diff options
Diffstat (limited to 'Cargo.toml')
| -rw-r--r-- | Cargo.toml | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/Cargo.toml b/Cargo.toml index 3f373fdace..33010e65fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,21 @@ -# Using Cargo's workspace feature to build all the Rust code in -# into a single package. -# TODO(alan) notes about rust version requirements. Undecided yet. +# 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"] +members = ["zjit", "yjit", "jit"] [package] -name = "jit" +name = "ruby" version = "0.0.0" edition = "2024" rust-version = "1.85.0" @@ -18,7 +27,7 @@ zjit = { path = "zjit", optional = true } [lib] crate-type = ["staticlib"] -path = "jit.rs" +path = "ruby.rs" [features] disasm = ["yjit?/disasm", "zjit?/disasm"] @@ -27,11 +36,15 @@ yjit = [ "dep:yjit" ] zjit = [ "dep:zjit" ] [profile.dev] -opt-level = 0 +opt-level = 1 # On 0, functions use so much stack space that we get stray `SystemStackError`s debug = true debug-assertions = true overflow-checks = true +[profile.test] +inherits = "dev" +opt-level = 0 + [profile.dev_nodebug] inherits = "dev" |
