Skip to content

Allow time implementation for wasm32-unknown-unknown #4302

@lastmjs

Description

@lastmjs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions