diff --git a/Cargo.lock b/Cargo.lock index e407cadc1..27aa2ca96 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -76,7 +76,7 @@ version = "0.12.0" dependencies = [ "anyhow", "borsh", - "client-sdk", + "hyle-client-sdk", "hyle-contract-sdk", "risc0-zkvm", "serde", @@ -822,25 +822,6 @@ dependencies = [ "serde_with", ] -[[package]] -name = "bonsai-runner" -version = "0.12.0" -dependencies = [ - "anyhow", - "axum 0.8.1", - "bincode", - "bonsai-sdk", - "borsh", - "bytemuck", - "hex", - "risc0-zkvm", - "serde", - "serde_json", - "tokio", - "tracing", - "tracing-subscriber 0.3.19", -] - [[package]] name = "bonsai-sdk" version = "1.3.0" @@ -1111,29 +1092,6 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" -[[package]] -name = "client-sdk" -version = "0.12.0" -dependencies = [ - "anyhow", - "axum 0.8.1", - "bincode", - "bonsai-runner", - "borsh", - "futures", - "hyle-contract-sdk", - "reqwest", - "risc0-zkvm", - "serde", - "serde_json", - "sp1-sdk", - "tokio", - "tokio-util", - "tracing", - "utoipa", - "utoipa-axum", -] - [[package]] name = "colorchoice" version = "1.0.3" @@ -2580,9 +2538,9 @@ dependencies = [ "anyhow", "borsh", "clap", - "client-sdk", "hex", "hydentity", + "hyle-client-sdk", "hyle-contract-sdk", "risc0-zkvm", "serde", @@ -2610,13 +2568,13 @@ dependencies = [ "bytes", "chrono", "clap", - "client-sdk", "config", "dhat", "fjall", "futures", "hex", "hydentity", + "hyle-client-sdk", "hyle-contract-sdk", "hyle-contracts", "hyle-model", @@ -2658,6 +2616,48 @@ dependencies = [ "uuid-tld", ] +[[package]] +name = "hyle-bonsai-runner" +version = "0.12.0" +dependencies = [ + "anyhow", + "axum 0.8.1", + "bincode", + "bonsai-sdk", + "borsh", + "bytemuck", + "hex", + "risc0-zkvm", + "serde", + "serde_json", + "tokio", + "tracing", + "tracing-subscriber 0.3.19", +] + +[[package]] +name = "hyle-client-sdk" +version = "0.12.0" +dependencies = [ + "anyhow", + "axum 0.8.1", + "bincode", + "borsh", + "futures", + "hyle-bonsai-runner", + "hyle-contract-sdk", + "reqwest", + "risc0-zkvm", + "serde", + "serde_json", + "sp1-sdk", + "tokio", + "tokio-util", + "tracing", + "utoipa", + "utoipa-axum", +] + [[package]] name = "hyle-contract-sdk" version = "0.12.0" @@ -2686,8 +2686,8 @@ dependencies = [ "anyhow", "borsh", "clap", - "client-sdk", "hydentity", + "hyle-client-sdk", "hyle-contract-sdk", "hyle-contracts", "hyllar", @@ -2739,7 +2739,7 @@ version = "0.12.0" dependencies = [ "anyhow", "borsh", - "client-sdk", + "hyle-client-sdk", "hyle-contract-sdk", "hyllar", "risc0-zkvm", @@ -5177,9 +5177,9 @@ version = "0.12.0" dependencies = [ "anyhow", "borsh", - "client-sdk", "hex", "hydentity", + "hyle-client-sdk", "hyle-contract-sdk", "hyle-contracts", "risc0-recursion", @@ -6598,7 +6598,7 @@ version = "0.12.0" dependencies = [ "anyhow", "borsh", - "client-sdk", + "hyle-client-sdk", "hyle-contract-sdk", "risc0-zkvm", "serde", @@ -7553,7 +7553,7 @@ name = "uuid-tld" version = "0.12.0" dependencies = [ "borsh", - "client-sdk", + "hyle-client-sdk", "hyle-contract-sdk", "rand 0.9.0", "rand_seeder", diff --git a/Cargo.toml b/Cargo.toml index 138e1d832..cc97e3d95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,6 +33,21 @@ repository = "https://github.com/Hyle-org/hyle/" rust-version = "1.84" # licence = "" +[workspace.dependencies] +bonsai-runner = { version = "0.12.0", default-features = false, path = "crates/bonsai-runner", package = "hyle-bonsai-runner" } +sdk = { version = "0.12.0", default-features = false, path = "crates/contract-sdk", package = "hyle-contract-sdk" } +hyle-contract-sdk = { version = "0.12.0", default-features = false, path = "crates/contract-sdk", package = "hyle-contract-sdk" } +client-sdk = { version = "0.12.0", default-features = false, path = "crates/client-sdk", package = "hyle-client-sdk" } +hyle-contracts = { version = "0.12.0", default-features = false, path = "crates/contracts", package = "hyle-contracts" } +hyle-model = { version = "0.12.0", default-features = false, path = "crates/hyle-model", package = "hyle-model" } +hyle-verifiers = { version = "0.12.0", default-features = false, path = "crates/hyle-verifiers", package = "hyle-verifiers" } +risc0-recursion = { version = "0.12.0", default-features = false, path = "crates/contracts/risc0-recursion", package = "risc0-recursion" } +hydentity = { version = "0.12.0", default-features = false, path = "crates/contracts/hydentity", package = "hydentity" } +hyllar = { version = "0.12.0", default-features = false, path = "crates/contracts/hyllar", package = "hyllar" } +staking = { version = "0.12.0", default-features = false, path = "crates/contracts/staking", package = "staking" } +amm = { version = "0.12.0", default-features = false, path = "crates/contracts/amm", package = "amm" } +uuid-tld = { version = "0.12.0", default-features = false, path = "crates/contracts/uuid-tld", package = "uuid-tld" } + [package] name = "hyle" version = { workspace = true } @@ -58,26 +73,25 @@ indexing_slicing = "warn" [dependencies] # Public dependencies -hyle-contract-sdk = { path = "./crates/contract-sdk", default-features = false, features = [ +hyle-contract-sdk = { workspace = true, default-features = false, features = [ "tracing", ] } -staking = { path = "./crates/contracts/staking", default-features = false, features = [ +staking = { workspace = true, default-features = false, features = [ "client", ] } -client-sdk = { path = "./crates/client-sdk", default-features = false, features = [ - "rest", +client-sdk = { workspace = true, features = [ + "rest", "tcp", "indexer" ] } -hyle-model = { path = "./crates/hyle-model", default-features = false, features = [ +hyle-model = { workspace = true, default-features = false, features = [ "full", "sqlx", ] } -hydentity = { path = "./crates/contracts/hydentity", features = ["client"] } -hyllar = { path = "./crates/contracts/hyllar", features = ["client"] } -risc0-recursion = { path = "./crates/contracts/risc0-recursion" } - -hyle-verifiers = { path = "crates/hyle-verifiers" } +hydentity = { workspace = true, features = ["client"] } +hyllar = { workspace = true, features = ["client"] } +risc0-recursion = { workspace = true } +hyle-verifiers = { workspace = true } anyhow = "1.0.96" @@ -100,7 +114,7 @@ bytes = { version = "1.10.0" } clap = { version = "4.5.31", features = ["derive"] } config = { version = "=0.15.0", default-features = false, features = ["ron"] } futures = { version = "0.3.31" } -hyle-contracts = { path = "./crates/contracts", package = "hyle-contracts" } +hyle-contracts = { workspace = true } indexmap = { version = "2.7.1", features = ["serde"] } # opentelemetry and axum-otel-metrics must be updated together (so that there is only one opentelemetry version) opentelemetry = { version = "0.28" } @@ -135,9 +149,9 @@ utoipa-axum = { version = "0.2.0" } testcontainers-modules = { version = "0.11.6", features = ["postgres"] } [dev-dependencies] -amm = { path = "./crates/contracts/amm", features = ["client"] } -uuid-tld = { path = "./crates/contracts/uuid-tld", features = ["client"] } -client-sdk = { path = "./crates/client-sdk", default-features = false, features = [ +amm = { workspace = true, features = ["client"] } +uuid-tld = { workspace = true, features = ["client"] } +client-sdk = { workspace = true, default-features = false, features = [ "rest", "tcp", "risc0", @@ -155,7 +169,7 @@ test-log = { version = "0.2.17", features = [ tokio-stream = "0.1.17" tempfile = "3.17.1" assert-json-diff = "2.0.2" -risc0-recursion = { path = "./crates/contracts/risc0-recursion" } +risc0-recursion = { workspace = true } risc0-zkvm = { version = "1.2.4", default-features = false, features = [ "client", ] } diff --git a/crates/bonsai-runner/Cargo.toml b/crates/bonsai-runner/Cargo.toml index 6cc02d43c..f4f047487 100644 --- a/crates/bonsai-runner/Cargo.toml +++ b/crates/bonsai-runner/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "bonsai-runner" +name = "hyle-bonsai-runner" version = { workspace = true } edition = { workspace = true } # license = { workspace = true } diff --git a/crates/bonsai-runner/src/bin/bonsai-runner.rs b/crates/bonsai-runner/src/bin/bonsai-runner.rs index 8c1879f2f..3d943a5cd 100644 --- a/crates/bonsai-runner/src/bin/bonsai-runner.rs +++ b/crates/bonsai-runner/src/bin/bonsai-runner.rs @@ -47,7 +47,7 @@ async fn prove_handler( } // Appeler la fonction `run_bonsai` - let receipt = bonsai_runner::run_bonsai(&payload.elf, payload.input_data) + let receipt = hyle_bonsai_runner::run_bonsai(&payload.elf, payload.input_data) .await .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; diff --git a/crates/client-sdk/Cargo.toml b/crates/client-sdk/Cargo.toml index 4436b939c..5e10b2384 100644 --- a/crates/client-sdk/Cargo.toml +++ b/crates/client-sdk/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "client-sdk" +name = "hyle-client-sdk" version = { workspace = true } edition = { workspace = true } # license = { workspace = true } @@ -8,7 +8,7 @@ repository = { workspace = true } rust-version = { workspace = true } [dependencies] -sdk = { path = "../contract-sdk", package = "hyle-contract-sdk", default-features = false, features = [ +sdk = { workspace = true, default-features = false, features = [ "full-model", ] } anyhow = "1.0.96" @@ -17,7 +17,7 @@ serde = "1.0" serde_json = { version = "1" } tracing = "0.1" -bonsai-runner = { path = "../bonsai-runner", optional = true } +bonsai-runner = { workspace = true, optional = true } risc0-zkvm = { version = "1.2.4", default-features = false, optional = true } sp1-sdk = { version = "4.1.1", default-features = false, optional = true } bincode = { version = "1.3.3", optional = true } diff --git a/crates/contract-sdk/Cargo.toml b/crates/contract-sdk/Cargo.toml index 7b4489be8..41face3f3 100644 --- a/crates/contract-sdk/Cargo.toml +++ b/crates/contract-sdk/Cargo.toml @@ -8,7 +8,7 @@ repository = { workspace = true } rust-version = "1.81" [dependencies] -hyle_model = { path = "../hyle-model", package = "hyle-model", default-features = false } +hyle-model = { workspace = true, default-features = false } serde = { version = "1.0", default-features = false, features = [ "derive", "alloc", @@ -26,4 +26,4 @@ mockall = "0.13.0" risc0 = ["dep:risc0-zkvm"] sp1 = ["dep:sp1-zkvm"] tracing = ["dep:tracing"] -full-model = ["hyle_model/full"] +full-model = ["hyle-model/full"] diff --git a/crates/contracts/Cargo.toml b/crates/contracts/Cargo.toml index db6c0ea12..1e3546e40 100644 --- a/crates/contracts/Cargo.toml +++ b/crates/contracts/Cargo.toml @@ -12,7 +12,7 @@ rust-version = "1.81" path = "metadata.rs" [dependencies] -sdk = { path = "../contract-sdk", package = "hyle-contract-sdk" } +sdk = { workspace = true } [build-dependencies] risc0-build = { version = "2.0.0", optional = true } diff --git a/crates/contracts/amm/Cargo.toml b/crates/contracts/amm/Cargo.toml index 7d13e6943..246875290 100644 --- a/crates/contracts/amm/Cargo.toml +++ b/crates/contracts/amm/Cargo.toml @@ -13,7 +13,7 @@ required-features = ["risc0"] test = false [dependencies] -sdk = { path = "../../contract-sdk", package = "hyle-contract-sdk" } +sdk = { workspace = true } serde = { version = "1.0", default-features = false, features = [ "derive", "alloc", @@ -24,11 +24,9 @@ borsh = { version = "1.5.5", features = ["derive"] } risc0-zkvm = { version = "1.2.4", default-features = false, optional = true, features = [ 'std', ] } -client_sdk = { path = "../../client-sdk", package = "client-sdk", features = [ - "risc0", -], optional = true } +client-sdk = { workspace = true, features = ["risc0"], optional = true } [features] default = [] -client = ["dep:client_sdk"] +client = ["dep:client-sdk"] risc0 = ["dep:risc0-zkvm", "sdk/risc0"] diff --git a/crates/contracts/hydentity/Cargo.toml b/crates/contracts/hydentity/Cargo.toml index aa7ced0ef..f6df77a2f 100644 --- a/crates/contracts/hydentity/Cargo.toml +++ b/crates/contracts/hydentity/Cargo.toml @@ -17,7 +17,7 @@ name = "hydentity-runner" path = "examples/host.rs" [dependencies] -sdk = { path = "../../contract-sdk", package = "hyle-contract-sdk" } +sdk = { workspace = true } serde_json = "1.0" serde = { version = "1.0", default-features = false, features = [ "derive", @@ -31,22 +31,13 @@ hex = "0.4.3" risc0-zkvm = { version = "1.2.4", default-features = false, optional = true, features = [ 'std', ] } -client_sdk = { path = "../../client-sdk", package = "client-sdk", features = [ - "risc0", -], optional = true } +client-sdk = { workspace = true, features = ["risc0"], optional = true } [dev-dependencies] # Activate client in examples. -sdk = { path = "../../contract-sdk", features = [ - "full-model", - "tracing", -], package = "hyle-contract-sdk" } +sdk = { workspace = true, features = ["full-model", "tracing"] } hydentity = { path = ".", features = ["client"] } -client_sdk = { path = "../../client-sdk", package = "client-sdk", features = [ - "risc0", - "rest", - "indexer", -] } +client-sdk = { workspace = true, features = ["risc0", "rest", "indexer"] } clap = { version = "4.5", features = ["derive"] } tokio = { version = "1.42.0", features = ["full", "tracing"] } @@ -54,5 +45,5 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] } [features] default = [] -client = ["dep:client_sdk"] +client = ["dep:client-sdk"] risc0 = ["dep:risc0-zkvm", "sdk/risc0"] diff --git a/crates/contracts/hyllar/Cargo.toml b/crates/contracts/hyllar/Cargo.toml index f7b570782..21ad70c98 100644 --- a/crates/contracts/hyllar/Cargo.toml +++ b/crates/contracts/hyllar/Cargo.toml @@ -13,7 +13,7 @@ required-features = ["risc0"] test = false [dependencies] -sdk = { path = "../../contract-sdk", package = "hyle-contract-sdk" } +sdk = { workspace = true } serde = { version = "1.0", default-features = false, features = [ "derive", "alloc", @@ -25,10 +25,7 @@ serde_with = "3.12.0" risc0-zkvm = { version = "1.2.4", default-features = false, optional = true, features = [ 'std', ] } -client_sdk = { path = "../../client-sdk", package = "client-sdk", features = [ - "risc0", - "indexer", -], optional = true } +client-sdk = { workspace = true, features = ["risc0", "indexer"], optional = true } [dev-dependencies] # Active client feature for tests @@ -41,5 +38,5 @@ risc0-zkvm = { version = "1.2.4", default-features = false, features = [ [features] default = [] -client = ["dep:client_sdk"] +client = ["dep:client-sdk"] risc0 = ["dep:risc0-zkvm", "sdk/risc0"] diff --git a/crates/contracts/risc0-recursion/Cargo.toml b/crates/contracts/risc0-recursion/Cargo.toml index d5c043af4..62b259b64 100644 --- a/crates/contracts/risc0-recursion/Cargo.toml +++ b/crates/contracts/risc0-recursion/Cargo.toml @@ -18,7 +18,7 @@ name = "risc0-recursion-runner" path = "examples/host.rs" [dependencies] -sdk = { path = "../../contract-sdk", package = "hyle-contract-sdk" } +sdk = { workspace = true } serde = { version = "1.0.218", features = ["derive"] } risc0-zkvm = { version = "1.2.4", default-features = false, optional = true, features = [ @@ -29,15 +29,14 @@ risc0-zkvm = { version = "1.2.4", default-features = false, optional = true, fea # Activate client in examples. risc0-recursion = { path = ".", features = ["client"] } +client-sdk = { workspace = true } +sdk = { workspace = true, features = ["full-model"] } + anyhow = "1.0.96" borsh = "1.5.5" hex = "0.4.3" -hydentity = { path = "../hydentity", features = ["client"] } +hydentity = { workspace = true, features = ["client"] } hyle-contracts = { path = ".." } -client-sdk = { path = "../../client-sdk" } -sdk = { path = "../../contract-sdk", package = "hyle-contract-sdk", features = [ - "full-model", -] } tokio = { version = "1.42.0" } risc0-zkvm = { version = "1.2.4", default-features = false, features = [ 'std', diff --git a/crates/contracts/staking/Cargo.toml b/crates/contracts/staking/Cargo.toml index 7e916952b..825148f94 100644 --- a/crates/contracts/staking/Cargo.toml +++ b/crates/contracts/staking/Cargo.toml @@ -13,7 +13,7 @@ required-features = ["risc0"] test = false [dependencies] -sdk = { path = "../../contract-sdk", package = "hyle-contract-sdk" } +sdk = { workspace = true } serde = { version = "1.0", default-features = false, features = [ "derive", "alloc", @@ -25,7 +25,7 @@ borsh = { version = "1.5.5", features = ["derive"] } risc0-zkvm = { version = "1.2.4", default-features = false, optional = true, features = [ 'std', ] } -client_sdk = { path = "../../client-sdk", package = "client-sdk", default-features = false, features = [ +client-sdk = { workspace = true, default-features = false, features = [ "risc0", ], optional = true } @@ -37,5 +37,5 @@ risc0-zkvm = { version = "1.2.4", default-features = false, features = [ [features] default = [] -client = ["dep:client_sdk"] +client = ["dep:client-sdk"] risc0 = ["dep:risc0-zkvm", "sdk/risc0"] diff --git a/crates/contracts/uuid-tld/Cargo.toml b/crates/contracts/uuid-tld/Cargo.toml index d76f7aaf1..3aeed7685 100644 --- a/crates/contracts/uuid-tld/Cargo.toml +++ b/crates/contracts/uuid-tld/Cargo.toml @@ -13,15 +13,13 @@ required-features = ["risc0"] test = false [dependencies] -sdk = { path = "../../contract-sdk", package = "hyle-contract-sdk" } +sdk = { workspace = true } borsh = "1.5.5" risc0-zkvm = { version = "1.2.4", default-features = false, optional = true, features = [ 'std', ] } -client_sdk = { path = "../../client-sdk", package = "client-sdk", default-features = false, features = [ - "risc0", -], optional = true } +client-sdk = { workspace = true, default-features = false, features = ["risc0"], optional = true } uuid = { version = "1.15.0", default-features = false } rand = { version = "0.9", default-features = false } rand_seeder = { version = "0.4.0", default-features = false } @@ -34,5 +32,5 @@ risc0-zkvm = { version = "1.2.4", default-features = false, features = [ [features] default = [] -client = ["dep:client_sdk"] +client = ["dep:client-sdk"] risc0 = ["dep:risc0-zkvm", "sdk/risc0"] diff --git a/crates/hyle-loadtest/Cargo.toml b/crates/hyle-loadtest/Cargo.toml index ff44ba8f9..d1163a5a3 100644 --- a/crates/hyle-loadtest/Cargo.toml +++ b/crates/hyle-loadtest/Cargo.toml @@ -9,11 +9,11 @@ rust-version.workspace = true [dependencies] tokio = "1.42" -hyllar = { path = "../contracts/hyllar", features = ["client"] } -hydentity = { path = "../contracts/hydentity", features = ["client"] } -hyle-contracts = { path = "../contracts", package = "hyle-contracts" } -hyle-contract-sdk = { path = "../contract-sdk", features = ["tracing"] } -client-sdk = { path = "../client-sdk", features = ["tcp", "risc0"] } +hyllar = { workspace = true, features = ["client"] } +hydentity = { workspace = true, features = ["client"] } +hyle-contracts = { workspace = true } +hyle-contract-sdk = { workspace = true, features = ["tracing"] } +client-sdk = { workspace = true, features= ["tcp", "risc0"] } anyhow = "1.0.96" borsh = "1.5.5" diff --git a/crates/hyle-verifiers/Cargo.toml b/crates/hyle-verifiers/Cargo.toml index abf1ac058..222e4186b 100644 --- a/crates/hyle-verifiers/Cargo.toml +++ b/crates/hyle-verifiers/Cargo.toml @@ -8,7 +8,7 @@ repository = { workspace = true } rust-version = { workspace = true } [dependencies] -hyle-model = { path = "../hyle-model" } +hyle-model = { workspace = true } anyhow = "1.0.96" borsh = "1.5.5"