blob: 521129d92d28638c80e147442da7821927be842c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# This is the root Cargo [workspace](https://doc.rust-lang.org/cargo/reference/workspaces.html)
# and the root package for all the rust code that are statically linked into ruby. Rust tooling
# limitations means all Rust code need to share a single archive library (staticlib) at the
# integration point with non-rust code. (See rustlang/rust#44322 and #104707 for a taste of
# the linking challenges.)
#
# Do not add required dependencies. This is a policy that helps downstream consumers and give
# us tight control over what we ship. All of the optional dependencies are used exclusively
# during development.
#
# Release builds avoid Cargo entirely because offline builds can fail even when none of the
# optional dependencies are built (rust-lang/cargo#10352).
[workspace]
members = ["zjit", "yjit", "jit"]
[package]
name = "ruby"
version = "0.0.0"
edition = "2024"
rust-version = "1.85.0"
publish = false # Don't publish to crates.io
[dependencies]
yjit = { path = "yjit", optional = true }
zjit = { path = "zjit", optional = true }
[lib]
crate-type = ["staticlib"]
path = "ruby.rs"
[features]
disasm = ["yjit?/disasm", "zjit?/disasm"]
runtime_checks = ["yjit?/runtime_checks", "zjit?/runtime_checks"]
yjit = [ "dep:yjit" ]
zjit = [ "dep:zjit" ]
[profile.dev]
opt-level = 0
debug = true
debug-assertions = true
overflow-checks = true
[profile.dev_nodebug]
inherits = "dev"
[profile.stats]
inherits = "release"
[profile.release]
# NOTE: --enable-yjit and zjit builds use `rustc` without going through Cargo. You
# might want to update the `rustc` invocation if you change this profile.
opt-level = 3
# The extra robustness that comes from checking for arithmetic overflow is
# worth the performance cost for the compiler.
overflow-checks = true
# Generate debug info
debug = true
# Use ThinLTO. Much smaller output for a small amount of build time increase.
lto = "thin"
|