-
Notifications
You must be signed in to change notification settings - Fork 543
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
Update CI test for wasm32-unknown-unknown to enable wasmbind feature #746
Conversation
.github/workflows/test.yml
Outdated
@@ -6,6 +6,7 @@ on: | |||
pull_request: | |||
branches: [main] | |||
paths: | |||
- ".ci/**" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hah, good call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking of removing branches: [main]
as well, that way PR's to PR's will also run CI which would be great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! In a separate commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep - just squashing them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant, would be good to have the test.yml
changes in a separate commit from the Cargo.toml
changes since they're conceptually independent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, will push up two separate commits
6e2a859
to
40519df
Compare
Also I think we'll no longer need @AmateurECE's original commit as part of this PR, right? |
8da3baf
to
d20c344
Compare
no longer require wasmbind feature to get js-sys on wasm32-unknown-unknown target fix comment and remove wasmbind feature from tests add wasi test add wasi test
d20c344
to
de695ab
Compare
I initially thought we still needed, but then I saw the inconsistency between the |
Hey, now that the wasm-bindgen is in the dependency tree and it is not possible to remove that from wasm targets, it adds a bunch of wasm_bindgen imports that runtimes like wasmtime and wasmer don't provide. Is it ok if I create a PR adding a feature_flag that is off by default that we can use to disable wasm_bingen from being installed? RIght now I am having difficulties in using chrono crate with wasmtime. In chrono = 0.4.19 I didnt have that issue |
@morenol - this PR was to fix #740 where there is essentially a discoverability problem, however it is not ideal that we have broken your use case. If I'm understanding you correctly, you are proposing to have a feature which disables wasm-bindgen, but this might break the additive nature of features. Instead, it may be possible to make those two dependencies optional and add wasmbind to the default features (and include wasm-bindgen and js-sys in wasmbind feature)? Also to note, because the features would be additive, if any of your dependencies used the wasmbind feature, then you would get those crates in your tree as well. Is this preventing you from using chrono with wasmtime, eg compile error or runtime error - or is this more of an efficiency concern? |
This is preventing me from using chrono with wasmtime. The solution that you propose would also work, the thing that I need is to disable wasm-bindgen from the dependency tree. The issue that I am having is that when wasm-bindgen is in the dependency tree, it injects some imports that are intended for JavaScripts hosts. Just as a reference, this is the specific line in wasmtime that is returing an error: |
This sounds good to me. |
@morenol - are you using the target |
wasm32-unknown-unknown, I am able to compile without issues, the problem arises when trying to instanciate the module in wasmtime |
I've set up #771 allow this. Do you mind checking whether it works for you? I might need to make a few more changes. We can continue the conversation over there |
Testing whether this triggers the CI