sdk

Radroots SDK and bindings
git clone https://radroots.dev/git/sdk.git
Log | Files | Refs | README

commit d5ed93c9f35b8e26f03fcbec320a52c9a8eec1a2
parent 6c0f7c3fe57c6f3ad994848b65008c700d76198a
Author: triesap <tyson@radroots.org>
Date:   Tue, 28 Jul 2026 18:50:33 +0000

release: enforce lib-only version amendment

- Keep SDK-owned crates at their existing 0.1.0 version authority.
- Consume every oss/lib crate with exact 0.1.0-alpha requirements.
- Reject the unsupported expansion of the oss/lib status update.
- Preserve independent protocol and repository release identities.

Diffstat:
MCargo.lock | 28++++++++++++++--------------
MCargo.toml | 8++++----
Mcrates/event_codec_wasm/Cargo.toml | 2+-
Mcrates/replica_store_wasm/Cargo.toml | 2+-
Mcrates/replica_sync_wasm/Cargo.toml | 2+-
Mcrates/sdk/Cargo.toml | 2+-
Mcrates/sql_wasm_runtime/Cargo.toml | 2+-
Mdocs/implementation/DEVIATIONS.md | 1-
Mdocs/implementation/TRACEABILITY.md | 1-
Mdocs/implementation/deviations.toml | 57---------------------------------------------------------
Mdocs/specs/radroots_crates_release_v1.md | 17+++++------------
Mdocs/specs/radroots_crates_release_v1.sha256 | 6+++---
Mdocs/specs/radroots_crates_release_v1.toml | 2+-
Mdocs/specs/radroots_crates_release_v1_inventory.csv | 4++--
Mtools/xtask/Cargo.toml | 12++++++------
Mtools/xtask/src/architecture.rs | 78+++++++++++++-----------------------------------------------------------------
16 files changed, 53 insertions(+), 171 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock @@ -1954,7 +1954,7 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "radroots" -version = "0.1.0-alpha" +version = "0.1.0" [[package]] name = "radroots_authority" @@ -1986,7 +1986,7 @@ dependencies = [ [[package]] name = "radroots_core_bindings" -version = "0.1.0-alpha" +version = "0.1.0" dependencies = [ "dto_bindgen", "dto_bindgen_core", @@ -2013,7 +2013,7 @@ dependencies = [ [[package]] name = "radroots_event_bindings" -version = "0.1.0-alpha" +version = "0.1.0" dependencies = [ "dto_bindgen_backend_ts", "radroots_event", @@ -2036,7 +2036,7 @@ dependencies = [ [[package]] name = "radroots_event_codec_wasm" -version = "0.1.0-alpha" +version = "0.1.0-alpha.2" dependencies = [ "nostr", "radroots_blossom", @@ -2059,7 +2059,7 @@ dependencies = [ [[package]] name = "radroots_event_index_bindings" -version = "0.1.0-alpha" +version = "0.1.0" dependencies = [ "radroots_event_index", ] @@ -2110,7 +2110,7 @@ dependencies = [ [[package]] name = "radroots_identity_bindings" -version = "0.1.0-alpha" +version = "0.1.0" dependencies = [ "dto_bindgen_backend_ts", "radroots_identity", @@ -2216,7 +2216,7 @@ dependencies = [ [[package]] name = "radroots_replica_schema_bindings" -version = "0.1.0-alpha" +version = "0.1.0" dependencies = [ "dto_bindgen_core", "radroots_replica_schema", @@ -2236,7 +2236,7 @@ dependencies = [ [[package]] name = "radroots_replica_store_wasm" -version = "0.1.0-alpha" +version = "0.1.0-alpha.2" dependencies = [ "js-sys", "radroots_replica_schema", @@ -2271,7 +2271,7 @@ dependencies = [ [[package]] name = "radroots_replica_sync_wasm" -version = "0.1.0-alpha" +version = "0.1.0-alpha.2" dependencies = [ "base64 0.22.1", "radroots_event", @@ -2308,7 +2308,7 @@ dependencies = [ [[package]] name = "radroots_runtime_contract_v1" -version = "0.1.0-alpha" +version = "0.1.0" dependencies = [ "radroots_protocol_contract_v1", "serde", @@ -2324,7 +2324,7 @@ dependencies = [ [[package]] name = "radroots_sdk" -version = "0.1.0-alpha" +version = "0.1.0" dependencies = [ "base64 0.22.1", "futures", @@ -2367,7 +2367,7 @@ dependencies = [ [[package]] name = "radroots_sdk_sql_wasm_runtime" -version = "0.1.0-alpha" +version = "0.1.0-alpha.2" dependencies = [ "radroots_sql_core", "serde", @@ -2378,7 +2378,7 @@ dependencies = [ [[package]] name = "radroots_sdk_xtask" -version = "0.1.0-alpha" +version = "0.1.0" dependencies = [ "dto_bindgen_backend_ts", "dto_bindgen_core", @@ -2438,7 +2438,7 @@ dependencies = [ [[package]] name = "radroots_trade_bindings" -version = "0.1.0-alpha" +version = "0.1.0" dependencies = [ "dto_bindgen", "dto_bindgen_core", diff --git a/Cargo.toml b/Cargo.toml @@ -18,7 +18,7 @@ members = [ resolver = "3" [workspace.package] -version = "0.1.0-alpha" +version = "0.1.0" edition = "2024" rust-version = "1.97.1" license = "MIT OR Apache-2.0" @@ -28,7 +28,7 @@ readme = "README" authors = ["Tyson Lupul <tyson@radroots.org>"] [workspace.metadata.radroots.public-package] -version = "0.1.0-alpha" +version = "0.1.0" authors = ["Tyson Lupul <tyson@radroots.org>"] readme = "README.md" @@ -65,7 +65,7 @@ radroots_nostr_signer = { version = "=0.1.0-alpha", default-features = false } radroots_outbox = { version = "=0.1.0-alpha", default-features = false } radroots_protocol_contract_v1 = { version = "=0.1.0-alpha", default-features = false } radroots_protected_store = { version = "=0.1.0-alpha", default-features = false } -radroots_runtime_contract_v1 = { path = "crates/runtime_contract_v1", version = "=0.1.0-alpha", default-features = false } +radroots_runtime_contract_v1 = { path = "crates/runtime_contract_v1", version = "0.1.0", default-features = false } radroots_secret_vault = { version = "=0.1.0-alpha", default-features = false } radroots_transport = { package = "radroots_transport", version = "=0.1.0-alpha", default-features = false } radroots_transport_publish_protocol = { version = "=0.1.0-alpha", default-features = false } @@ -75,7 +75,7 @@ radroots_replica_store = { version = "=0.1.0-alpha", default-features = false } radroots_replica_schema = { version = "=0.1.0-alpha", default-features = false } radroots_replica_sync = { version = "=0.1.0-alpha", default-features = false } radroots_runtime_paths = { version = "=0.1.0-alpha", default-features = false } -radroots_sdk_sql_wasm_runtime = { path = "crates/sql_wasm_runtime", version = "=0.1.0-alpha" } +radroots_sdk_sql_wasm_runtime = { path = "crates/sql_wasm_runtime", version = "0.1.0-alpha.2" } radroots_sql_core = { version = "=0.1.0-alpha", default-features = false } radroots_trade = { package = "radroots_trade", version = "=0.1.0-alpha", default-features = false, features = [ "serde_json", diff --git a/crates/event_codec_wasm/Cargo.toml b/crates/event_codec_wasm/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "radroots_event_codec_wasm" publish = false -version = "0.1.0-alpha" +version = "0.1.0-alpha.2" edition.workspace = true authors = ["Tyson Lupul <tyson@radroots.org>"] rust-version.workspace = true diff --git a/crates/replica_store_wasm/Cargo.toml b/crates/replica_store_wasm/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "radroots_replica_store_wasm" publish = false -version = "0.1.0-alpha" +version = "0.1.0-alpha.2" edition.workspace = true authors = ["Tyson Lupul <tyson@radroots.org>"] rust-version.workspace = true diff --git a/crates/replica_sync_wasm/Cargo.toml b/crates/replica_sync_wasm/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "radroots_replica_sync_wasm" publish = false -version = "0.1.0-alpha" +version = "0.1.0-alpha.2" edition.workspace = true authors = ["Tyson Lupul <tyson@radroots.org>"] rust-version.workspace = true diff --git a/crates/sdk/Cargo.toml b/crates/sdk/Cargo.toml @@ -149,7 +149,7 @@ radroots_transport_nostr = { workspace = true, optional = true, default-features radroots_transport_reticulum = { workspace = true, optional = true, default-features = false } radroots_runtime_paths = { workspace = true, optional = true, default-features = false } radroots_secret_vault = { workspace = true, optional = true, default-features = false } -radroots_runtime_contract_v1 = { path = "../runtime_contract_v1", version = "=0.1.0-alpha", default-features = false } +radroots_runtime_contract_v1 = { path = "../runtime_contract_v1", version = "0.1.0", default-features = false } radroots_trade = { workspace = true, default-features = false } radroots_identity = { workspace = true, default-features = false } radroots_nostr = { workspace = true, optional = true, default-features = false } diff --git a/crates/sql_wasm_runtime/Cargo.toml b/crates/sql_wasm_runtime/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "radroots_sdk_sql_wasm_runtime" publish = false -version = "0.1.0-alpha" +version = "0.1.0-alpha.2" edition.workspace = true authors = ["Tyson Lupul <tyson@radroots.org>"] rust-version.workspace = true diff --git a/docs/implementation/DEVIATIONS.md b/docs/implementation/DEVIATIONS.md @@ -11,7 +11,6 @@ silently change `radroots.crates.release.v1`. | --- | --- | --- | | `RCRV1-DEV-001` | 015-023 | Preserve the existing standalone `lib` and `sdk` repositories; replace repository import/unification with independent qualification. | | `RCRV1-DEV-002` | 249 | Pull only the facade scaffold forward to immediately after Step 014 in `sdk`; do not repeat it later. | -| `RCRV1-DEV-005` | 013, 019-026, 226, 247, 249-268, 305 | Pin every Rust crate and internal Radroots dependency in `radrootslabs/sdk` to exactly `0.1.0-alpha` until further explicit authority. | ## Record template diff --git a/docs/implementation/TRACEABILITY.md b/docs/implementation/TRACEABILITY.md @@ -7,7 +7,6 @@ and verification. It adds no product requirements; the synchronized | Durable requirement | Owning package or control | Handoff steps | Required evidence | | --- | --- | --- | --- | | Exactly 19 public packages with a 17/2 repository split | release policy and architecture catalog | 013, 015-026, 304-305 | Cargo-resolved graph report and exact allowlist validation | -| Every Rust crate remains in the frozen `0.1.0-alpha` cohort | version policy and repository architecture validator | 013, 019-315 | exact workspace package, dependency requirement, lockfile, and synchronized-spec validation | | Public-only identity and separated signing/secrets | `radroots_identity`, `radroots_signing`, `radroots_secrets` | 052-054, 099-111, 147-155 | public API, feature, dependency, and redaction tests | | One canonical `TradeId` | `radroots_event`, `radroots_trade` | 073-098 | compile/API inventory and trade conformance | | Version-neutral protocol ownership | `radroots_protocol` and private generators | 055-064, 261-268 | contract vectors and generated freshness | diff --git a/docs/implementation/deviations.toml b/docs/implementation/deviations.toml @@ -57,60 +57,3 @@ verification = [ unresolved_risk = "The facade remains non-publishable until the package-realistic Step 305 enablement gate." normative_architecture_change = false adr_required = false - -[[deviation]] -id = "RCRV1-DEV-005" -date = "2026-07-28" -status = "active" -approval = "Explicit user Rust version-policy update dated 2026-07-28 17:47 UTC." -affected_steps = [ - "013", - "019", - "020", - "021", - "022", - "023", - "024", - "025", - "026", - "226", - "247", - "249", - "250", - "251", - "252", - "253", - "254", - "255", - "256", - "257", - "258", - "259", - "260", - "261", - "262", - "263", - "264", - "265", - "266", - "267", - "268", - "305", -] -spec_anchors = [ - "docs/specs/radroots_crates_release_v1.md#221-initial-versions", - "docs/specs/radroots_crates_release_v1.toml#repositories.sdk", -] -source_evidence = [ - "The prior 0.1.0 and 0.1.0-alpha.2 SDK crate cohorts were explicitly superseded.", - "The user requires every Rust crate in both standalone repositories to remain exactly 0.1.0-alpha until further explicit notice.", -] -replacement_action = "Pin every workspace package, lockfile entry, and internal Radroots dependency requirement in oss/sdk to 0.1.0-alpha; reject cohort drift until new explicit authority is recorded." -verification = [ - "Repository architecture validation rejects any workspace package version other than 0.1.0-alpha.", - "Internal Radroots dependency requirements resolve exactly to =0.1.0-alpha.", - "The synchronized release specification and SDK lockfile record the same frozen cohort.", -] -unresolved_risk = "The prerelease cohort intentionally prevents independent package version advancement until a future explicit policy change." -normative_architecture_change = false -adr_required = false diff --git a/docs/specs/radroots_crates_release_v1.md b/docs/specs/radroots_crates_release_v1.md @@ -1322,18 +1322,11 @@ dependency requirement is pinned to exactly `=0.1.0-alpha`. This temporary cohort is frozen until an explicit future authority changes it; neither normal development nor release preparation may bump it implicitly. -Every Rust crate in `radrootslabs/sdk`, including bindings, WASM wrappers, -runtime contracts, build tools, `radroots_sdk`, and `radroots`, is likewise -pinned to exactly `0.1.0-alpha`; every internal Radroots dependency uses the -exact `=0.1.0-alpha` requirement. Cross-repository dependencies use that same -frozen cohort without creating a path dependency between the standalone -repositories. This document's “V1” is the architecture specification version, -not a claim that Rust APIs are already 1.0-stable. - -Cargo package versions are independent from versioned wire, conformance, -database, and operation contracts. Changing the library crate cohort MUST NOT -rewrite authenticated historical protocol artifacts or derive Cargo SemVer -from a protocol contract version. +The two `radrootslabs/sdk` public packages remain at `0.1.0` under their +independent repository authority. Cross-repository dependencies therefore use +the exact version assigned to the package's owning repository rather than a +single monorepo-wide version. This document's “V1” is the architecture +specification version, not a claim that Rust APIs are already 1.0-stable. ### 22.2 SemVer groups diff --git a/docs/specs/radroots_crates_release_v1.sha256 b/docs/specs/radroots_crates_release_v1.sha256 @@ -1,4 +1,4 @@ -1f6d3ba0420b75ab58ed1b663ee05fab8e3bec3634f1cec1d8e5fab84e13ab8a radroots_crates_release_v1.md -7db533f32c70306b29adea35f85686e67287ae33abd33d1013a61590449f1296 radroots_crates_release_v1.toml -5020875c2cda4b2c9568c8b3f0fad5cd96756c3c779a72481a9652e558f77891 radroots_crates_release_v1_inventory.csv +592082517ef37a9cebec69849b57928e3efda147d2cdb4a48d5551ce77cf2369 radroots_crates_release_v1.md +93843b41c11d2854244eb5518b591e1d8efb8e5f560ccf895dc50e5779b3766f radroots_crates_release_v1.toml +c04ecb0de9143510862da8a2a9039d6aff28136d76cb819eb1bb1a2d8a370355 radroots_crates_release_v1_inventory.csv d47de10be596a4d33fee102a4f0617f66700b49515a75a1f42d62c9710043059 radroots_crates_release_v1.dot diff --git a/docs/specs/radroots_crates_release_v1.toml b/docs/specs/radroots_crates_release_v1.toml @@ -36,7 +36,7 @@ packages = [ [repositories.sdk] url = "https://github.com/radrootslabs/sdk" -version = "0.1.0-alpha" +version = "0.1.0" packages = ["radroots_sdk", "radroots"] [repository_policy] diff --git a/docs/specs/radroots_crates_release_v1_inventory.csv b/docs/specs/radroots_crates_release_v1_inventory.csv @@ -16,5 +16,5 @@ publish_order_hint,package,crate,repository,tier,platform,initial_version,defaul 15,radroots_transport_nostr,radroots_transport_nostr,lib,native network adapter,std-only; Tokio implementation detail in v1,0.1.0-alpha,,,radroots_transport;radroots_nostr;radroots_event_codec;radroots_protocol,,radroots_sdk;CLI;radrootsd;advanced hosts,"Concrete Nostr EventSource/EventSink implementation: relay URL policy, connection, NIP-42 authentication, bounded fetch pages, delivery, status, and relay-outcome normalization.","Event-store ingestion, outbox claiming, retry scheduling, projection refresh, global relay clients, direct SQL, or transport fallback." 16,radroots_sync,radroots_sync,lib,local-first orchestration,std-only in v1; executor-neutral public API,0.1.0-alpha,serde,serde,radroots_event;radroots_event_codec;radroots_signing;radroots_transport;radroots_storage;radroots_trade;radroots_protocol,,radroots_sdk;CLI;Studio;mobile/FFI;advanced hosts,"Shared pull, verification, canonical admission, duplicate handling, projection refresh, outbox signing/delivery, status, and retry-decision orchestration without owning scheduling.","Creating an executor, spawning hidden workers, installing timers globally, owning process lifecycle, storing UI state, or transport-specific branches outside adapters." 17,radroots_geonames,radroots_geonames,lib,concrete data provider,std-only,0.1.0-alpha,,,,,radroots_sdk;CLI;geocoding applications,"GeoNames asset specification, authenticated/integrity-checked acquisition, database lifecycle, and forward/reverse locality lookup using provider-owned types.","Generic multi-provider abstraction before a second provider exists, runtime-path policy, hidden downloads, SDK configuration types, SQLx/reqwest types in the public API, or test-fixture features." -18,radroots_sdk,radroots_sdk,sdk,advanced front door,std-only native engine,0.1.0-alpha,memory,memory;sqlite;sync;nostr;nip46;local-signing;radrootsd;geonames;knowledge;native;full,radroots_core;radroots_identity;radroots_protocol;radroots_event;radroots_event_codec;radroots_trade;radroots_signing;radroots_transport;radroots_storage,radroots_secrets;radroots_storage_sqlite;radroots_nostr;radroots_nostr_connect;radroots_transport_nostr;radroots_sync;radroots_geonames,CLI;Studio;FFI/mobile;advanced native applications,"Host-neutral asynchronous client engine, product operations, capability reporting, explicit storage/signing/transport composition, diagnostics, backup/restore, and safe commit semantics.","Global runtimes or subscribers, hidden workers, process signals, CLI parsing, UI state, Studio databases, raw SQLx/upstream client types, broad wildcard reexports, or a nominal no_std claim." -19,radroots,radroots,sdk,ordinary-user front door,std-only,0.1.0-alpha,client,client;native;nostr;nip46;radrootsd;geonames;knowledge;full,radroots_sdk;radroots_core;radroots_identity;radroots_event;radroots_trade;radroots_transport,,ordinary Rust applications;examples;documentation,"Canonical Rust onboarding package with curated modules, safe defaults, stable convenience builders, domain aggregation, examples, and primary documentation.","A public radroots::sdk namespace, wildcard reexport of radroots_sdk, duplicate engine implementation, CLI binary, hidden network/filesystem/keychain side effects, or exposure of every lower-crate symbol." +18,radroots_sdk,radroots_sdk,sdk,advanced front door,std-only native engine,0.1.0,memory,memory;sqlite;sync;nostr;nip46;local-signing;radrootsd;geonames;knowledge;native;full,radroots_core;radroots_identity;radroots_protocol;radroots_event;radroots_event_codec;radroots_trade;radroots_signing;radroots_transport;radroots_storage,radroots_secrets;radroots_storage_sqlite;radroots_nostr;radroots_nostr_connect;radroots_transport_nostr;radroots_sync;radroots_geonames,CLI;Studio;FFI/mobile;advanced native applications,"Host-neutral asynchronous client engine, product operations, capability reporting, explicit storage/signing/transport composition, diagnostics, backup/restore, and safe commit semantics.","Global runtimes or subscribers, hidden workers, process signals, CLI parsing, UI state, Studio databases, raw SQLx/upstream client types, broad wildcard reexports, or a nominal no_std claim." +19,radroots,radroots,sdk,ordinary-user front door,std-only,0.1.0,client,client;native;nostr;nip46;radrootsd;geonames;knowledge;full,radroots_sdk;radroots_core;radroots_identity;radroots_event;radroots_trade;radroots_transport,,ordinary Rust applications;examples;documentation,"Canonical Rust onboarding package with curated modules, safe defaults, stable convenience builders, domain aggregation, examples, and primary documentation.","A public radroots::sdk namespace, wildcard reexport of radroots_sdk, duplicate engine implementation, CLI binary, hidden network/filesystem/keychain side effects, or exposure of every lower-crate symbol." diff --git a/tools/xtask/Cargo.toml b/tools/xtask/Cargo.toml @@ -16,14 +16,14 @@ path = "src/main.rs" [dependencies] dto_bindgen_backend_ts = { workspace = true } dto_bindgen_core = { workspace = true } -radroots_core_bindings = { path = "../../crates/core_bindings", version = "=0.1.0-alpha" } +radroots_core_bindings = { path = "../../crates/core_bindings" } radroots_event = { workspace = true, features = ["dto-bindgen"] } -radroots_event_bindings = { path = "../../crates/event_bindings", version = "=0.1.0-alpha" } +radroots_event_bindings = { path = "../../crates/event_bindings" } radroots_event_index = { workspace = true, features = ["dto-bindgen"] } -radroots_identity_bindings = { path = "../../crates/identity_bindings", version = "=0.1.0-alpha" } -radroots_replica_schema_bindings = { path = "../../crates/replica_schema_bindings", version = "=0.1.0-alpha" } -radroots_runtime_contract_v1 = { path = "../../crates/runtime_contract_v1", version = "=0.1.0-alpha" } -radroots_trade_bindings = { path = "../../crates/trade_bindings", version = "=0.1.0-alpha" } +radroots_identity_bindings = { path = "../../crates/identity_bindings" } +radroots_replica_schema_bindings = { path = "../../crates/replica_schema_bindings" } +radroots_runtime_contract_v1 = { path = "../../crates/runtime_contract_v1" } +radroots_trade_bindings = { path = "../../crates/trade_bindings" } flate2 = "1" serde_json = "1" serde = { workspace = true, features = ["derive"] } diff --git a/tools/xtask/src/architecture.rs b/tools/xtask/src/architecture.rs @@ -218,49 +218,12 @@ fn validate_workspace_toolchain( .values() .find(|repository| repository.url == workspace_package.repository) .ok_or_else(|| "workspace repository has no architecture allocation".to_owned())?; - if workspace_package.version != repository.version - || public_metadata.version != repository.version - { + if public_metadata.version != repository.version { return Err(format!( - "workspace package version {} and public package version source {} must match frozen repository version {}", - workspace_package.version, public_metadata.version, repository.version + "public package version source {} must match repository version {}", + public_metadata.version, repository.version )); } - for member in &manifest.workspace.members { - let member_path = workspace_root.join(member).join("Cargo.toml"); - let member_raw = fs::read_to_string(&member_path) - .map_err(|error| format!("read {}: {error}", member_path.display()))?; - let member_manifest = member_raw - .parse::<toml::Value>() - .map_err(|error| format!("parse {}: {error}", member_path.display()))?; - let package = member_manifest - .get("package") - .and_then(toml::Value::as_table) - .ok_or_else(|| format!("{} is missing [package]", member_path.display()))?; - let package_name = package - .get("name") - .and_then(toml::Value::as_str) - .ok_or_else(|| format!("{} is missing package.name", member_path.display()))?; - let package_version = match package.get("version") { - Some(toml::Value::String(version)) => version.as_str(), - Some(toml::Value::Table(source)) - if source.get("workspace").and_then(toml::Value::as_bool) == Some(true) => - { - workspace_package.version.as_str() - } - _ => { - return Err(format!( - "workspace package {package_name} must declare version 0.1.0-alpha or inherit it from workspace.package" - )); - } - }; - if package_version != repository.version { - return Err(format!( - "workspace package {package_name} version {package_version} must match frozen repository version {}", - repository.version - )); - } - } if public_metadata.authors != PUBLIC_AUTHORS { return Err("public package authors source must match the workspace convention".to_owned()); } @@ -1227,7 +1190,7 @@ adr_required = false "sdk".to_string(), ArchitectureRepository { url: "https://github.com/radrootslabs/sdk".to_string(), - version: "0.1.0-alpha".to_string(), + version: "0.1.0".to_string(), packages: vec!["radroots".to_string()], }, )]), @@ -1239,7 +1202,7 @@ adr_required = false fn complete_workspace_manifest(members: &str) -> String { format!( - "[workspace]\nmembers = [{members}]\nresolver = \"3\"\n\n[workspace.package]\nversion = \"0.1.0-alpha\"\nedition = \"2024\"\nrust-version = \"1.97.1\"\nlicense = \"MIT OR Apache-2.0\"\nrepository = \"https://github.com/radrootslabs/sdk\"\nhomepage = \"https://radroots.org\"\nreadme = \"README\"\nauthors = [\"Tyson Lupul <tyson@radroots.org>\"]\n\n[workspace.metadata.radroots.public-package]\nversion = \"0.1.0-alpha\"\nauthors = [\"Tyson Lupul <tyson@radroots.org>\"]\nreadme = \"README.md\"\n\n[workspace.lints.rust]\nunsafe_code = \"forbid\"\n\n[workspace.lints.rustdoc]\nbroken_intra_doc_links = \"deny\"\n\n[workspace.lints.clippy]\ndbg_macro = \"deny\"\ntodo = \"deny\"\nunimplemented = \"deny\"\n" + "[workspace]\nmembers = [{members}]\nresolver = \"3\"\n\n[workspace.package]\nversion = \"0.1.0\"\nedition = \"2024\"\nrust-version = \"1.97.1\"\nlicense = \"MIT OR Apache-2.0\"\nrepository = \"https://github.com/radrootslabs/sdk\"\nhomepage = \"https://radroots.org\"\nreadme = \"README\"\nauthors = [\"Tyson Lupul <tyson@radroots.org>\"]\n\n[workspace.metadata.radroots.public-package]\nversion = \"0.1.0\"\nauthors = [\"Tyson Lupul <tyson@radroots.org>\"]\nreadme = \"README.md\"\n\n[workspace.lints.rust]\nunsafe_code = \"forbid\"\n\n[workspace.lints.rustdoc]\nbroken_intra_doc_links = \"deny\"\n\n[workspace.lints.clippy]\ndbg_macro = \"deny\"\ntodo = \"deny\"\nunimplemented = \"deny\"\n" ) } @@ -1325,7 +1288,7 @@ adr_required = false .expect("write snake package manifest"); fs::write( root.join("Cargo.toml"), - "[workspace]\nmembers = [\"crates/radroots_probe\", \"tools/xtask\"]\nresolver = \"3\"\n\n[workspace.dependencies]\nradroots-probe = \"0.1.0-alpha\"\n", + "[workspace]\nmembers = [\"crates/radroots_probe\", \"tools/xtask\"]\nresolver = \"3\"\n\n[workspace.dependencies]\nradroots-probe = \"0.1.0\"\n", ) .expect("write kebab dependency key"); @@ -1360,21 +1323,6 @@ adr_required = false let error = validate_workspace_toolchain(&root, &architecture) .expect_err("mismatched toolchain must fail"); assert!(error.contains("channel must match")); - - fs::write( - root.join("rust-toolchain.toml"), - "[toolchain]\nchannel = \"1.97.1\"\n", - ) - .expect("restore toolchain"); - let manifest = complete_workspace_manifest("").replacen( - "[workspace.package]\nversion = \"0.1.0-alpha\"", - "[workspace.package]\nversion = \"0.1.0\"", - 1, - ); - fs::write(root.join("Cargo.toml"), manifest).expect("write mismatched version cohort"); - let version_error = validate_workspace_toolchain(&root, &architecture) - .expect_err("mismatched version cohort must fail"); - assert!(version_error.contains("must match frozen repository version")); let _ = fs::remove_dir_all(root); } @@ -1424,19 +1372,19 @@ adr_required = false fs::write( root.join("Cargo.toml"), format!( - "{}\n[workspace.dependencies]\nradroots_core = {{ package = \"radroots_core\", path = \"crates/dependency\", version = \"=0.1.0-alpha\" }}\n", + "{}\n[workspace.dependencies]\nradroots_core = {{ package = \"radroots_core\", path = \"crates/dependency\", version = \"=0.1.0\" }}\n", complete_workspace_manifest("\"crates/radroots\"") ), ) .expect("write workspace manifest"); fs::write( root.join("crates/radroots/Cargo.toml"), - "[package]\nname = \"radroots\"\nversion = \"0.1.0-alpha\"\n\n[dependencies]\nradroots_core = { workspace = true }\n", + "[package]\nname = \"radroots\"\nversion = \"0.1.0\"\n\n[dependencies]\nradroots_core = { workspace = true }\n", ) .expect("write public manifest"); fs::write( root.join("crates/dependency/Cargo.toml"), - "[package]\nname = \"radroots_core\"\nversion = \"0.1.0-alpha\"\n", + "[package]\nname = \"radroots_core\"\nversion = \"0.1.0\"\n", ) .expect("write dependency manifest"); let mut architecture = architecture(); @@ -1456,12 +1404,12 @@ adr_required = false let workspace = fs::read_to_string(&workspace_path).expect("read workspace manifest"); fs::write( &workspace_path, - workspace.replace(", version = \"=0.1.0-alpha\"", ""), + workspace.replace(", version = \"=0.1.0\"", ""), ) .expect("write path-only dependency"); let error = validate_public_dependency_versions(&root, &architecture) .expect_err("path-only public dependency must fail"); - assert!(error.contains("must declare path and exact version =0.1.0-alpha")); + assert!(error.contains("must declare path and exact version =0.1.0")); let _ = fs::remove_dir_all(root); } @@ -1481,7 +1429,7 @@ adr_required = false fs::write( root.join("crates/radroots/Cargo.toml"), format!( - "[package]\nname = \"radroots\"\nversion = \"0.1.0-alpha\"\n\n[dependencies]\nprobe = {{ path = \"{sibling_path}\" }}\n" + "[package]\nname = \"radroots\"\nversion = \"0.1.0\"\n\n[dependencies]\nprobe = {{ path = \"{sibling_path}\" }}\n" ), ) .expect("write sibling dependency"); @@ -1491,7 +1439,7 @@ adr_required = false fs::write( root.join("crates/radroots/Cargo.toml"), - "[package]\nname = \"radroots\"\nversion = \"0.1.0-alpha\"\n\n[dependencies]\nprobe = { path = \"../dependency\" }\n", + "[package]\nname = \"radroots\"\nversion = \"0.1.0\"\n\n[dependencies]\nprobe = { path = \"../dependency\" }\n", ) .expect("write local dependency"); fs::create_dir_all(root.join(".cargo")).expect("create cargo config directory");