1[package]
2authors = ["Jorge Aparicio <japaricious@gmail.com>"]
3name = "compiler_builtins"
4version = "0.1.160"
5license = "MIT AND Apache-2.0 WITH LLVM-exception AND (MIT OR Apache-2.0)"
6readme = "README.md"
7repository = "https://github.com/rust-lang/compiler-builtins"
8homepage = "https://github.com/rust-lang/compiler-builtins"
9documentation = "https://docs.rs/compiler_builtins"
10edition = "2024"
11description = "Compiler intrinsics used by the Rust compiler."
12links = "compiler-rt"
13
14[lib]
15bench = false
16doctest = false
17test = false
18
19[dependencies]
20core = { path = "../../core", optional = true }
21
22[build-dependencies]
23cc = { optional = true, version = "1.2" }
24
25[features]
26default = ["compiler-builtins"]
27
28# Enable compilation of C code in compiler-rt, filling in some more optimized
29# implementations and also filling in unimplemented intrinsics
30c = ["dep:cc"]
31
32# Workaround for the Cranelift codegen backend. Disables any implementations
33# which use inline assembly and fall back to pure Rust versions (if available).
34no-asm = []
35
36# Workaround for codegen backends which haven't yet implemented `f16` and
37# `f128` support. Disabled any intrinsics which use those types.
38no-f16-f128 = []
39
40# Flag this library as the unstable compiler-builtins lib
41compiler-builtins = []
42
43# Generate memory-related intrinsics like memcpy
44mem = []
45
46# Mangle all names so this can be linked in with other versions or other
47# compiler-rt implementations. Also used for testing
48mangled-names = []
49
50# Only used in the compiler's build system
51rustc-dep-of-std = ["compiler-builtins", "dep:core"]
52
53# This makes certain traits and function specializations public that
54# are not normally public but are required by the `builtins-test`
55unstable-public-internals = []
56
57[lints.rust]
58# The cygwin config can be dropped after our benchmark toolchain is bumped
59unexpected_cfgs = { level = "warn", check-cfg = ['cfg(bootstrap)', 'cfg(target_os, values("cygwin"))'] }
60