-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
68 lines (63 loc) · 3.92 KB
/
Copy pathCargo.toml
File metadata and controls
68 lines (63 loc) · 3.92 KB
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
61
62
63
64
65
66
67
68
[workspace]
resolver = "2"
# `crates/*` are the shipped crates. `tools/*` are dev-only check binaries that no
# shipped crate depends on (e.g. tools/io-free-check, the structural ironbus-core
# IO-free AST check), so their dependencies never enter a published crate's graph.
members = ["crates/*", "tools/*"]
# `tools/loom-tests` (#122) is its OWN, separate workspace with its OWN Cargo.lock, EXCLUDED here so
# its `cfg(loom)` `loom` dev-dependency (and loom's non-optional `tracing-subscriber`/`env-filter`
# tree) never enters THIS workspace's lockfile. That is what keeps the env-filter crates out of the
# shipped binary's cargo-auditable SBOM: a workspace member would unify `tracing-subscriber`'s
# features into the single shared build node even when cfg-gated out of the compiled units, because
# feature resolution is per-lockfile. The nightly loom job builds it from its own directory.
#
# `tools/iceberg-sink` (#793) is likewise its OWN, separate workspace with its OWN Cargo.lock,
# EXCLUDED here for the SAME reason: it is the opt-in Iceberg/Parquet SINK connector, and its heavy
# analytics stack (Apache Arrow, Parquet, the `iceberg` metadata layer, Thrift, Avro, tokio, opendal)
# must NEVER unify into the broker's graph or its SBOM. The broker stays a pure message bus; the sink
# path-depends on `ironbus-client` to consume over the wire, exactly like any external consumer.
exclude = ["tools/loom-tests", "tools/iceberg-sink"]
[workspace.package]
version = "0.1.0"
edition = "2021"
rust-version = "1.78"
license = "MIT OR Apache-2.0"
repository = "https://github.com/ELares/IronBus"
authors = ["The IronBus Authors"]
# Lints applied to every crate via `[lints] workspace = true`.
# unsafe_code is a warning (denied in CI via -D warnings), so every unsafe block
# must be opted in explicitly with `#[allow(unsafe_code)]` plus a safety comment.
[workspace.lints.rust]
unsafe_code = "warn"
# `cfg(loom)` is a known, deliberate cfg: the scoped loom concurrency tests (#122) build only under
# `RUSTFLAGS="--cfg loom"`. Declare it so `unexpected_cfgs` stays quiet (and the loom job stays
# `-D warnings`-clean) without disabling the lint for genuinely unknown cfgs.
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(loom)'] }
[workspace.lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
# Size-optimized, reproducible release profile (#101): minimize the static musl binary for
# scarce edge flash. `opt-level = "s"` (not "z", which is gated on a #19 throughput check),
# fat LTO and a single codegen unit for size and deterministic codegen, `panic = "abort"`
# (binding: handlers are panic-free by construction, see #7), and strip the symbols. The
# determinism inputs that pair with this profile (`--remap-path-prefix`, `CARGO_INCREMENTAL=0`,
# `SOURCE_DATE_EPOCH`, `--locked`, embed-the-SBOM-before-strip) are in `.cargo/config.toml` and
# the reproducible-build invocation in RELEASING.md. The byte-identical two-runner CI gate ships
# with the release workflow + signing in #103.
[profile.release]
opt-level = "s"
lto = "fat"
codegen-units = 1
panic = "abort"
strip = true
# Vendor the raft-rs codec (V2-C1, #578). The `raft` crate (tikv/raft-rs, Apache-2.0, the
# production TiKV Raft core) depends on `raft-proto`, whose `build.rs` regenerates the
# `eraftpb` protobuf codec at build time via `protobuf-build` -> `protoc`/`prost-build`.
# IronBus has NO build-time codegen anywhere and must keep the reproducible static-musl
# build, the MSRV-1.78 floor, and the zero-build-script posture intact. So `raft-proto` is
# redirected to a vendored, build-script-free drop-in (the generated `eraftpb` committed as
# source; see crates/ironbus-server/vendor/raft-proto): the build links the real raft-rs
# core while running NO `protoc` and NO build script. raft-rs is wired ONLY into
# ironbus-server (never ironbus-core, which stays IO-free/async-free).
[patch.crates-io]
raft-proto = { path = "crates/ironbus-server/vendor/raft-proto" }