You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WorkerOptions is missing "pub fn type()", this prevents Workers from using modules.
This is a significant issue in allowing developers to work with Workers when using rustwasm.
Proposed Solution
The solution is quite simple and shouldn't involve much.
The current web_sys implementation just needs to be updated to the current MDN spec (see "options").
The implementation would be similar to "name" which already exists, but for the property "type" instead.
The "type" could be defined the same way BlobPropertyBag's type parameter is for example.
There' is also the parameters "credentials" that may be added also.
Alternatives
None
Additional Context
This feature is quite crucial in multi-threaded rustwasm applications using Workers bootstrapped within Rust.
The text was updated successfully, but these errors were encountered:
I would like to run wasm in a Worker, but I need a WorkerOptions type: "module"
I created a new project with wasm-pack.
I cloned wasm-bindgen
but when I change the default to a path
wasm-bindgen = { path = "/home/ubuntu/wasm-bindgen", version = "0.2.75" }
Updating crates.io index
error: failed to select a version for `wasm-bindgen-shared`.
... required by package `wasm-bindgen-macro-support v0.2.75`
... which is depended on by `wasm-bindgen-macro v0.2.75`
... which is depended on by `wasm-bindgen v0.2.75`
... which is depended on by `js-sys v0.3.52`
... which is depended on by `wasm-bindgen-futures v0.4.25`
... which is depended on by `wasm-bindgen-test v0.3.25`
... which is depended on by `webtst v0.1.0 (/home/ubuntu/webtst)`
versions that meet the requirements `=0.2.75` are: 0.2.75
the package `wasm-bindgen-shared` links to the native library `wasm_bindgen`, but it conflicts with a previous package which links to `wasm_bindgen` as well:
package `wasm-bindgen-shared v0.2.75 (/home/ubuntu/wasm-bindgen/crates/shared)`
... which is depended on by `wasm-bindgen-backend v0.2.75 (/home/ubuntu/wasm-bindgen/crates/backend)`
... which is depended on by `wasm-bindgen-macro-support v0.2.75 (/home/ubuntu/wasm-bindgen/crates/macro-support)`
... which is depended on by `wasm-bindgen-macro v0.2.75 (/home/ubuntu/wasm-bindgen/crates/macro)`
... which is depended on by `wasm-bindgen v0.2.75 (/home/ubuntu/wasm-bindgen)`
... which is depended on by `webtst v0.1.0 (/home/ubuntu/webtst)`
failed to select a version for `wasm-bindgen-shared` which could resolve this conflict
ubuntu@sysdyn:~/webtst$
I am willing to create a PR for this, I really need "type" as a WorkerPptions
Motivation
WorkerOptions is missing "pub fn type()", this prevents Workers from using modules.
This is a significant issue in allowing developers to work with Workers when using rustwasm.
Proposed Solution
The solution is quite simple and shouldn't involve much.
The current web_sys implementation just needs to be updated to the current MDN spec (see "options").
The implementation would be similar to "name" which already exists, but for the property "type" instead.
The "type" could be defined the same way BlobPropertyBag's type parameter is for example.
There' is also the parameters "credentials" that may be added also.
Alternatives
None
Additional Context
This feature is quite crucial in multi-threaded rustwasm applications using Workers bootstrapped within Rust.
The text was updated successfully, but these errors were encountered: