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

Expose to WASM #11

Open
bitner opened this issue Jul 29, 2024 · 4 comments
Open

Expose to WASM #11

bitner opened this issue Jul 29, 2024 · 4 comments

Comments

@bitner
Copy link
Contributor

bitner commented Jul 29, 2024

No description provided.

@gadomski gadomski added this to the v0.2 milestone Oct 8, 2024
@gadomski
Copy link
Collaborator

gadomski commented Oct 9, 2024

I think this is currently blocked by santhosh-tekuri/boon#23 — I'm not "smart" on WASM, but when I checked wasm32-unknown-emscripten in cql2, I got:

$ cargo check --target wasm32-unknown-emscripten
--- >8 ---
    Checking boon v0.6.0
error[E0432]: unresolved import `loader::FileLoader`
   --> /Users/gadomski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/boon-0.6.0/src/lib.rs:121:14
    |
121 |     loader::{FileLoader, SchemeUrlLoader, UrlLoader},
    |              ^^^^^^^^^^
    |              |
    |              no `FileLoader` in `loader`
    |              help: a similar name exists in the module: `UrlLoader`
    |
note: found an item that was configured out
   --> /Users/gadomski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/boon-0.6.0/src/loader.rs:31:12
    |
31  | pub struct FileLoader;
    |            ^^^^^^^^^^
note: the item is gated here
   --> /Users/gadomski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/boon-0.6.0/src/loader.rs:30:1
    |
30  | #[cfg(not(target_arch = "wasm32"))]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0432`.
error: could not compile `boon` (lib) due to 1 previous error

@kylebarron
Copy link
Member

You should compile to wasm32-unknown-unknown. That's the primary supported browser webassembly target for Rust

@gadomski
Copy link
Collaborator

gadomski commented Oct 9, 2024

You should compile to wasm32-unknown-unknown.

Yup good point, I'll be sure to target that when we can build out. I tried that first and ended up with a transitive dependency yelling at me, so that will take unpicking once boon is fixed:

error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the "js" feature. For more information see: https://docs.rs/getrandom/#webassembly-support
   --> /Users/gadomski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.15/src/lib.rs:342:9
    |
342 | /         compile_error!("the wasm*-unknown-unknown targets are not supported by \
343 | |                         default, you may need to enable the \"js\" feature. \
344 | |                         For more information see: \
345 | |                         https://docs.rs/getrandom/#webassembly-support");
    | |________________________________________________________________________^

Imma remove this from the v0.2 milestone b/c we don't know how responsive the boon folks will be.

@gadomski gadomski removed this from the v0.2 milestone Oct 9, 2024
@kylebarron
Copy link
Member

Well, fwiw that's a one-line change to fix that error https://github.com/kylebarron/parquet-wasm/blob/7ea19b91b9d026da19cb9aacc60c0befd6ce355b/Cargo.toml#L61

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

3 participants