idanarye / rust-typed-builder

Compile-time type-checked builder derive
https://crates.io/crates/typed-builder
Apache License 2.0
904 stars 52 forks source link

Add no_std compatibility #102

Closed andreafioraldi closed 1 year ago

andreafioraldi commented 1 year ago

Thanks for the effort in maintaining Typed Builder.

Our framework LibAFL is using Typed Builder in a no_std context and the recent update to 0.15.0 is breaking our library on bare metal targets.

In this PR, I introduce no_std compatibility. There is no downside, just an annotation and an import from core.

If you want to test it, use cargo +nightly build -Zbuild-std=core --target aarch64-unknown-none (you may want it in the CI script eventually).

idanarye commented 1 year ago

There were already nostd tests. Maybe the CI does not run them?