Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/cranelift/codegen/Cargo.toml
3070 views
1
[package]
2
authors = ["The Cranelift Project Developers"]
3
name = "cranelift-codegen"
4
version = "0.130.0"
5
description = "Low-level code generator library"
6
license = "Apache-2.0 WITH LLVM-exception"
7
documentation = "https://docs.rs/cranelift-codegen"
8
repository = "https://github.com/bytecodealliance/wasmtime"
9
categories = ["no-std"]
10
readme = "README.md"
11
keywords = ["compile", "compiler", "jit"]
12
build = "build.rs"
13
edition.workspace = true
14
rust-version.workspace = true
15
16
[lints]
17
workspace = true
18
19
[package.metadata.docs.rs]
20
# Ask Cargo to build docs with the feature `all-arch`
21
features = ["all-arch"]
22
23
[dependencies]
24
anyhow = { workspace = true, optional = true, features = ['std'] }
25
bumpalo = "3"
26
capstone = { workspace = true, optional = true }
27
cranelift-assembler-x64 = { workspace = true }
28
cranelift-codegen-shared = { path = "./shared", version = "0.130.0" }
29
cranelift-entity = { workspace = true }
30
cranelift-bforest = { workspace = true }
31
cranelift-bitset = { workspace = true }
32
cranelift-control = { workspace = true }
33
hashbrown = { workspace = true, features = ["default-hasher"] }
34
target-lexicon = { workspace = true }
35
log = { workspace = true }
36
serde = { workspace = true, optional = true }
37
serde_derive = { workspace = true, optional = true }
38
pulley-interpreter = { workspace = true, optional = true }
39
postcard = { workspace = true, optional = true }
40
gimli = { workspace = true, features = ["write"], optional = true }
41
smallvec = { workspace = true }
42
regalloc2 = { workspace = true, features = ["checker"] }
43
souper-ir = { version = "2.1.0", optional = true }
44
sha2 = { version = "0.10.2", optional = true }
45
rustc-hash = { workspace = true }
46
wasmtime-core = { workspace = true }
47
libm = { workspace = true }
48
# It is a goal of the cranelift-codegen crate to have minimal external dependencies.
49
# Please don't add any unless they are essential to the task of creating binary
50
# machine code. Integration tests that need external dependencies can be
51
# accommodated in `tests`.
52
53
[dev-dependencies]
54
criterion = { workspace = true }
55
similar = "2.1.0"
56
env_logger = { workspace = true }
57
proptest = { workspace = true }
58
59
[build-dependencies]
60
cranelift-codegen-meta = { path = "meta", version = "0.130.0" }
61
cranelift-isle = { path = "../isle/isle", version = "=0.130.0" }
62
63
[features]
64
default = ["std", "unwind", "host-arch", "timing"]
65
66
# The "std" feature enables use of libstd. The "core" feature enables use
67
# of some minimal std-like replacement libraries. At least one of these two
68
# features need to be enabled.
69
std = ["serde?/std", "rustc-hash/std", "gimli/std", "cranelift-control/fuzz"]
70
71
# The "core" feature used to enable a hashmap workaround, but is now
72
# deprecated (we (i) always use hashbrown, and (ii) don't support a
73
# no_std build anymore). The feature remains for backward
74
# compatibility as a no-op.
75
core = []
76
77
# Enable the `to_capstone` method on TargetIsa, for constructing a Capstone
78
# context, and the `disassemble` method on `MachBufferFinalized`.
79
disas = ["anyhow", "capstone"]
80
81
# Enables detailed logging which can be somewhat expensive.
82
trace-log = ["regalloc2/trace-log"]
83
84
# By default, an ISLE term is compiled into a single Rust function, but it can be
85
# significantly inefficient for large terms (e.g. `simplify` with hundreds of rules).
86
# This is because the generated Rust code for such terms is large, and `rustc` takes quadratically longer to compile huge functions.
87
# This feature splits large match arms in such ISLE terms into closures, for compiling ISLE terms more efficiently.
88
# However, this can degrade Cranelift compilation times, introducing ABI boundaries between the closures.
89
# Therefore, we recommend enabling this feature only for debugging/development purposes.
90
isle-split-match = []
91
92
# This enables unwind info generation functionality.
93
unwind = ["gimli"]
94
95
# ISA targets for which we should build.
96
# If no ISA targets are explicitly enabled, the ISA target for the host machine is enabled.
97
x86 = []
98
arm64 = []
99
s390x = []
100
riscv64 = []
101
pulley = [
102
"dep:pulley-interpreter",
103
"pulley-interpreter/encode",
104
"pulley-interpreter/disas",
105
"cranelift-codegen-meta/pulley",
106
]
107
# Enable the ISA target for the host machine
108
host-arch = []
109
110
# Option to enable all architectures.
111
all-arch = ["all-native-arch", "pulley"]
112
113
# Option to enable all architectures that correspond to an actual native target
114
# (that is, exclude Pulley).
115
all-native-arch = ["x86", "arm64", "s390x", "riscv64"]
116
117
# For dependent crates that want to serialize some parts of cranelift
118
enable-serde = [
119
"serde",
120
"serde_derive",
121
"cranelift-entity/enable-serde",
122
"cranelift-bitset/enable-serde",
123
"regalloc2/enable-serde",
124
"smallvec/serde",
125
]
126
127
# Enable the incremental compilation cache for hot-reload use cases.
128
incremental-cache = ["enable-serde", "postcard", "sha2"]
129
130
# Enable support for the Souper harvester.
131
souper-harvest = ["souper-ir", "souper-ir/stringify"]
132
133
# Report any ISLE errors in pretty-printed style.
134
isle-errors = ["cranelift-isle/fancy-errors"]
135
136
# Enable tracking how long passes take in Cranelift.
137
#
138
# Enabled by default.
139
timing = []
140
141