SoftbearStudios / bitcode

A binary encoder/decoder for Rust
https://crates.io/crates/bitcode/
MIT License
376 stars 19 forks source link

Possible to remove dependency on `bitintr` crate? #17

Closed djkoloski closed 9 months ago

djkoloski commented 9 months ago

bitcode no longer compiles on the latest nightlies because it depends on bitintr which uses the (now removed) stdsimd feature. I filed an issue for bitintr detailing the issue. It looks like that crate hasn't been updated in a while, maybe it's worth removing the dependency altogether?

finnbear commented 9 months ago

Thank you for reporting this!

Here is a workaround you can apply immediately while we decide what to do in the long term:

# insert somewhere in your Cargo.toml
[patch.crates-io]
bitintr = { git = "https://github.com/finnbear/bitintr", branch = "remove_nightly" }

(the branch I made has one commit to remove nightly issues)

caibear commented 9 months ago

bitcode uses bitintr for PDEP/PEXT x86 instructions to make #[bitcode_hint(ascii)] decoding/encoding about 2x faster. We could remove the bitintr dependency and have worse performance or remove #[bitcode_hint(ascii)] all together since it may not be that useful.

finnbear commented 9 months ago

We removed bitintr in bitcode@0.5.1, as you suggested, with a 2X performance hit for #[bitcode_hint(ascii)].