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
Is that possible to support wasm? I know currently libc crate doesn't support wasm yet (rust-lang/libc#1126), but since this crate only used limited number of c types (c_char, c_int and etc.). Replace them with Rust types like i8, i32 and etc, could be a possible temporary solution.
Any thoughts?
The text was updated successfully, but these errors were encountered:
This would be possible at the cost of platform independency. See #36 for example.
Additionally, when I last tried wasm with Rust months ago, crates required ![no_std] to properly work. lz4-sys is no_std but lz4 uses collections and IO traits.
I just looked it up and I think wasm does not requireno_std, but a lot of libstd is simply unsupported.
For your specific problem, I'ld suggest doing one of two things:
Wait, until libc supports wasm
Refactor this crate locally and hard-code the types. I think I could guide you through that, if want to go this route.
This crate needs some tidying up anyways, so I think, I'll note wasm support for a future lz4 2.0, where I am going to add stream mode and refactor the API to match alexcrichton's flate2
Is that possible to support wasm? I know currently
libc
crate doesn't support wasm yet (rust-lang/libc#1126), but since this crate only used limited number of c types (c_char, c_int and etc.). Replace them with Rust types like i8, i32 and etc, could be a possible temporary solution.Any thoughts?
The text was updated successfully, but these errors were encountered: