From 32ec36b9eff443f21a5c29d5046248dac136f2f6 Mon Sep 17 00:00:00 2001 From: Jean-Pierre De Jesus DIAZ Date: Mon, 8 Apr 2024 16:28:31 +0200 Subject: [PATCH 1/3] SFT-3189: Update MSRV to 1.70.0. * Dockerfile: Update MSRV to 1.70.0. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7d1fc4195..23bc24b4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ ENV RUSTUP_HOME="/rustup" ENV CARGO_HOME="/cargo" RUN mkdir -p /rustup /cargo && \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ - sh -s -- -y --profile minimal --default-toolchain 1.69.0 + sh -s -- -y --profile minimal --default-toolchain 1.70.0 ENV PATH="/cargo/bin:${PATH}" # Finish installation of Rust toolchain. From d9e834fbfb37e194777cc378c99d46276ad4defe Mon Sep 17 00:00:00 2001 From: Jean-Pierre De Jesus DIAZ Date: Fri, 19 Jan 2024 17:48:40 +0100 Subject: [PATCH 2/3] SFT-3189: Update Cargo dependencies. * extmod/foundation-rust/Cargo.toml (minicbor): Update to 0.20. (foundation-ur): Use crates.io version. (foundation-urtypes): Use crates.io version. (heapless): Use crates.io version. * extmod/foundation-rust/Cargo.lock: Update using `cargo update'. Signed-off-by: Jean-Pierre De Jesus DIAZ --- extmod/foundation-rust/Cargo.lock | 170 +++++++++++------------------- extmod/foundation-rust/Cargo.toml | 9 +- 2 files changed, 67 insertions(+), 112 deletions(-) diff --git a/extmod/foundation-rust/Cargo.lock b/extmod/foundation-rust/Cargo.lock index 0a0421699..87b04a019 100644 --- a/extmod/foundation-rust/Cargo.lock +++ b/extmod/foundation-rust/Cargo.lock @@ -2,43 +2,29 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "atomic-polyfill" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" -dependencies = [ - "critical-section", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - [[package]] name = "bare-metal" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5deb64efa5bd81e31fcd1938615a6d98c82eafcbcd787162b6f63b91d6bac5b3" dependencies = [ - "rustc_version 0.2.3", + "rustc_version", ] [[package]] -name = "bitcoin-private" -version = "0.1.0" +name = "bitcoin-internals" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57" +checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb" [[package]] name = "bitcoin_hashes" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501" +checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" dependencies = [ - "bitcoin-private", + "bitcoin-internals", + "hex-conservative", ] [[package]] @@ -49,15 +35,15 @@ checksum = "46afbd2983a5d5a7bd740ccb198caf5b82f45c40c09c0eed36052d91cb92e719" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc" [[package]] name = "cfg-if" @@ -89,21 +75,21 @@ dependencies = [ [[package]] name = "crc-catalog" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "critical-section" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" +checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" [[package]] name = "either" -version = "1.8.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "embedded-hal" @@ -135,17 +121,18 @@ dependencies = [ [[package]] name = "foundation-arena" version = "0.1.0" -source = "git+https://github.com/Foundation-Devices/foundation-rs?branch=main#7fb778d9d3ff9b3925aba3abff16cdb3d387e2e3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e6bdea1eeaa5edb5355234d02f81c6dbdd4bc5146887990dd29a213029bbeae" [[package]] name = "foundation-ur" version = "0.1.0" -source = "git+https://github.com/Foundation-Devices/foundation-rs?branch=main#7fb778d9d3ff9b3925aba3abff16cdb3d387e2e3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17beecc12e50f5a410dfa764b937bc043b4b3f4ec6fe861746a4f8db56638b5" dependencies = [ "bitcoin_hashes", "crc", "heapless", - "hex", "itertools", "minicbor", "phf", @@ -154,8 +141,9 @@ dependencies = [ [[package]] name = "foundation-urtypes" -version = "0.1.0" -source = "git+https://github.com/Foundation-Devices/foundation-rs?branch=main#7fb778d9d3ff9b3925aba3abff16cdb3d387e2e3" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f381636222dfe7a832f140a4ca1945edac51754b65896e172dc6fe2e3bd9732" dependencies = [ "foundation-arena", "heapless", @@ -166,9 +154,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", @@ -187,12 +175,10 @@ dependencies = [ [[package]] name = "heapless" version = "0.8.0" -source = "git+https://github.com/japaric/heapless#644653bf3b831c6bb4963be2de24804acf5e5001" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" dependencies = [ - "atomic-polyfill", "hash32", - "rustc_version 0.4.0", - "spin", "stable_deref_trait", ] @@ -202,6 +188,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hex-conservative" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ed443af458ccb6d81c1e7e661545f94d3176752fb1df2f543b902a1e0f51e2" + [[package]] name = "itertools" version = "0.10.5" @@ -213,25 +205,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.147" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" - -[[package]] -name = "lock_api" -version = "0.4.10" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" -dependencies = [ - "autocfg", - "scopeguard", -] +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "minicbor" -version = "0.19.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7005aaf257a59ff4de471a9d5538ec868a21586534fff7f85dd97d4043a6139" +checksum = "9d15f4203d71fdf90903c2696e55426ac97a363c67b218488a73b534ce7aca10" dependencies = [ "minicbor-derive", ] @@ -264,12 +246,12 @@ checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d" [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" dependencies = [ - "atomic-polyfill", "critical-section", + "portable-atomic", ] [[package]] @@ -302,7 +284,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.51", ] [[package]] @@ -314,6 +296,12 @@ dependencies = [ "siphasher", ] +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -322,18 +310,18 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.64" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.29" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -383,24 +371,9 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" dependencies = [ - "semver 0.9.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.17", + "semver", ] -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - [[package]] name = "secp256k1" version = "0.27.0" @@ -429,12 +402,6 @@ dependencies = [ "semver-parser", ] -[[package]] -name = "semver" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" - [[package]] name = "semver-parser" version = "0.7.0" @@ -443,18 +410,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "siphasher" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" - -[[package]] -name = "spin" -version = "0.9.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "stable_deref_trait" @@ -475,9 +433,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.25" +version = "2.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" +checksum = "6ab617d94515e94ae53b8406c628598680aa0c9587474ecbe58188f7b345d66c" dependencies = [ "proc-macro2", "quote", @@ -486,15 +444,15 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "uuid" -version = "1.4.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" [[package]] name = "vcell" @@ -510,9 +468,9 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "volatile-register" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee8f19f9d74293faf70901bc20ad067dc1ad390d2cbf1e3f75f721ffee908b6" +checksum = "de437e2a6208b014ab52972a27e59b33fa2920d3e00fe05026167a1c509d19cc" dependencies = [ "vcell", ] diff --git a/extmod/foundation-rust/Cargo.toml b/extmod/foundation-rust/Cargo.toml index 2c4ef5686..0993081d8 100644 --- a/extmod/foundation-rust/Cargo.toml +++ b/extmod/foundation-rust/Cargo.toml @@ -12,12 +12,11 @@ name = "sizes" required-features = ["std"] [dependencies.minicbor] -version = "0.19" +version = "0.20" default-features = false [dependencies.heapless] version = "0.8" -git = "https://github.com/japaric/heapless" default-features = false [dependencies.uuid] @@ -25,13 +24,11 @@ version = "1" default-features = false [dependencies.foundation-ur] -git = "https://github.com/Foundation-Devices/foundation-rs" -branch = "main" +version = "0.1" default-features = false [dependencies.foundation-urtypes] -git = "https://github.com/Foundation-Devices/foundation-rs" -branch = "main" +version = "0.2" default-features = false [target.'cfg(target_arch = "arm")'.dependencies.cortex-m] From a5de79fa4644b774918efd4afca32718cd28fd4e Mon Sep 17 00:00:00 2001 From: Jean-Pierre De Jesus DIAZ Date: Mon, 26 Feb 2024 16:10:48 +0100 Subject: [PATCH 3/3] SFT-3189: Do not build to generate header. * Justfile (generate): Do not depend on build target. Signed-off-by: Jean-Pierre De Jesus DIAZ --- extmod/foundation-rust/Justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extmod/foundation-rust/Justfile b/extmod/foundation-rust/Justfile index c5d7bbe2e..3a9b5e16f 100644 --- a/extmod/foundation-rust/Justfile +++ b/extmod/foundation-rust/Justfile @@ -6,7 +6,7 @@ alias b := build alias l := lint # Generate C bindings header. -generate: build +generate: cbindgen --config cbindgen.toml \ --crate foundation \ --output include/foundation.h