The Wayback Machine - https://web.archive.org/web/20230310205252/https://github.com/RustPython/RustPython/issues/1849
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Incubate rust-native modules #1849

Open
youknowone opened this issue Apr 10, 2020 · 1 comment
Open

[RFC] Incubate rust-native modules #1849

youknowone opened this issue Apr 10, 2020 · 1 comment
Labels
RFC Request for comments

Comments

@youknowone
Copy link
Member

Summary

For some modules, having pure python module is easier than rust natve one. In that case, we probably still want to have rust version of that modules due to safety or performance.

Detailed Explanation

Drawbacks, Rationale, and Alternatives

Unresolved Questions

We need to decide:

  • What kind of modules need to be rust native even though there are pure python implementations.
  • How would we manage both version of python and rust modules at same time (at least for a while until it matures)

Technical support for testing both module with same test script would be great to manage the quality of incubating modules.

@youknowone youknowone added the RFC Request for comments label Apr 10, 2020
@ep12
Copy link

ep12 commented Apr 12, 2020

Maybe a simple solution for one or more Python implementations would be the following procedure:

  • a list of all modules (names) implemented in Rust
  • a typing.Dict[str, typing.Set[str]] of module names and module root directories (set is useful to test multiple different python implementations if ever needed (mostly for extensibility, I guess).
  • for every combination of modules, create a Lib directory with symlinks to the required module implementation root directories.
  • run the tests with RUSTPYTHONPATH set

Note: This only works if the modules in a Lib dir are preferred over built-in modules written in Rust. I don't know details like this about RustPython.

If that is the case, I could write a short python script to demonstrate the procedure above to make things clearer. Code says more than thousand words...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request for comments
Projects
None yet
Development

No branches or pull requests

2 participants