diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..47684146 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[env] +CARGO_WORKSPACE_DIR = { value = "", relative = true } diff --git a/.gitignore b/.gitignore index 5a955134..3ea2c6c8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ out-arm/ cscope.* .DS_Store .dir-locals.el -.cargo .gradle/ *.code-workspace **/.vscode @@ -15,6 +14,7 @@ src/jar.list org.eclipse.buildship.core.prefs local.properties *.tar.gz -.cargo +.cargo/* +!.cargo/config.toml target .spr.yml diff --git a/Cargo.lock b/Cargo.lock index 7356afa7..9a9eefd6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -157,9 +157,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "aws-lc-rs" -version = "1.15.2" +version = "1.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88aab2464f1f25453baa7a07c84c5b7684e274054ba06817f382357f77a288" +checksum = "7b7b6141e96a8c160799cc2d5adecd5cbbe5054cb8c7c4af53da0f83bb7ad256" dependencies = [ "aws-lc-sys", "zeroize", @@ -167,9 +167,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.35.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45afffdee1e7c9126814751f88dddc747f41d91da16c9551a0f1e8a11e788a1" +checksum = "5c34dda4df7017c8db52132f0f8a2e0f8161649d15723ed63fc00c82d0f2081a" dependencies = [ "cc", "cmake", @@ -228,9 +228,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.8.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d809780667f4410e7c41b07f52439b94d2bdf8528eeedc287fa38d3b7f95d82" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" [[package]] name = "bincode" @@ -317,7 +317,7 @@ dependencies = [ "serde_json", "serde_repr", "serde_urlencoded", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-util", "tower-service", @@ -355,6 +355,15 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +[[package]] +name = "bzip2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c" +dependencies = [ + "libbz2-rs-sys", +] + [[package]] name = "call_sim" version = "2.64.1" @@ -395,9 +404,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.51" +version = "1.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a0aeaff4ff1a90589618835a598e545176939b97874f7abc7851caa0618f203" +checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" dependencies = [ "find-msvc-tools", "jobserver", @@ -419,9 +428,9 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "chrono" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" +checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" dependencies = [ "iana-time-zone", "js-sys", @@ -478,9 +487,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" +checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" [[package]] name = "cmake" @@ -538,7 +547,7 @@ dependencies = [ "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "libc", ] @@ -572,7 +581,7 @@ checksum = "c9d2790b5c08465d49f8dc05c8bcae9fea467855947db39b0f8145c091aaced5" dependencies = [ "core-foundation", "core-graphics", - "foreign-types", + "foreign-types 0.5.0", "libc", ] @@ -854,6 +863,15 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + [[package]] name = "env_filter" version = "0.1.4" @@ -864,6 +882,12 @@ dependencies = [ "regex", ] +[[package]] +name = "env_home" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" + [[package]] name = "env_logger" version = "0.11.8" @@ -915,10 +939,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] -name = "find-msvc-tools" -version = "0.1.6" +name = "filetime" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645cbb3a84e60b7531617d5ae4e57f7e27308f6445f5abf653209ea76dec8dff" +checksum = "f98844151eee8917efc50bd9e8318cb963ae8b297431495d3f758616ea5c57db" +dependencies = [ + "cfg-if", + "libc", + "libredox", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" [[package]] name = "fixedbitset" @@ -928,9 +963,9 @@ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] name = "flate2" -version = "1.1.5" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" +checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369" dependencies = [ "crc32fast", "miniz_oxide", @@ -948,6 +983,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "font-kit" version = "0.14.3" @@ -973,6 +1014,15 @@ dependencies = [ "yeslogic-fontconfig-sys", ] +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared 0.1.1", +] + [[package]] name = "foreign-types" version = "0.5.0" @@ -980,7 +1030,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" dependencies = [ "foreign-types-macros", - "foreign-types-shared", + "foreign-types-shared 0.3.1", ] [[package]] @@ -994,6 +1044,12 @@ dependencies = [ "syn", ] +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "foreign-types-shared" version = "0.3.1" @@ -1039,6 +1095,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", + "futures-sink", ] [[package]] @@ -1047,6 +1104,12 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + [[package]] name = "futures-macro" version = "0.3.31" @@ -1077,8 +1140,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", + "futures-io", "futures-macro", + "futures-sink", "futures-task", + "memchr", "pin-project-lite", "pin-utils", "slab", @@ -1096,9 +1162,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", "libc", @@ -1153,6 +1219,15 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + [[package]] name = "hashbrown" version = "0.16.1" @@ -1253,7 +1328,7 @@ dependencies = [ "hpke-rs-crypto", "libcrux-sha3", "log", - "rand_core 0.9.3", + "rand_core 0.9.5", "zeroize", ] @@ -1263,7 +1338,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dd92b7d7f0deaae59c152e01c01f5280ea92dfac82090e5c025879b32df9193" dependencies = [ - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -1349,6 +1424,22 @@ dependencies = [ "winapi", ] +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + [[package]] name = "hyper-timeout" version = "0.5.2" @@ -1362,12 +1453,29 @@ dependencies = [ "tower-service", ] +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + [[package]] name = "hyper-util" version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" dependencies = [ + "base64", "bytes", "futures-channel", "futures-core", @@ -1375,12 +1483,16 @@ dependencies = [ "http", "http-body", "hyper", + "ipnet", "libc", + "percent-encoding", "pin-project-lite", "socket2", + "system-configuration", "tokio", "tower-service", "tracing", + "windows-registry", ] [[package]] @@ -1563,6 +1675,22 @@ dependencies = [ "generic-array", ] +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.2" @@ -1584,6 +1712,17 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +[[package]] +name = "java-properties" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37bf6f484471c451f2b51eabd9e66b3fa7274550c5ec4b6c3d6070840945117f" +dependencies = [ + "encoding_rs", + "lazy_static", + "regex", +] + [[package]] name = "jiff" version = "0.2.18" @@ -1642,9 +1781,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.83" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" dependencies = [ "once_cell", "wasm-bindgen", @@ -1657,10 +1796,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] -name = "libc" -version = "0.2.179" +name = "libbz2-rs-sys" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5a2d376baa530d1238d133232d15e239abad80d05838b4b59354e5268af431f" +checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" + +[[package]] +name = "libc" +version = "0.2.180" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" [[package]] name = "libcrux-intrinsics" @@ -1730,6 +1875,7 @@ checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ "bitflags 2.10.0", "libc", + "redox_syscall", ] [[package]] @@ -1746,12 +1892,12 @@ dependencies = [ "protobuf 3.7.2", "protobuf-codegen", "rand 0.9.2", - "rand_core 0.9.3", + "rand_core 0.9.5", "serde", "sha2", "signal-crypto", "static_assertions", - "thiserror 2.0.17", + "thiserror 2.0.18", "zerocopy", ] @@ -1767,7 +1913,7 @@ dependencies = [ "rand 0.9.2", "sha2", "subtle", - "thiserror 2.0.17", + "thiserror 2.0.18", "uuid", "x25519-dalek", "zerocopy", @@ -1863,7 +2009,7 @@ dependencies = [ "anyhow", "log", "rand 0.9.2", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -1872,6 +2018,23 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "neon" version = "1.1.1" @@ -1920,9 +2083,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" [[package]] name = "num-integer" @@ -2001,6 +2164,50 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +[[package]] +name = "openssl" +version = "0.10.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" +dependencies = [ + "bitflags 2.10.0", + "cfg-if", + "foreign-types 0.3.2", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.111" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "option-ext" version = "0.2.0" @@ -2071,11 +2278,12 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "petgraph" -version = "0.7.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ "fixedbitset", + "hashbrown 0.15.5", "indexmap 2.13.0", ] @@ -2253,18 +2461,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.105" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "prost" -version = "0.14.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" +checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568" dependencies = [ "bytes", "prost-derive", @@ -2272,15 +2480,14 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.14.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac6c3320f9abac597dcbc668774ef006702672474aad53c6d596b62e487b40b1" +checksum = "343d3bd7056eda839b03204e68deff7d1b13aba7af2b2fd16890697274262ee7" dependencies = [ "heck", "itertools", "log", "multimap", - "once_cell", "petgraph", "prettyplease", "prost", @@ -2294,9 +2501,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.14.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" +checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" dependencies = [ "anyhow", "itertools", @@ -2307,9 +2514,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.14.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9b4db3d6da204ed77bb26ba83b6122a73aeb2e87e25fbf7ad2e84c4ccbf8f72" +checksum = "8991c4cbdb8bc5b11f0b074ffe286c30e523de90fee5ba8132f1399f23cb3dd7" dependencies = [ "prost", ] @@ -2361,7 +2568,7 @@ dependencies = [ "protobuf-support", "tempfile", "thiserror 1.0.69", - "which", + "which 4.4.2", ] [[package]] @@ -2386,18 +2593,18 @@ dependencies = [ [[package]] name = "pulldown-cmark-to-cmark" -version = "21.1.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8246feae3db61428fd0bb94285c690b460e4517d83152377543ca802357785f1" +checksum = "50793def1b900256624a709439404384204a5dc3a6ec580281bfaac35e882e90" dependencies = [ "pulldown-cmark", ] [[package]] name = "quote" -version = "1.0.43" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] @@ -2432,7 +2639,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -2452,7 +2659,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -2461,14 +2668,14 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", ] [[package]] name = "rand_core" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ "getrandom 0.3.4", ] @@ -2493,15 +2700,24 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "redox_syscall" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f3fe0889e69e2ae9e41f4d6c4c0181701d00e4697b356fb1f74173a5e0ee27" +dependencies = [ + "bitflags 2.10.0", +] + [[package]] name = "redox_users" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "libredox", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -2572,6 +2788,48 @@ dependencies = [ "serde", ] +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "ring" version = "0.17.14" @@ -2580,7 +2838,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.16", + "getrandom 0.2.17", "libc", "untrusted", "windows-sys 0.52.0", @@ -2633,7 +2891,7 @@ dependencies = [ "strum_macros", "subtle", "sysinfo", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tonic", "tonic-prost", @@ -2698,18 +2956,18 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" dependencies = [ "zeroize", ] [[package]] name = "rustls-webpki" -version = "0.103.8" +version = "0.103.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" dependencies = [ "aws-lc-rs", "ring", @@ -2738,6 +2996,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "schannel" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "schemars" version = "0.9.0" @@ -2762,6 +3029,29 @@ dependencies = [ "serde_json", ] +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.10.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "semver" version = "1.0.27" @@ -2916,11 +3206,11 @@ dependencies = [ "hpke-rs-crypto", "libsignal-core", "rand_chacha 0.9.0", - "rand_core 0.9.3", + "rand_core 0.9.5", "sha1", "sha2", "subtle", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -2959,9 +3249,9 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" dependencies = [ "libc", "windows-sys 0.60.2", @@ -3028,6 +3318,9 @@ name = "sync_wrapper" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] [[package]] name = "synstructure" @@ -3054,12 +3347,44 @@ dependencies = [ "windows 0.61.3", ] +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.10.0", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tap" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +[[package]] +name = "tar" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" +dependencies = [ + "filetime", + "libc", + "xattr", +] + [[package]] name = "tempfile" version = "3.24.0" @@ -3084,11 +3409,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl 2.0.18", ] [[package]] @@ -3104,9 +3429,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", @@ -3115,30 +3440,30 @@ dependencies = [ [[package]] name = "time" -version = "0.3.44" +version = "0.3.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" +checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5" dependencies = [ "deranged", "itoa", "num-conv", "powerfmt", - "serde", + "serde_core", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.24" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" +checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4" dependencies = [ "num-conv", "time-core", @@ -3181,6 +3506,26 @@ dependencies = [ "syn", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.18" @@ -3305,9 +3650,9 @@ dependencies = [ [[package]] name = "tower" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", @@ -3322,6 +3667,24 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags 2.10.0", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -3472,9 +3835,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" +checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" dependencies = [ "getrandom 0.3.4", "js-sys", @@ -3482,6 +3845,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version_check" version = "0.9.5" @@ -3515,18 +3884,18 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.1+wasi-0.2.4" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" dependencies = [ "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" dependencies = [ "cfg-if", "once_cell", @@ -3536,10 +3905,24 @@ dependencies = [ ] [[package]] -name = "wasm-bindgen-macro" -version = "0.2.106" +name = "wasm-bindgen-futures" +version = "0.4.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +dependencies = [ + "cfg-if", + "futures-util", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3547,9 +3930,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" dependencies = [ "bumpalo", "proc-macro2", @@ -3560,18 +3943,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.83" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" dependencies = [ "js-sys", "wasm-bindgen", @@ -3586,6 +3969,32 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "webrtc-sys" +version = "2.64.1" +dependencies = [ + "anyhow", + "webrtc-sys-build", + "xshell", +] + +[[package]] +name = "webrtc-sys-build" +version = "0.1.0" +dependencies = [ + "anyhow", + "bzip2", + "fs_extra", + "hex", + "java-properties", + "reqwest", + "serde_json", + "sha2", + "tar", + "which 7.0.3", + "xshell", +] + [[package]] name = "which" version = "4.4.2" @@ -3598,6 +4007,18 @@ dependencies = [ "rustix 0.38.44", ] +[[package]] +name = "which" +version = "7.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d643ce3fd3e5b54854602a080f34fb10ab75e0b813ee32d00ca2b44fa74762" +dependencies = [ + "either", + "env_home", + "rustix 1.1.3", + "winsafe", +] + [[package]] name = "winapi" version = "0.3.9" @@ -3774,6 +4195,17 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "windows-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" +dependencies = [ + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + [[package]] name = "windows-result" version = "0.3.4" @@ -4068,6 +4500,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "winsafe" +version = "0.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" + [[package]] name = "wio" version = "0.2.2" @@ -4079,9 +4517,9 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.46.0" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" [[package]] name = "writeable" @@ -4110,6 +4548,31 @@ dependencies = [ "zeroize", ] +[[package]] +name = "xattr" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" +dependencies = [ + "libc", + "rustix 1.1.3", +] + +[[package]] +name = "xshell" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e7290c623014758632efe00737145b6867b66292c42167f2ec381eb566a373d" +dependencies = [ + "xshell-macros", +] + +[[package]] +name = "xshell-macros" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32ac00cd3f8ec9c1d33fb3e7958a82df6989c42d747bd326c822b1d625283547" + [[package]] name = "yeslogic-fontconfig-sys" version = "6.0.0" @@ -4146,18 +4609,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" +checksum = "71ddd76bcebeed25db614f82bf31a9f4222d3fbba300e6fb6c00afa26cbd4d9d" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" +checksum = "d8187381b52e32220d50b255276aa16a084ec0a9017a0ca2152a1f55c539758d" dependencies = [ "proc-macro2", "quote", @@ -4253,7 +4716,7 @@ dependencies = [ "serde", "sha2", "subtle", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -4281,13 +4744,13 @@ dependencies = [ "sha2", "static_assertions", "subtle", - "thiserror 2.0.17", + "thiserror 2.0.18", "uuid", "zkcredential", ] [[package]] name = "zmij" -version = "1.0.12" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc5a66a20078bf1251bde995aa2fdcc4b800c70b5d92dd2c62abc5c60f679f8" +checksum = "02aae0f83f69aafc94776e879363e9771d7ecbffe2c7fbb6c14c5e00dfe88439" diff --git a/Cargo.toml b/Cargo.toml index a520d208..9e0322fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,8 @@ members = [ "mrp", "protobuf", "src/rust", + "webrtc-sys", + "webrtc-sys/build", ] [workspace.package] diff --git a/acknowledgments/about.toml b/acknowledgments/about.toml index d5143ba9..3c8c807b 100644 --- a/acknowledgments/about.toml +++ b/acknowledgments/about.toml @@ -10,6 +10,7 @@ accepted = [ "AGPL-3.0-only", "ISC", "Unicode-3.0", + "Zlib", ] ignore-dev-dependencies = true diff --git a/acknowledgments/acknowledgments.html b/acknowledgments/acknowledgments.html index 7406493f..3ff0335f 100644 --- a/acknowledgments/acknowledgments.html +++ b/acknowledgments/acknowledgments.html @@ -45,13 +45,14 @@

Overview of licenses:

All license text:

@@ -982,7 +983,7 @@ You should also get your employer (if you work as a programmer) or school, if an

Apache License 2.0

Used by:

                                 Apache License
                            Version 2.0, January 2004
@@ -1400,10 +1401,10 @@ You should also get your employer (if you work as a programmer) or school, if an
                 

Apache License 2.0

Used by:

                              Apache License
                         Version 2.0, January 2004
@@ -2023,10 +2024,10 @@ SOFTWARE.
                 

MIT License

Used by:

Copyright (c) 2014 Alex Crichton
@@ -2093,7 +2094,7 @@ DEALINGS IN THE SOFTWARE.
                 

MIT License

Used by:

Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
 Copyright (c) 2021-2025 The RustCrypto Project Developers
@@ -2165,7 +2166,7 @@ DEALINGS IN THE SOFTWARE.
                 

MIT License

Used by:

Copyright (c) 2014 The Rust Project Developers
 Copyright (c) 2018 Ashley Mannix, Christopher Armstrong, Dylan DPC, Hunar Roop Kahlon
@@ -2199,7 +2200,7 @@ DEALINGS IN THE SOFTWARE.
                 

MIT License

Used by:

Copyright (c) 2014-2020 The Rust Project Developers
 
@@ -2262,7 +2263,7 @@ THE SOFTWARE.
                 
@@ -2572,6 +2573,7 @@ DEALINGS IN THE SOFTWARE.
                 

MIT License

Used by:

Copyright (c) 2016 Amanieu d'Antras
@@ -3038,7 +3040,7 @@ DEALINGS IN THE SOFTWARE.
                 

MIT License

Used by:

Copyright (c) 2018-2024 The rust-random Project Developers
 Copyright (c) 2014 The Rust Project Developers
@@ -3561,7 +3563,7 @@ SOFTWARE.
                     
  • rand_chacha 0.3.1
  • rand_chacha 0.9.0
  • rand_core 0.6.4
  • -
  • rand_core 0.9.3
  • +
  • rand_core 0.9.5
  • Copyright 2018 Developers of the Rand project
     Copyright (c) 2014 The Rust Project Developers
    @@ -3595,8 +3597,8 @@ DEALINGS IN THE SOFTWARE.
                     

    MIT License

    Used by:

    Copyright 2023 The Fuchsia Authors
     
    @@ -3929,8 +3931,8 @@ SOFTWARE.
                         
  • once_cell 1.21.3
  • prettyplease 0.2.37
  • proc-macro-crate 3.4.0
  • -
  • proc-macro2 1.0.105
  • -
  • quote 1.0.43
  • +
  • proc-macro2 1.0.106
  • +
  • quote 1.0.44
  • rustix 0.38.44
  • rustix 1.1.3
  • rustversion 1.0.22
  • @@ -3942,11 +3944,11 @@ SOFTWARE.
  • serde_json 1.0.149
  • syn 2.0.114
  • thiserror-impl 1.0.69
  • -
  • thiserror-impl 2.0.17
  • +
  • thiserror-impl 2.0.18
  • thiserror 1.0.69
  • -
  • thiserror 2.0.17
  • +
  • thiserror 2.0.18
  • unicode-ident 1.0.22
  • -
  • zmij 1.0.12
  • +
  • zmij 1.0.17
  • Permission is hereby granted, free of charge, to any
     person obtaining a copy of this software and associated
    @@ -4901,6 +4903,32 @@ dealings in these Data Files or Software without prior written
     authorization of the copyright holder.
     
    +
  • +

    zlib License

    +

    Used by:

    + +
    Copyright (c) 2024 Orson Peters
    +
    +This software is provided 'as-is', without any express or implied warranty. In
    +no event will the authors be held liable for any damages arising from the use of
    +this software.
    +
    +Permission is granted to anyone to use this software for any purpose, including
    +commercial applications, and to alter it and redistribute it freely, subject to
    +the following restrictions:
    +
    +1. The origin of this software must not be misrepresented; you must not claim
    +    that you wrote the original software. If you use this software in a product,
    +    an acknowledgment in the product documentation would be appreciated but is
    +    not required.
    +
    +2. Altered source versions must be plainly marked as such, and must not be
    +    misrepresented as being the original software.
    +
    +3. This notice may not be removed or altered from any source distribution.
    +
  • diff --git a/acknowledgments/acknowledgments.md b/acknowledgments/acknowledgments.md index 67d18044..95828fe7 100644 --- a/acknowledgments/acknowledgments.md +++ b/acknowledgments/acknowledgments.md @@ -910,7 +910,7 @@ You should also get your employer (if you work as a programmer) or school, if an ``` -## pulldown-cmark-to-cmark 21.1.0 +## pulldown-cmark-to-cmark 22.0.0 ``` Apache License @@ -1324,7 +1324,7 @@ You should also get your employer (if you work as a programmer) or school, if an ``` -## prost-build 0.14.1, prost-derive 0.14.1, prost-types 0.14.1, prost 0.14.1 +## prost-build 0.14.3, prost-derive 0.14.3, prost-types 0.14.3, prost 0.14.3 ``` Apache License @@ -1900,7 +1900,7 @@ SOFTWARE. ``` -## cc 1.2.51, cfg-if 1.0.4, cmake 0.1.57, find-msvc-tools 0.1.6, pkg-config 0.3.32 +## cc 1.2.54, cfg-if 1.0.4, cmake 0.1.57, find-msvc-tools 0.1.8, pkg-config 0.3.32 ``` Copyright (c) 2014 Alex Crichton @@ -1962,7 +1962,7 @@ DEALINGS IN THE SOFTWARE. ``` -## base64ct 1.8.2 +## base64ct 1.8.3 ``` Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) @@ -2025,7 +2025,7 @@ DEALINGS IN THE SOFTWARE. ``` -## uuid 1.19.0 +## uuid 1.20.0 ``` Copyright (c) 2014 The Rust Project Developers @@ -2057,7 +2057,7 @@ DEALINGS IN THE SOFTWARE. ``` -## libc 0.2.179 +## libc 0.2.180 ``` Copyright (c) 2014-2020 The Rust Project Developers @@ -2114,7 +2114,7 @@ THE SOFTWARE. ``` -## either 1.15.0, itertools 0.14.0, petgraph 0.7.1, serde_with 3.16.1, serde_with_macros 3.16.1 +## either 1.15.0, itertools 0.14.0, petgraph 0.8.3, serde_with 3.16.1, serde_with_macros 3.16.1 ``` Copyright (c) 2015 @@ -2402,7 +2402,7 @@ DEALINGS IN THE SOFTWARE. ``` -## hashbrown 0.16.1 +## hashbrown 0.15.5, hashbrown 0.16.1 ``` Copyright (c) 2016 Amanieu d'Antras @@ -2837,7 +2837,7 @@ DEALINGS IN THE SOFTWARE. ``` -## getrandom 0.2.16 +## getrandom 0.2.17 ``` Copyright (c) 2018-2024 The rust-random Project Developers @@ -3319,7 +3319,7 @@ SOFTWARE. ``` -## rand 0.8.5, rand 0.9.2, rand_chacha 0.3.1, rand_chacha 0.9.0, rand_core 0.6.4, rand_core 0.9.3 +## rand 0.8.5, rand 0.9.2, rand_chacha 0.3.1, rand_chacha 0.9.0, rand_core 0.6.4, rand_core 0.9.5 ``` Copyright 2018 Developers of the Rand project @@ -3351,7 +3351,7 @@ DEALINGS IN THE SOFTWARE. ``` -## zerocopy-derive 0.8.33, zerocopy 0.8.33 +## zerocopy-derive 0.8.34, zerocopy 0.8.34 ``` Copyright 2023 The Fuchsia Authors @@ -3621,7 +3621,7 @@ SOFTWARE. ``` -## curve25519-dalek-derive 0.1.1, anyhow 1.0.100, displaydoc 0.2.5, fastrand 2.3.0, home 0.5.12, itoa 1.0.17, linkme-impl 0.3.35, linkme 0.3.35, linux-raw-sys 0.11.0, linux-raw-sys 0.4.15, num_enum 0.7.5, num_enum_derive 0.7.5, once_cell 1.21.3, prettyplease 0.2.37, proc-macro-crate 3.4.0, proc-macro2 1.0.105, quote 1.0.43, rustix 0.38.44, rustix 1.1.3, rustversion 1.0.22, semver 1.0.27, send_wrapper 0.6.0, serde 1.0.228, serde_core 1.0.228, serde_derive 1.0.228, serde_json 1.0.149, syn 2.0.114, thiserror-impl 1.0.69, thiserror-impl 2.0.17, thiserror 1.0.69, thiserror 2.0.17, unicode-ident 1.0.22, zmij 1.0.12 +## curve25519-dalek-derive 0.1.1, anyhow 1.0.100, displaydoc 0.2.5, fastrand 2.3.0, home 0.5.12, itoa 1.0.17, linkme-impl 0.3.35, linkme 0.3.35, linux-raw-sys 0.11.0, linux-raw-sys 0.4.15, num_enum 0.7.5, num_enum_derive 0.7.5, once_cell 1.21.3, prettyplease 0.2.37, proc-macro-crate 3.4.0, proc-macro2 1.0.106, quote 1.0.44, rustix 0.38.44, rustix 1.1.3, rustversion 1.0.22, semver 1.0.27, send_wrapper 0.6.0, serde 1.0.228, serde_core 1.0.228, serde_derive 1.0.228, serde_json 1.0.149, syn 2.0.114, thiserror-impl 1.0.69, thiserror-impl 2.0.18, thiserror 1.0.69, thiserror 2.0.18, unicode-ident 1.0.22, zmij 1.0.17 ``` Permission is hereby granted, free of charge, to any @@ -4533,3 +4533,27 @@ authorization of the copyright holder. ``` +## foldhash 0.1.5 + +``` +Copyright (c) 2024 Orson Peters + +This software is provided 'as-is', without any express or implied warranty. In +no event will the authors be held liable for any damages arising from the use of +this software. + +Permission is granted to anyone to use this software for any purpose, including +commercial applications, and to alter it and redistribute it freely, subject to +the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim + that you wrote the original software. If you use this software in a product, + an acknowledgment in the product documentation would be appreciated but is + not required. + +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. +``` + diff --git a/acknowledgments/acknowledgments.plist b/acknowledgments/acknowledgments.plist index ee7d48a4..e7b4a5a6 100644 --- a/acknowledgments/acknowledgments.plist +++ b/acknowledgments/acknowledgments.plist @@ -1135,7 +1135,7 @@ You should also get your employer (if you work as a programmer) or school, if an License Apache License 2.0 Title - pulldown-cmark-to-cmark 21.1.0 + pulldown-cmark-to-cmark 22.0.0 Type PSGroupSpecifier @@ -1557,7 +1557,7 @@ limitations under the License. License Apache License 2.0 Title - prost-build 0.14.1, prost-derive 0.14.1, prost-types 0.14.1, prost 0.14.1 + prost-build 0.14.3, prost-derive 0.14.3, prost-types 0.14.3, prost 0.14.3 Type PSGroupSpecifier @@ -2005,7 +2005,7 @@ DEALINGS IN THE SOFTWARE. License MIT License Title - cc 1.2.51, cfg-if 1.0.4, cmake 0.1.57, find-msvc-tools 0.1.6, pkg-config 0.3.32 + cc 1.2.54, cfg-if 1.0.4, cmake 0.1.57, find-msvc-tools 0.1.8, pkg-config 0.3.32 Type PSGroupSpecifier @@ -2076,7 +2076,7 @@ DEALINGS IN THE SOFTWARE. License MIT License Title - base64ct 1.8.2 + base64ct 1.8.3 Type PSGroupSpecifier @@ -2147,7 +2147,7 @@ DEALINGS IN THE SOFTWARE. License MIT License Title - uuid 1.19.0 + uuid 1.20.0 Type PSGroupSpecifier @@ -2182,7 +2182,7 @@ DEALINGS IN THE SOFTWARE. License MIT License Title - libc 0.2.179 + libc 0.2.180 Type PSGroupSpecifier @@ -2247,7 +2247,7 @@ DEALINGS IN THE SOFTWARE. License MIT License Title - either 1.15.0, itertools 0.14.0, petgraph 0.7.1, serde_with 3.16.1, serde_with_macros 3.16.1 + either 1.15.0, itertools 0.14.0, petgraph 0.8.3, serde_with 3.16.1, serde_with_macros 3.16.1 Type PSGroupSpecifier @@ -2575,7 +2575,7 @@ DEALINGS IN THE SOFTWARE. License MIT License Title - hashbrown 0.16.1 + hashbrown 0.15.5, hashbrown 0.16.1 Type PSGroupSpecifier @@ -3067,7 +3067,7 @@ DEALINGS IN THE SOFTWARE. License MIT License Title - getrandom 0.2.16 + getrandom 0.2.17 Type PSGroupSpecifier @@ -3613,7 +3613,7 @@ DEALINGS IN THE SOFTWARE. License MIT License Title - rand 0.8.5, rand 0.9.2, rand_chacha 0.3.1, rand_chacha 0.9.0, rand_core 0.6.4, rand_core 0.9.3 + rand 0.8.5, rand 0.9.2, rand_chacha 0.3.1, rand_chacha 0.9.0, rand_core 0.6.4, rand_core 0.9.5 Type PSGroupSpecifier @@ -3649,7 +3649,7 @@ DEALINGS IN THE SOFTWARE. License MIT License Title - zerocopy-derive 0.8.33, zerocopy 0.8.33 + zerocopy-derive 0.8.34, zerocopy 0.8.34 Type PSGroupSpecifier @@ -3956,7 +3956,7 @@ DEALINGS IN THE SOFTWARE. License MIT License Title - curve25519-dalek-derive 0.1.1, anyhow 1.0.100, displaydoc 0.2.5, fastrand 2.3.0, home 0.5.12, itoa 1.0.17, linkme-impl 0.3.35, linkme 0.3.35, linux-raw-sys 0.11.0, linux-raw-sys 0.4.15, num_enum 0.7.5, num_enum_derive 0.7.5, once_cell 1.21.3, prettyplease 0.2.37, proc-macro-crate 3.4.0, proc-macro2 1.0.105, quote 1.0.43, rustix 0.38.44, rustix 1.1.3, rustversion 1.0.22, semver 1.0.27, send_wrapper 0.6.0, serde 1.0.228, serde_core 1.0.228, serde_derive 1.0.228, serde_json 1.0.149, syn 2.0.114, thiserror-impl 1.0.69, thiserror-impl 2.0.17, thiserror 1.0.69, thiserror 2.0.17, unicode-ident 1.0.22, zmij 1.0.12 + curve25519-dalek-derive 0.1.1, anyhow 1.0.100, displaydoc 0.2.5, fastrand 2.3.0, home 0.5.12, itoa 1.0.17, linkme-impl 0.3.35, linkme 0.3.35, linux-raw-sys 0.11.0, linux-raw-sys 0.4.15, num_enum 0.7.5, num_enum_derive 0.7.5, once_cell 1.21.3, prettyplease 0.2.37, proc-macro-crate 3.4.0, proc-macro2 1.0.106, quote 1.0.44, rustix 0.38.44, rustix 1.1.3, rustversion 1.0.22, semver 1.0.27, send_wrapper 0.6.0, serde 1.0.228, serde_core 1.0.228, serde_derive 1.0.228, serde_json 1.0.149, syn 2.0.114, thiserror-impl 1.0.69, thiserror-impl 2.0.18, thiserror 1.0.69, thiserror 2.0.18, unicode-ident 1.0.22, zmij 1.0.17 Type PSGroupSpecifier @@ -4919,6 +4919,34 @@ authorization of the copyright holder. Type PSGroupSpecifier + + FooterText + Copyright (c) 2024 Orson Peters + +This software is provided 'as-is', without any express or implied warranty. In +no event will the authors be held liable for any damages arising from the use of +this software. + +Permission is granted to anyone to use this software for any purpose, including +commercial applications, and to alter it and redistribute it freely, subject to +the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim + that you wrote the original software. If you use this software in a product, + an acknowledgment in the product documentation would be appreciated but is + not required. + +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. + License + zlib License + Title + foldhash 0.1.5 + Type + PSGroupSpecifier + FooterText Generated by cargo-about diff --git a/bin/fetch-artifact.py b/bin/fetch-artifact.py index 87442f88..40eba2dd 100755 --- a/bin/fetch-artifact.py +++ b/bin/fetch-artifact.py @@ -7,6 +7,7 @@ import argparse import hashlib +import json import os import platform import ssl @@ -18,16 +19,18 @@ from typing import BinaryIO UNVERIFIED_DOWNLOAD_NAME = "unverified.tmp" -PREBUILD_CHECKSUMS = { - 'android': '520be7a10fa6c796cba29a790c8bf839b2e9f08b06b9314ebb165f0d76bbf7f9', - 'ios': '5421d640ce6f598a42cbc22eeb74223135d6d9869f8929d6bd5acaf0722527ff', - 'linux-x64': '9135254b5b230b50ddbe6787d85715676ccc41636af331bef670303762153c99', - 'linux-arm64': '3e9a4eab524c386fa87a30f3ff2156f375e563bed2b9e3ba5a78917f8dd76e70', - 'mac-x64': '36d19d0ee14a0bbe45dc24298b1b211ec4ee11b7d891c585feb43383e4d8920f', - 'mac-arm64': '30cd81aca0f9c8f971895b584104f8412abd3c7a067f49c5b8322e1b7beebf2f', - 'windows-x64': '51fa1684901009f04684c45f039a9cbf48be2b7cf5242ad730b203adf69bd0c0', - 'windows-arm64': '5cf450c5fc0cb50840e5c18dc97afeb9a17c5ea7b359949b8c9af62adcf7770a', -} +fetch_script_file_path = os.path.realpath(__file__) +fetch_script_file_dir = os.path.dirname(fetch_script_file_path) + +try: + with open("{}/../config/webrtc_artifact_checksums.json".format(fetch_script_file_dir), 'r') as file: + PREBUILD_CHECKSUMS = json.load(file) +except FileNotFoundError: + print("The artifact checksum file was not found.") + exit(1) +except json.JSONDecodeError: + print("The artifact checksum file contains invalid JSON.") + exit(1) def resolve_os(os_name: str) -> str: diff --git a/call_sim/Cargo.toml b/call_sim/Cargo.toml index 1989edf9..76c27872 100644 --- a/call_sim/Cargo.toml +++ b/call_sim/Cargo.toml @@ -29,7 +29,7 @@ relative-path = "2.0.1" serde = { version = "1.0.228", features = ["derive"] } serde_json = "1.0.145" sha2 = "0.10.9" -tokio = { version = "1.48.0", features = ["rt-multi-thread", "macros", "time", "fs", "process"] } +tokio = { version = "1.48.0", features = ["rt-multi-thread", "macros", "time", "fs", "process", "io-std"] } tonic = "0.14.2" tonic-prost = "0.14.2" tower = { version = "0.5.2", features = ["timeout"] } diff --git a/config/webrtc_artifact_checksums.json b/config/webrtc_artifact_checksums.json new file mode 100644 index 00000000..f5a778f1 --- /dev/null +++ b/config/webrtc_artifact_checksums.json @@ -0,0 +1,10 @@ +{ + "android": "520be7a10fa6c796cba29a790c8bf839b2e9f08b06b9314ebb165f0d76bbf7f9", + "ios": "5421d640ce6f598a42cbc22eeb74223135d6d9869f8929d6bd5acaf0722527ff", + "linux-x64": "9135254b5b230b50ddbe6787d85715676ccc41636af331bef670303762153c99", + "linux-arm64": "3e9a4eab524c386fa87a30f3ff2156f375e563bed2b9e3ba5a78917f8dd76e70", + "mac-x64": "36d19d0ee14a0bbe45dc24298b1b211ec4ee11b7d891c585feb43383e4d8920f", + "mac-arm64": "30cd81aca0f9c8f971895b584104f8412abd3c7a067f49c5b8322e1b7beebf2f", + "windows-x64": "51fa1684901009f04684c45f039a9cbf48be2b7cf5242ad730b203adf69bd0c0", + "windows-arm64": "5cf450c5fc0cb50840e5c18dc97afeb9a17c5ea7b359949b8c9af62adcf7770a" +} diff --git a/webrtc-sys/Cargo.toml b/webrtc-sys/Cargo.toml new file mode 100644 index 00000000..6943f43d --- /dev/null +++ b/webrtc-sys/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "webrtc-sys" +edition = "2024" +version.workspace = true +authors.workspace = true + +[features] +prebuilt-webrtc = ["webrtc-sys-build/prebuilt-webrtc"] +simulator = ["webrtc-sys-build/simulator"] + +[lib] +crate-type = ["cdylib", "staticlib", "lib"] + +[build-dependencies] +anyhow = "1.0.100" +webrtc-sys-build = { path = "./build" } +xshell = "0.2.7" diff --git a/webrtc-sys/build.rs b/webrtc-sys/build.rs new file mode 100644 index 00000000..ee89dd31 --- /dev/null +++ b/webrtc-sys/build.rs @@ -0,0 +1,30 @@ +// +// Copyright 2025 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only +// + +use std::fs; + +use webrtc_sys_build::webrtc::{self, config::*}; + +fn main() -> anyhow::Result<()> { + println!( + "webrtc-sys build.rs: profile: {}, test: {}, os: {}, arch: {}, sim: {} webrtc_output_dir: {}, workspace_dir: {}", + *PROFILE, IS_TEST, *TARGET_OS, *TARGET_ARCH, TARGET_SIMULATOR, *OUTPUT_DIR, *WORKSPACE_DIR + ); + + webrtc::verify_webrtc_target()?; + println!("cargo:rerun-if-env-changed=OUTPUT_DIR"); + println!("cargo:rerun-if-changed=build.rs"); + println!("cargo:rerun-if-changed=libwebrtc/*"); + println!("cargo:rerun-if-changed=src/*"); + + fs::create_dir_all(WEBRTC_DEST_DIR.as_str())?; + if webrtc::should_use_prebuilt() { + webrtc::download_prebuilt()?; + return Ok(()); + } + + let sh = webrtc::prepare_workspace_shell()?; + webrtc::build_webrtc_from_source(sh) +} diff --git a/webrtc-sys/build/Cargo.toml b/webrtc-sys/build/Cargo.toml new file mode 100644 index 00000000..03fa71b8 --- /dev/null +++ b/webrtc-sys/build/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "webrtc-sys-build" +version = "0.1.0" +edition = "2024" + +[features] +prebuilt-webrtc = [] +simulator = [] + +[dependencies] +anyhow = "1.0.100" +bzip2 = "0.6.1" +fs_extra = "1.3.0" +hex = "0.4.3" +java-properties = "2.0.0" +reqwest = { version = "0.12.24", features = [ + "blocking", +] } # Use "blocking" feature for simpler synchronous code +serde_json = "1.0.145" +sha2 = "0.10.9" +tar = "0.4.44" +which = "7.0.0" +xshell = "0.2.7" diff --git a/webrtc-sys/build/README.md b/webrtc-sys/build/README.md new file mode 100644 index 00000000..edf05c18 --- /dev/null +++ b/webrtc-sys/build/README.md @@ -0,0 +1,22 @@ +## Expected directory structure + +``` + |- webrtc-sys + |- build.rs + |- src/ + | |- ... + |- libwebrtc + | |- .gclient + | |- artifact_checksums.json + | |- version.properties + | |- src + | |- .git + | |- out + | |- ... + | |- ... + |- out + |- + |- + |- obj + |- libwebrtc.so +``` diff --git a/webrtc-sys/build/WebRTCForTesting.podspec.tpl b/webrtc-sys/build/WebRTCForTesting.podspec.tpl new file mode 100644 index 00000000..414bc7e4 --- /dev/null +++ b/webrtc-sys/build/WebRTCForTesting.podspec.tpl @@ -0,0 +1,12 @@ +Pod::Spec.new do |s| + s.name = "WebRTCForTesting" + s.version = "0.0.1" + s.summary = "Intended only for testing SignalRingRTC within this repository" + s.license = "BSD" + s.homepage = "https://github.com/signalapp/webrtc" + s.source = {{ git: "https://github.com/signalapp/webrtc.git" }} + s.author = {{ "iOS Team": "ios@signal.org" }} + + s.platform = :ios, "'{}'" + s.vendored_frameworks = "'{}'/WebRTC.xcframework" +end diff --git a/webrtc-sys/build/src/lib.rs b/webrtc-sys/build/src/lib.rs new file mode 100644 index 00000000..9aa97fa6 --- /dev/null +++ b/webrtc-sys/build/src/lib.rs @@ -0,0 +1,6 @@ +// +// Copyright 2025 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only +// + +pub mod webrtc; diff --git a/webrtc-sys/build/src/webrtc.rs b/webrtc-sys/build/src/webrtc.rs new file mode 100644 index 00000000..c4b853fb --- /dev/null +++ b/webrtc-sys/build/src/webrtc.rs @@ -0,0 +1,496 @@ +// +// Copyright 2025 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only +// + +use core::panic; +use std::{ + collections::HashMap, + fs::{self, File, OpenOptions}, + io::{self, BufReader, Read, Seek}, + path::Path, +}; + +use anyhow::bail; +use config::*; +use sha2::{Digest, Sha256}; +use xshell::{Shell, cmd}; + +pub fn prepare_workspace_shell() -> anyhow::Result { + let mut sh = Shell::new()?; + if *TARGET_PLATFORM == "windows" { + sh.set_var("DEPOT_TOOLS_WIN_TOOLCHAIN", "0"); + } + + ensure_chromium_depot_tools(&mut sh)?; + sync_webrtc_source(&mut sh)?; + Ok(sh) +} + +pub fn ensure_chromium_depot_tools(sh: &mut Shell) -> anyhow::Result<()> { + if which::which("gclient").is_ok() { + return Ok(()); + } + + let depot_tools_path = format!("{}/depot_tools", *OUTPUT_DIR); + if !Path::new(&depot_tools_path).exists() { + cmd!(sh, "git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git {depot_tools_path}").run()?; + } + sh.set_var( + "PATH", + format!("{depot_tools_path}:{}", sh.var("PATH").unwrap()), + ); + + Ok(()) +} + +pub fn sync_webrtc_source(sh: &mut Shell) -> anyhow::Result<()> { + println!( + "Syncing WebRTC source version '{}' to directory {}", + *WEBRTC_VERSION, *LIBWEBRTC_DIR + ); + let gclient_file = *GCLIENT_FILE; + let revision = WEBRTC_VERSION.as_str(); + sh.change_dir(LIBWEBRTC_DIR.as_str()); + let env_vars = HashMap::from([ + ("WEBRTC_DIR", LIBWEBRTC_DIR.clone()), + ("WEBRTC_VERSION", WEBRTC_VERSION.clone()), + ( + "WEBRTC_REVISION", + format!("branch-heads/{}", *WEBRTC_VERSION), + ), + ]); + cmd!( + sh, + "gclient sync --no-history --jobs 32 --with_tags --revision=src@{revision} --gclientfile={gclient_file}" + ) + .envs(env_vars) + .run()?; + Ok(()) +} + +pub fn build_webrtc_from_source(sh: Shell) -> anyhow::Result<()> { + match *TARGET_PLATFORM { + "ios" => build_webrtc_for_ios(sh), + "android" => build_webrtc_for_android(sh), + "desktop" => build_webrtc_for_desktop(sh), + _ => bail!("Unsupported target platform {}", *TARGET_PLATFORM), + } +} + +pub fn common_webrtc_flags() -> Vec { + let target_os = match TARGET_OS.as_str() { + "macos" => "target_os=\"mac\"".to_string(), + os => format!("target_os=\"{os}\""), + }; + let symbol_level = if *IS_RELEASE { 1 } else { 2 }; + let include_tests = *IS_DESKTOP && IS_TEST; + vec![ + target_os, + format!("is_debug={}", !*IS_RELEASE), + format!("rtc_include_tests={include_tests}"), + format!("rtc_enable_protobuf={include_tests}"), + format!("symbol_level={symbol_level}"), + "rtc_build_examples=false".to_string(), + "rtc_build_tools=false".to_string(), + "rtc_enable_sctp=false".to_string(), + "rtc_disable_metrics=true".to_string(), + "rtc_disable_trace_events=true".to_string(), + ] +} + +pub fn build_webrtc_for_desktop(sh: Shell) -> anyhow::Result<()> { + let working_dir = format!("{}/src", *LIBWEBRTC_DIR); + let dest = format!("out/{}/{}", *TARGET_KEY, *PROFILE); + sh.change_dir(&working_dir); + + let gnu_arch = DESKTOP_TARGET_ARCH_TO_GNU_ARCH[TARGET_ARCH.as_str()]; + let mut args = common_webrtc_flags(); + args.extend(vec![ + format!("target_cpu=\"{gnu_arch}\""), + "rtc_use_x11=false".to_string(), + "rtc_libvpx_build_vp9=true".to_string(), + "use_siso=true".to_string(), + ]); + if TARGET_OS.as_str() == "linux" && gnu_arch == "arm64" { + args.push("libyuv_use_sme=false".to_string()); + // Ensure that experimental compact relocation is disabled until upstream projects properly set it. + // https://issues.webrtc.org/issues/407797634 + // https://chromium-review.googlesource.com/c/chromium/src/+/5938657 + cmd!( + sh, + "sed -i '/^[^#].*--allow-experimental-crel/ s/^/#/' src/webrtc/src/build/config/compiler/BUILD.gn" + ).run()?; + } + let args_flag = args.join(" "); + cmd!(sh, "gn gen -C {dest} --args={args_flag}").run()?; + cmd!(sh, "third_party/siso/cipd/siso ninja -C {dest} webrtc").run()?; + if IS_TEST { + cmd!(sh, "third_party/siso/cipd/siso ninja -C {dest} default").run()?; + cmd!(sh, "download_from_google_storage --directory --recursive --num_threads=10 --no_auth --quiet --bucket chromium-webrtc-resources resources") + .run()?; + } + cmd!( + sh, + "tools_webrtc/libs/generate_licenses.py --target :webrtc {dest} {dest}" + ) + .run()?; + + let filename = if *TARGET_PLATFORM == "windows" { + "webrtc.lib" + } else { + "libwebrtc.a" + }; + let from = format!("{working_dir}/{dest}/obj/{filename}"); + let to = format!("{}/{}", *WEBRTC_DEST_DIR, filename); + let err_msg = format!("could not copy webrtc lib from {from} to {to}"); + fs::copy(from, to).expect(&err_msg); + let from = format!("{working_dir}/{dest}/LICENSE.md"); + let to = format!("{}/{}/{}/LICENSE.md", *OUTPUT_DIR, *TARGET_KEY, *PROFILE); + let err_msg = format!("could not copy webrtc license from {from} to {to}"); + fs::copy(from, to).expect(&err_msg); + Ok(()) +} + +pub fn build_webrtc_for_ios(sh: Shell) -> anyhow::Result<()> { + const IPHONEOS_DEPLOYMENT_TARGET: &str = "14.0"; + let profile = PROFILE.as_str(); + let mut args = common_webrtc_flags(); + args.extend(vec![ + format!("enable_dsyms={}", !*IS_RELEASE), + "rtc_libvpx_build_vp9=false".to_string(), + ]); + let working_dir = format!("{}/src", *LIBWEBRTC_DIR); + let dest = format!("{}/out/ios/{}", working_dir, *PROFILE); + let library_dest = WEBRTC_DEST_DIR.as_str(); + let xcframework_dest = format!("{library_dest}/WebRTC.xcframework"); + let bin_dir = format!("{}/bin", *WORKSPACE_DIR); + let webrtc_version = WEBRTC_VERSION.as_str(); + let ringrtc_version = RINGRTC_VERSION.as_str(); + + sh.change_dir(working_dir); + cmd!( + sh, + "tools_webrtc/ios/build_ios_libs.py -o {dest} --build_config {profile} --arch simulator:x64 simulator:arm64 device:arm64 --deployment-target {IPHONEOS_DEPLOYMENT_TARGET} --extra-gn-args {args...}" + ).run()?; + cmd!(sh, "cp -Rf {dest}/WebRTC.xcframework {library_dest}").run()?; + let build_env = cmd!(sh, "{bin_dir}/print_build_env.py --webrtc-version={webrtc_version} --ringrtc-version={ringrtc_version}").read().unwrap(); + fs::write(format!("{xcframework_dest}/build_env.txt"), build_env) + .expect("failed to write build_env.txt"); + // Delete dSYMs out of the built XCFramework. + // FIXME: In the future, we probably want to keep these, + // which is why we aren't changing WebRTC's build script to skip them altogether. + // We enumerate directories since we can't use parameter expansion with xshell + cmd!(sh, "rm -r {xcframework_dest}/ios-arm64/dSYMs").run()?; + cmd!( + sh, + "rm -r {xcframework_dest}/ios-arm64_x86_64-simulator/dSYMs" + ) + .run()?; + cmd!( + sh, + "plutil -remove AvailableLibraries.DebugSymbolsPath {xcframework_dest}/Info.plist" + ) + .run()?; + + let podspec = format!( + include_str!("../WebRTCForTesting.podspec.tpl"), + IPHONEOS_DEPLOYMENT_TARGET, profile + ); + fs::write(format!("{library_dest}/WebRTCForTesting.podspec"), podspec) + .expect("failed to write podspec"); + let acknowledgements = cmd!( + sh, + "{bin_dir}/convert_webrtc_acknowledgments.py -f plist {xcframework_dest}/LICENSE.md" + ) + .read()?; + fs::write( + format!("{library_dest}/acknowledgments-webrtc-ios.plist"), + acknowledgements, + ) + .expect("failed to write acknowledgements"); + + Ok(()) +} + +pub fn build_webrtc_for_android(sh: Shell) -> anyhow::Result<()> { + let gnu_arch = ANDROID_TARGET_ARCH_TO_GNU_ARCH[TARGET_ARCH.as_str()]; + let profile = PROFILE.as_str(); + let mut args = common_webrtc_flags(); + args.extend(vec![ + format!("target_cpu={gnu_arch}"), + "rtc_libvpx_build_vp9=false".to_string(), + "android_static_analysis=\"off\"".to_string(), + "use_siso=true".to_string(), + ]); + let args_flag = args.join(" "); + let working_dir = format!("{}/src", *LIBWEBRTC_DIR); + let dest = format!("{working_dir}/out/android-{gnu_arch}/{profile}"); + let library_dest = WEBRTC_DEST_DIR.as_str(); + let path = "lib.java/sdk/android"; + let filename = "libwebrtc.jar"; + + sh.change_dir(working_dir); + cmd!(sh, "gn gen -C {dest} --args={args_flag}").run()?; + cmd!(sh, "third_party/siso/cipd/siso ninja -C {dest} ringrtc").run()?; + cmd!(sh, "cp -Rf {dest} {library_dest}").run()?; + cmd!(sh, "mkdir -p {path}").run()?; + cmd!( + sh, + "cp -Rf {dest}/{path}/{filename} {library_dest}/{path}/{filename}" + ) + .run()?; + + Ok(()) +} + +pub fn should_use_prebuilt() -> bool { + let has_prebuilt_env: Option<&'static str> = option_env!("PREBUILT_WEBRTC"); + let has_prebuilt_feature = cfg!(feature = "prebuilt-webrtc"); + + has_prebuilt_env + .and_then(|s: &str| s.parse::().ok()) + .and_then(|b| match b { + 0 => Some(false), + 1 => Some(true), + _ => None, + }) + .unwrap_or(has_prebuilt_feature) +} + +pub fn download_prebuilt() -> anyhow::Result<()> { + let expected_checksum = ARTIFACT_CHECKSUMS + .get(TARGET_KEY.as_str()) + .unwrap_or_else(|| panic!("could not find checksum for artifact key: {}", *TARGET_KEY)) + .as_str() + .expect("artifact checksum must be string"); + let archive_filename = format!( + "webrtc-{}-{}-{}.tar.bz2", + *WEBRTC_VERSION, *TARGET_PAIR, *PROFILE + ); + let archive_local_dir = format!("{}/{}", *OUTPUT_DIR, *TARGET_KEY); + let archive_local_path = format!("{}/{}", archive_local_dir, archive_filename); + let download_url = format!("https://build-artifacts.signal.org/libraries/{archive_filename}"); + let temporary_path = format!("{}/unverified.tar.bz2", archive_local_dir); + + println!("Looking for artifact in {archive_local_path} with checksum {expected_checksum}"); + let mut archive_file = OpenOptions::new() + .read(true) + .open(&archive_local_path) + .or_else(|_| download_file(&download_url, &temporary_path)) + .expect("failed to download prebuilt-webrtc artifact"); + + let checksum = calculate_sha256(&mut archive_file).expect("Failed to checksum"); + if checksum != expected_checksum { + bail!( + "download checksum did not match expected checksum: {checksum} vs {expected_checksum}" + ); + } + let _ = fs::rename(temporary_path, archive_local_path); + archive_file + .rewind() + .expect("failed to seek to start of archive file"); + let decoder = bzip2::read::BzDecoder::new(BufReader::new(archive_file)); + let mut archive = tar::Archive::new(decoder); + archive + .unpack(archive_local_dir) + .expect("failed to decompress webrtc artifact"); + Ok(()) +} + +pub fn calculate_sha256(file: &mut File) -> io::Result { + file.rewind()?; + let mut hasher = Sha256::new(); + let mut buffer = [0; 1024]; // Buffer to read file in chunks + loop { + let bytes_read = file.read(&mut buffer)?; + if bytes_read == 0 { + break; + } + hasher.update(&buffer[..bytes_read]); + } + + let hash_bytes = hasher.finalize(); + Ok(hex::encode(hash_bytes)) +} + +pub fn download_file(url: &str, filename: &str) -> anyhow::Result { + println!("Downloading from {url} to local file {filename}"); + fs::create_dir_all(Path::new(filename).parent().unwrap()) + .expect("could not make target download folder"); + let mut response = reqwest::blocking::get(url)?.error_for_status()?; + let mut file = OpenOptions::new() + .read(true) + .truncate(true) + .create(true) + .write(true) + .open(filename)?; + std::io::copy(&mut response, &mut file)?; + Ok(file) +} + +// only certain HOSTS can build certain TARGET_OS such as +// windows targets must be built on windows +// ios and macos must be built on macos +// android or linux can be built on macos or linux +pub fn verify_webrtc_target() -> anyhow::Result<()> { + if !SUPPORTED_OS_TO_TARGET_ARCH.contains_key(TARGET_OS.as_str()) { + bail!("Unsupported target OS: {}", *TARGET_OS); + } + if !SUPPORTED_OS_TO_TARGET_ARCH[TARGET_OS.as_str()].contains(TARGET_ARCH.as_str()) { + bail!("Unsupported target ARCH: {}", *TARGET_ARCH); + } + if TARGET_SIMULATOR && !*IS_DESKTOP { + bail!("Unsupported target OS for simulator: {}", *TARGET_OS); + } + + let target_os = TARGET_OS.as_str(); + let host_os = std::env::consts::OS; + let host_os_can_build_target = match target_os { + "windows" => host_os == "windows", + "ios" | "macos" => ["macos"].contains(&host_os), + "android" | "linux" => ["macos", "linux"].contains(&host_os), + _ => bail!("Should have been prevented in earlier supported OS check"), + }; + + if !host_os_can_build_target { + bail!("Invalid host_os {host_os} for building target_os {target_os}") + } + Ok(()) +} + +pub fn shell>(cwd: T) -> Shell { + let sh = Shell::new().unwrap(); + sh.change_dir(cwd.as_ref()); + sh +} + +pub mod config { + use std::{ + collections::{HashMap, HashSet}, + env, + io::BufReader, + sync::LazyLock, + }; + + use serde_json::Value; + + // Build Target info + pub static VERBOSE: LazyLock = LazyLock::new(|| env::var("CARGO_TERM_VERBOSE").is_ok()); + pub static PROFILE: LazyLock = LazyLock::new(|| env::var("PROFILE").unwrap()); + pub static TARGET_OS: LazyLock = + LazyLock::new(|| env::var("CARGO_CFG_TARGET_OS").unwrap()); + pub static TARGET_ARCH: LazyLock = + LazyLock::new(|| env::var("CARGO_CFG_TARGET_ARCH").unwrap()); + pub static TARGET_SIMULATOR: bool = cfg!(feature = "simulator"); + pub static TARGET_PLATFORM: LazyLock<&str> = LazyLock::new(|| match TARGET_OS.as_str() { + "ios" => "ios", + "android" => "ios", + "windows" | "macos" | "linux" => "desktop", + _ => panic!("Unsupported TARGET OS"), + }); + // we can simplify if we use cargo target key for webrtc artifacts + pub static TARGET_PAIR: LazyLock = LazyLock::new(|| match TARGET_OS.as_ref() { + os @ "ios" | os @ "android" => os.to_string(), + os => { + // remove once we migrate releasing prebuilds using cargo build + let os = if os == "macos" { "mac" } else { os }; + format!( + "{}-{}", + os, + DESKTOP_TARGET_ARCH_TO_GNU_ARCH[TARGET_ARCH.as_str()], + ) + } + }); + pub static TARGET_KEY: LazyLock = LazyLock::new(|| { + if TARGET_SIMULATOR { + format!("{}-sim", *TARGET_PAIR) + } else { + TARGET_PAIR.clone() + } + }); + pub static RINGRTC_VERSION: LazyLock = LazyLock::new(|| { + format!( + "{}.{}.{}", + env::var("CARGO_PKG_VERSION_MAJOR").unwrap(), + env::var("CARGO_PKG_VERSION_MINOR").unwrap(), + env::var("CARGO_PKG_VERSION_PATCH").unwrap() + ) + }); + pub static IS_DESKTOP: LazyLock = + LazyLock::new(|| ["linux", "macos", "windows"].contains(&TARGET_OS.as_str())); + pub static IS_RELEASE: LazyLock = LazyLock::new(|| &*PROFILE == "release"); + pub static IS_TEST: bool = cfg!(test); + + // Directory info + pub static WORKSPACE_DIR: LazyLock = LazyLock::new(|| { + env::var("CARGO_WORKSPACE_DIR") + .map(|s| s.strip_suffix(|_| true).unwrap_or(&s).to_string()) + .unwrap() + }); + pub static CRATE_DIR: LazyLock = + LazyLock::new(|| format!("{}/webrtc-sys", *WORKSPACE_DIR)); + pub static LIBWEBRTC_DIR: LazyLock = + LazyLock::new(|| format!("{}/libwebrtc", *CRATE_DIR)); + pub static OUTPUT_DIR: LazyLock = + LazyLock::new(|| env::var("OUTPUT_DIR").unwrap_or(format!("{}/out", *CRATE_DIR))); + pub static WEBRTC_DEST_DIR: LazyLock = LazyLock::new(|| { + if *IS_DESKTOP { + format!("{}/{}/{}/obj", *OUTPUT_DIR, *TARGET_KEY, *PROFILE) + } else { + format!("{}/{}/{}/obj", *OUTPUT_DIR, *TARGET_OS, *PROFILE) + } + }); + + pub const SUPPORTED_DESKTOP_TARGET_ARCH: [&str; 4] = ["x86_64", "i686", "aarch64", "arm64"]; + pub const SUPPORTED_ANDROID_TARGET_ARCH: [&str; 5] = ["aarch64", "arm", "arm64", "x86", "x64"]; + pub const SUPPORTED_IOS_TARGET_ARCH: [&str; 3] = ["aarch64", "x86", "arm64"]; + pub static SUPPORTED_OS_TO_TARGET_ARCH: LazyLock>> = + LazyLock::new(|| { + HashMap::from([ + ("android", HashSet::from(SUPPORTED_ANDROID_TARGET_ARCH)), + ("ios", HashSet::from(SUPPORTED_IOS_TARGET_ARCH)), + ("macos", HashSet::from(SUPPORTED_DESKTOP_TARGET_ARCH)), + ("windows", HashSet::from(SUPPORTED_DESKTOP_TARGET_ARCH)), + ("linux", HashSet::from(SUPPORTED_DESKTOP_TARGET_ARCH)), + ]) + }); + pub static DESKTOP_TARGET_ARCH_TO_GNU_ARCH: LazyLock> = + LazyLock::new(|| { + HashMap::from([ + ("x86_64", "x64"), + ("i686", "x86"), + ("aarch64", "arm64"), + ("arm64", "arm64"), + ]) + }); + pub static ANDROID_TARGET_ARCH_TO_GNU_ARCH: LazyLock> = + LazyLock::new(|| { + HashMap::from([("x86_64", "x64"), ("aarch64", "arm64"), ("armv7", "arm")]) + }); + + // Values pulled from config files + pub static ARTIFACT_CHECKSUMS: LazyLock = LazyLock::new(|| { + serde_json::from_str(include_str!( + "../../../config/webrtc_artifact_checksums.json" + )) + .expect("artifact checksums should be valid json file") + }); + pub static VERSION_PROPERTIES: LazyLock> = LazyLock::new(|| { + java_properties::read(BufReader::new( + include_str!("../../../config/version.properties").as_bytes(), + )) + .expect("invalid webrtc version properties file") + }); + pub static WEBRTC_VERSION: LazyLock<&String> = LazyLock::new(|| { + VERSION_PROPERTIES + .get("webrtc.version") + .expect("no webrtc.version property in versions property file") + }); + pub static GCLIENT_FILE: LazyLock<&str> = LazyLock::new(|| match TARGET_OS.as_str() { + "windows" => ".gclient.windows", + "ios" | "macos" => ".gclient.apple", + "android" | "linux" => ".gclient.unix", + _ => panic!("Invalid target os gclient file specified"), + }); +} diff --git a/webrtc-sys/libwebrtc/.gclient.apple b/webrtc-sys/libwebrtc/.gclient.apple new file mode 100644 index 00000000..e8892f23 --- /dev/null +++ b/webrtc-sys/libwebrtc/.gclient.apple @@ -0,0 +1,14 @@ +# +# Copyright 2019-2021 Signal Messenger, LLC +# SPDX-License-Identifier: AGPL-3.0-only +# + +solutions = [ + { "name" : "src", + "url" : "https://github.com/signalapp/webrtc.git", + "deps_file" : "DEPS", + }, +] + +target_os = ["ios", "mac"] + diff --git a/webrtc-sys/libwebrtc/.gclient.unix b/webrtc-sys/libwebrtc/.gclient.unix new file mode 100644 index 00000000..be86b4e0 --- /dev/null +++ b/webrtc-sys/libwebrtc/.gclient.unix @@ -0,0 +1,14 @@ +# +# Copyright 2019-2021 Signal Messenger, LLC +# SPDX-License-Identifier: AGPL-3.0-only +# + +solutions = [ + { "name" : "src", + "url" : "https://github.com/signalapp/webrtc.git", + "deps_file" : "DEPS", + }, +] + +target_os = ["android", "linux"] + diff --git a/webrtc-sys/libwebrtc/.gclient.windows b/webrtc-sys/libwebrtc/.gclient.windows new file mode 100644 index 00000000..fe5d24ce --- /dev/null +++ b/webrtc-sys/libwebrtc/.gclient.windows @@ -0,0 +1,14 @@ +# +# Copyright 2019-2021 Signal Messenger, LLC +# SPDX-License-Identifier: AGPL-3.0-only +# + +solutions = [ + { "name" : "src", + "url" : "https://github.com/signalapp/webrtc.git", + "deps_file" : "DEPS", + }, +] + +target_os = ["windows"] + diff --git a/webrtc-sys/libwebrtc/.gitignore b/webrtc-sys/libwebrtc/.gitignore new file mode 100644 index 00000000..06cf029d --- /dev/null +++ b/webrtc-sys/libwebrtc/.gitignore @@ -0,0 +1,5 @@ +.cipd +.gclient*_entries +.gclient_previous_sync_commits +.gcs_entries +src diff --git a/webrtc-sys/src/lib.rs b/webrtc-sys/src/lib.rs new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/webrtc-sys/src/lib.rs @@ -0,0 +1 @@ +