From 1cb3a7da7df65f5724c6b4acb01f43e2e01e35ce Mon Sep 17 00:00:00 2001 From: ThetaSinner Date: Mon, 15 Jul 2024 13:11:48 +0100 Subject: [PATCH] Upgrade to 0.4 (#64) * Use new Holonix at 0.4 * Format * Update Holochain deps * Bump versions * Fix compile with new version * Try alt cache * Remove sweep * Include `hc` in CI shell * Include `lair-keystore` in CI shell * Format --- .github/workflows/test.yaml | 15 +- Cargo.lock | 617 +++++++++++++++--------- Cargo.toml | 42 +- Makefile | 10 + bindings/client/Cargo.toml | 2 +- bindings/runner/Cargo.toml | 2 +- bindings/runner/src/common.rs | 1 + bindings/trycp_client/Cargo.toml | 2 +- bindings/trycp_runner/Cargo.toml | 2 +- bindings/trycp_runner/src/common.rs | 1 + flake.lock | 564 ++++++---------------- flake.nix | 123 ++--- framework/core/Cargo.toml | 2 +- framework/instruments/Cargo.toml | 2 +- framework/instruments_derive/Cargo.toml | 2 +- framework/runner/Cargo.toml | 2 +- happ_builder/src/lib.rs | 1 + nix/modules/formatter.nix | 7 +- nix/modules/happs.nix | 339 +++++++------ nix/modules/rust.nix | 43 +- nix/modules/scenario.nix | 92 ++-- nix/modules/scenarios.nix | 32 +- nix/modules/workspace.nix | 120 +++-- nix/modules/zome.nix | 44 +- nix/modules/zomes.nix | 18 +- scripts/bump.sh | 6 + 26 files changed, 987 insertions(+), 1104 deletions(-) create mode 100644 Makefile create mode 100755 scripts/bump.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 82861c70..2d28908a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -38,20 +38,7 @@ jobs: extraPullNames: holochain-ci authToken: ${{ secrets.CACHIX_HOLOCHAIN_WIND_TUNNEL }} - - uses: actions/cache@v4 - with: - path: | - .cargo/bin/ - .cargo/registry/index/ - .cargo/registry/cache/ - .cargo/git/db/ - target/ - wasm-target/ - key: "${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}" - - - name: Cargo sweep mark for files - run: | - nix develop .#ci -c bash -c "cargo install cargo-sweep --force && cargo sweep --time 5" + - uses: Swatinem/rust-cache@v2 - name: Check scripts run: | diff --git a/Cargo.lock b/Cargo.lock index b6e2637d..85b45b9c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -200,7 +200,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -396,6 +396,18 @@ name = "bytes" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +dependencies = [ + "serde", +] + +[[package]] +name = "bytesize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" +dependencies = [ + "serde", +] [[package]] name = "callback" @@ -447,9 +459,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" +checksum = "907d8581360765417f8f2e0e7d602733bbed60156b4465b7617243689ef9b83d" [[package]] name = "cfg-if" @@ -518,7 +530,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -823,7 +835,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -871,7 +883,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -893,7 +905,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -931,6 +943,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + [[package]] name = "derivative" version = "2.2.0" @@ -950,7 +972,16 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", +] + +[[package]] +name = "derive_builder" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +dependencies = [ + "derive_builder_macro 0.12.0", ] [[package]] @@ -959,7 +990,19 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" dependencies = [ - "derive_builder_macro", + "derive_builder_macro 0.20.0", +] + +[[package]] +name = "derive_builder_core" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -971,7 +1014,17 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", +] + +[[package]] +name = "derive_builder_macro" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +dependencies = [ + "derive_builder_core 0.12.0", + "syn 1.0.109", ] [[package]] @@ -980,8 +1033,8 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" dependencies = [ - "derive_builder_core", - "syn 2.0.70", + "derive_builder_core 0.20.0", + "syn 2.0.71", ] [[package]] @@ -994,7 +1047,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -1032,7 +1085,16 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", +] + +[[package]] +name = "document-features" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef5282ad69563b5fc40319526ba27e0e7363d552a896f0297d54f767717f9b95" +dependencies = [ + "litrs", ] [[package]] @@ -1041,6 +1103,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + [[package]] name = "ed25519" version = "2.2.3" @@ -1125,7 +1193,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -1194,6 +1262,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + [[package]] name = "fallible-streaming-iterator" version = "0.1.9" @@ -1237,9 +1311,9 @@ dependencies = [ [[package]] name = "fixt" -version = "0.3.1" +version = "0.4.0-dev.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "977cd7a96311c3a16ad8aa924628d55383effba61508c732c9dc43a6d449d877" +checksum = "4f7d990d3dc39a57bdfc28947ec11c6045940f62bb04a862de3979a7e5c7fb66" dependencies = [ "holochain_serialized_bytes", "lazy_static", @@ -1354,7 +1428,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -1436,8 +1510,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -1461,7 +1537,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ - "fallible-iterator", + "fallible-iterator 0.2.0", "indexmap 1.9.3", "stable_deref_trait", ] @@ -1510,6 +1586,12 @@ dependencies = [ "tracing", ] +[[package]] +name = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + [[package]] name = "happ_builder" version = "0.1.0" @@ -1531,15 +1613,6 @@ dependencies = [ "ahash 0.7.8", ] -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.11", -] - [[package]] name = "hashbrown" version = "0.14.5" @@ -1552,22 +1625,33 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.8.4" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" dependencies = [ "hashbrown 0.14.5", ] +[[package]] +name = "hc_r2d2_sqlite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a95a4a8a02468f63e725a3881594a6720933f4e620087e5c2e34681d14cef05" +dependencies = [ + "r2d2", + "rusqlite", + "uuid 1.10.0", +] + [[package]] name = "hc_seed_bundle" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1524f81cc7a05bfacd666324692d1cd46c9f8dce68aa524a4c8a993449617f6b" +checksum = "849aaef544dc9a561bcf1af4cbbc02e4cd24904b623aa1d0311f756fc2a96d38" dependencies = [ "futures", "one_err", - "rmp-serde 0.15.5", + "rmp-serde", "rmpv", "serde", "serde_bytes", @@ -1576,9 +1660,9 @@ dependencies = [ [[package]] name = "hdi" -version = "0.4.1" +version = "0.5.0-dev.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03aed8ad8b59c0fffd1eaf3a064c28d6dcbb8a6e386c154ca2f5a3f52d00e3a0" +checksum = "496fab25a7da57d4473ec3afd676c097fa6b1e579e7f97cf7ccfe409b391f079" dependencies = [ "getrandom 0.2.15", "hdk_derive", @@ -1594,9 +1678,9 @@ dependencies = [ [[package]] name = "hdk" -version = "0.3.1" +version = "0.4.0-dev.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9319cd1bf3c04663cf76f7466a5da86dcc20641fbdb9faea623056ff1bb5237a" +checksum = "4c64cad926b27bbf72c447f8f8e3b53946458c0987a5b09f40d894aaa2bb143b" dependencies = [ "getrandom 0.2.15", "hdi", @@ -1614,9 +1698,9 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.3.1" +version = "0.4.0-dev.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49d060f62bb0bf59a833a6f8741bf780b499c2f87b5c9d9d861656f6f16bd02a" +checksum = "ec8a4f51a32c79ec338daaec277c46ecb51f6b5f65517894c43cb012c6864efe" dependencies = [ "darling 0.14.4", "heck 0.5.0", @@ -1672,9 +1756,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "holo_hash" -version = "0.3.1" +version = "0.4.0-dev.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9404dd8b3b47ef84ad39cd4cd679d6bf8f98c879fa33a966357246d3988616cd" +checksum = "4be7094460e2cbf0f2092fb7158ca5c0aeaa6e225fdcf417f091bb994dc8c919" dependencies = [ "base64 0.22.1", "blake2b_simd", @@ -1695,9 +1779,9 @@ dependencies = [ [[package]] name = "holochain_client" -version = "0.5.0-rc.5" +version = "0.6.0-dev.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749b6cdb1a99d0054b59f88907abb4ca8c2e1b57496e324a368b62179785bb6f" +checksum = "de2eca8edb7f3974d87674c25b559dcc5a4509afc749958e7bf3ec660443ca23" dependencies = [ "again", "anyhow", @@ -1720,7 +1804,7 @@ dependencies = [ [[package]] name = "holochain_client_instrumented" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" dependencies = [ "anyhow", "holo_hash", @@ -1736,9 +1820,9 @@ dependencies = [ [[package]] name = "holochain_conductor_api" -version = "0.3.1" +version = "0.4.0-dev.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7749c521f500aaf7fb1b34a8385d56707ce8076e319580dc74d75e5a02b4671d" +checksum = "7dd3aabbd5bc3b2161136016c1572547f665d18f612180a98e24ae7ab5e9f207" dependencies = [ "derive_more", "holo_hash", @@ -1759,11 +1843,11 @@ dependencies = [ [[package]] name = "holochain_integrity_types" -version = "0.3.1" +version = "0.4.0-dev.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe62dd90d6ddf5e02284a651713ab63112ce141002e4ee78e4e130ec90795eec" +checksum = "048f0ba891006a949a244543954977612b17a0acd7efbeac1914d0e7a119cf8b" dependencies = [ - "derive_builder", + "derive_builder 0.20.0", "holo_hash", "holochain_secure_primitive", "holochain_serialized_bytes", @@ -1778,9 +1862,9 @@ dependencies = [ [[package]] name = "holochain_keystore" -version = "0.3.1" +version = "0.4.0-dev.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97678069682249c5fa100d6de032868d012ae4e416f87ba12b43e7f3074bea77" +checksum = "50203763524fc888d73b449f657fb4c403eaf9e0653029d912e095ecd184ac2a" dependencies = [ "base64 0.22.1", "derive_more", @@ -1807,9 +1891,9 @@ dependencies = [ [[package]] name = "holochain_nonce" -version = "0.3.1" +version = "0.4.0-dev.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f206e624cefcc714e156e2459727d6dfef4c587d3cda69cf9d88c9b2b1418259" +checksum = "4d338a69a1d074d7ecc58e028bd3962c98741f5448830b0dcf7a853bbb6515f0" dependencies = [ "getrandom 0.2.15", "holochain_secure_primitive", @@ -1818,9 +1902,9 @@ dependencies = [ [[package]] name = "holochain_secure_primitive" -version = "0.3.1" +version = "0.4.0-dev.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edf2267568b756d9772a6ec62cf83b0519866d0e6f33c74ef8c77bfff0432d48" +checksum = "c9c9cbba8effd767423fd69a65e4c4458f359b62aca46f2e3527406958cf26c7" dependencies = [ "paste", "serde", @@ -1829,12 +1913,12 @@ dependencies = [ [[package]] name = "holochain_serialized_bytes" -version = "0.0.54" +version = "0.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad1068180811f3a23c340894cb98b0710244ffac76427664239545f162619c5" +checksum = "719fa847cf9f772f7e8e1a6f11d801e1383cc5af043292042665da9a6ce5c742" dependencies = [ "holochain_serialized_bytes_derive", - "rmp-serde 1.1.2", + "rmp-serde", "serde", "serde-transcode", "serde_bytes", @@ -1844,9 +1928,9 @@ dependencies = [ [[package]] name = "holochain_serialized_bytes_derive" -version = "0.0.54" +version = "0.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71cc7f19017233d644abc4a23cbe19220effc05aea057f93db1be00348b89464" +checksum = "3e6a221b5650251e09ef0b9223cf39e72b5222492cffc6bb4bdf36b2a6bc91aa" dependencies = [ "quote", "syn 1.0.109", @@ -1854,16 +1938,17 @@ dependencies = [ [[package]] name = "holochain_sqlite" -version = "0.3.1" +version = "0.4.0-dev.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8d7793ad7c8f0c56bda030ba16ce2b2ebda5b212256d0269bce0bf005dac81a" +checksum = "451cef8386abbb3b33324bb97988d2722c6cab7d75de977ca4839f6633d14043" dependencies = [ "anyhow", "async-trait", "derive_more", - "fallible-iterator", + "fallible-iterator 0.3.0", "futures", "getrandom 0.2.15", + "hc_r2d2_sqlite", "holo_hash", "holochain_nonce", "holochain_serialized_bytes", @@ -1881,8 +1966,7 @@ dependencies = [ "parking_lot 0.12.3", "pretty_assertions", "r2d2", - "r2d2_sqlite_neonphog", - "rmp-serde 1.1.2", + "rmp-serde", "rusqlite", "scheduled-thread-pool", "serde", @@ -1897,9 +1981,9 @@ dependencies = [ [[package]] name = "holochain_state_types" -version = "0.3.1" +version = "0.4.0-dev.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62c5b35375b270a899d3f731d504431becfd41d706c2d35c0b0ac0cb0ea0bac5" +checksum = "426e26174cbd8a48c17bb16b99537e13df4eb735f7acdb91c96a7ef0cb41293a" dependencies = [ "holo_hash", "holochain_integrity_types", @@ -1908,9 +1992,9 @@ dependencies = [ [[package]] name = "holochain_trace" -version = "0.3.1" +version = "0.4.0-dev.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b35d4236d4c1fb42273f8d5ccd3721f20601a4726f2f29df6e8c90938285f01" +checksum = "2e893ff1a7709195c73ad47dd5329ec9c96280743cdc2a92917709a626c34195" dependencies = [ "chrono", "derive_more", @@ -1926,15 +2010,15 @@ dependencies = [ [[package]] name = "holochain_types" -version = "0.3.1" +version = "0.4.0-dev.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b4358d68ae3aef3bcd990c046ce6cce7fbe0d924251b5aad81db1548e7abc03" +checksum = "dac8dd94259b1a620a895e78f454b346f2eeadb09628dab3b8eb59e9241791c2" dependencies = [ "anyhow", "async-trait", "automap", "backtrace", - "derive_builder", + "derive_builder 0.20.0", "derive_more", "fixt", "flate2", @@ -1975,9 +2059,9 @@ dependencies = [ [[package]] name = "holochain_util" -version = "0.3.1" +version = "0.4.0-dev.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "273aa62ff9274a22ce2f8830578edc177b77249fca5ff06bb486b4fc1d928ce4" +checksum = "79b89c3542e1fe783d9505d14a83497abadcf84d5d87e73fe1dbff3ac21cfce8" dependencies = [ "backtrace", "cfg-if", @@ -1993,9 +2077,9 @@ dependencies = [ [[package]] name = "holochain_wasmer_common" -version = "0.0.94" +version = "0.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9f7d17668e4a4997b5e121c7a951ea9606331ef206b991f1e81420c84d98485" +checksum = "81862ba8234412864273d21983c99af4e8b97739a5e4c354030470acdc6b431c" dependencies = [ "holochain_serialized_bytes", "serde", @@ -2007,9 +2091,9 @@ dependencies = [ [[package]] name = "holochain_wasmer_guest" -version = "0.0.94" +version = "0.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e292e12fda0716ce36b566c7cf3dad8443fdc7c56950e42c5a3ba81988e792d0" +checksum = "fce20cd8eb137a355394e57612cf2cf7836dab57948d56af9f9fe080ea168d41" dependencies = [ "holochain_serialized_bytes", "holochain_wasmer_common", @@ -2021,9 +2105,9 @@ dependencies = [ [[package]] name = "holochain_websocket" -version = "0.3.1" +version = "0.4.0-dev.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86f7b4866e33556abbcaff03967ba52df1df2daa12555dcb8d620218f92fb2f" +checksum = "3b97be832d7e3d99bc16c925fa14865d45ae3c9cc0027db3b1b3e3ed73e76d7d" dependencies = [ "async-trait", "futures", @@ -2038,7 +2122,7 @@ dependencies = [ [[package]] name = "holochain_wind_tunnel_runner" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" dependencies = [ "anyhow", "holochain_client_instrumented", @@ -2052,11 +2136,11 @@ dependencies = [ [[package]] name = "holochain_zome_types" -version = "0.3.1" +version = "0.4.0-dev.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd576c22f2752cf05d018a94797fe4ac4ccbf66d8ba448a1d267bb9657ad3ea5" +checksum = "c9338e9b985d6af6e788aa0036040dc98996ddbc7156a9240dc31d87adf81a9a" dependencies = [ - "derive_builder", + "derive_builder 0.20.0", "derive_more", "holo_hash", "holochain_integrity_types", @@ -2475,9 +2559,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_bin_data" -version = "0.3.1" +version = "0.4.0-dev.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "820631479f0e3e6a843a34d8fbe96c11c0cbedfaaeb290a559f8c7cfb09384df" +checksum = "df3f80a3c52eef16808c654490e65d3403b7d2c958ab886e0bc1c74dfb1fb488" dependencies = [ "base64 0.22.1", "derive_more", @@ -2490,9 +2574,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_block" -version = "0.3.1" +version = "0.4.0-dev.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb67ae6c87581d2f6906bddb651f16f67caf1f3143e2344d3c9d32233afc3357" +checksum = "70ada912be6060d3602b2b5d02edc5ae5e655a6f96ba225b237e5645c9416e65" dependencies = [ "kitsune_p2p_bin_data", "kitsune_p2p_timestamp", @@ -2501,9 +2585,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_dht" -version = "0.3.1" +version = "0.4.0-dev.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61621c362da7b74e19b89bc097441743a7eaae0a167a2c33ef501419e0d277c1" +checksum = "6b257c121606739785c4703d4db69cd0d91d7b0b5672462e9bdc373e51ad9880" dependencies = [ "derivative", "derive_more", @@ -2521,9 +2605,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_dht_arc" -version = "0.3.1" +version = "0.4.0-dev.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc4e3eea7e151b8be2f6e7af6b625ae864c1709a654b8396bd6af72f5e70e470" +checksum = "241ded259c121ee17b34f95c81f6b0a11e3d28f379486c47b089102698a83556" dependencies = [ "derive_more", "gcollections", @@ -2536,9 +2620,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_timestamp" -version = "0.3.1" +version = "0.4.0-dev.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e4eedd4a5ec72fbf433fb4957c93449fd3e47636874dbc8e119a5d9031845" +checksum = "f75c6b5bdc4e3a9514c949975ab2a68f977e612bb638bd961ccab948d134af7a" dependencies = [ "chrono", "rusqlite", @@ -2547,9 +2631,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_types" -version = "0.3.1" +version = "0.4.0-dev.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76acb97b596371959305c0f327316c7d58f267132a202c10959786c8aabe496a" +checksum = "e5c87e769391648c0717996646bd4ccddacbcff1a050589f7ea65229834a9c8f" dependencies = [ "base64 0.22.1", "derive_more", @@ -2564,12 +2648,12 @@ dependencies = [ "once_cell", "parking_lot 0.12.3", "paste", - "rmp-serde 1.1.2", - "rustls 0.20.9", + "rmp-serde", + "rustls 0.21.12", "serde", "serde_bytes", "serde_json", - "sysinfo 0.30.13", + "sysinfo", "thiserror", "tokio", "url", @@ -2578,9 +2662,9 @@ dependencies = [ [[package]] name = "lair_keystore" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56689c6c7f318e5909c9de1d7eac7f2d383370341632ab845c2da24b5b6bb7aa" +checksum = "f0da3e3e1bd2644dc2974ef622743cd83f2c661b3c6c67acb00cda4725646def" dependencies = [ "lair_keystore_api", "pretty_assertions", @@ -2588,17 +2672,17 @@ dependencies = [ "rusqlite", "sqlformat", "structopt", - "sysinfo 0.28.4", + "sysinfo", "tracing-subscriber", ] [[package]] name = "lair_keystore_api" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa27af83a127b28c06d7c175dfc34d762fb66ea36d6ac2110d93a55d0e058dd5" +checksum = "9519a48df54d2041f8697bba7c3957263a5f2bb720ae6c4954004bad51693c61" dependencies = [ - "base64 0.13.1", + "base64 0.22.1", "dunce", "hc_seed_bundle", "lru", @@ -2611,7 +2695,7 @@ dependencies = [ "serde_yaml", "time", "tokio", - "toml 0.7.8", + "toml 0.8.14", "tracing", "url", "winapi", @@ -2694,9 +2778,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" +checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" dependencies = [ "cc", "pkg-config", @@ -2709,6 +2793,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litrs" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" + [[package]] name = "local_signals" version = "0.1.0" @@ -2744,11 +2834,11 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.10.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.14.5", ] [[package]] @@ -2867,16 +2957,16 @@ checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "mr_bundle" -version = "0.3.1" +version = "0.4.0-dev.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d57525022d61a753a0ce52bbee5aeeb60b42f715918e1af81def36565fe49f" +checksum = "ecba74b5293658685ec724bbe6baced8b4ff86e7bbea69a787de085d1f90b38d" dependencies = [ "derive_more", "flate2", "futures", "holochain_util", "reqwest 0.12.5", - "rmp-serde 1.1.2", + "rmp-serde", "serde", "serde_bytes", "serde_yaml", @@ -2986,6 +3076,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-format" version = "0.4.4" @@ -3053,7 +3149,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -3112,7 +3208,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -3273,7 +3369,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -3310,6 +3406,12 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -3417,16 +3519,6 @@ dependencies = [ "scheduled-thread-pool", ] -[[package]] -name = "r2d2_sqlite_neonphog" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d1e95b387a49ce52c5e4994fbe18af7b6cd52510f74c9a243b12abfc207f49c" -dependencies = [ - "r2d2", - "rusqlite", -] - [[package]] name = "radium" version = "0.7.0" @@ -3868,20 +3960,9 @@ dependencies = [ [[package]] name = "rmp-serde" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723ecff9ad04f4ad92fe1c8ca6c20d2196d9286e9c60727c4cb5511629260e9d" -dependencies = [ - "byteorder", - "rmp", - "serde", -] - -[[package]] -name = "rmp-serde" -version = "1.1.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffea85eea980d8a74453e5d02a8d93028f3c34725de143085a844ebe953258a" +checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" dependencies = [ "byteorder", "rmp", @@ -3890,9 +3971,9 @@ dependencies = [ [[package]] name = "rmpv" -version = "1.0.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de8813b3a2f95c5138fe5925bfb8784175d88d6bff059ba8ce090aa891319754" +checksum = "58450723cd9ee93273ce44a20b6ec4efe17f8ed2e3631474387bfdecf18bb2a9" dependencies = [ "num-traits", "rmp", @@ -3923,12 +4004,12 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" +checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" dependencies = [ "bitflags 2.6.0", - "fallible-iterator", + "fallible-iterator 0.3.0", "fallible-streaming-iterator", "hashlink", "libsqlite3-sys", @@ -3963,18 +4044,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.20.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" -dependencies = [ - "log", - "ring 0.16.20", - "sct", - "webpki", -] - [[package]] name = "rustls" version = "0.21.12" @@ -4094,6 +4163,31 @@ dependencies = [ "parking_lot 0.12.3", ] +[[package]] +name = "schemars" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", + "url", +] + +[[package]] +name = "schemars_derive" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.71", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -4174,9 +4268,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.197" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] @@ -4210,15 +4304,36 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.71", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -4281,7 +4396,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -4636,9 +4751,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.70" +version = "2.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" dependencies = [ "proc-macro2", "quote", @@ -4657,21 +4772,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" -[[package]] -name = "sysinfo" -version = "0.28.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c2f3ca6693feb29a89724516f016488e9aafc7f37264f898593ee4b942f31b" -dependencies = [ - "cfg-if", - "core-foundation-sys", - "libc", - "ntapi", - "once_cell", - "rayon", - "winapi", -] - [[package]] name = "sysinfo" version = "0.30.13" @@ -4835,22 +4935,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -4865,11 +4965,14 @@ dependencies = [ [[package]] name = "time" -version = "0.3.23" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ + "deranged", "itoa", + "num-conv", + "powerfmt", "serde", "time-core", "time-macros", @@ -4877,16 +4980,17 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.10" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] @@ -4949,7 +5053,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -5137,7 +5241,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -5217,9 +5321,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "trycp_api" -version = "0.16.0" +version = "0.17.0-dev.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c4959cf96dd36f063336eb415b41c765f111bca3225ad0a33002b4eff8ca46" +checksum = "8ce5ae60896a79542aa8cb9befe28e0a8749ed574ae0d0e867efd07212686ebd" dependencies = [ "serde", "serde_bytes", @@ -5228,12 +5332,12 @@ dependencies = [ [[package]] name = "trycp_client" -version = "0.16.0" +version = "0.17.0-dev.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d718e080cf594c08826f0058c7bebbdca0352b2d044d1654d3e6a0e39dcf3de1" +checksum = "d59bb2075dcd4e8f25cb5b02e03a77bdc154dc236b010e6a85d6d93943604205" dependencies = [ "futures", - "rmp-serde 1.1.2", + "rmp-serde", "serde_json", "tokio", "tokio-tungstenite", @@ -5242,7 +5346,7 @@ dependencies = [ [[package]] name = "trycp_client_instrumented" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" dependencies = [ "ed25519-dalek", "holo_hash", @@ -5254,7 +5358,7 @@ dependencies = [ "holochain_zome_types", "kitsune_p2p_types", "rand 0.8.5", - "rmp-serde 1.1.2", + "rmp-serde", "serde", "tokio", "tokio-tungstenite", @@ -5267,7 +5371,7 @@ dependencies = [ [[package]] name = "trycp_wind_tunnel_runner" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" dependencies = [ "anyhow", "clap 4.5.9", @@ -5333,7 +5437,7 @@ dependencies = [ "holochain_types", "log", "rand 0.8.5", - "rmp-serde 1.1.2", + "rmp-serde", "tokio", "trycp_wind_tunnel_runner", ] @@ -5484,6 +5588,10 @@ name = "uuid" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +dependencies = [ + "getrandom 0.2.15", + "rand 0.8.5", +] [[package]] name = "validated" @@ -5577,7 +5685,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", "wasm-bindgen-shared", ] @@ -5611,7 +5719,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5648,9 +5756,9 @@ dependencies = [ [[package]] name = "wasmer" -version = "4.2.8" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4014573f108a246858299eb230031e268316fd57207bd2e8afc79b20fc7ce983" +checksum = "6ce4a267a570e121c9375136adefa2c48810273907de9c6817bc19db4d6144bc" dependencies = [ "bytes", "cfg-if", @@ -5677,9 +5785,9 @@ dependencies = [ [[package]] name = "wasmer-compiler" -version = "4.2.8" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a77bfe259f08e8ec9e77f8f772ebfb4149f799d1f637231c5a5a6a90c447256" +checksum = "b9c23098e86ef1038155684fe50f0c1079a0e2a2e70f115b789df17e6ba98d20" dependencies = [ "backtrace", "bytes", @@ -5700,13 +5808,14 @@ dependencies = [ "wasmer-vm", "wasmparser", "winapi", + "xxhash-rust", ] [[package]] name = "wasmer-compiler-cranelift" -version = "4.2.8" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9280c47ebc754f95357745a38a995dd766f149e16b26e1b7e35741eb23c03d12" +checksum = "95287b79973ad5f485215733ef9f0d4bb951a6b7e655585d2bd3d4a4ba1253c9" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -5721,11 +5830,33 @@ dependencies = [ "wasmer-types", ] +[[package]] +name = "wasmer-config" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a0f70c177b1c5062cfe0f5308c3317751796fef9403c22a0cd7b4cacd4ccd8" +dependencies = [ + "anyhow", + "bytesize", + "derive_builder 0.12.0", + "hex", + "indexmap 2.2.6", + "schemars", + "semver 1.0.23", + "serde", + "serde_cbor", + "serde_json", + "serde_yaml", + "thiserror", + "toml 0.8.14", + "url", +] + [[package]] name = "wasmer-derive" -version = "4.2.8" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9352877c4f07fc59146d21b56ae6dc469caf342587f49c81b4fbeafead31972" +checksum = "e48f36aeeecb655f15fdd358bdf6e4cec27df181468fa4226084157e8462bd5e" dependencies = [ "proc-macro-error", "proc-macro2", @@ -5735,25 +5866,30 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "4.2.8" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749214b6170f2b2fbbfe5b7e7f8d381e64930ac4122f3abceb33cde0292d45d2" +checksum = "83cb97b6b20084757a2a8d548dc0d4179c3fe9e2d711740423a1e6aa3f8b9091" dependencies = [ "bytecheck", "enum-iterator", "enumset", + "getrandom 0.2.15", + "hex", "indexmap 1.9.3", "more-asserts", "rkyv", + "sha2", "target-lexicon", "thiserror", + "webc", + "xxhash-rust", ] [[package]] name = "wasmer-vm" -version = "4.2.8" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300215479de0deeb453e95aeb1b9c8ffd9bc7d9bd27c5f9e8a184e54db4d31a9" +checksum = "bc1e19d986844b17b927ec8b0c7f3da6a7a2c2cb3b0f8ca5d4cb1a1f71bfb124" dependencies = [ "backtrace", "cc", @@ -5820,13 +5956,32 @@ dependencies = [ ] [[package]] -name = "webpki" -version = "0.22.4" +name = "webc" +version = "6.0.0-rc1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" +checksum = "c1fc686c7b43c9bc630a499f6ae1f0a4c4bd656576a53ae8a147b0cc9bc983ad" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "anyhow", + "base64 0.21.7", + "bytes", + "cfg-if", + "document-features", + "flate2", + "indexmap 1.9.3", + "libc", + "once_cell", + "semver 1.0.23", + "serde", + "serde_cbor", + "serde_json", + "sha2", + "shared-buffer", + "tar", + "tempfile", + "thiserror", + "toml 0.7.8", + "url", + "wasmer-config", ] [[package]] @@ -5890,7 +6045,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "wind_tunnel_core" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" dependencies = [ "derive_more", "log", @@ -5899,7 +6054,7 @@ dependencies = [ [[package]] name = "wind_tunnel_instruments" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" dependencies = [ "anyhow", "influxive-core", @@ -5914,15 +6069,15 @@ dependencies = [ [[package]] name = "wind_tunnel_instruments_derive" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" dependencies = [ "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] name = "wind_tunnel_runner" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" dependencies = [ "anyhow", "clap 4.5.9", @@ -5932,7 +6087,7 @@ dependencies = [ "log", "nanoid", "parking_lot 0.12.3", - "sysinfo 0.30.13", + "sysinfo", "tokio", "wind_tunnel_core", "wind_tunnel_instruments", @@ -6234,6 +6389,12 @@ dependencies = [ "rustix", ] +[[package]] +name = "xxhash-rust" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63658493314859b4dfdf3fb8c1defd61587839def09582db50b8a4e93afca6bb" + [[package]] name = "yansi" version = "0.5.1" @@ -6266,7 +6427,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 5c821917..48381522 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,31 +87,31 @@ rand = "0.8" ed25519-dalek = "2.1" # Deps for Holochain -holochain_client = { version = "=0.5.0-rc.5" } -trycp_client = { version = "0.16.0" } -trycp_api = { version = "0.16.0" } -holochain_zome_types = { version = "0.3.1" } -holo_hash = { version = "0.3.1" } -holochain_types = { version = "0.3.1" } -holochain_conductor_api = { version = "0.3.1" } -holochain_nonce = { version = "0.3.1" } -kitsune_p2p_types = { version = "0.3.1" } -hdk = { version = "0.3.1" } -hdi = "0.4.1" -mr_bundle = "0.3.1" -holochain_serialized_bytes = "0.0.54" +holochain_client = { version = "=0.6.0-dev.2" } +trycp_client = { version = "0.17.0-dev.0" } +trycp_api = { version = "0.17.0-dev.0" } +holochain_zome_types = { version = "0.4.0-dev.10" } +holo_hash = { version = "0.4.0-dev.8" } +holochain_types = { version = "0.4.0-dev.12" } +holochain_conductor_api = { version = "0.4.0-dev.12" } +holochain_nonce = { version = "0.4.0-dev.4" } +kitsune_p2p_types = { version = "0.4.0-dev.9" } +hdk = { version = "0.4.0-dev.10" } +hdi = "0.5.0-dev.9" +mr_bundle = "0.4.0-dev.5" +holochain_serialized_bytes = "0.0.55" # Framework -wind_tunnel_core = { path = "./framework/core", version = "0.2.0-alpha.2" } -wind_tunnel_instruments = { path = "./framework/instruments", version = "0.2.0-alpha.2" } -wind_tunnel_instruments_derive = { path = "./framework/instruments_derive", version = "0.2.0-alpha.2" } -wind_tunnel_runner = { path = "./framework/runner", version = "0.2.0-alpha.2" } +wind_tunnel_core = { path = "./framework/core", version = "0.3.0-alpha.1" } +wind_tunnel_instruments = { path = "./framework/instruments", version = "0.3.0-alpha.1" } +wind_tunnel_instruments_derive = { path = "./framework/instruments_derive", version = "0.3.0-alpha.1" } +wind_tunnel_runner = { path = "./framework/runner", version = "0.3.0-alpha.1" } # Bindings -holochain_client_instrumented = { path = "./bindings/client", version = "0.2.0-alpha.2" } -holochain_wind_tunnel_runner = { path = "./bindings/runner", version = "0.2.0-alpha.2" } -trycp_client_instrumented = { path = "./bindings/trycp_client", version = "0.2.0-alpha.2" } -trycp_wind_tunnel_runner = { path = "./bindings/trycp_runner", version = "0.2.0-alpha.2" } +holochain_client_instrumented = { path = "./bindings/client", version = "0.3.0-alpha.1" } +holochain_wind_tunnel_runner = { path = "./bindings/runner", version = "0.3.0-alpha.1" } +trycp_client_instrumented = { path = "./bindings/trycp_client", version = "0.3.0-alpha.1" } +trycp_wind_tunnel_runner = { path = "./bindings/trycp_runner", version = "0.3.0-alpha.1" } # hApp Builder happ_builder = { path = "./happ_builder", version = "0.1.0" } diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..8d77c24e --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ + +bump: + @if [ "$(ver)x" = "x" ]; then \ + echo "USAGE: make bump ver=0.1.0-alpha.1"; \ + exit 1; \ + fi + ./scripts/bump.sh $(ver) + cargo build + + diff --git a/bindings/client/Cargo.toml b/bindings/client/Cargo.toml index 4f0cbf7f..84296138 100644 --- a/bindings/client/Cargo.toml +++ b/bindings/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_client_instrumented" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" description = "An instrumented wrapper around the holochain_client" license = "MIT" authors = ["ThetaSinner"] diff --git a/bindings/runner/Cargo.toml b/bindings/runner/Cargo.toml index 2e318ba7..71835d8d 100644 --- a/bindings/runner/Cargo.toml +++ b/bindings/runner/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_wind_tunnel_runner" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" description = "Customises the wind_tunnel_runner for Holochain testing" license = "MIT" authors = ["ThetaSinner"] diff --git a/bindings/runner/src/common.rs b/bindings/runner/src/common.rs index 95f60c79..ce46b00f 100644 --- a/bindings/runner/src/common.rs +++ b/bindings/runner/src/common.rs @@ -165,6 +165,7 @@ where installed_app_id: Some(installed_app_id.clone()), membrane_proofs: Default::default(), network_seed: None, + ignore_genesis_failure: false, }) .await .map_err(handle_api_err)?; diff --git a/bindings/trycp_client/Cargo.toml b/bindings/trycp_client/Cargo.toml index 997e7b81..35179f68 100644 --- a/bindings/trycp_client/Cargo.toml +++ b/bindings/trycp_client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trycp_client_instrumented" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" description = "An instrumented wrapper around trycp_client" license = "MIT" authors = ["ThetaSinner"] diff --git a/bindings/trycp_runner/Cargo.toml b/bindings/trycp_runner/Cargo.toml index 9a906e19..fa5a0170 100644 --- a/bindings/trycp_runner/Cargo.toml +++ b/bindings/trycp_runner/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trycp_wind_tunnel_runner" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" description = "Customises the wind_tunnel_runner for Holochain testing" license = "MIT" authors = ["ThetaSinner"] diff --git a/bindings/trycp_runner/src/common.rs b/bindings/trycp_runner/src/common.rs index ad198d10..978fb7f4 100644 --- a/bindings/trycp_runner/src/common.rs +++ b/bindings/trycp_runner/src/common.rs @@ -131,6 +131,7 @@ where installed_app_id: Some(installed_app_id.clone()), membrane_proofs: Default::default(), network_seed: Some(run_id), + ignore_genesis_failure: false, }, // Allow more time to install the app when running many agents. The upload of // the app bundle can take some time when targeting many nodes. diff --git a/flake.lock b/flake.lock index 14d99e31..52e170cc 100644 --- a/flake.lock +++ b/flake.lock @@ -4,17 +4,17 @@ "inputs": { "naersk": "naersk", "nixpkgs": [ - "holochain", + "holonix", "nixpkgs" ], "utils": "utils" }, "locked": { - "lastModified": 1720515076, - "narHash": "sha256-DRghB5nXdXzyMLoo3zI8oYTfhaF0nxWJdmdH7vo4wLo=", + "lastModified": 1720711731, + "narHash": "sha256-e3UmwyA8TUVqQytF7K58lO3j8MsoH3hoA4n4YBhGDoM=", "owner": "Ph0enixKM", "repo": "Amber", - "rev": "a0bbc045abfca7c782bddbb6a945e3e2c0643d5c", + "rev": "58e9d04d85d5195c97e88e9413dc76b3fa0f83fd", "type": "github" }, "original": { @@ -40,23 +40,6 @@ "type": "github" } }, - "cargo-chef_2": { - "flake": false, - "locked": { - "lastModified": 1695999026, - "narHash": "sha256-UtLoZd7YBRSF9uXStfC3geEFqSqZXFh1rLHaP8hre0Y=", - "owner": "LukeMathWalker", - "repo": "cargo-chef", - "rev": "6e96ae5cd023b718ae40d608981e50a6e7d7facf", - "type": "github" - }, - "original": { - "owner": "LukeMathWalker", - "ref": "main", - "repo": "cargo-chef", - "type": "github" - } - }, "cargo-rdme": { "flake": false, "locked": { @@ -74,36 +57,19 @@ "type": "github" } }, - "cargo-rdme_2": { - "flake": false, - "locked": { - "lastModified": 1675118998, - "narHash": "sha256-lrYWqu3h88fr8gG3Yo5GbFGYaq5/1Os7UtM+Af0Bg4k=", - "owner": "orium", - "repo": "cargo-rdme", - "rev": "f9dbb6bccc078f4869f45ae270a2890ac9a75877", - "type": "github" - }, - "original": { - "owner": "orium", - "ref": "v1.1.0", - "repo": "cargo-rdme", - "type": "github" - } - }, "crane": { "inputs": { "nixpkgs": [ - "holochain", + "holonix", "nixpkgs" ] }, "locked": { - "lastModified": 1720226507, - "narHash": "sha256-yHVvNsgrpyNTXZBEokL8uyB2J6gB1wEx0KOJzoeZi1A=", + "lastModified": 1720546058, + "narHash": "sha256-iU2yVaPIZm5vMGdlT0+57vdB/aPq/V5oZFBRwYw+HBM=", "owner": "ipetkov", "repo": "crane", - "rev": "0aed560c5c0a61c9385bddff471a13036203e11c", + "rev": "2d83156f23c43598cf44e152c33a59d3892f8b29", "type": "github" }, "original": { @@ -115,16 +81,16 @@ "crane_2": { "inputs": { "nixpkgs": [ - "holochain", + "holonix", "nixpkgs" ] }, "locked": { - "lastModified": 1707363936, - "narHash": "sha256-QbqyvGFYt84QNOQLOOTWplZZkzkyDhYrAl/N/9H0vFM=", + "lastModified": 1720546058, + "narHash": "sha256-iU2yVaPIZm5vMGdlT0+57vdB/aPq/V5oZFBRwYw+HBM=", "owner": "ipetkov", "repo": "crane", - "rev": "9107434eda6991e9388ad87b815dafa337446d16", + "rev": "2d83156f23c43598cf44e152c33a59d3892f8b29", "type": "github" }, "original": { @@ -134,27 +100,6 @@ } }, "crane_3": { - "inputs": { - "nixpkgs": [ - "tryorama", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1718078026, - "narHash": "sha256-LbQabH6h86ZzTvDnaZHmMwedRZNB2jYtUQzmoqWQoJ8=", - "owner": "ipetkov", - "repo": "crane", - "rev": "a3f0c63eed74a516298932b9b1627dd80b9c3892", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "crane_4": { "inputs": { "nixpkgs": [ "tryorama", @@ -192,22 +137,6 @@ "type": "github" } }, - "crate2nix_2": { - "flake": false, - "locked": { - "lastModified": 1706909251, - "narHash": "sha256-T7G9Uhh77P0kKri/u+Mwa/4YnXwdPsJSwYCiJCCW+fs=", - "owner": "kolloch", - "repo": "crate2nix", - "rev": "15656bb6cb15f55ee3344bf4362e6489feb93db6", - "type": "github" - }, - "original": { - "owner": "kolloch", - "repo": "crate2nix", - "type": "github" - } - }, "empty": { "flake": false, "locked": { @@ -224,22 +153,6 @@ "type": "github" } }, - "empty_2": { - "flake": false, - "locked": { - "lastModified": 1683792623, - "narHash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=", - "owner": "steveej", - "repo": "empty", - "rev": "8e328e450e4cd32e072eba9e99fe92cf2a1ef5cf", - "type": "github" - }, - "original": { - "owner": "steveej", - "repo": "empty", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -256,37 +169,22 @@ "type": "github" } }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1706830856, - "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", + "lastModified": 1719994518, + "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", + "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", "type": "github" }, "original": { - "id": "flake-parts", - "type": "indirect" + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" } }, "flake-parts_2": { @@ -311,11 +209,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "type": "github" }, "original": { @@ -324,86 +222,53 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems_3" - }, + "hc-launch": { + "flake": false, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "lastModified": 1715106263, + "narHash": "sha256-a7iQ8pKGz6fghJrtXq0Xamp57GE8Hd3w5YQASzz5Wlk=", + "owner": "holochain", + "repo": "launcher", + "rev": "92bd39e1c66912d61c35c4725d7b106959888670", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "holochain", + "ref": "holochain-weekly", + "repo": "launcher", "type": "github" } }, - "flake-utils_3": { - "inputs": { - "systems": "systems_4" - }, + "hc-scaffold": { + "flake": false, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "lastModified": 1720709716, + "narHash": "sha256-JrUNDbAiSPl11L8JxtgNfKXV13bWgCD+Xd0hNy8nK9A=", + "owner": "holochain", + "repo": "scaffolding", + "rev": "3241aaaf52589ced9e29bf616407b867f6927c44", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "holochain", + "ref": "holochain-weekly", + "repo": "scaffolding", "type": "github" } }, "holochain": { - "inputs": { - "cargo-chef": "cargo-chef", - "cargo-rdme": "cargo-rdme", - "crane": "crane_2", - "crate2nix": "crate2nix", - "empty": "empty", - "flake-compat": "flake-compat", - "flake-parts": "flake-parts", - "holochain": [ - "holochain", - "empty" - ], - "lair": [ - "holochain", - "empty" - ], - "launcher": [ - "holochain", - "empty" - ], - "nix-filter": "nix-filter", - "nixpkgs": "nixpkgs_2", - "pre-commit-hooks-nix": "pre-commit-hooks-nix", - "repo-git": "repo-git", - "rust-overlay": "rust-overlay", - "scaffolding": [ - "holochain", - "empty" - ], - "versions": [ - "versions" - ] - }, + "flake": false, "locked": { - "lastModified": 1720481908, - "narHash": "sha256-UjKicjEFFZ/QtqqDEFDMeLyE7nC9by/2KYbXBVshqMA=", + "lastModified": 1720573775, + "narHash": "sha256-ElKLtMDQpK+4NJixEz0SerENGgle88vp3GPePoOkCPQ=", "owner": "holochain", "repo": "holochain", - "rev": "c30873ff7de7cb7234c973aeae3672507350870d", + "rev": "e7c08520293e17501637f3d36841b1e5c7802603", "type": "github" }, "original": { "owner": "holochain", + "ref": "holochain-0.4.0-dev.12", "repo": "holochain", "type": "github" } @@ -411,45 +276,54 @@ "holochain_2": { "flake": false, "locked": { - "lastModified": 1718142789, - "narHash": "sha256-Lam1hWLqi+zv0umdTIIHK9YKHVWQrI/Z4AySo97xK9E=", + "lastModified": 1718154411, + "narHash": "sha256-jlFRYa8ikBYunTPOV7lngEiuq3ULM8u9yITsuKUf/7o=", "owner": "holochain", "repo": "holochain", - "rev": "582f05b66b690448b1574d1aa6004114ff98187f", + "rev": "db897af50d3fb25e819c05096f2cb5df3603fd75", "type": "github" }, "original": { "owner": "holochain", - "ref": "holochain-0.3.1", + "ref": "holochain-0.4.0-dev.8", "repo": "holochain", "type": "github" } }, - "holochain_3": { - "flake": false, + "holonix": { + "inputs": { + "crane": "crane_2", + "flake-parts": "flake-parts", + "hc-launch": "hc-launch", + "hc-scaffold": "hc-scaffold", + "holochain": "holochain", + "lair-keystore": "lair-keystore", + "nixpkgs": "nixpkgs_2", + "rust-overlay": "rust-overlay" + }, "locked": { - "lastModified": 1718142789, - "narHash": "sha256-Lam1hWLqi+zv0umdTIIHK9YKHVWQrI/Z4AySo97xK9E=", + "lastModified": 1720726548, + "narHash": "sha256-Rp6Ks+GA82/xDzfrJwGVr7xuOACeHsPC3CR1sGpWaiM=", "owner": "holochain", - "repo": "holochain", - "rev": "582f05b66b690448b1574d1aa6004114ff98187f", + "repo": "holonix", + "rev": "63cdd16daf92ad3fd342b56ce23d88f93cc7fc68", "type": "github" }, "original": { "owner": "holochain", - "ref": "holochain-0.3.1", - "repo": "holochain", + "ref": "main", + "repo": "holonix", "type": "github" } }, - "holonix": { + "holonix_2": { "inputs": { - "cargo-chef": "cargo-chef_2", - "cargo-rdme": "cargo-rdme_2", - "crane": "crane_4", - "crate2nix": "crate2nix_2", - "empty": "empty_2", - "flake-compat": "flake-compat_2", + "cargo-chef": "cargo-chef", + "cargo-rdme": "cargo-rdme", + "crane": "crane_3", + "crate2nix": "crate2nix", + "empty": "empty", + "flake-compat": "flake-compat", "flake-parts": "flake-parts_2", "holochain": [ "tryorama", @@ -466,10 +340,10 @@ "holonix", "empty" ], - "nix-filter": "nix-filter_2", + "nix-filter": "nix-filter", "nixpkgs": "nixpkgs_3", - "pre-commit-hooks-nix": "pre-commit-hooks-nix_2", - "repo-git": "repo-git_2", + "pre-commit-hooks-nix": "pre-commit-hooks-nix", + "repo-git": "repo-git", "rust-overlay": "rust-overlay_3", "scaffolding": [ "tryorama", @@ -482,11 +356,11 @@ ] }, "locked": { - "lastModified": 1718285062, - "narHash": "sha256-FVXY8scfrt2QQ1v3iqAK8GTaMmSOClNFlI0/T+qZeTU=", + "lastModified": 1718224007, + "narHash": "sha256-uPOaySGH58H9hQS8fM/TfyYl2tIU9B7p6OcYlVPnuoY=", "owner": "holochain", "repo": "holochain", - "rev": "4be2cfa4aa5d92dcea35f76aff344af5127e07fb", + "rev": "649ad4c97ecb0bb113139d1aff688b689853b292", "type": "github" }, "original": { @@ -498,33 +372,33 @@ "lair": { "flake": false, "locked": { - "lastModified": 1709335027, - "narHash": "sha256-rKMhh7TLuR1lqze2YFWZCGYKZQoB4dZxjpX3sb7r7Jk=", + "lastModified": 1717684904, + "narHash": "sha256-vcXt67Tl1qwVUkx8CBevdQocqZXUEeoXjaYw86ljsYo=", "owner": "holochain", "repo": "lair", - "rev": "826be915efc839d1d1b8a2156b158999b8de8d5b", + "rev": "6a84ed490fc7074d107e38bbb4a8d707e9b8e066", "type": "github" }, "original": { "owner": "holochain", - "ref": "lair_keystore-v0.4.4", + "ref": "lair_keystore-v0.4.5", "repo": "lair", "type": "github" } }, - "lair_2": { + "lair-keystore": { "flake": false, "locked": { - "lastModified": 1709335027, - "narHash": "sha256-rKMhh7TLuR1lqze2YFWZCGYKZQoB4dZxjpX3sb7r7Jk=", + "lastModified": 1717684904, + "narHash": "sha256-vcXt67Tl1qwVUkx8CBevdQocqZXUEeoXjaYw86ljsYo=", "owner": "holochain", "repo": "lair", - "rev": "826be915efc839d1d1b8a2156b158999b8de8d5b", + "rev": "6a84ed490fc7074d107e38bbb4a8d707e9b8e066", "type": "github" }, "original": { "owner": "holochain", - "ref": "lair_keystore-v0.4.4", + "ref": "lair_keystore-v0.4.5", "repo": "lair", "type": "github" } @@ -532,33 +406,16 @@ "launcher": { "flake": false, "locked": { - "lastModified": 1717431387, - "narHash": "sha256-+VvWwBmxcgePV1L6kU2mSkg3emMiMgpdQnCqvQJkRPk=", - "owner": "holochain", - "repo": "launcher", - "rev": "9d9cab5e6b57e1c278113921ff203e515c8bbd2e", - "type": "github" - }, - "original": { - "owner": "holochain", - "ref": "holochain-0.3", - "repo": "launcher", - "type": "github" - } - }, - "launcher_2": { - "flake": false, - "locked": { - "lastModified": 1717431387, - "narHash": "sha256-+VvWwBmxcgePV1L6kU2mSkg3emMiMgpdQnCqvQJkRPk=", + "lastModified": 1715106263, + "narHash": "sha256-a7iQ8pKGz6fghJrtXq0Xamp57GE8Hd3w5YQASzz5Wlk=", "owner": "holochain", "repo": "launcher", - "rev": "9d9cab5e6b57e1c278113921ff203e515c8bbd2e", + "rev": "92bd39e1c66912d61c35c4725d7b106959888670", "type": "github" }, "original": { "owner": "holochain", - "ref": "holochain-0.3", + "ref": "holochain-weekly", "repo": "launcher", "type": "github" } @@ -597,21 +454,6 @@ "type": "github" } }, - "nix-filter_2": { - "locked": { - "lastModified": 1705332318, - "narHash": "sha256-kcw1yFeJe9N4PjQji9ZeX47jg0p9A0DuU4djKvg1a7I=", - "owner": "numtide", - "repo": "nix-filter", - "rev": "3449dc925982ad46246cfc36469baf66e1b64f17", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "nix-filter", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1716619601, @@ -628,20 +470,14 @@ }, "nixpkgs-lib": { "locked": { - "dir": "lib", - "lastModified": 1706550542, - "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "97b17f32362e475016f942bbdfda4a4a72a8a652", - "type": "github" + "lastModified": 1719876945, + "narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" }, "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" } }, "nixpkgs-lib_2": { @@ -664,17 +500,18 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1716293225, - "narHash": "sha256-pU9ViBVE3XYb70xZx+jK6SEVphvt7xMTbm6yDIF4xPs=", - "owner": "NixOS", + "lastModified": 1720542800, + "narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "3eaeaeb6b1e08a016380c279f8846e0bd8808916", + "rev": "feb2849fdeb70028c70d73b848214b00d324a497", "type": "github" }, "original": { - "id": "nixpkgs", + "owner": "nixos", "ref": "nixos-unstable", - "type": "indirect" + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs_3": { @@ -708,22 +545,6 @@ "type": "github" } }, - "pre-commit-hooks-nix_2": { - "flake": false, - "locked": { - "lastModified": 1707297608, - "narHash": "sha256-ADjo/5VySGlvtCW3qR+vdFF4xM9kJFlRDqcC9ZGI8EA=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "0db2e67ee49910adfa13010e7f012149660af7f0", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, "repo-git": { "flake": false, "locked": { @@ -736,46 +557,36 @@ "url": "file:/dev/null" } }, - "repo-git_2": { - "flake": false, - "locked": { - "narHash": "sha256-d6xi4mKdjkX2JFicDIv5niSzpyI0m/Hnm8GGAIU04kY=", - "type": "file", - "url": "file:/dev/null" - }, - "original": { - "type": "file", - "url": "file:/dev/null" - } - }, "root": { "inputs": { "amber": "amber", "crane": "crane", - "flake-utils": "flake-utils", - "holochain": "holochain", + "flake-parts": [ + "holonix", + "flake-parts" + ], + "holonix": "holonix", "nixpkgs": [ - "holochain", + "holonix", "nixpkgs" ], "rust-overlay": "rust-overlay_2", - "tryorama": "tryorama", - "versions": "versions_2" + "tryorama": "tryorama" } }, "rust-overlay": { "inputs": { "nixpkgs": [ - "holochain", + "holonix", "nixpkgs" ] }, "locked": { - "lastModified": 1720318855, - "narHash": "sha256-w3CCVK9LJ5aznXGkO1IyAlbvMNJfyA+dBF7Z1Zwx1LA=", + "lastModified": 1720664424, + "narHash": "sha256-+odiMNHRYdvzL1ewl41UVFxsjmdoXfH+maQ8xvUoR4g=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "3eed08a074cd2000884a69d448d70da2843f7103", + "rev": "fec97e65fcbaab0decccba740ac8688f61dadd70", "type": "github" }, "original": { @@ -787,16 +598,16 @@ "rust-overlay_2": { "inputs": { "nixpkgs": [ - "holochain", + "holonix", "nixpkgs" ] }, "locked": { - "lastModified": 1720491570, - "narHash": "sha256-PHS2BcQ9kxBpu9GKlDg3uAlrX/ahQOoAiVmwGl6BjD4=", + "lastModified": 1720750737, + "narHash": "sha256-hPXe9Pr3s2EKRdDki3UkCKoPGlNkOhplCooNoC/L7Qc=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "b970af40fdc4bd80fd764796c5f97c15e2b564eb", + "rev": "a17c5d38c6fe47880eb8c6bede15d943ac2c4d17", "type": "github" }, "original": { @@ -807,7 +618,7 @@ }, "rust-overlay_3": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "nixpkgs": [ "tryorama", "holonix", @@ -828,58 +639,19 @@ "type": "github" } }, - "rust-overlay_4": { - "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": [ - "tryorama", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1718331519, - "narHash": "sha256-6Ru37wS8uec626nHVIh6hSpCYB7eNc3RPFa2U//bhw4=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "419e7fae2731f41dd9b3e34dfe8802be68558b92", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, "scaffolding": { "flake": false, "locked": { - "lastModified": 1717661456, - "narHash": "sha256-e+9YRRFJg89rfHDWtumEa33rpa2vmij/zw7Uwl6BP/g=", - "owner": "holochain", - "repo": "scaffolding", - "rev": "1ffc9eb350b82784a8fb609073f1c7eccf2e0fc0", - "type": "github" - }, - "original": { - "owner": "holochain", - "ref": "holochain-0.3", - "repo": "scaffolding", - "type": "github" - } - }, - "scaffolding_2": { - "flake": false, - "locked": { - "lastModified": 1718803517, - "narHash": "sha256-TXefe4AJxnfcXDQa9V/rM1ieWybi043pTUI1td4xfzM=", + "lastModified": 1718124894, + "narHash": "sha256-ALDxuF+TZBbXrSp4r736M3MEFq0PgC5iMpzVIvkQwSc=", "owner": "holochain", "repo": "scaffolding", - "rev": "ea8dfd8ed4778184338edd3549711f94e70f780e", + "rev": "e4bf5486c59abf47a7ec6a97b93c1d2a1447a0d7", "type": "github" }, "original": { "owner": "holochain", - "ref": "holochain-0.3", + "ref": "holochain-weekly", "repo": "scaffolding", "type": "github" } @@ -914,59 +686,34 @@ "type": "github" } }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tryorama": { "inputs": { - "crane": "crane_3", - "holonix": "holonix", + "crane": [ + "holonix", + "crane" + ], + "holonix": "holonix_2", "nixpkgs": [ - "tryorama", "holonix", "nixpkgs" ], - "rust-overlay": "rust-overlay_4", + "rust-overlay": [ + "holonix", + "rust-overlay" + ], "versions": "versions" }, "locked": { - "lastModified": 1718362187, - "narHash": "sha256-bWr+Mc59vFZ00Y3p0FjvbpZEaZFmt9UUw04yt9xmAkk=", + "lastModified": 1718303526, + "narHash": "sha256-DJnHfRS6bpy6TcGCgnAWJrkoFaSubWEsVTQPcfEWQS4=", "owner": "holochain", "repo": "tryorama", - "rev": "0c983d068f8b1423c0e39b927bce63360b058826", + "rev": "b376544cb64ac396b4cc52fdcf6063e3e9b7b4b2", "type": "github" }, "original": { "owner": "holochain", - "ref": "v0.16.0", + "ref": "v0.17.0-dev.1", "repo": "tryorama", "type": "github" } @@ -997,39 +744,16 @@ "scaffolding": "scaffolding" }, "locked": { - "dir": "versions/0_3", - "lastModified": 1718285062, - "narHash": "sha256-FVXY8scfrt2QQ1v3iqAK8GTaMmSOClNFlI0/T+qZeTU=", - "owner": "holochain", - "repo": "holochain", - "rev": "4be2cfa4aa5d92dcea35f76aff344af5127e07fb", - "type": "github" - }, - "original": { - "dir": "versions/0_3", - "owner": "holochain", - "repo": "holochain", - "type": "github" - } - }, - "versions_2": { - "inputs": { - "holochain": "holochain_3", - "lair": "lair_2", - "launcher": "launcher_2", - "scaffolding": "scaffolding_2" - }, - "locked": { - "dir": "versions/0_3", - "lastModified": 1720481908, - "narHash": "sha256-UjKicjEFFZ/QtqqDEFDMeLyE7nC9by/2KYbXBVshqMA=", + "dir": "versions/weekly", + "lastModified": 1718224007, + "narHash": "sha256-uPOaySGH58H9hQS8fM/TfyYl2tIU9B7p6OcYlVPnuoY=", "owner": "holochain", "repo": "holochain", - "rev": "c30873ff7de7cb7234c973aeae3672507350870d", + "rev": "649ad4c97ecb0bb113139d1aff688b689853b292", "type": "github" }, "original": { - "dir": "versions/0_3", + "dir": "versions/weekly", "owner": "holochain", "repo": "holochain", "type": "github" diff --git a/flake.nix b/flake.nix index a87e14e8..a0873b4e 100644 --- a/flake.nix +++ b/flake.nix @@ -2,99 +2,102 @@ description = "Flake for Holochain testing"; inputs = { - versions.url = "github:holochain/holochain?dir=versions/0_3"; + holonix.url = "github:holochain/holonix/main"; - holochain = { - url = "github:holochain/holochain"; - inputs.versions.follows = "versions"; - }; + nixpkgs.follows = "holonix/nixpkgs"; + flake-parts.follows = "holonix/flake-parts"; - tryorama.url = "github:holochain/tryorama/v0.16.0"; + tryorama = { + url = "github:holochain/tryorama/v0.17.0-dev.1"; + inputs = { + nixpkgs.follows = "holonix/nixpkgs"; + crane.follows = "holonix/crane"; + rust-overlay.follows = "holonix/rust-overlay"; + }; + }; crane = { url = "github:ipetkov/crane"; - inputs.nixpkgs.follows = "holochain/nixpkgs"; + inputs.nixpkgs.follows = "holonix/nixpkgs"; }; - flake-utils.url = "github:numtide/flake-utils"; - rust-overlay = { url = "github:oxalica/rust-overlay"; inputs = { - nixpkgs.follows = "holochain/nixpkgs"; + nixpkgs.follows = "holonix/nixpkgs"; }; }; amber = { url = "github:Ph0enixKM/Amber"; - inputs.nixpkgs.follows = "holochain/nixpkgs"; + inputs.nixpkgs.follows = "holonix/nixpkgs"; }; - - nixpkgs.follows = "holochain/nixpkgs"; }; - outputs = inputs: - inputs.holochain.inputs.flake-parts.lib.mkFlake { inherit inputs; } + outputs = inputs@{ flake-parts, crane, rust-overlay, nixpkgs, ... }: flake-parts.lib.mkFlake { inherit inputs; } ({ flake-parts-lib, ... }: { + systems = builtins.attrNames inputs.holonix.devShells; + perSystem = { inputs', pkgs, system, config, ... }: + let + rustMod = flake-parts-lib.importApply ./nix/modules/rust.nix { inherit crane rust-overlay nixpkgs; }; + in { - systems = builtins.attrNames inputs.holochain.devShells; imports = [ ./nix/modules/formatter.nix ./nix/modules/happs.nix - ./nix/modules/rust.nix + rustMod ./nix/modules/scenario.nix ./nix/modules/scenarios.nix ./nix/modules/workspace.nix ./nix/modules/zome.nix ./nix/modules/zomes.nix ]; - perSystem = { lib, config, pkgs, system, self', ... }: - { - devShells.default = pkgs.mkShell { - inputsFrom = [ - inputs.holochain.devShells.${system}.holonix - ]; - packages = [ - pkgs.influxdb2-cli - pkgs.influxdb2-server - # TODO https://docs.influxdata.com/telegraf/v1/install/#ntp - pkgs.telegraf - pkgs.yq - pkgs.httpie - pkgs.shellcheck - pkgs.statix - inputs.tryorama.packages.${system}.trycp-server - # inputs.amber.packages.${system}.default - ]; + devShells.default = pkgs.mkShell { + inputsFrom = [ inputs'.holonix.devShells ]; + + packages = with pkgs; [ + pkgs.influxdb2-cli + pkgs.influxdb2-server + # TODO https://docs.influxdata.com/telegraf/v1/install/#ntp + pkgs.telegraf + pkgs.yq + pkgs.httpie + pkgs.shellcheck + pkgs.statix + inputs'.holonix.packages.holochain + inputs'.holonix.packages.lair-keystore + inputs'.tryorama.packages.trycp-server + inputs'.amber.packages.default + ]; - shellHook = '' - source ./scripts/influx.sh - source ./scripts/telegraf.sh - source ./scripts/trycp.sh - source ./scripts/checks.sh - ''; - }; + shellHook = '' + source ./scripts/influx.sh + source ./scripts/telegraf.sh + source ./scripts/trycp.sh + source ./scripts/checks.sh + ''; + }; - devShells.ci = pkgs.mkShell { - inputsFrom = [ - inputs.holochain.devShells.${system}.holochainBinaries - ]; + devShells.ci = pkgs.mkShell { + inputsFrom = [ inputs'.holonix.devShells ]; - packages = [ - pkgs.shellcheck - pkgs.statix - inputs.tryorama.packages.${system}.trycp-server - ]; - }; + packages = [ + pkgs.shellcheck + pkgs.statix + inputs'.holonix.packages.holochain + inputs'.holonix.packages.lair-keystore + inputs'.tryorama.packages.trycp-server + ]; + }; - packages = { - default = config.workspace.workspace; - inherit (config.workspace) workspace; - }; + packages = { + default = config.workspace.workspace; + inherit (config.workspace) workspace; + }; - checks = { - inherit (config.workspace) workspace_clippy; - }; - }; + checks = { + inherit (config.workspace) workspace_clippy; + }; }; + }); } diff --git a/framework/core/Cargo.toml b/framework/core/Cargo.toml index 4f39ca2d..ca412b85 100644 --- a/framework/core/Cargo.toml +++ b/framework/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wind_tunnel_core" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" description = "Core components for Wind Tunnel" license = "MIT" authors = ["ThetaSinner"] diff --git a/framework/instruments/Cargo.toml b/framework/instruments/Cargo.toml index afbc33dd..123f0163 100644 --- a/framework/instruments/Cargo.toml +++ b/framework/instruments/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wind_tunnel_instruments" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" description = "Instruments for measuring performance with Wind Tunnel" license = "MIT" authors = ["ThetaSinner"] diff --git a/framework/instruments_derive/Cargo.toml b/framework/instruments_derive/Cargo.toml index f67dad83..36ad37d1 100644 --- a/framework/instruments_derive/Cargo.toml +++ b/framework/instruments_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wind_tunnel_instruments_derive" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" description = "Derive macros for the wind_tunnel_instruments crate" license = "MIT" authors = ["ThetaSinner"] diff --git a/framework/runner/Cargo.toml b/framework/runner/Cargo.toml index b2066691..f81797ad 100644 --- a/framework/runner/Cargo.toml +++ b/framework/runner/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wind_tunnel_runner" -version = "0.2.0-alpha.2" +version = "0.3.0-alpha.1" description = "The Wind Tunnel runner" license = "MIT" authors = ["ThetaSinner"] diff --git a/happ_builder/src/lib.rs b/happ_builder/src/lib.rs index 97b39c3b..9949aa43 100644 --- a/happ_builder/src/lib.rs +++ b/happ_builder/src/lib.rs @@ -296,6 +296,7 @@ fn build_required_dna( coordinator: holochain_types::dna::CoordinatorManifest { zomes: coordinator_manifests, }, + lineage: Vec::with_capacity(0), }); let dna_manifest_workdir = dna_target_dir.join(scenario_package_name).join(dna_name); diff --git a/nix/modules/formatter.nix b/nix/modules/formatter.nix index 2be5633f..f1f93d3f 100644 --- a/nix/modules/formatter.nix +++ b/nix/modules/formatter.nix @@ -1,6 +1,3 @@ -{ self, lib, ... }: { - perSystem = { config, self', inputs', pkgs, ... }: { - # define formatter used by `nix fmt` - formatter = pkgs.nixpkgs-fmt; - }; +{ pkgs, ... }: { + formatter = pkgs.nixpkgs-fmt; } diff --git a/nix/modules/happs.nix b/nix/modules/happs.nix index 4d2cc7cb..ec9767cf 100644 --- a/nix/modules/happs.nix +++ b/nix/modules/happs.nix @@ -1,175 +1,174 @@ # Module for building hApps and DNAs from the requirements specified in the metadata section of a Cargo.toml -{ self, inputs, lib, ... }@flake: { - perSystem = { config, self', inputs', system, pkgs, ... }: - let - inherit (config.rustHelper) craneLib; - - zomeHasIntegrity = zome_name: builtins.hasAttr "${zome_name}_integrity" self'.packages; - in - { - options.happHelper = lib.mkOption { type = lib.types.raw; }; - - config.happHelper = { - mkHapps = { configToml }: - let - config = builtins.fromTOML (builtins.readFile configToml); - inherit (config.package) metadata; - - requiredDnas = - if builtins.hasAttr "required-dna" metadata then - if builtins.isList metadata."required-dna" then - metadata."required-dna" - else - [ metadata."required-dna" ] - else - [ ]; - - # - # - # This section contains DNA build logic - # - # - - mkDnaManifest = { name, zomes }: { - manifest_version = "1"; - inherit name; - - coordinator = { - zomes = builtins.map - (zome_name: - { - name = zome_name; - hash = null; - # Relying on referencing a derivation here and having Nix convert that to the store path of that derivation when it's converted to a string - bundled = "${self'.packages."${zome_name}_coordinator"}/lib/${zome_name}_coordinator.wasm"; - dependencies = - if builtins.hasAttr "${zome_name}_integrity" self'.packages then - [{ name = "${zome_name}_integrity"; }] - else - [ ]; - dylib = null; - } - ) - zomes; - }; - - integrity = { - network_seed = null; - properties = null; - origin_time = 1710431275; - zomes = builtins.map - (zome_name: { - name = "${zome_name}_integrity"; - hash = null; - # Relying on referencing a derivation here and having Nix convert that to the store path of that derivation when it's converted to a string - bundled = "${self'.packages."${zome_name}_integrity"}/lib/${zome_name}_integrity.wasm"; - dependencies = null; - dylib = null; - }) - (builtins.filter zomeHasIntegrity zomes); - }; - }; - - mkDnaBuildScript = manifest: '' - mkdir -p ./${manifest.name} - echo '${lib.generators.toYAML {} manifest}' > ./${manifest.name}/dna.yaml - - hc dna pack --output ./${manifest.name}.dna ./${manifest.name} - ''; - - mkDnaBuildScripts = manifests: - builtins.concatStringsSep "\n" (map mkDnaBuildScript manifests); - - # - # - # This section contains hApp build logic - # - # - - requiredHapps = - if builtins.hasAttr "required-happ" metadata then - if builtins.isList metadata."required-happ" then - metadata."required-happ" - else - [ metadata."required-happ" ] - else - [ ]; - - mkHappManifest = { name, dnas }: { - manifest_version = "1"; - inherit name; - description = "A Wind Tunnel sample hApp"; - - roles = builtins.map - (dna_name: - { - name = dna_name; - - provisioning = { - strategy = "create"; - deferred = false; - }; - - dna = { - # These are built as part of this derivation so look for them in the build directory - bundled = "../${dna_name}.dna"; - }; - - modifiers = { - network_seed = null; - properties = null; - origin_time = null; - quantum_time = null; - }; - installed_hash = null; - clone_limit = 0; - } - ) - dnas; - }; - - mkHappBuildScript = manifest: '' - mkdir -p ./${manifest.name} - echo '${lib.generators.toYAML {} manifest}' > ./${manifest.name}/happ.yaml - - mkdir -p $out/${manifest.name} - hc app pack --output $out/${manifest.name}.happ ./${manifest.name} - ''; - - mkHappBuildScripts = manifests: - builtins.concatStringsSep "\n" (map mkHappBuildScript manifests); - - # - # - # Figure out what zome packages are required as inputs to this derivation - # - # - requiredZomes = lib.lists.unique (lib.lists.flatten (map (builtins.getAttr "zomes") requiredDnas)); - - # The zome packages that this derivation depends on - zomeDeps = builtins.map (zome_name: [ self'.packages."${zome_name}_coordinator" ] ++ (if zomeHasIntegrity zome_name then [ self'.packages."${zome_name}_integrity" ] else [ ])) requiredZomes; - in - pkgs.stdenv.mkDerivation { - inherit (config.package) name; - - # This is all based on workspace code, so rely on the Crane filter to select the right sources. - src = craneLib.cleanCargoSource (craneLib.path ./../..); - - buildInputs = zomeDeps ++ [ - # Need `hc` to package DNAs and hApps. - inputs.holochain.packages.${system}.holochain - ]; - - postInstall = '' - # Ensure the derivation is not empty if there are ne hApps requested - mkdir -p $out - touch $out/.happ-build - - ${mkDnaBuildScripts (map mkDnaManifest requiredDnas)} - ${mkHappBuildScripts (map mkHappManifest requiredHapps)} - ''; +{ config, self', inputs', system, pkgs, lib, ... }: + +let + inherit (config.rustHelper) craneLib; + + zomeHasIntegrity = zome_name: builtins.hasAttr "${zome_name}_integrity" self'.packages; +in +{ + options.happHelper = lib.mkOption { type = lib.types.raw; }; + + config.happHelper = { + mkHapps = { configToml }: + let + config = builtins.fromTOML (builtins.readFile configToml); + inherit (config.package) metadata; + + requiredDnas = + if builtins.hasAttr "required-dna" metadata then + if builtins.isList metadata."required-dna" then + metadata."required-dna" + else + [ metadata."required-dna" ] + else + [ ]; + + # + # + # This section contains DNA build logic + # + # + + mkDnaManifest = { name, zomes }: { + manifest_version = "1"; + inherit name; + + coordinator = { + zomes = builtins.map + (zome_name: + { + name = zome_name; + hash = null; + # Relying on referencing a derivation here and having Nix convert that to the store path of that derivation when it's converted to a string + bundled = "${self'.packages."${zome_name}_coordinator"}/lib/${zome_name}_coordinator.wasm"; + dependencies = + if builtins.hasAttr "${zome_name}_integrity" self'.packages then + [{ name = "${zome_name}_integrity"; }] + else + [ ]; + dylib = null; + } + ) + zomes; }; + + integrity = { + network_seed = null; + properties = null; + origin_time = 1710431275; + zomes = builtins.map + (zome_name: { + name = "${zome_name}_integrity"; + hash = null; + # Relying on referencing a derivation here and having Nix convert that to the store path of that derivation when it's converted to a string + bundled = "${self'.packages."${zome_name}_integrity"}/lib/${zome_name}_integrity.wasm"; + dependencies = null; + dylib = null; + }) + (builtins.filter zomeHasIntegrity zomes); + }; + }; + + mkDnaBuildScript = manifest: '' + mkdir -p ./${manifest.name} + echo '${lib.generators.toYAML {} manifest}' > ./${manifest.name}/dna.yaml + + hc dna pack --output ./${manifest.name}.dna ./${manifest.name} + ''; + + mkDnaBuildScripts = manifests: + builtins.concatStringsSep "\n" (map mkDnaBuildScript manifests); + + # + # + # This section contains hApp build logic + # + # + + requiredHapps = + if builtins.hasAttr "required-happ" metadata then + if builtins.isList metadata."required-happ" then + metadata."required-happ" + else + [ metadata."required-happ" ] + else + [ ]; + + mkHappManifest = { name, dnas }: { + manifest_version = "1"; + inherit name; + description = "A Wind Tunnel sample hApp"; + + roles = builtins.map + (dna_name: + { + name = dna_name; + + provisioning = { + strategy = "create"; + deferred = false; + }; + + dna = { + # These are built as part of this derivation so look for them in the build directory + bundled = "../${dna_name}.dna"; + }; + + modifiers = { + network_seed = null; + properties = null; + origin_time = null; + quantum_time = null; + }; + installed_hash = null; + clone_limit = 0; + } + ) + dnas; + }; + + mkHappBuildScript = manifest: '' + mkdir -p ./${manifest.name} + echo '${lib.generators.toYAML {} manifest}' > ./${manifest.name}/happ.yaml + + mkdir -p $out/${manifest.name} + hc app pack --output $out/${manifest.name}.happ ./${manifest.name} + ''; + + mkHappBuildScripts = manifests: + builtins.concatStringsSep "\n" (map mkHappBuildScript manifests); + + # + # + # Figure out what zome packages are required as inputs to this derivation + # + # + requiredZomes = lib.lists.unique (lib.lists.flatten (map (builtins.getAttr "zomes") requiredDnas)); + + # The zome packages that this derivation depends on + zomeDeps = builtins.map (zome_name: [ self'.packages."${zome_name}_coordinator" ] ++ (if zomeHasIntegrity zome_name then [ self'.packages."${zome_name}_integrity" ] else [ ])) requiredZomes; + in + pkgs.stdenv.mkDerivation { + inherit (config.package) name; + + # This is all based on workspace code, so rely on the Crane filter to select the right sources. + src = craneLib.cleanCargoSource (craneLib.path ./../..); + + buildInputs = zomeDeps ++ [ + # Need `hc` to package DNAs and hApps. + inputs'.holonix.packages.holochain + ]; + + postInstall = '' + # Ensure the derivation is not empty if there are ne hApps requested + mkdir -p $out + touch $out/.happ-build + + ${mkDnaBuildScripts (map mkDnaManifest requiredDnas)} + ${mkHappBuildScripts (map mkHappManifest requiredHapps)} + ''; }; - }; + }; } diff --git a/nix/modules/rust.nix b/nix/modules/rust.nix index 40c9b487..e268171a 100644 --- a/nix/modules/rust.nix +++ b/nix/modules/rust.nix @@ -1,31 +1,30 @@ # Module to configure Rust and Crane for use in other modules. -{ self, inputs, lib, ... }@flake: { - perSystem = { config, self', inputs', system, pkgs, ... }: - let - rustPkgs = import inputs.nixpkgs { - inherit system; - overlays = [ (import inputs.rust-overlay) ]; - }; +{ crane, nixpkgs, rust-overlay }: +{ config, self', inputs', system, pkgs, lib, ... }: +let + rustPkgs = import nixpkgs { + inherit system; + overlays = [ (import rust-overlay) ]; + }; - rustVersion = "1.78.0"; + rustVersion = "1.78.0"; - rustWithWasmTarget = rustPkgs.rust-bin.stable."${rustVersion}".minimal.override { - targets = [ "wasm32-unknown-unknown" ]; - extensions = [ "clippy" ]; - }; + rustWithWasmTarget = rustPkgs.rust-bin.stable."${rustVersion}".minimal.override { + targets = [ "wasm32-unknown-unknown" ]; + extensions = [ "clippy" ]; + }; - craneLib = (inputs.crane.mkLib rustPkgs).overrideToolchain rustWithWasmTarget; - in - { - options.rustHelper = lib.mkOption { type = lib.types.raw; }; + craneLib = (crane.mkLib rustPkgs).overrideToolchain rustWithWasmTarget; +in +{ + options.rustHelper = lib.mkOption { type = lib.types.raw; }; - config.rustHelper = { - findCrateVersion = cargoToml: (craneLib.crateNameFromCargoToml { inherit cargoToml; }).version; + config.rustHelper = { + findCrateVersion = cargoToml: (craneLib.crateNameFromCargoToml { inherit cargoToml; }).version; - inherit craneLib; + inherit craneLib; - rust = rustWithWasmTarget; - }; - }; + rust = rustWithWasmTarget; + }; } diff --git a/nix/modules/scenario.nix b/nix/modules/scenario.nix index 2d859c6f..708fdcec 100644 --- a/nix/modules/scenario.nix +++ b/nix/modules/scenario.nix @@ -1,51 +1,49 @@ # Module to build scenarios and their required hApps into a single derivation -{ self, inputs, lib, ... }@flake: { - perSystem = { config, self', inputs', system, pkgs, ... }: - let - inherit (config.rustHelper) craneLib; - - mkPackage = { name }: craneLib.buildPackage (config.workspace.commonArgs // { - pname = name; - version = config.rustHelper.findCrateVersion ../../scenarios/${name}/Cargo.toml; - - inherit (config.workspace) cargoArtifacts; - - cargoExtraArgs = "-p ${name}"; - SKIP_HAPP_BUILD = "1"; - }); - in - { - options.scenarioHelper = lib.mkOption { type = lib.types.raw; }; - - config.scenarioHelper = { - mkScenario = { name }: - let - scenarioBinary = mkPackage { inherit name; }; - scenarioHapps = config.happHelper.mkHapps { configToml = ../../scenarios/${name}/Cargo.toml; }; - in - pkgs.stdenv.mkDerivation { - inherit name; - - # No sources to copy, everything comes from the build inputs - unpackPhase = "true"; - - buildInputs = [ scenarioBinary scenarioHapps ]; - - # To tell `nix run` which binary to run. It gets it right anyway because there is only one binary but - # it prints an annoying warning message. - meta = { - mainProgram = name; - }; - - postInstall = '' - mkdir -p $out/bin - cp "${scenarioBinary}/bin/${name}" $out/bin/ - - mkdir -p $out/happs - cp ${scenarioHapps}/.happ-build ${scenarioHapps}/*.happ $out/happs - ''; - }; +{ config, self', inputs', system, pkgs, lib, ... }: +let + inherit (config.rustHelper) craneLib; + + mkPackage = { name }: craneLib.buildPackage (config.workspace.commonArgs // { + pname = name; + version = config.rustHelper.findCrateVersion ../../scenarios/${name}/Cargo.toml; + + inherit (config.workspace) cargoArtifacts; + + cargoExtraArgs = "-p ${name}"; + SKIP_HAPP_BUILD = "1"; + }); +in +{ + options.scenarioHelper = lib.mkOption { type = lib.types.raw; }; + + config.scenarioHelper = { + mkScenario = { name }: + let + scenarioBinary = mkPackage { inherit name; }; + scenarioHapps = config.happHelper.mkHapps { configToml = ../../scenarios/${name}/Cargo.toml; }; + in + pkgs.stdenv.mkDerivation { + inherit name; + + # No sources to copy, everything comes from the build inputs + unpackPhase = "true"; + + buildInputs = [ scenarioBinary scenarioHapps ]; + + # To tell `nix run` which binary to run. It gets it right anyway because there is only one binary but + # it prints an annoying warning message. + meta = { + mainProgram = name; + }; + + postInstall = '' + mkdir -p $out/bin + cp "${scenarioBinary}/bin/${name}" $out/bin/ + + mkdir -p $out/happs + cp ${scenarioHapps}/.happ-build ${scenarioHapps}/*.happ $out/happs + ''; }; - }; + }; } diff --git a/nix/modules/scenarios.nix b/nix/modules/scenarios.nix index 252fef73..b2ec875a 100644 --- a/nix/modules/scenarios.nix +++ b/nix/modules/scenarios.nix @@ -1,22 +1,20 @@ # Helper module to discover all scenarios and build packages for each. -{ self, inputs, lib, ... }@flake: { - perSystem = { config, self', inputs', system, pkgs, ... }: - let - scenario_names = builtins.filter (name: !(lib.strings.hasInfix "." name)) (builtins.attrNames (builtins.readDir ../../scenarios)); +{ config, self', inputs', system, pkgs, lib, ... }: +let + scenario_names = builtins.filter (name: !(lib.strings.hasInfix "." name)) (builtins.attrNames (builtins.readDir ../../scenarios)); - scenarios = map - (name: { - inherit name; - value = config.scenarioHelper.mkScenario { - inherit name; - }; - }) - scenario_names; - in - { - packages = builtins.listToAttrs scenarios; + scenarios = map + (name: { + inherit name; + value = config.scenarioHelper.mkScenario { + inherit name; + }; + }) + scenario_names; +in +{ + packages = builtins.listToAttrs scenarios; - apps = builtins.listToAttrs (builtins.map ({ name, value }: { inherit name; value = { program = value; }; }) scenarios); - }; + apps = builtins.listToAttrs (builtins.map ({ name, value }: { inherit name; value = { program = value; }; }) scenarios); } diff --git a/nix/modules/workspace.nix b/nix/modules/workspace.nix index 1567cb74..009ec310 100644 --- a/nix/modules/workspace.nix +++ b/nix/modules/workspace.nix @@ -1,63 +1,61 @@ -{ self, inputs, lib, ... }@flake: { - perSystem = { config, self', inputs', system, pkgs, ... }: - let - inherit (config.rustHelper) craneLib; - - opensslStatic = - if system == "x86_64-darwin" - then pkgs.openssl # pkgsStatic is considered a cross build and this is not yet supported - else pkgs.pkgsStatic.openssl; - - nonCargoBuildFiles = path: _type: builtins.match ".*conductor-config.yaml$" path != null; - includeFilesFilter = path: type: - (craneLib.filterCargoSources path type) || (nonCargoBuildFiles path type); - - commonArgs = { - pname = "workspace"; - version = "0.1.0"; - - src = pkgs.lib.cleanSourceWith { - src = ./../..; - filter = includeFilesFilter; - }; - strictDeps = true; - - cargoExtraArgs = "--locked --workspace"; - SKIP_HAPP_BUILD = "1"; - - buildInputs = with pkgs; [ - # Some Holochain crates link against openssl - openssl - opensslStatic - ]; - - nativeBuildInputs = with pkgs; [ - # To build openssl-sys - perl - pkg-config - # Because the holochain_client depends on Kitsune/tx5 - go - ]; - }; - - cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { - pname = "${commonArgs.pname}-deps"; - }); - - workspace = craneLib.buildPackage (commonArgs // { - inherit cargoArtifacts; - }); - - workspace_clippy = craneLib.cargoClippy (commonArgs // { - inherit cargoArtifacts; - cargoClippyExtraArgs = "--all-targets --all-features -- --deny warnings"; - }); - in - { - options.workspace = lib.mkOption { type = lib.types.raw; }; - - config.workspace = { - inherit commonArgs cargoArtifacts workspace workspace_clippy; - }; +{ config, self', inputs', system, pkgs, lib, ... }: +let + inherit (config.rustHelper) craneLib; + + opensslStatic = + if system == "x86_64-darwin" + then pkgs.openssl # pkgsStatic is considered a cross build and this is not yet supported + else pkgs.pkgsStatic.openssl; + + nonCargoBuildFiles = path: _type: builtins.match ".*conductor-config.yaml$" path != null; + includeFilesFilter = path: type: + (craneLib.filterCargoSources path type) || (nonCargoBuildFiles path type); + + commonArgs = { + pname = "workspace"; + version = "0.1.0"; + + src = pkgs.lib.cleanSourceWith { + src = ./../..; + filter = includeFilesFilter; }; + strictDeps = true; + + cargoExtraArgs = "--locked --workspace"; + SKIP_HAPP_BUILD = "1"; + + buildInputs = with pkgs; [ + # Some Holochain crates link against openssl + openssl + opensslStatic + ]; + + nativeBuildInputs = with pkgs; [ + # To build openssl-sys + perl + pkg-config + # Because the holochain_client depends on Kitsune/tx5 + go + ]; + }; + + cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { + pname = "${commonArgs.pname}-deps"; + }); + + workspace = craneLib.buildPackage (commonArgs // { + inherit cargoArtifacts; + }); + + workspace_clippy = craneLib.cargoClippy (commonArgs // { + inherit cargoArtifacts; + cargoClippyExtraArgs = "--all-targets --all-features -- --deny warnings"; + }); +in +{ + options.workspace = lib.mkOption { type = lib.types.raw; }; + + config.workspace = { + inherit commonArgs cargoArtifacts workspace workspace_clippy; + }; } diff --git a/nix/modules/zome.nix b/nix/modules/zome.nix index 55fe7ef4..856ca91d 100644 --- a/nix/modules/zome.nix +++ b/nix/modules/zome.nix @@ -1,28 +1,30 @@ # Module for building zome WASMs -{ self, inputs, lib, ... }@flake: { - perSystem = { config, self', inputs', system, pkgs, ... }: - let - inherit (config.rustHelper) craneLib; - in - { - options.zomeHelper = lib.mkOption { type = lib.types.raw; }; +{ config, lib, ... }: +let + inherit (config.rustHelper) craneLib; - config.zomeHelper = { - mkZome = { name, kind }: - let - packageName = if kind == "integrity" then "${name}_${kind}" else name; - in - craneLib.buildPackage (config.workspace.commonArgs // { - pname = "${name}_${kind}"; - version = config.rustHelper.findCrateVersion ../../zomes/${name}/${kind}/Cargo.toml; + x = builtins.trace craneLib craneLib; +in +{ + options.zomeHelper = lib.mkOption { type = lib.types.raw; }; - inherit (config.workspace) cargoArtifacts; + config.zomeHelper = { + mkZome = { name, kind }: + let + x = builtins.trace "hello" "hello"; - doCheck = false; + packageName = if kind == "integrity" then "${name}_${kind}" else name; + in + craneLib.buildPackage (config.workspace.commonArgs // { + pname = "${name}_${kind}"; + version = config.rustHelper.findCrateVersion ../../zomes/${name}/${kind}/Cargo.toml; - cargoExtraArgs = "-p ${packageName} --lib --target wasm32-unknown-unknown"; - }); - }; - }; + inherit (config.workspace) cargoArtifacts; + + doCheck = false; + + cargoExtraArgs = "-p ${packageName} --lib --target wasm32-unknown-unknown"; + }); + }; } diff --git a/nix/modules/zomes.nix b/nix/modules/zomes.nix index bfb000ea..888b2ab8 100644 --- a/nix/modules/zomes.nix +++ b/nix/modules/zomes.nix @@ -1,15 +1,13 @@ # Helper module to discover all the zomes in the zomes directory and create a package for each one -{ self, inputs, lib, ... }@flake: { - perSystem = { config, self', inputs', system, pkgs, ... }: - let - zome_names = builtins.filter (name: !(lib.strings.hasInfix "." name)) (builtins.attrNames (builtins.readDir ../../zomes)); +{ config, lib, ... }: +let + zome_names = builtins.filter (name: !(lib.strings.hasInfix "." name)) (builtins.attrNames (builtins.readDir ../../zomes)); - zome_names_with_types = builtins.map (zome_name: builtins.map (kind: { name = zome_name; inherit kind; }) (builtins.attrNames (builtins.readDir ../../zomes/${zome_name}))) zome_names; + zome_names_with_types = builtins.map (zome_name: builtins.map (kind: { name = zome_name; inherit kind; }) (builtins.attrNames (builtins.readDir ../../zomes/${zome_name}))) zome_names; - named_zomes = builtins.map ({ name, kind } @ input: { name = "${name}_${kind}"; value = config.zomeHelper.mkZome input; }) (lib.lists.flatten zome_names_with_types); - in - { - packages = builtins.listToAttrs named_zomes; - }; + named_zomes = builtins.map ({ name, kind } @ input: { name = "${name}_${kind}"; value = config.zomeHelper.mkZome input; }) (lib.lists.flatten zome_names_with_types); +in +{ + packages = builtins.listToAttrs named_zomes; } diff --git a/scripts/bump.sh b/scripts/bump.sh new file mode 100755 index 00000000..12a953d7 --- /dev/null +++ b/scripts/bump.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +current_version=$(tomlq -r '.workspace.dependencies.wind_tunnel_core.version' Cargo.toml) + +sed -i "s/\", version = \"${current_version}\"/\", version = \"$1\"/g" Cargo.toml +sed -i "s/version = \"${current_version}\"/version = \"$1\"/g" ./framework/**/Cargo.toml ./bindings/**/Cargo.toml