Known Issues
This section informs you about known "gotchas". Keep in mind, that this section is (and always will be) incomplete. For suggestions and amendments, feel free to contribute to this guide.
Target Features
Most target-feature problems arise, when mixing code that have the target-feature enabled with code that have it disabled. If you want to avoid undefined behavior, it is recommended to build all code (including the standard library and imported crates) with a common set of target-features.
By default, compiling your code with the -C target-feature flag will not recompile the entire standard library and/or imported crates with matching target features. Therefore, target features are generally considered as unsafe. Using #[target_feature] on individual functions makes the function unsafe.
Examples:
| Target-Feature | Issue | Seen on | Description | Details | 
|---|---|---|---|---|
| +soft-floatand -sse | Segfaults and ABI mismatches | x86andx86-64 | The x86andx86_64architecture uses SSE registers (akaxmm) for floating point operations. Using software emulated floats ("soft-floats") disables usage ofxmmregisters, but parts of Rust's core libraries (e.g.std::f32orstd::f64) are compiled without soft-floats and expect parameters to be passed inxmmregisters. This leads to ABI mismatches.Attempting to compile with disabled SSE causes the same error, too. | #63466 |