diff --git a/.capnp_version b/.capnp_version deleted file mode 100644 index 7f207341..00000000 --- a/.capnp_version +++ /dev/null @@ -1 +0,0 @@ -1.0.1 \ No newline at end of file diff --git a/.protoc_version b/.protoc_version deleted file mode 100644 index ed18113a..00000000 --- a/.protoc_version +++ /dev/null @@ -1 +0,0 @@ -24.3 \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index d210e639..59184ab9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -64,9 +64,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.5" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] @@ -439,7 +439,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -650,16 +650,15 @@ dependencies = [ [[package]] name = "blake3" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if 1.0.0", "constant_time_eq", - "digest 0.10.7", ] [[package]] @@ -670,7 +669,7 @@ checksum = "e0b121a9fe0df916e362fb3271088d071159cdf11db0e4182d02152850756eff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -901,9 +900,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.3" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" +checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136" dependencies = [ "clap_builder", "clap_derive", @@ -911,9 +910,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.2" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" +checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56" dependencies = [ "anstream", "anstyle", @@ -931,7 +930,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -1308,9 +1307,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622178105f911d937a42cdb140730ba4a3ed2becd8ae6ce39c7d28b5d75d4588" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -1331,7 +1330,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -1387,7 +1386,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -1409,7 +1408,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -1507,9 +1506,9 @@ checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" [[package]] name = "dyn-clone" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "ed25519" @@ -1557,7 +1556,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -1577,7 +1576,7 @@ checksum = "04d0b288e3bb1d861c4403c1774a6f7a798781dfc519b3647df2a3dd4ae95f25" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -1620,7 +1619,7 @@ dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -1827,7 +1826,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" dependencies = [ - "rustix 0.38.13", + "rustix 0.38.14", "windows-sys 0.48.0", ] @@ -1902,7 +1901,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -2187,9 +2186,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -2433,7 +2432,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.3", "libc", "windows-sys 0.48.0", ] @@ -2553,18 +2552,18 @@ dependencies = [ [[package]] name = "keyvaluedb" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8833bc9e937f44bac0e8d129b3ccda60dee6ca5fa2757d7e05a5e04503df02fb" +checksum = "9bdcaabe14fa83eaae1fb92480f619c5a8b413580723153da0334848eb2dff24" dependencies = [ "smallvec", ] [[package]] name = "keyvaluedb-memorydb" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14fdc324ae658318df46f62e64159c5662b94bcc99f9b6403d47d20ca7768b21" +checksum = "62802173041ed97845bc20f8cf6817e445fe537ed879ddf43fb96166829ec8ff" dependencies = [ "keyvaluedb", "parking_lot 0.12.1", @@ -2572,9 +2571,9 @@ dependencies = [ [[package]] name = "keyvaluedb-sqlite" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6bad95a1ad34c10ad4823fae1cb655be7fec022de642c95fbfafad360ba2f54" +checksum = "144f474a27a7dadc5c179c08ef9a4662acaca8047f4e5c30d5b77582243c7538" dependencies = [ "hex", "keyvaluedb", @@ -2585,9 +2584,9 @@ dependencies = [ [[package]] name = "keyvaluedb-web" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26cc6bb420f98cdd63a72c95eaa06947cdbd04e60a8d296b87f466196bacf068" +checksum = "d93d243dfa1643389f8b981ddc07b2a7c533f0fae38b3f5831b004b2cc7f6353" dependencies = [ "async-lock", "flume", @@ -3120,7 +3119,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.3", "libc", ] @@ -3490,7 +3489,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -3531,7 +3530,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -3953,9 +3952,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.13" +version = "0.38.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" dependencies = [ "bitflags 2.4.0", "errno", @@ -4008,9 +4007,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763f8cd0d4c71ed8389c90cb8100cba87e763bd01a8e614d4f0af97bcd50a161" +checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" dependencies = [ "dyn-clone", "schemars_derive", @@ -4020,9 +4019,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0f696e21e10fa546b7ffb1c9672c6de8fbc7a81acf59524386d8639bf12737" +checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" dependencies = [ "proc-macro2", "quote", @@ -4174,7 +4173,7 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -4196,7 +4195,7 @@ checksum = "e578a843d40b4189a4d66bba51d7684f57da5bd7c304c64e14bd63efbef49509" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -4218,7 +4217,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -4265,14 +4264,14 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -4403,9 +4402,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "snailquote" @@ -4523,9 +4522,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.36" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e02e55d62894af2a08aca894c6577281f76769ba47c94d5756bec8ac6e7373" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -4563,11 +4562,11 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix 0.37.23", + "rustix 0.38.14", "windows-sys 0.48.0", ] @@ -4597,7 +4596,7 @@ checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -4704,7 +4703,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -4720,9 +4719,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -4868,7 +4867,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -5059,7 +5058,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals 0.28.0", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] @@ -5122,9 +5121,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode_categories" @@ -5221,7 +5220,7 @@ dependencies = [ "async-std", "async-tungstenite", "cfg-if 1.0.0", - "clap 4.4.3", + "clap 4.4.4", "config", "crossbeam-channel", "cursive", @@ -5308,7 +5307,6 @@ dependencies = [ "paste", "range-set-blaze", "rtnetlink", - "rusqlite", "rustls", "rustls-pemfile", "schemars", @@ -5415,7 +5413,7 @@ dependencies = [ "async-tungstenite", "backtrace", "cfg-if 1.0.0", - "clap 4.4.3", + "clap 4.4.4", "color-eyre", "config", "console-subscriber", @@ -5601,7 +5599,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", "wasm-bindgen-shared", ] @@ -5635,7 +5633,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5760,7 +5758,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.13", + "rustix 0.38.14", ] [[package]] @@ -5793,9 +5791,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -6150,7 +6148,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.36", + "syn 2.0.37", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 21cb31de..90d036a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,13 +7,18 @@ members = [ "veilid-flutter/rust", "veilid-wasm", ] -exclude = ["./external"] resolver = "2" [patch.crates-io] cursive = { git = "https://gitlab.com/veilid/cursive.git" } cursive_core = { git = "https://gitlab.com/veilid/cursive.git" } +# For local development +# keyvaluedb = { path = "../keyvaluedb/keyvaluedb" } +# keyvaluedb-memorydb = { path = "../keyvaluedb/keyvaluedb-memorydb" } +# keyvaluedb-sqlite = { path = "../keyvaluedb/keyvaluedb-sqlite" } +# keyvaluedb-web = { path = "../keyvaluedb/keyvaluedb-web" } + [profile.release] opt-level = "s" lto = true diff --git a/Earthfile b/Earthfile index 4c047c9e..7a2d2e6b 100644 --- a/Earthfile +++ b/Earthfile @@ -12,16 +12,14 @@ deps-base: # Install Cap'n Proto deps-capnp: FROM +deps-base - COPY .capnp_version / COPY scripts/earthly/install_capnproto.sh / - RUN /bin/bash /install_capnproto.sh 1; rm /install_capnproto.sh .capnp_version + RUN /bin/bash /install_capnproto.sh 1; rm /install_capnproto.sh # Install protoc deps-protoc: FROM +deps-capnp - COPY .protoc_version / COPY scripts/earthly/install_protoc.sh / - RUN /bin/bash /install_protoc.sh; rm /install_protoc.sh .protoc_version + RUN /bin/bash /install_protoc.sh; rm /install_protoc.sh # Install Rust deps-rust: @@ -73,14 +71,14 @@ deps-linux: # Code + Linux deps code-linux: FROM +deps-linux - COPY --dir .cargo .capnp_version .protoc_version files scripts veilid-cli veilid-core veilid-server veilid-tools veilid-flutter veilid-wasm Cargo.lock Cargo.toml /veilid + COPY --dir .cargo files scripts veilid-cli veilid-core veilid-server veilid-tools veilid-flutter veilid-wasm Cargo.lock Cargo.toml /veilid RUN cat /veilid/scripts/earthly/cargo-linux/config.toml >> /veilid/.cargo/config.toml WORKDIR /veilid # Code + Linux + Android deps code-android: FROM +deps-android - COPY --dir .cargo .capnp_version .protoc_version files scripts veilid-cli veilid-core veilid-server veilid-tools veilid-flutter veilid-wasm Cargo.lock Cargo.toml /veilid + COPY --dir .cargo files scripts veilid-cli veilid-core veilid-server veilid-tools veilid-flutter veilid-wasm Cargo.lock Cargo.toml /veilid RUN cat /veilid/scripts/earthly/cargo-linux/config.toml >> /veilid/.cargo/config.toml RUN cat /veilid/scripts/earthly/cargo-android/config.toml >> /veilid/.cargo/config.toml WORKDIR /veilid diff --git a/dev-setup/setup_macos.sh b/dev-setup/setup_macos.sh index a0ea6c9d..0ec96c1c 100755 --- a/dev-setup/setup_macos.sh +++ b/dev-setup/setup_macos.sh @@ -27,6 +27,9 @@ else exit 1 fi +# ensure Android SDK packages are installed +$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager build-tools\;33.0.1 ndk\;25.1.8937393 cmake\;3.22.1 platform-tools platforms\;android-33 + # ensure ANDROID_NDK_HOME is defined and exists if [ -d "$ANDROID_NDK_HOME" ]; then echo '[X] $ANDROID_NDK_HOME is defined and exists' @@ -129,12 +132,6 @@ if [ "$BREW_USER" == "" ]; then fi sudo -H -u $BREW_USER brew install capnp cmake wabt llvm protobuf openjdk@17 jq -case $response in - [yY] ) echo Checking android sdk packages are installed...; -# Ensure android sdk packages are installed -$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager build-tools\;33.0.1 ndk\;25.1.8937393 cmake\;3.22.1 platform-tools platforms\;android-33 -esac - # install targets rustup target add aarch64-apple-darwin aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-darwin x86_64-apple-ios wasm32-unknown-unknown aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android diff --git a/scripts/earthly/install_capnproto.sh b/scripts/earthly/install_capnproto.sh index 61544d6b..865dbea2 100755 --- a/scripts/earthly/install_capnproto.sh +++ b/scripts/earthly/install_capnproto.sh @@ -1,10 +1,6 @@ #!/bin/bash SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -if [ -f ".capnp_version" ]; then - CAPNPROTO_VERSION=$(cat ".capnp_version") -else - CAPNPROTO_VERSION=$(cat "$SCRIPTDIR/../../.capnp_version") -fi +CAPNPROTO_VERSION="1.0.1" # Keep in sync with veilid-core/build.rs mkdir /tmp/capnproto-install pushd /tmp/capnproto-install diff --git a/scripts/earthly/install_protoc.sh b/scripts/earthly/install_protoc.sh index 04cb461e..d01a780e 100755 --- a/scripts/earthly/install_protoc.sh +++ b/scripts/earthly/install_protoc.sh @@ -1,10 +1,6 @@ #!/bin/bash SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -if [ -f ".protoc_version" ]; then - PROTOC_VERSION=$(cat ".protoc_version") -else - PROTOC_VERSION=$(cat "$SCRIPTDIR/../../.protoc_version") -fi +PROTOC_VERSION="24.3" # Keep in sync with veilid-core/build.rs UNAME_M=$(uname -m) if [[ "$UNAME_M" == "x86_64" ]]; then diff --git a/veilid-core/Cargo.toml b/veilid-core/Cargo.toml index 7778c64c..464c7183 100644 --- a/veilid-core/Cargo.toml +++ b/veilid-core/Cargo.toml @@ -83,7 +83,7 @@ thiserror = "1.0.48" # Data structures enumset = { version = "1.1.2", features = ["serde"] } -keyvaluedb = "0.1.0" +keyvaluedb = "0.1.1" range-set-blaze = "0.1.9" weak-table = "0.3.2" hashlink = { package = "veilid-hashlink", version = "0.1.0", features = [ @@ -128,7 +128,7 @@ trust-dns-resolver = { version = "0.23.0", optional = true } enum-as-inner = "=0.6.0" # temporary fix for trust-dns-resolver v0.22.0 # Serialization -capnp = { version = "0.18.1", default-features = false, features = [ "alloc" ] } +capnp = { version = "0.18.1", default-features = false, features = ["alloc"] } serde = { version = "1.0.188", features = ["derive"] } serde_json = { version = "1.0.107" } serde-big-array = "0.5.1" @@ -166,10 +166,10 @@ futures-util = { version = "0.3.28", default-features = false, features = [ # Data structures keyring-manager = "0.5.0" -keyvaluedb-sqlite = "0.1.0" +keyvaluedb-sqlite = "0.1.1" # Network -async-tungstenite = { version = "0.23.0", features = [ "async-tls" ] } +async-tungstenite = { version = "0.23.0", features = ["async-tls"] } igd = { package = "veilid-igd", version = "0.1.0" } async-tls = "0.12.0" webpki = "0.22.1" @@ -209,7 +209,7 @@ wasm-logger = "0.2.0" tracing-wasm = "0.2.1" # Data Structures -keyvaluedb-web = "0.1.0" +keyvaluedb-web = "0.1.1" ### Configuration for WASM32 'web-sys' crate [target.'cfg(target_arch = "wasm32")'.dependencies.web-sys] @@ -258,12 +258,6 @@ windows-permissions = "0.2.4" [target.'cfg(target_os = "ios")'.dependencies] tracing-oslog = { version = "0.1.2", optional = true } -# Rusqlite configuration to ensure platforms that don't come with sqlite get it bundled -# Except WASM which doesn't use sqlite -[target.'cfg(all(not(target_os = "ios"),not(target_os = "android"),not(target_arch = "wasm32")))'.dependencies.rusqlite] -version = "0.29.0" -features = ["bundled"] - ### DEV DEPENDENCIES [dev-dependencies] diff --git a/veilid-core/build.rs b/veilid-core/build.rs index 3eb93400..745f3e52 100644 --- a/veilid-core/build.rs +++ b/veilid-core/build.rs @@ -1,26 +1,14 @@ -use std::path::PathBuf; use std::process::{Command, Stdio}; -fn search_file, P: AsRef>(start: T, name: P) -> Option { - let start_path = PathBuf::from(start.as_ref()).canonicalize().ok(); - let mut path = start_path.as_deref(); - while let Some(some_path) = path { - let file_path = some_path.join(name.as_ref()); - if file_path.exists() { - return Some(file_path.to_owned()); - } - path = some_path.parent(); - } - None -} +const CAPNP_VERSION: &str = "1.0.1"; // Keep in sync with scripts/install_capnp.sh +const PROTOC_VERSION: &str = "24.3"; // Keep in sync with scripts/install_protoc.sh fn get_desired_capnp_version_string() -> String { - let capnp_path = search_file(env!("CARGO_MANIFEST_DIR"), ".capnp_version") - .expect("should find .capnp_version file"); - std::fs::read_to_string(&capnp_path) - .unwrap_or_else(|_| panic!("can't read .capnp_version file here: {:?}", capnp_path)) - .trim() - .to_owned() + CAPNP_VERSION.to_string() +} + +fn get_desired_protoc_version_string() -> String { + PROTOC_VERSION.to_string() } fn get_capnp_version_string() -> String { @@ -40,15 +28,6 @@ fn get_capnp_version_string() -> String { s[20..].to_owned() } -fn get_desired_protoc_version_string() -> String { - let protoc_path = search_file(env!("CARGO_MANIFEST_DIR"), ".protoc_version") - .expect("should find .protoc_version file"); - std::fs::read_to_string(&protoc_path) - .unwrap_or_else(|_| panic!("can't read .protoc_version file here: {:?}", protoc_path)) - .trim() - .to_owned() -} - fn get_protoc_version_string() -> String { let output = Command::new("protoc") .arg("--version") @@ -67,63 +46,69 @@ fn get_protoc_version_string() -> String { } fn main() { - let desired_capnp_version_string = get_desired_capnp_version_string(); - let capnp_version_string = get_capnp_version_string(); - let desired_protoc_version_string = get_desired_protoc_version_string(); - let protoc_version_string = get_protoc_version_string(); + #[cfg(doc)] + return; - // Check capnp version - let desired_capnp_major_version = desired_capnp_version_string - .split_once('.') - .unwrap() - .0 - .parse::() - .expect("should be valid int"); - - if capnp_version_string - .split_once('.') - .unwrap() - .0 - .parse::() - .expect("should be valid int") - != desired_capnp_major_version + #[cfg(not(doc))] { - panic!( - "capnproto version should be major version 1, preferably {} but is {}", - desired_capnp_version_string, capnp_version_string - ); - } else if capnp_version_string != desired_capnp_version_string { - println!( - "capnproto version may be untested: {}", - capnp_version_string - ); - } + let desired_capnp_version_string = get_desired_capnp_version_string(); + let capnp_version_string = get_capnp_version_string(); + let desired_protoc_version_string = get_desired_protoc_version_string(); + let protoc_version_string = get_protoc_version_string(); - // Check protoc version - let desired_protoc_major_version = desired_protoc_version_string - .split_once('.') - .unwrap() - .0 - .parse::() - .expect("should be valid int"); - if protoc_version_string - .split_once('.') - .unwrap() - .0 - .parse::() - .expect("should be valid int") - < desired_protoc_major_version - { - panic!( - "protoc version should be at least major version {} but is {}", - desired_protoc_major_version, protoc_version_string - ); - } else if protoc_version_string != desired_protoc_version_string { - println!("protoc version may be untested: {}", protoc_version_string); - } + // Check capnp version + let desired_capnp_major_version = desired_capnp_version_string + .split_once('.') + .unwrap() + .0 + .parse::() + .expect("should be valid int"); - ::capnpc::CompilerCommand::new() - .file("proto/veilid.capnp") - .run() - .expect("compiling schema"); + if capnp_version_string + .split_once('.') + .unwrap() + .0 + .parse::() + .expect("should be valid int") + != desired_capnp_major_version + { + panic!( + "capnproto version should be major version 1, preferably {} but is {}", + desired_capnp_version_string, capnp_version_string + ); + } else if capnp_version_string != desired_capnp_version_string { + println!( + "capnproto version may be untested: {}", + capnp_version_string + ); + } + + // Check protoc version + let desired_protoc_major_version = desired_protoc_version_string + .split_once('.') + .unwrap() + .0 + .parse::() + .expect("should be valid int"); + if protoc_version_string + .split_once('.') + .unwrap() + .0 + .parse::() + .expect("should be valid int") + < desired_protoc_major_version + { + panic!( + "protoc version should be at least major version {} but is {}", + desired_protoc_major_version, protoc_version_string + ); + } else if protoc_version_string != desired_protoc_version_string { + println!("protoc version may be untested: {}", protoc_version_string); + } + + ::capnpc::CompilerCommand::new() + .file("proto/veilid.capnp") + .run() + .expect("compiling schema"); + } } diff --git a/veilid-core/run_tests.sh b/veilid-core/run_tests.sh index d3e0376a..0ee1c973 100755 --- a/veilid-core/run_tests.sh +++ b/veilid-core/run_tests.sh @@ -30,8 +30,8 @@ elif [[ "$1" == "ios" ]]; then elif [[ "$1" == "android" ]]; then ID="$2" if [[ "$ID" == "" ]]; then - echo "No emulator ID specified" - exit 1 + echo "No emulator ID specified, trying 'emulator-5554'" + ID="emulator-5554" fi APPNAME=veilid_core_android_tests APPID=com.veilid.veilid_core_android_tests diff --git a/veilid-core/src/rpc_processor/coders/operations/operation_watch_value.rs b/veilid-core/src/rpc_processor/coders/operations/operation_watch_value.rs index 77eea5a5..f7e0ea14 100644 --- a/veilid-core/src/rpc_processor/coders/operations/operation_watch_value.rs +++ b/veilid-core/src/rpc_processor/coders/operations/operation_watch_value.rs @@ -22,10 +22,9 @@ impl RPCOperationWatchValueQ { watcher: PublicKey, signature: Signature, ) -> Result { - #[cfg(target_arch = "wasm32")] + // Needed because RangeSetBlaze uses different types here all the time + #[allow(clippy::unnecessary_cast)] let subkeys_len = subkeys.len() as usize; - #[cfg(not(target_arch = "wasm32"))] - let subkeys_len = subkeys.len(); if subkeys_len > MAX_WATCH_VALUE_Q_SUBKEYS_LEN { return Err(RPCError::protocol("WatchValueQ subkeys length too long")); @@ -42,10 +41,9 @@ impl RPCOperationWatchValueQ { // signature covers: key, subkeys, expiration, count, using watcher key fn make_signature_data(&self) -> Vec { - #[cfg(target_arch = "wasm32")] + // Needed because RangeSetBlaze uses different types here all the time + #[allow(clippy::unnecessary_cast)] let subkeys_len = self.subkeys.len() as usize; - #[cfg(not(target_arch = "wasm32"))] - let subkeys_len = self.subkeys.len(); let mut sig_data = Vec::with_capacity(PUBLIC_KEY_LENGTH + 4 + (subkeys_len * 8) + 8 + 4); sig_data.extend_from_slice(&self.key.kind.0); diff --git a/veilid-flutter/android/build.gradle b/veilid-flutter/android/build.gradle index a49c617a..2f67d5a7 100644 --- a/veilid-flutter/android/build.gradle +++ b/veilid-flutter/android/build.gradle @@ -75,7 +75,7 @@ android { dependencies { implementation "androidx.security:security-crypto:1.1.0-alpha03" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" } apply plugin: 'org.mozilla.rust-android-gradle.rust-android' diff --git a/veilid-flutter/example/android/app/build.gradle b/veilid-flutter/example/android/app/build.gradle index 870fc29d..3b74008a 100644 --- a/veilid-flutter/example/android/app/build.gradle +++ b/veilid-flutter/example/android/app/build.gradle @@ -70,5 +70,5 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" } diff --git a/veilid-flutter/example/android/build.gradle b/veilid-flutter/example/android/build.gradle index b05ad989..8764a914 100644 --- a/veilid-flutter/example/android/build.gradle +++ b/veilid-flutter/example/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/veilid-flutter/example/ios/Flutter/AppFrameworkInfo.plist b/veilid-flutter/example/ios/Flutter/AppFrameworkInfo.plist index 9625e105..b908a13e 100644 --- a/veilid-flutter/example/ios/Flutter/AppFrameworkInfo.plist +++ b/veilid-flutter/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.3 diff --git a/veilid-flutter/example/ios/Runner.xcodeproj/project.pbxproj b/veilid-flutter/example/ios/Runner.xcodeproj/project.pbxproj index 0f079077..30547a5c 100644 --- a/veilid-flutter/example/ios/Runner.xcodeproj/project.pbxproj +++ b/veilid-flutter/example/ios/Runner.xcodeproj/project.pbxproj @@ -345,7 +345,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.3; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -424,7 +424,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.3; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -474,7 +474,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.3; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/veilid-flutter/example/pubspec.lock b/veilid-flutter/example/pubspec.lock index 25f2d414..8d0b8994 100644 --- a/veilid-flutter/example/pubspec.lock +++ b/veilid-flutter/example/pubspec.lock @@ -403,7 +403,7 @@ packages: path: ".." relative: true source: path - version: "0.2.1" + version: "0.2.3" web: dependency: transitive description: diff --git a/veilid-flutter/rust/Cargo.toml b/veilid-flutter/rust/Cargo.toml index 21a3d1ce..11fb0f05 100644 --- a/veilid-flutter/rust/Cargo.toml +++ b/veilid-flutter/rust/Cargo.toml @@ -28,10 +28,7 @@ rt-tokio = [ ] [dependencies] -veilid-core = { path = "../../veilid-core", default-features = false, features = [ - "verbose-tracing", - "network-result-extra", -] } +veilid-core = { path = "../../veilid-core", default-features = false } tracing = { version = "^0", features = ["log", "attributes"] } tracing-subscriber = "^0" parking_lot = "^0"