ogxd / gxhash

The fastest hashing algorithm 📈
https://docs.rs/gxhash
MIT License
766 stars 26 forks source link

Fix docs.rs build #72

Closed notsatvrn closed 4 months ago

notsatvrn commented 4 months ago

docs.rs build should work properly with this change.

Got sidetracked and eventually forgot about this project but I'd like to come back to this and finish my runtime CPU feature checking & software AES implementations. Hopefully I'll have an update on those soon.

ogxd commented 4 months ago

Hi @notsatvrn !

About the fallback, FYI there is a MR in progress that changes the build conditions. It might simplify the implementation of the fallback a bit https://github.com/ogxd/gxhash/issues/69

It should also fix the doc.rs build

ogxd commented 4 months ago

I've merged this commit https://github.com/ogxd/gxhash/commit/b85cfb9b158aa8d818d22d4903e34d2a4a1d4f78 which simplifies the build checks but also adds a RUSTDOCFLAGS to .cargo/config.toml. https://github.com/ogxd/gxhash/blob/5a23285e3ede7166db90c0ede26a4d06cc8d8ac7/.cargo/config.toml#L3

I seems now doctest no longer fails :) Let me know if you still see issues! (I haven't published the crate yet to crates.io)

EDIT: Still not building... https://docs.rs/crate/gxhash/3.3.0/builds/1232296

ogxd commented 4 months ago

I finally got it working https://docs.rs/crate/gxhash/latest 🥳

The trick was to used the docrs cfg to bypass the target_feature checks

https://github.com/ogxd/gxhash/blob/97efe401edbfb6cedebb7db58a5e854c6b1e4dfc/src/gxhash/platform/x86.rs#L1

Closing this pull request. Let me know if I can help on the AES fallback 😃