-
Notifications
You must be signed in to change notification settings - Fork 547
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
Support for wasm32-wasi #352
Comments
In what way exactly is wasm32-wasi not supported? |
The clock APIs (dates and co.) are directly supported through syscalls / libc on WASI unlike with wasm32-unknown-unknown. In fact most of Rust‘s std even fully works. iirc chrono‘s clock feature does not work on WASI because the time crate doesn‘t know about WASI, so it handles it the same way as the normal unknown target. |
This is what I'm doing as a workaround: https://github.com/LiveSplit/livesplit-core/blob/2057b3a3828bd0a2469d96b1f9713bf3f9a2e23b/src/platform/wasm/wasi/mod.rs#L9-L17 Basically since SystemTime in std works, you can just get the unix timestamp and thus a DateTime from there. |
Interesting. I'll try and set up a wasm-wasi test or definitely accept a PR adding one, and then we can flip some cfg flags to make this all work. |
if you (or anyone) wants to work on this feel free to assign it to yourself! I'll assign to myself when I start work, which probably won't be this week. |
I can try working on this; it's relevant to a project I'm working on. |
There are a few more things before we actually want this to be closed:
Anyone should feel free to assign this to themselves and start working on either part of that! |
We have support for |
It seems like wasm32-wasi isn't supported, but could very easily be supported by chrono (although I don't quite know what the situation with the time crate is nowadays).
The text was updated successfully, but these errors were encountered: