From 50c2f2a788f5632c60a3731cc2bdcf9850ee5d01 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Sat, 18 Jul 2026 06:01:07 +0000 Subject: [PATCH 1/2] packaging: pin cross-group deps to git tags behind an umbrella patch Every cross-group dep in the videre and shepherd manifests now carries its final form: nexum-* crates pinned to the nexum-runtime repo at v0.1.0, videre-* crates pinned to the videre-nexum-module repo at v0.1.0. A root umbrella [patch] resolves each pinned crate from its in-tree group, so the monorepo builds green before the remotes are populated and the carve reduces to deleting the patch tables. Each group also gains a Cargo.repo.toml: the patch-free workspace root the standalone repo renames to Cargo.toml at the carve, carrying only the hoisted dep-table subset its members inherit. --- Cargo.toml | 17 +++ nexum/Cargo.repo.toml | 120 ++++++++++++++++++ shepherd/Cargo.repo.toml | 89 +++++++++++++ shepherd/crates/composable-cow/Cargo.toml | 6 +- shepherd/crates/cow-venue/Cargo.toml | 6 +- shepherd/crates/shepherd-backtest/Cargo.toml | 6 +- shepherd/crates/shepherd/Cargo.toml | 6 +- shepherd/modules/ethflow-watcher/Cargo.toml | 6 +- .../modules/examples/stop-loss/Cargo.toml | 6 +- shepherd/modules/twap-monitor/Cargo.toml | 6 +- videre/Cargo.repo.toml | 77 +++++++++++ videre/crates/videre-host/Cargo.toml | 8 +- videre/crates/videre-macros/Cargo.toml | 2 +- videre/crates/videre-sdk/Cargo.toml | 4 +- videre/crates/videre-test/Cargo.toml | 4 +- .../modules/examples/echo-client/Cargo.toml | 2 +- .../modules/examples/echo-keeper/Cargo.toml | 2 +- 17 files changed, 335 insertions(+), 32 deletions(-) create mode 100644 nexum/Cargo.repo.toml create mode 100644 shepherd/Cargo.repo.toml create mode 100644 videre/Cargo.repo.toml diff --git a/Cargo.toml b/Cargo.toml index 4b8c8806..aa783df3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -223,6 +223,23 @@ todo = "deny" [patch.crates-io] cowprotocol = { git = "https://github.com/nullislabs/cow-rs", rev = "17fc0c5f55d04fad38963911da07d5da9290fefb" } +# Cross-group deps already carry their final git-tag form. Resolve every +# such crate from the in-tree group until the split repos are populated; +# a fully patched source is never fetched. +[patch."https://github.com/nullislabs/nexum-runtime"] +nexum-launch = { path = "nexum/crates/nexum-launch" } +nexum-runtime = { path = "nexum/crates/nexum-runtime" } +nexum-sdk = { path = "nexum/crates/nexum-sdk" } +nexum-sdk-test = { path = "nexum/crates/nexum-sdk-test" } +nexum-status-body = { path = "nexum/crates/nexum-status-body" } +nexum-tasks = { path = "nexum/crates/nexum-tasks" } +nexum-world = { path = "nexum/crates/nexum-world" } + +[patch."https://github.com/nullislabs/videre-nexum-module"] +videre-host = { path = "videre/crates/videre-host" } +videre-sdk = { path = "videre/crates/videre-sdk" } +videre-test = { path = "videre/crates/videre-test" } + [profile.dev] panic = "abort" diff --git a/nexum/Cargo.repo.toml b/nexum/Cargo.repo.toml new file mode 100644 index 00000000..feeedfbc --- /dev/null +++ b/nexum/Cargo.repo.toml @@ -0,0 +1,120 @@ +# Workspace root for the standalone nexum-runtime repo; renamed to +# Cargo.toml at the carve. Carries no [patch]: this group has no +# cross-group deps to neutralise. + +[workspace] +members = [ + "crates/nexum-cli", + "crates/nexum-launch", + "crates/nexum-module-macros", + "crates/nexum-runtime", + "crates/nexum-sdk", + "crates/nexum-sdk-test", + "crates/nexum-status-body", + "crates/nexum-tasks", + "crates/nexum-world", + "modules/example", + "modules/examples/balance-tracker", + "modules/examples/http-probe", + "modules/examples/price-alert", + "modules/fixtures/clock-reader", + "modules/fixtures/flaky-bomb", + "modules/fixtures/fuel-bomb", + "modules/fixtures/memory-bomb", + "modules/fixtures/panic-bomb", + "modules/fixtures/slow-host", +] +resolver = "2" + +[workspace.package] +edition = "2024" +license = "AGPL-3.0" +repository = "https://github.com/nullislabs/nexum-runtime" + +# Hoisted external deps. Core crates inherit with `dep.workspace = true`; +# guest modules express-declare their own external deps. +[workspace.dependencies] +# Error + async plumbing. +anyhow = "1" +thiserror = "2" +tokio = { version = "1", features = ["full"] } +futures = "0.3" +async-trait = "0.1" + +# Serde + config. +serde = { version = "1", features = ["derive"] } +serde_json = { version = "1", default-features = false, features = ["alloc"] } +toml = "1" + +# Wire codec. +borsh = { version = "1", features = ["derive"] } + +# Observability. +tracing = "0.1" +tracing-core = { version = "0.1", default-features = false, features = ["std"] } +tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "env-filter", "ansi", "json"] } +strum = { version = "0.28", default-features = false, features = ["derive"] } +metrics = "0.24" +metrics-exporter-prometheus = { version = "0.18", default-features = false, features = ["http-listener"] } + +# CLI parser. +clap = { version = "4", features = ["derive"] } + +# alloy stack; featureless provider so the guest SDK's wasm build stays +# transport-free, call sites add ws/ipc/pubsub/reqwest. +alloy-primitives = { version = "1.6", default-features = false, features = ["std", "serde"] } +alloy-sol-types = { version = "1.6", default-features = false, features = ["std"] } +alloy-provider = { version = "2.1", default-features = false } +alloy-rpc-types-eth = { version = "2.1", default-features = false, features = ["std"] } +alloy-transport-ws = { version = "2.1", default-features = false } +alloy-chains = { version = "0.2", default-features = false, features = ["std", "serde"] } +alloy-json-rpc = { version = "2.1", default-features = false } +alloy-rpc-client = { version = "2.1", default-features = false } +alloy-transport = { version = "2.1", default-features = false } + +# HTTP surface. +http = "1" +http-body = "1" +http-body-util = "0.1" +bytes = "1" + +# Bee HTTP API client behind the Swarm `remote-store` backend. +bee-rs = "1.7" + +# Proc-macro toolkit. +proc-macro2 = "1" +quote = "1" +syn = { version = "2", features = ["full"] } + +# Guest-side wasi:http client behind the SDK's `http::fetch` helper. +wstd = { version = "0.6", default-features = false } + +# WASM Component Model runtime. +wasmtime = { version = "46", features = ["component-model"] } +wasmtime-wasi = "46" +wasmtime-wasi-http = "46" + +# Embedded key-value store (local-store backend). +redb = "4" + +# Misc engine host deps. +url = "2" + +# Dev/test helpers. +tempfile = "3" +wiremock = "0.6" +proptest = "1" +tower = "0.5" + +[workspace.lints.rust] +unsafe_op_in_unsafe_fn = "warn" + +[workspace.lints.clippy] +dbg_macro = "deny" +todo = "deny" + +[profile.dev] +panic = "abort" + +[profile.release] +panic = "abort" diff --git a/shepherd/Cargo.repo.toml b/shepherd/Cargo.repo.toml new file mode 100644 index 00000000..91820110 --- /dev/null +++ b/shepherd/Cargo.repo.toml @@ -0,0 +1,89 @@ +# Workspace root for the standalone shepherd repo; renamed to Cargo.toml +# at the carve. Carries no cross-group [patch]: nexum-* and videre-* deps +# resolve from their real git tags. + +[workspace] +members = [ + "crates/composable-cow", + "crates/cow-venue", + "crates/shepherd", + "crates/shepherd-backtest", + "modules/ethflow-watcher", + "modules/examples/stop-loss", + "modules/twap-monitor", + "tools/load-gen", + "tools/orderbook-mock", +] +resolver = "2" + +[workspace.package] +edition = "2024" +license = "AGPL-3.0" +repository = "https://github.com/nullislabs/shepherd" + +# Hoisted external deps. Core crates inherit with `dep.workspace = true`; +# guest modules express-declare their own external deps. +[workspace.dependencies] +# Error + async plumbing. +anyhow = "1" +thiserror = "2" +tokio = { version = "1", features = ["full"] } +futures = "0.3" + +# Serde + config. +serde = { version = "1", features = ["derive"] } +serde_json = { version = "1", default-features = false, features = ["alloc"] } +toml = "1" + +# Wire codec. +borsh = { version = "1", features = ["derive"] } + +# Observability. +tracing = "0.1" +tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "env-filter", "ansi", "json"] } + +# CLI parser. +clap = { version = "4", features = ["derive"] } + +# alloy stack; featureless provider, call sites add transports. +alloy-primitives = { version = "1.6", default-features = false, features = ["std", "serde"] } +alloy-sol-types = { version = "1.6", default-features = false, features = ["std"] } +alloy-provider = { version = "2.1", default-features = false } +alloy-rpc-types-eth = { version = "2.1", default-features = false, features = ["std"] } +alloy-transport-ws = { version = "2.1", default-features = false } + +# HTTP surface. +reqwest = { version = "0.13", default-features = false, features = ["json", "rustls"] } +http = "1" +axum = "0.8" + +# Guest bindings. +wit-bindgen = { version = "0.59", default-features = false, features = ["macros", "realloc"] } + +# Misc. +url = "2" +rand = "0.10" +hex = "0.4" + +# Dev/test helpers. +proptest = "1" +tower = "0.5" + +[workspace.lints.rust] +unsafe_op_in_unsafe_fn = "warn" + +[workspace.lints.clippy] +dbg_macro = "deny" +todo = "deny" + +# `cowprotocol` 0.2.0 (hash-only submission shape + the WASI clock fix) +# is unpublished; patch to the cow-rs rev carrying both. Drop once a +# release with the hash-only constructor ships. +[patch.crates-io] +cowprotocol = { git = "https://github.com/nullislabs/cow-rs", rev = "17fc0c5f55d04fad38963911da07d5da9290fefb" } + +[profile.dev] +panic = "abort" + +[profile.release] +panic = "abort" diff --git a/shepherd/crates/composable-cow/Cargo.toml b/shepherd/crates/composable-cow/Cargo.toml index 82dd0512..3b28a7f7 100644 --- a/shepherd/crates/composable-cow/Cargo.toml +++ b/shepherd/crates/composable-cow/Cargo.toml @@ -18,11 +18,11 @@ alloy-primitives.workspace = true alloy-sol-types.workspace = true borsh.workspace = true cowprotocol = { version = "0.2.0", default-features = false } -nexum-sdk = { path = "../../../nexum/crates/nexum-sdk" } +nexum-sdk = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } # `sweep` slice: the keeper run over the typed CoW client on the # `videre:venue/client` seam. cow-venue = { path = "../cow-venue", features = ["client", "assembly"], optional = true } -videre-sdk = { path = "../../../videre/crates/videre-sdk", optional = true } +videre-sdk = { git = "https://github.com/nullislabs/videre-nexum-module", tag = "v0.1.0", optional = true } tracing = { workspace = true, optional = true } [features] @@ -32,7 +32,7 @@ sweep = ["dep:cow-venue", "dep:videre-sdk", "dep:tracing"] [dev-dependencies] proptest.workspace = true -nexum-sdk-test = { path = "../../../nexum/crates/nexum-sdk-test" } +nexum-sdk-test = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } [[test]] name = "sweep" diff --git a/shepherd/crates/cow-venue/Cargo.toml b/shepherd/crates/cow-venue/Cargo.toml index 86f71597..2758dc09 100644 --- a/shepherd/crates/cow-venue/Cargo.toml +++ b/shepherd/crates/cow-venue/Cargo.toml @@ -23,12 +23,12 @@ workspace = true borsh = { workspace = true, optional = true } # Source of the `IntentBody` derive and trait the version enum implements, # and the typed intent client the `client` slice binds to the CoW venue. -videre-sdk = { path = "../../../videre/crates/videre-sdk", optional = true } +videre-sdk = { git = "https://github.com/nullislabs/videre-nexum-module", tag = "v0.1.0", optional = true } # `client` slice only: the keeper `RetryAction` the generated # classification table maps each errorType to. The TOML parse happens in # `build.rs`, so serde/toml/thiserror are build- and dev-only and never # reach a guest that links this slice. -nexum-sdk = { path = "../../../nexum/crates/nexum-sdk", optional = true } +nexum-sdk = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0", optional = true } # `assembly` slice: the chain-edge order projections and orderbook # submission bodies. Express-declared (not workspace-inherited) so the # guest build never inherits the native `http-client` feature. @@ -55,7 +55,7 @@ serde = { workspace = true } toml = { workspace = true } thiserror = { workspace = true } # The conformance kit: holds the body codec to its published vector set. -videre-test = { path = "../../../videre/crates/videre-test" } +videre-test = { git = "https://github.com/nullislabs/videre-nexum-module", tag = "v0.1.0" } # Parity tests only: the upstream errorType enum and `retry_hint()` the # shipped table is reconciled against. Never a runtime dependency. cowprotocol = { version = "0.2.0", default-features = false } diff --git a/shepherd/crates/shepherd-backtest/Cargo.toml b/shepherd/crates/shepherd-backtest/Cargo.toml index 12a324ff..43e8d096 100644 --- a/shepherd/crates/shepherd-backtest/Cargo.toml +++ b/shepherd/crates/shepherd-backtest/Cargo.toml @@ -16,9 +16,9 @@ path = "src/main.rs" # `strategy::on_chain_logs` directly without an embedded runtime. ethflow-watcher = { path = "../../modules/ethflow-watcher" } cow-venue = { path = "../cow-venue", features = ["client"] } -nexum-sdk = { path = "../../../nexum/crates/nexum-sdk" } -nexum-sdk-test = { path = "../../../nexum/crates/nexum-sdk-test" } -videre-sdk = { path = "../../../videre/crates/videre-sdk" } +nexum-sdk = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } +nexum-sdk-test = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } +videre-sdk = { git = "https://github.com/nullislabs/videre-nexum-module", tag = "v0.1.0" } anyhow.workspace = true clap.workspace = true diff --git a/shepherd/crates/shepherd/Cargo.toml b/shepherd/crates/shepherd/Cargo.toml index c5ed1b75..eba2e8de 100644 --- a/shepherd/crates/shepherd/Cargo.toml +++ b/shepherd/crates/shepherd/Cargo.toml @@ -13,9 +13,9 @@ name = "shepherd" path = "src/main.rs" [dependencies] -nexum-launch = { path = "../../../nexum/crates/nexum-launch" } -nexum-runtime = { path = "../../../nexum/crates/nexum-runtime" } -videre-host = { path = "../../../videre/crates/videre-host" } +nexum-launch = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } +nexum-runtime = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } +videre-host = { git = "https://github.com/nullislabs/videre-nexum-module", tag = "v0.1.0" } anyhow.workspace = true tokio.workspace = true diff --git a/shepherd/modules/ethflow-watcher/Cargo.toml b/shepherd/modules/ethflow-watcher/Cargo.toml index 1f5d3c99..90c71ae4 100644 --- a/shepherd/modules/ethflow-watcher/Cargo.toml +++ b/shepherd/modules/ethflow-watcher/Cargo.toml @@ -13,8 +13,8 @@ repository.workspace = true crate-type = ["cdylib", "rlib"] [dependencies] -nexum-sdk = { path = "../../../nexum/crates/nexum-sdk" } -videre-sdk = { path = "../../../videre/crates/videre-sdk" } +nexum-sdk = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } +videre-sdk = { git = "https://github.com/nullislabs/videre-nexum-module", tag = "v0.1.0" } cow-venue = { path = "../../crates/cow-venue", features = ["client", "assembly"] } cowprotocol = { version = "0.2.0", default-features = false } alloy-primitives = { version = "1.6", default-features = false, features = ["std"] } @@ -23,4 +23,4 @@ tracing = { version = "0.1", default-features = false } wit-bindgen = { version = "0.59", default-features = false, features = ["macros", "realloc"] } [dev-dependencies] -nexum-sdk-test = { path = "../../../nexum/crates/nexum-sdk-test" } +nexum-sdk-test = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } diff --git a/shepherd/modules/examples/stop-loss/Cargo.toml b/shepherd/modules/examples/stop-loss/Cargo.toml index a14946e2..dc4a99e6 100644 --- a/shepherd/modules/examples/stop-loss/Cargo.toml +++ b/shepherd/modules/examples/stop-loss/Cargo.toml @@ -11,8 +11,8 @@ crate-type = ["cdylib"] [dependencies] cow-venue = { path = "../../../crates/cow-venue", features = ["client"] } -nexum-sdk = { path = "../../../../nexum/crates/nexum-sdk" } -videre-sdk = { path = "../../../../videre/crates/videre-sdk" } +nexum-sdk = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } +videre-sdk = { git = "https://github.com/nullislabs/videre-nexum-module", tag = "v0.1.0" } cowprotocol = { version = "0.2.0", default-features = false } alloy-primitives = { version = "1.6", default-features = false, features = ["std"] } tracing = { version = "0.1", default-features = false } @@ -21,7 +21,7 @@ wit-bindgen = { version = "0.59", default-features = false, features = ["macros" [dev-dependencies] # The chain-edge projections back the pinned-UID regression test. cow-venue = { path = "../../../crates/cow-venue", features = ["client", "assembly"] } -nexum-sdk-test = { path = "../../../../nexum/crates/nexum-sdk-test" } +nexum-sdk-test = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } # Only used by tests in `strategy.rs` to encode a synthetic oracle # return body; the production code uses `nexum_sdk::chain::chainlink`. alloy-sol-types = { version = "1.6", default-features = false, features = ["std"] } diff --git a/shepherd/modules/twap-monitor/Cargo.toml b/shepherd/modules/twap-monitor/Cargo.toml index abf8b075..6fafc1bb 100644 --- a/shepherd/modules/twap-monitor/Cargo.toml +++ b/shepherd/modules/twap-monitor/Cargo.toml @@ -11,8 +11,8 @@ crate-type = ["cdylib"] [dependencies] composable-cow = { path = "../../crates/composable-cow", features = ["sweep"] } cow-venue = { path = "../../crates/cow-venue", features = ["client"] } -nexum-sdk = { path = "../../../nexum/crates/nexum-sdk" } -videre-sdk = { path = "../../../videre/crates/videre-sdk" } +nexum-sdk = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } +videre-sdk = { git = "https://github.com/nullislabs/videre-nexum-module", tag = "v0.1.0" } cowprotocol = { version = "0.2.0", default-features = false } alloy-primitives = { version = "1.6", default-features = false, features = ["std"] } alloy-sol-types = { version = "1.6", default-features = false, features = ["std"] } @@ -22,4 +22,4 @@ wit-bindgen = { version = "0.59", default-features = false, features = ["macros" [dev-dependencies] cow-venue = { path = "../../crates/cow-venue", features = ["client", "assembly"] } serde_json = { version = "1", default-features = false, features = ["alloc"] } -nexum-sdk-test = { path = "../../../nexum/crates/nexum-sdk-test" } +nexum-sdk-test = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } diff --git a/videre/Cargo.repo.toml b/videre/Cargo.repo.toml new file mode 100644 index 00000000..d01b0eb7 --- /dev/null +++ b/videre/Cargo.repo.toml @@ -0,0 +1,77 @@ +# Workspace root for the standalone videre-nexum-module repo; renamed to +# Cargo.toml at the carve. Carries no [patch]: nexum-* deps resolve from +# their real git tags. + +[workspace] +members = [ + "crates/no-std-probe", + "crates/videre-host", + "crates/videre-macros", + "crates/videre-sdk", + "crates/videre-test", + "modules/examples/echo-client", + "modules/examples/echo-keeper", + "modules/examples/echo-venue", + "modules/fixtures/flaky-venue", +] +resolver = "2" + +[workspace.package] +edition = "2024" +license = "AGPL-3.0" +repository = "https://github.com/nullislabs/videre-nexum-module" + +# Hoisted external deps. Core crates inherit with `dep.workspace = true`; +# guest modules express-declare their own external deps. +[workspace.dependencies] +# Error + async plumbing. +anyhow = "1" +thiserror = "2" +tokio = { version = "1", features = ["full"] } +futures = "0.3" +async-trait = "0.1" + +# Serde + config. +serde = { version = "1", features = ["derive"] } +serde_json = { version = "1", default-features = false, features = ["alloc"] } +toml = "1" + +# Wire codec. +borsh = { version = "1", features = ["derive"] } + +# Observability. +tracing = "0.1" +strum = { version = "0.28", default-features = false, features = ["derive"] } + +# HTTP request/response vocabulary for the `Fetch` seam. +http = "1" + +# Hex codec for vector and golden files. +hex = "0.4" + +# Proc-macro toolkit. +proc-macro2 = "1" +quote = "1" +syn = { version = "2", features = ["full"] } + +# Guest bindings. +wit-bindgen = { version = "0.59", default-features = false, features = ["macros", "realloc"] } + +# WASM Component Model runtime (videre-host). +wasmtime = { version = "46", features = ["component-model"] } + +# Dev/test helpers. +tempfile = "3" + +[workspace.lints.rust] +unsafe_op_in_unsafe_fn = "warn" + +[workspace.lints.clippy] +dbg_macro = "deny" +todo = "deny" + +[profile.dev] +panic = "abort" + +[profile.release] +panic = "abort" diff --git a/videre/crates/videre-host/Cargo.toml b/videre/crates/videre-host/Cargo.toml index a7346a79..bdad1c9d 100644 --- a/videre/crates/videre-host/Cargo.toml +++ b/videre/crates/videre-host/Cargo.toml @@ -11,10 +11,10 @@ workspace = true [dependencies] # The runtime seam this crate plugs into; the only nexum crate edge. -nexum-runtime = { path = "../../../nexum/crates/nexum-runtime" } +nexum-runtime = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } # Encoder for the opaque status body the host event stream carries; the # registry lowers an adapter-reported status through it. -nexum-status-body = { path = "../../../nexum/crates/nexum-status-body" } +nexum-status-body = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } wasmtime.workspace = true anyhow.workspace = true @@ -27,6 +27,6 @@ toml.workspace = true tracing.workspace = true [dev-dependencies] -nexum-runtime = { path = "../../../nexum/crates/nexum-runtime", features = ["test-utils"] } -nexum-tasks = { path = "../../../nexum/crates/nexum-tasks" } +nexum-runtime = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0", features = ["test-utils"] } +nexum-tasks = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } tempfile.workspace = true diff --git a/videre/crates/videre-macros/Cargo.toml b/videre/crates/videre-macros/Cargo.toml index 2a68447d..36d97fd8 100644 --- a/videre/crates/videre-macros/Cargo.toml +++ b/videre/crates/videre-macros/Cargo.toml @@ -13,7 +13,7 @@ proc-macro = true workspace = true [dependencies] -nexum-world = { path = "../../../nexum/crates/nexum-world" } +nexum-world = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } proc-macro2.workspace = true quote.workspace = true syn = { workspace = true, features = ["full"] } diff --git a/videre/crates/videre-sdk/Cargo.toml b/videre/crates/videre-sdk/Cargo.toml index 39686688..db851169 100644 --- a/videre/crates/videre-sdk/Cargo.toml +++ b/videre/crates/videre-sdk/Cargo.toml @@ -27,7 +27,7 @@ videre-macros = { path = "../videre-macros" } # Host-neutral SDK layer this crate builds on: the `ChainHost` seam the # chain wrapper implements, the shared `Fault` vocabulary, and the # wasi:http `fetch` surface re-exported as `transport::http`. -nexum-sdk = { path = "../../../nexum/crates/nexum-sdk" } +nexum-sdk = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } # The standard request/response types the `Fetch` seam (and the # `TimedFetch` middleware over it) is expressed in. http.workspace = true @@ -39,4 +39,4 @@ wit-bindgen.workspace = true [dev-dependencies] # In-memory `LocalStoreHost` behind the keeper sweep tests. -nexum-sdk-test = { path = "../../../nexum/crates/nexum-sdk-test" } +nexum-sdk-test = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } diff --git a/videre/crates/videre-test/Cargo.toml b/videre/crates/videre-test/Cargo.toml index d53a82a6..150846aa 100644 --- a/videre/crates/videre-test/Cargo.toml +++ b/videre/crates/videre-test/Cargo.toml @@ -25,10 +25,10 @@ hex.workspace = true http.workspace = true # Transport seam vocabulary: `ChainHost`, `Fault`, and the `Fetch` seam # the mocks implement. -nexum-sdk = { path = "../../../nexum/crates/nexum-sdk" } +nexum-sdk = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } # `MockChain` is composed rather than reimplemented: one chain mock # serves both personas. -nexum-sdk-test = { path = "../../../nexum/crates/nexum-sdk-test" } +nexum-sdk-test = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } # The contract under test: `IntentBody`, `BodyError`, the intent # header types, and the `MessagingHost` seam. videre-sdk = { path = "../videre-sdk" } diff --git a/videre/modules/examples/echo-client/Cargo.toml b/videre/modules/examples/echo-client/Cargo.toml index 9afd855d..4eada01b 100644 --- a/videre/modules/examples/echo-client/Cargo.toml +++ b/videre/modules/examples/echo-client/Cargo.toml @@ -13,5 +13,5 @@ workspace = true crate-type = ["cdylib"] [dependencies] -nexum-sdk = { path = "../../../../nexum/crates/nexum-sdk" } +nexum-sdk = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } wit-bindgen = { version = "0.58", default-features = false, features = ["macros", "realloc"] } diff --git a/videre/modules/examples/echo-keeper/Cargo.toml b/videre/modules/examples/echo-keeper/Cargo.toml index de13587b..d9ba15a5 100644 --- a/videre/modules/examples/echo-keeper/Cargo.toml +++ b/videre/modules/examples/echo-keeper/Cargo.toml @@ -13,6 +13,6 @@ workspace = true crate-type = ["cdylib"] [dependencies] -nexum-sdk = { path = "../../../../nexum/crates/nexum-sdk" } +nexum-sdk = { git = "https://github.com/nullislabs/nexum-runtime", tag = "v0.1.0" } videre-sdk = { path = "../../../crates/videre-sdk" } wit-bindgen = { version = "0.59", default-features = false, features = ["macros", "realloc"] } From 24c4d9ea972e404c31598c15d70eaef81f201219 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Sat, 18 Jul 2026 09:23:41 +0000 Subject: [PATCH 2/2] test(videre-host): layout-agnostic paths for the standalone carve Resolve the workspace root via the nearest [workspace] Cargo.toml and module.toml sources via the group root, and drop --all-features from the nexum-runtime graph oracle (cargo rejects it for an out-of-workspace dep). The videre-host integration tests now pass both in the monorepo and the carved videre-nexum-module repo. --- videre/crates/videre-host/tests/platform.rs | 47 +++++++++++--------- videre/crates/videre-host/tests/zero_leak.rs | 39 ++++++++++------ 2 files changed, 50 insertions(+), 36 deletions(-) diff --git a/videre/crates/videre-host/tests/platform.rs b/videre/crates/videre-host/tests/platform.rs index 0cf0b336..eeb5c05f 100644 --- a/videre/crates/videre-host/tests/platform.rs +++ b/videre/crates/videre-host/tests/platform.rs @@ -33,16 +33,29 @@ const INTENT_STATUS: &str = "intent-status"; // ── fixtures + assembly ─────────────────────────────────────────────── -/// Workspace-root-relative path. `CARGO_MANIFEST_DIR` is -/// `videre/crates/videre-host`; three parents up is the workspace root. +/// Workspace-root-relative path: the nearest ancestor whose `Cargo.toml` +/// declares `[workspace]` (the umbrella in the monorepo, the repo root +/// standalone). fn workspace_path(relative: &str) -> PathBuf { + let mut dir = Path::new(env!("CARGO_MANIFEST_DIR")); + loop { + if std::fs::read_to_string(dir.join("Cargo.toml")).is_ok_and(|t| t.contains("[workspace]")) + { + return dir.join(relative); + } + dir = dir.parent().expect("workspace root above crate dir"); + } +} + +/// Group-root-relative path: the crate's grandparent (`videre/` in the +/// monorepo, the repo root standalone), under which this group's `modules/` +/// live. Layout-agnostic, unlike a workspace-root path that would need the +/// `videre/` group prefix only in the monorepo. +fn group_path(relative: &str) -> PathBuf { Path::new(env!("CARGO_MANIFEST_DIR")) .parent() - .expect("crates dir") - .parent() - .expect("videre root") - .parent() - .expect("workspace root") + .and_then(Path::parent) + .expect("group root") .join(relative) } @@ -575,17 +588,13 @@ async fn e2e_echo_module_registry_adapter_round_trip() { let config = EngineConfig { adapters: vec![AdapterEntry { path: adapter_wasm, - manifest: Some(workspace_path( - "videre/modules/examples/echo-venue/module.toml", - )), + manifest: Some(group_path("modules/examples/echo-venue/module.toml")), http_allow: Vec::new(), messaging_topics: Vec::new(), }], modules: vec![ModuleEntry { path: module_wasm, - manifest: Some(workspace_path( - "videre/modules/examples/echo-client/module.toml", - )), + manifest: Some(group_path("modules/examples/echo-client/module.toml")), }], ..Default::default() }; @@ -690,17 +699,13 @@ async fn e2e_keeper_module_drives_the_venue_through_the_typed_client() { let config = EngineConfig { adapters: vec![AdapterEntry { path: adapter_wasm, - manifest: Some(workspace_path( - "videre/modules/examples/echo-venue/module.toml", - )), + manifest: Some(group_path("modules/examples/echo-venue/module.toml")), http_allow: Vec::new(), messaging_topics: Vec::new(), }], modules: vec![ModuleEntry { path: module_wasm, - manifest: Some(workspace_path( - "videre/modules/examples/echo-keeper/module.toml", - )), + manifest: Some(group_path("modules/examples/echo-keeper/module.toml")), }], ..Default::default() }; @@ -946,9 +951,7 @@ async fn boot_flaky_venue( let config = EngineConfig { adapters: vec![AdapterEntry { path: adapter_wasm, - manifest: Some(workspace_path( - "videre/modules/fixtures/flaky-venue/module.toml", - )), + manifest: Some(group_path("modules/fixtures/flaky-venue/module.toml")), http_allow: Vec::new(), messaging_topics: Vec::new(), }], diff --git a/videre/crates/videre-host/tests/zero_leak.rs b/videre/crates/videre-host/tests/zero_leak.rs index d5e2b8f1..f4221101 100644 --- a/videre/crates/videre-host/tests/zero_leak.rs +++ b/videre/crates/videre-host/tests/zero_leak.rs @@ -16,16 +16,29 @@ use nexum_runtime::test_utils::{ }; use videre_host::{VenueRegistry, platform}; -/// Workspace-root-relative path. `CARGO_MANIFEST_DIR` is -/// `videre/crates/videre-host`; three parents up is the workspace root. +/// Workspace-root-relative path: the nearest ancestor whose `Cargo.toml` +/// declares `[workspace]` (the umbrella in the monorepo, the repo root +/// standalone). fn workspace_path(relative: &str) -> PathBuf { + let mut dir = Path::new(env!("CARGO_MANIFEST_DIR")); + loop { + if std::fs::read_to_string(dir.join("Cargo.toml")).is_ok_and(|t| t.contains("[workspace]")) + { + return dir.join(relative); + } + dir = dir.parent().expect("workspace root above crate dir"); + } +} + +/// Group-root-relative path: the crate's grandparent (`videre/` in the +/// monorepo, the repo root standalone), under which this group's `modules/` +/// live. Layout-agnostic, unlike a workspace-root path that would need the +/// `videre/` group prefix only in the monorepo. +fn group_path(relative: &str) -> PathBuf { Path::new(env!("CARGO_MANIFEST_DIR")) .parent() - .expect("crates dir") - .parent() - .expect("videre root") - .parent() - .expect("workspace root") + .and_then(Path::parent) + .expect("group root") .join(relative) } @@ -75,17 +88,13 @@ async fn e2e_echo_venue_boots_and_submits_through_the_generic_seam() { let config = EngineConfig { adapters: vec![AdapterEntry { path: adapter_wasm, - manifest: Some(workspace_path( - "videre/modules/examples/echo-venue/module.toml", - )), + manifest: Some(group_path("modules/examples/echo-venue/module.toml")), http_allow: Vec::new(), messaging_topics: Vec::new(), }], modules: vec![ModuleEntry { path: module_wasm, - manifest: Some(workspace_path( - "videre/modules/examples/echo-client/module.toml", - )), + manifest: Some(group_path("modules/examples/echo-client/module.toml")), }], ..Default::default() }; @@ -123,6 +132,9 @@ async fn e2e_echo_venue_boots_and_submits_through_the_generic_seam() { /// edges) names no videre, intent, venue, or cow crate. #[test] fn host_crate_graph_reaches_no_venue_shaped_crate() { + // nexum-runtime resolves as an out-of-workspace dep in the standalone + // repo, where cargo rejects --all-features; it is venue-free under every + // feature, so the default-feature graph is a sound oracle. let output = Command::new(env!("CARGO")) .args([ "tree", @@ -130,7 +142,6 @@ fn host_crate_graph_reaches_no_venue_shaped_crate() { "nexum-runtime", "-e", "normal,build", - "--all-features", "--prefix", "none", "--locked",