Skip to content

Allow time implementation for wasm32-unknown-unknown #4302

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

Open
lastmjs opened this issue Dec 1, 2022 · 0 comments
Open

Allow time implementation for wasm32-unknown-unknown #4302

lastmjs opened this issue Dec 1, 2022 · 0 comments
Labels

Comments

@lastmjs
Copy link

lastmjs commented Dec 1, 2022

We are operating in a strict wasm32-unknown-unknown environment, but we do have a system API that provides the current nanoseconds. We would like to somehow hook up our time API into RustPython so that modules like time and datetime work properly.

In our own fork of RustPython, I've modified https://github.com/RustPython/RustPython/blob/main/vm/src/stdlib/time.rs in various places to remove any dependence on system time as an attempt to provide a blanket source of time for all time functionality.

You can see some of our changes here: demergent-labs@7439d7b and here: demergent-labs@eea609f

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

No branches or pull requests

2 participants