The owner asked for a nightly toolchain, -Zthreads, kache 2.0 with its incremental cache, and Rust's incremental compilation on. - rust-toolchain.toml pins nightly-2026-11-03 (rustc 1.101.0-nightly 1c3a65069), dated so every machine runs one rustc, clippy and rustfmt. The published crates keep rust-version 1.98, which this build no longer checks by itself (clippy's incompatible_msrv still flags newer std items). - .cargo/config.toml passes -Zthreads=0 (a thread per core) through Cargo's profile rustflags, which add to RUSTFLAGS instead of being replaced by it, so `--cfg m2v_gpu` lanes and CI's -Dwarnings keep it. - scripts/rustc-wrapper hands each compile to kache where kache is on PATH outside CI, and to rustc otherwise; `RUSTC_WRAPPER=` (empty) builds without it. - CARGO_INCREMENTAL=0 is gone from scripts/device-lane, AGENTS.md and CONTRIBUTING.md. - CI installs the toolchain the file names; both Dockerfiles take the same nightly. What the nightly asked of the code: - Its standard library containers take more trait-solver levels (Box -> BoxRaw, RawVec -> PhantomData), so proving a RenderCommandEncoder `Send` from a program's crate ran past the default recursion limit (tests/consumer_auto_traits.rs failed, a future-incompat lint that will become an error). The encoder now holds its own lowering in `OwnLowering`, whose `Send` impl is written out over a compile-time proof that `RenderLowering` is `Send`, as `LoweringSlot` already was. The runtime crate's own proofs need recursion_limit 256. - New clippy lints: needless_range_loop, single_element_loop, new_instead_of_clear (a false positive on a moved-from Vec: the part's segments are now taken explicitly), needless_borrows_for_generic_args, redundant_closure, unnecessary_lazy_evaluations, manual_range_patterns; AtomicU64::fetch_update is deprecated for try_update (present in 1.98). - Cargo warns that `homepage` equals `repository`: homepage removed from the manifests. - nightly rustfmt formats ir_id! invocations one argument per line. Verified on the M3 Max: `cargo clippy --workspace --all-targets --all-features -- -D warnings` clean on the nightly; `cargo build -v` shows -Zthreads on every rustc invocation and scripts/rustc-wrapper in front of each.
57 lines
2.4 KiB
TOML
57 lines
2.4 KiB
TOML
[workspace]
|
|
members = [
|
|
"crates/metal2vulkan",
|
|
"crates/metal2vulkan-air",
|
|
"crates/metal2vulkan-conformance",
|
|
"crates/metal2vulkan-devtools",
|
|
"crates/metal2vulkan-runtime",
|
|
"crates/metal2vulkan-validation",
|
|
]
|
|
# A bare `cargo build`, `cargo test` or `cargo run` at the root acts on the translator alone, as it
|
|
# did when the translator's package was this manifest; `--workspace` or `-p` selects the others.
|
|
default-members = ["crates/metal2vulkan"]
|
|
resolver = "2"
|
|
|
|
# What every crate here shares. The translator's source fingerprint hashes this manifest beside its
|
|
# own, because the translator inherits from it (`build_support.rs`).
|
|
[workspace.package]
|
|
edition = "2021"
|
|
rust-version = "1.98"
|
|
license = "GPL-2.0-or-later OR LGPL-3.0-or-later"
|
|
authors = ["Anees Iqbal <hello@aneesiqbal.ai>"]
|
|
repository = "https://github.com/steelbrain/metal2vulkan"
|
|
|
|
# The external dependencies more than one crate takes, at one version each. A crate adds its own
|
|
# features (and `optional`). The crates' dependencies on one another stay in their own manifests,
|
|
# by path and version: the translator pins the AIR front end exactly (`=0.x.y`), and its build
|
|
# script reads that path from its own manifest.
|
|
[workspace.dependencies]
|
|
# Never the loader at build time: a crate that opens it adds `loaded`.
|
|
ash = { version = "0.38", default-features = false }
|
|
libc = "0.2"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
# SHA-256 on the CPU's own instructions where it has them (ARMv8's SHA2 extension, x86's SHA-NI),
|
|
# detected at run time; nothing here uses the default `alloc` and `oid` features.
|
|
sha2 = { version = "0.11", default-features = false }
|
|
|
|
# Dev and test builds keep line tables (file and line in backtraces) and no other debug info, and
|
|
# dependencies none. Full debug info made each link of a binary holding the translator, the runtime
|
|
# and validation take 35-47 s; on an i9-13900 the clean workspace build's links
|
|
# summed to 726 s against 94 s with this, and its target to half the size. A debugger session that
|
|
# needs variables builds with `--profile debugger`. Profile settings only apply to builds whose
|
|
# workspace root this is, so they change how the repo builds itself and nothing about how a
|
|
# consumer builds the published crates.
|
|
[profile.dev]
|
|
debug = "line-tables-only"
|
|
|
|
[profile.dev.package."*"]
|
|
debug = false
|
|
|
|
[profile.debugger]
|
|
inherits = "dev"
|
|
debug = "full"
|
|
|
|
[profile.debugger.package."*"]
|
|
debug = "full"
|