rojo-rbx / rbx-dom

Roblox DOM and (de)serialization implementation in Rust
MIT License
107 stars 42 forks source link

rbx_binary: Replace C-binding crate `lz4` with a native Rust LZ4 Library #255

Open jmkd3v opened 1 year ago

jmkd3v commented 1 year ago

This one library has been a blocker in building rbx_binary for WebAssembly.

Dekkonot commented 1 year ago

I would love to support this use-case but it does lead us to a weird spot with support for ZSTD suppression. There doesn't exist, as far as I know, a native implementation of ZSTD for Rust. This means that any support we add for it would cause the same problem because of their C-binding. We could lock ZSTD support behind a feature (which is probably a good idea anyway given most people won't need it) but that's only something we need to consider if we switch to using e.g. lz4_flex over lz4.

If we were to switch to using a non-C implementation for LZ4 decoding, what other blockers if any would exist?