Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/cranelift/codegen/Cargo.toml
1690 views
1
[package]
2
authors = ["The Cranelift Project Developers"]
3
name = "cranelift-codegen"
4
version = "0.125.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.125.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 }
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", "std"], 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-math = { workspace = true }
47
# It is a goal of the cranelift-codegen crate to have minimal external dependencies.
48
# Please don't add any unless they are essential to the task of creating binary
49
# machine code. Integration tests that need external dependencies can be
50
# accommodated in `tests`.
51
52
[dev-dependencies]
53
criterion = { workspace = true }
54
similar = "2.1.0"
55
env_logger = { workspace = true }
56
proptest = { workspace = true }
57
58
[build-dependencies]
59
cranelift-codegen-meta = { path = "meta", version = "0.125.0" }
60
cranelift-isle = { path = "../isle/isle", version = "=0.125.0" }
61
62
[features]
63
default = ["std", "unwind", "host-arch", "timing"]
64
65
# The "std" feature enables use of libstd. The "core" feature enables use
66
# of some minimal std-like replacement libraries. At least one of these two
67
# features need to be enabled.
68
std = ["serde?/std"]
69
70
# The "core" feature used to enable a hashmap workaround, but is now
71
# deprecated (we (i) always use hashbrown, and (ii) don't support a
72
# no_std build anymore). The feature remains for backward
73
# compatibility as a no-op.
74
core = []
75
76
# Enable the `to_capstone` method on TargetIsa, for constructing a Capstone
77
# context, and the `disassemble` method on `MachBufferFinalized`.
78
disas = ["anyhow", "capstone"]
79
80
# Enables detailed logging which can be somewhat expensive.
81
trace-log = ["regalloc2/trace-log"]
82
83
# This enables unwind info generation functionality.
84
unwind = ["gimli"]
85
86
# ISA targets for which we should build.
87
# If no ISA targets are explicitly enabled, the ISA target for the host machine is enabled.
88
x86 = []
89
arm64 = []
90
s390x = []
91
riscv64 = []
92
pulley = [
93
"dep:pulley-interpreter",
94
"pulley-interpreter/encode",
95
"pulley-interpreter/disas",
96
"cranelift-codegen-meta/pulley",
97
]
98
# Enable the ISA target for the host machine
99
host-arch = []
100
101
# Option to enable all architectures.
102
all-arch = ["all-native-arch", "pulley"]
103
104
# Option to enable all architectures that correspond to an actual native target
105
# (that is, exclude Pulley).
106
all-native-arch = ["x86", "arm64", "s390x", "riscv64"]
107
108
# For dependent crates that want to serialize some parts of cranelift
109
enable-serde = [
110
"serde",
111
"serde_derive",
112
"cranelift-entity/enable-serde",
113
"cranelift-bitset/enable-serde",
114
"regalloc2/enable-serde",
115
"smallvec/serde",
116
]
117
118
# Enable the incremental compilation cache for hot-reload use cases.
119
incremental-cache = ["enable-serde", "postcard", "sha2"]
120
121
# Enable support for the Souper harvester.
122
souper-harvest = ["souper-ir", "souper-ir/stringify"]
123
124
# Report any ISLE errors in pretty-printed style.
125
isle-errors = ["cranelift-isle/fancy-errors"]
126
127
# Enable tracking how long passes take in Cranelift.
128
#
129
# Enabled by default.
130
timing = []
131
132