Closed sevenc-nanashi closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 91.82%. Comparing base (
d91b7d4
) to head (e466a30
). Report is 12 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I don't find this PR convincing. The crate you're advocating we start depending on:
I don't think that's a stable base for us to build on.
Apart from that I'd like to hear a rationale for adding an emscripten target, which I think has been superseded in most use cases by wasm32-unknown-unknown and WASI.
Thank you for working on this!
@ALEX11BR As the author of emscripten-functions would you be willing to comment on if this is the right direction for chrono on emscripten?
Looks mostly OK to me.
I had a remark to make with regards to the use of run_script
functions where direct bindings to the used JS functions are available.
@sevenc-nanashi Sorry for the wait. Could you reply to the concerns of @djc? They match my concerns on discord.
I know little about the current status of emscripten. Stdweb seems to be no more, and emscripten-functions
is a crate that doesn't see much use yet.
Oops, sorry for the late reply.
(Disclaimer: I'm not native speaker of english, so I might use some bad language...)
In most cases, using wasm-pack (wasn32-unknown-unknown) or wasi is enough to build a new software. But emscripten has a big advantage: it can compile C source (in other words, crates using cc can work with emscripten) I used emscripten to port the software written in Rust. (It's just my opinion: Isn't it so fascinating that some software written in Rust runs on browser?)
I don't care about closing this PR as lack of use cases.
How hard would it be to link to emscripten_run_script_string
directly?
Hmm. Cargo requires that there is at most one crate that links to a C library. So a project using stdweb is incompatible with emscripten-functions, and either would become incompatible with chrono if we link directly.
emscripten_run_script_string
directly?
It shouldn't be so hard I guess.
Unfortunately because of the state of the wasm32-unknown-emscripten
target I think it is best not to merge this PR for now 😞. Thank you for all your efforts @sevenc-nanashi!
I added support for wasm32-unknown-emscripten. With this PR, chrono will get timezone support.