open-standards/mesh/mesh-rs/crates/mesh-openai/Cargo.toml
Transaction Science d14f583d92 Cargo: no minimum-supported-version floor, because the policy is latest stable
The repository tracks the latest stable Rust, pinned at the root. A
`rust-version` key states a *floor* -- the oldest toolchain a crate supports --
which is a different promise, and one this repository does not make. It also
said 1.97 while the pin was 1.98.0 and nothing verified it, so it was a claim in
the wrong direction and unchecked in both.

So it goes, everywhere:

    59  rust-version = "1.97"            (workspace and package declarations)
   417  rust-version.workspace = true    (members inheriting them)
   476  files, 476 deletions, 0 insertions

The 417 are why this is not the sixty-file change it looks like from a grep for
the value. A member inheriting a key that no longer exists does not fall back to
a default -- its manifest stops resolving. Removing the declarations without the
inherits would have broken every workspace that has members.

Deliberately untouched: `joule-code-rs/vendor/wtransport/Cargo.toml`. That is a
vendored third-party crate declaring a floor about itself, not about us, and our
pin is above it. Editing vendored source to satisfy our own policy would make
the copy diverge from upstream for no benefit.

Verified rather than assumed:

- all 493 `Cargo.toml` files in the tree parse (`tomllib`)
- `cargo metadata --no-deps --locked` resolves on `joule-code-rs`, `wai-rs`,
  `openpay`, `mesh-rs`, `sandbox-rs` and `jcp-rs` -- the check that actually
  exercises workspace inheritance, which a TOML parse does not
- no `Cargo.lock` changed; `rust-version` is not lockfile state

`wai/wai-verify/Cargo.toml` already carried a comment saying it omits
`rust-version` on purpose, so this makes the rest of the tree agree with the one
crate that had already decided.

What this gives up, stated plainly: cargo can no longer greet an older
toolchain with "requires rustc 1.97" and will instead fail wherever the code
first needs something newer. That is the cost of not maintaining a floor, and
it is the right cost when the floor was fiction.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-11-03 17:42:20 -05:00

59 lines
2.5 KiB
TOML

[package]
name = "mesh-openai"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
description = "OpenAI-compatible API ingest for Mesh — translate a /v1/chat/completions request into a Mesh ServeRequest (joule ceiling + fidelity floor) and a served result back into an OpenAI chat-completion response carrying the sealed energy receipt as a usage extension. Lets any OpenAI client (vLLM/TGI/Ollama/SDKs) drive energy-metered serving without changing transport. Ingest, not compete."
[dependencies]
mesh-schema = { workspace = true }
mesh-core = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
hex = { workspace = true }
# Only to choose the reference server example's meter (the features below):
# the library itself never meters, it carries what `mesh-core` sealed.
mesh-meter = { workspace = true, optional = true }
# The GPU load for `ProcessMeter`'s liveness probe, with the `metal` feature.
jouleclaw-backend-apple = { workspace = true, optional = true }
[dev-dependencies]
mesh-engine = { workspace = true }
mesh-meter = { workspace = true }
jcp-schema = { workspace = true }
jcp-grant = { workspace = true }
mesh-router = { workspace = true }
mesh-receipt = { workspace = true }
ed25519-dalek = { workspace = true }
[features]
default = []
# A minimal, std-only /v1/chat/completions reference server (no async runtime,
# no extra deps). Routes through mesh-core and returns the sealed receipt.
server = []
# The meter the reference server example serves with (its module docs). With
# none of these it is the load estimator, and every receipt says `Estimator`.
# `hw-meter`: the family's machine meter (`HwMeter::detect`), a hardware
# reading only where a live counter covers the whole request (a RAPL package).
hw-meter = ["dep:mesh-meter", "mesh-meter/hw-meter"]
hw-meter-rapl = ["hw-meter", "mesh-meter/hw-meter-rapl"]
hw-meter-nvml = ["hw-meter", "mesh-meter/hw-meter-nvml"]
hw-meter-apple = ["hw-meter", "mesh-meter/hw-meter-apple"]
# macOS: this process's own CPU and GPU energy over each serve
# (`ProcessMeter`), since the reference engine runs in this process.
metal = ["hw-meter-apple", "dep:jouleclaw-backend-apple"]
# The reference server example uses the `server` module, so it only builds with
# the feature on (keeps the default `--all-targets` build clean).
[[example]]
name = "serve"
required-features = ["server"]
# Drives the example's own meter and mesh through one served request.
[[test]]
name = "serve_example"
required-features = ["server"]
[lints]
workspace = true