File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,19 @@ when not inlined it's pointer compatible with `String`, meaning that you can saf
2424if it had never been a ` SmartString ` . (But please don't do that, there's an ` Into<String> `
2525implementation that's much safer.)
2626
27+ ## Supported architectures
28+ ` smartstring ` currently doesn't build on 32-bit big endian architectures like ` powerpc ` , so its use
29+ in any crates that intend to run on those architectures should ideally be gated behind a
30+ [ platform specific dependency] ( https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies )
31+ in your ` Cargo.toml ` , like so:
32+ ``` toml
33+ [target .'cfg(not(all(target_endian = "big", target_pointer_width = "32")))' .dependencies ]
34+ smartstring = " 0.2"
35+ ```
36+
37+ This will ensure that ` cargo ` does not try to build ` smartstring ` on these unsupported
38+ architectures, which will otherwise [ always fail] ( https://github.com/bodil/smartstring/blob/v0.2.9/src/config.rs#L91-L93 ) .
39+
2740## Caveat
2841
2942The way ` smartstring ` gets by without a discriminant is dependent on the memory layout of the
You can’t perform that action at this time.
0 commit comments