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

now exposed when neither wasm-bindgen or stdweb are available #31

Open
dodomorandi opened this issue Jan 7, 2021 · 1 comment
Open

Comments

@dodomorandi
Copy link

dodomorandi commented Jan 7, 2021

When neither wasm-bindgen or stdweb features are used, the now function exposes a foreign now function, explicitly making it safe.

This behavior produces the effect that the FFI now is exposed even if wasm::now is never called, just because it is extern "C". Unfortunately, this causes some unexpected issues in other crates. I propose to remove wasm::now if no valid features are available, even if I understand that this is a breaking change.

Another possible solution is to change the behavior of the features in order to activate wasm-bindgen by default if the target is wasm32-unknown-unknown and stdweb is not specified.

I am very open to discussion, even because the rationale behind blindly using an extern now function is not clear to me. If you want I will be happy to open a PR when I have a clearer idea of what's the best thing that could be done.

@repi
Copy link

repi commented Mar 6, 2021

We've run into this as well, from the usage of this crate by parking_lot. That higher level issue is also tracked in Amanieu/parking_lot#269

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

No branches or pull requests

2 participants