Open d3bgger opened 2 months ago
Cargo.toml
[package] name = "rust-polars-wasm" version = "0.1.0" authors = [""] edition = "2018" [lib] crate-type = ["cdylib", "rlib"] [dependencies] wasm-bindgen = "0.2.84" [dependencies.polars] version = "*" default-features = false features = [ "lazy", "streaming", "csv", ] [profile.release] opt-level = "s"
src/lib.rs
use polars::prelude::*; use wasm_bindgen::prelude::*; #[wasm_bindgen(start)] fn main() -> Result<(), JsValue> { Ok(()) }
warning: lz4-sys@1.10.0: liblz4/lib/lz4.c:222:11: fatal error: 'stdlib.h' file not found warning: lz4-sys@1.10.0: 222 | # include <stdlib.h> /* malloc, calloc, free */ liblz4/lib/lz4frame.c:88:10: fatal error: 'string.h' file not found cargo:warning= 88 | #include <string.h> /* memset, memcpy, memmove */ In file included from liblz4/lib/lz4hc.c:66: cargo:warning=liblz4/lib/lz4.c:222:11: fatal error: 'stdlib.h' file not found cargo:warning= 222 | # include <stdlib.h> /* malloc, calloc, free */ liblz4/lib/xxhash.c:107:10: fatal error: 'stdlib.h' file not found cargo:warning= 107 | #include <stdlib.h>
When adding "lazy" and "streaming" features and building with wasm-pack build --target web the build fails.
wasm-pack build --target web
If these two features are not both added, but use one or the other, the build is successful.
As I understand, the root cause is that C is not supported (yet) for wasm32-unknown-unknown https://github.com/rustwasm/team/issues/291
wasm32-unknown-unknown
But can I opt out of needing lz4 at all, since I don't use compression?
Checks
Reproducible example
Cargo.toml
src/lib.rs
Log output
Issue description
When adding "lazy" and "streaming" features and building with
wasm-pack build --target web
the build fails.If these two features are not both added, but use one or the other, the build is successful.