From c3c5b789ef9fb8586d586ab19d21922411fe4ca2 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sat, 10 Aug 2024 15:28:49 +0200 Subject: [PATCH 1/6] chore: update dependencies --- Cargo.lock | 324 ++++++++++++++++++++++++++++------------- Cargo.toml | 5 +- rust/Cargo.toml | 2 +- rust/derive/Cargo.toml | 6 +- 4 files changed, 226 insertions(+), 111 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index acf8fef..0fbf96a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "amplify" -version = "4.6.0" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e711289a6cb28171b4f0e6c8019c69ff9476050508dc082167575d458ff74d0" +checksum = "7147b742325842988dd6c793d55f58df3ae36bccf7d9b6e07db10ab035be343d" dependencies = [ "amplify_apfloat", "amplify_derive", @@ -29,20 +29,20 @@ dependencies = [ [[package]] name = "amplify_apfloat" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e23f5ede99065fa6957a633498d2728d51016d61dae23b69c866112b7c61ee" +checksum = "695e433882668b55b3d7fb0ba22bf9be66a91abe30d7ca1f1a774f8b90b4db4c" dependencies = [ "amplify_num", - "bitflags 2.5.0", + "bitflags", "wasm-bindgen", ] [[package]] name = "amplify_derive" -version = "4.0.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759dcbfaf94d838367a86d493ec34ccc8aa6fe365cb7880d6bf89006de24d9c1" +checksum = "2a6309e6b8d89b36b9f959b7a8fa093583b94922a0f6438a24fb08936de4d428" dependencies = [ "amplify_syn", "proc-macro2", @@ -52,9 +52,9 @@ dependencies = [ [[package]] name = "amplify_num" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c009c5c4de814911b177e2ea59e4930bb918978ed3cce4900d846a6ceb0838" +checksum = "99bcb75a2982047f733547042fc3968c0f460dfcf7d90b90dea3b2744580e9ad" dependencies = [ "serde", "wasm-bindgen", @@ -71,12 +71,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "anyhow" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" - [[package]] name = "ascii" version = "1.1.0" @@ -88,15 +82,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bumpalo" @@ -104,6 +92,12 @@ version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "cfg-if" version = "1.0.0" @@ -112,9 +106,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "compiletest_rs" -version = "0.10.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7225fee1bcf9247bb3a1b1a2d7ecfe2f7a990e549a09d766a257a4ae30dac0d6" +checksum = "2b0f4b0a27f9efcea6a012305682f0f7c5691df7097b9eaf6abb50b75c89a8af" dependencies = [ "diff", "filetime", @@ -167,14 +161,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys", + "libredox", + "windows-sys 0.59.0", ] [[package]] @@ -209,9 +203,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -227,9 +221,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" @@ -243,29 +237,30 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags", "libc", + "redox_syscall", ] [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "miow" -version = "0.3.7" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" +checksum = "52ffbca2f655e33c08be35d87278e5b18b89550a37dbd598c20db92f6a471123" dependencies = [ - "winapi", + "windows-sys 0.42.0", ] [[package]] @@ -290,17 +285,26 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "proc-macro2" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -346,11 +350,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] @@ -366,9 +370,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -378,9 +382,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -389,20 +393,20 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "rustfix" -version = "0.6.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd2853d9e26988467753bd9912c3a126f642d05d229a4b53f5752ee36c56481" +checksum = "4cef0c817217c330b3ef879e06455d726c1cffc800eaf7734d3b4ac63213636b" dependencies = [ - "anyhow", - "log", "serde", "serde_json", + "thiserror", + "tracing", ] [[package]] @@ -419,31 +423,32 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "serde" -version = "1.0.202" +version = "1.0.205" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.202" +version = "1.0.205" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.72", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -460,7 +465,7 @@ dependencies = [ [[package]] name = "strict_encoding" -version = "2.7.0-beta.4" +version = "2.7.0-rc.1" dependencies = [ "amplify", "half", @@ -472,7 +477,7 @@ dependencies = [ [[package]] name = "strict_encoding_derive" -version = "2.7.0-beta.3" +version = "2.7.0-rc.1" dependencies = [ "amplify", "amplify_syn", @@ -516,9 +521,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -551,22 +556,53 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.72", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", ] [[package]] @@ -577,9 +613,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "wasi" @@ -608,7 +644,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.72", "wasm-bindgen-shared", ] @@ -630,7 +666,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.72", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -665,73 +701,151 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.52.0" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "zerocopy" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", +] diff --git a/Cargo.toml b/Cargo.toml index c9ff2df..ed44caa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,13 +4,14 @@ default-members = ["rust", "rust/derive", "rust/test_helpers"] resolver = "2" [workspace.package] +version = "2.7.0-rc.1" authors = ["Dr Maxim Orlovsky "] homepage = "https://strict-types.org" repository = "https://github.com/strict-types/strict-encoding" -rust-version = "1.70.0" # Due to amplify crate +rust-version = "1.75.0" # Due to amplify crate edition = "2021" license = "Apache-2.0" [workspace.dependencies] -amplify = { version = "4.6.0" } +amplify = { version = "4.7.0" } serde_crate = { package = "serde", version = "1", features = ["derive"] } diff --git a/rust/Cargo.toml b/rust/Cargo.toml index bf9f380..822031d 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "strict_encoding" -version = "2.7.0-beta.4" +version = { workspace = true } description = "Strict encoding: deterministic & confined binary serialization for strict types" keywords = ["strict-types", "gadt", "serialization", "serde", "protobuf"] categories = ["encoding", "parsing"] diff --git a/rust/derive/Cargo.toml b/rust/derive/Cargo.toml index dfc7f77..3ed90c2 100644 --- a/rust/derive/Cargo.toml +++ b/rust/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "strict_encoding_derive" -version = "2.7.0-beta.3" +version = { workspace = true } description = "Strict encoding derivation macros" keywords = ["strict-encoding", "proc-macro"] categories = ["development-tools", "encoding"] @@ -20,10 +20,10 @@ quote = "1" syn = { version = "1", features = ["full"] } proc-macro2 = "1" amplify_syn = "2.0.1" -heck = "0.4.1" +heck = "0.5.0" [dev-dependencies] strict_encoding = { path = ".." } strict_encoding_test = { path = "../test_helpers" } amplify = { workspace = true } -compiletest_rs = "0.10.2" +compiletest_rs = "0.11.0" From 68e2f01ef54cd3b4143d1fad9959dd23c2387592 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sat, 10 Aug 2024 15:31:45 +0200 Subject: [PATCH 2/6] chore: remove use of deprecated methods from amplify --- rust/derive/tests/dumb.rs | 2 +- rust/src/stl.rs | 6 +++--- rust/src/test.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rust/derive/tests/dumb.rs b/rust/derive/tests/dumb.rs index 135bc8a..bae2d9d 100644 --- a/rust/derive/tests/dumb.rs +++ b/rust/derive/tests/dumb.rs @@ -167,7 +167,7 @@ fn dumb_enum_associated() -> common::Result { fn dumb_ultra_complex() -> common::Result { #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, From)] #[derive(StrictDumb, StrictType, StrictEncode, StrictDecode)] - #[strict_type(lib = TEST_LIB, dumb = NamedFields(confined_vec!(T::strict_dumb())))] + #[strict_type(lib = TEST_LIB, dumb = NamedFields(Confined::with(T::strict_dumb())))] pub struct NamedFields( Confined, 1, { u8::MAX as usize }>, ); diff --git a/rust/src/stl.rs b/rust/src/stl.rs index 14cb6ba..4b7d82c 100644 --- a/rust/src/stl.rs +++ b/rust/src/stl.rs @@ -87,7 +87,7 @@ impl { type Target = AsciiString; - fn deref(&self) -> &Self::Target { self.s.as_inner() } + fn deref(&self) -> &Self::Target { self.s.as_unconfined() } } impl AsRef<[u8]> @@ -161,7 +161,7 @@ impl Result { if bytes.is_empty() && MIN == 0 { return Ok(Self { - s: Confined::from_collection_unsafe(AsciiString::new()), + s: Confined::from_checked(AsciiString::new()), first: PhantomData, rest: PhantomData, }); @@ -198,7 +198,7 @@ impl From> for String { - fn from(s: RString) -> Self { s.s.into_inner().into() } + fn from(s: RString) -> Self { s.s.release().into() } } impl Debug diff --git a/rust/src/test.rs b/rust/src/test.rs index 4b0b0cd..fb49219 100644 --- a/rust/src/test.rs +++ b/rust/src/test.rs @@ -33,7 +33,7 @@ pub fn encode(val: &T) -> Vec { let data = val.strict_encode(ast_data).unwrap().unbox().unconfine(); Confined::, 0, MAX>::try_from(data) .unwrap() - .into_inner() + .release() } pub fn decode(data: impl AsRef<[u8]>) -> T { From 8d87ca36cdd6ded7c61e572e5d8b20e137c3a878 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sat, 10 Aug 2024 15:45:10 +0200 Subject: [PATCH 3/6] chore: repo maintainence work --- .github/workflows/build.yml | 76 +++++++++++------------------- .github/workflows/codecov.yml | 47 ++++++------------- .github/workflows/lint.yml | 42 +++++------------ .github/workflows/test.yml | 29 +++++++----- Cargo.lock | 79 +++++++++++++++++++++++++++++++- LICENSE | 3 +- MAINTAINERS.md | 4 +- MANIFEST.yml | 7 ++- README.md | 9 ++-- codecov.yml | 2 +- rust/Cargo.toml | 9 +++- rust/README.md | 22 ++++----- rust/derive/README.md | 14 ++---- rust/derive/src/derive_decode.rs | 2 +- rust/derive/src/derive_dumb.rs | 2 +- rust/derive/src/derive_encode.rs | 2 +- rust/derive/src/derive_type.rs | 2 +- rust/derive/src/lib.rs | 2 +- rust/derive/src/params.rs | 2 +- rust/derive/tests/base.rs | 2 +- rust/derive/tests/common/mod.rs | 2 +- rust/derive/tests/dumb.rs | 2 +- rust/derive/tests/type.rs | 2 +- rust/src/embedded.rs | 2 +- rust/src/error.rs | 2 +- rust/src/ident.rs | 2 +- rust/src/lib.rs | 2 +- rust/src/macros.rs | 2 +- rust/src/primitives.rs | 2 +- rust/src/reader.rs | 2 +- rust/src/stl.rs | 2 +- rust/src/test.rs | 2 +- rust/src/traits.rs | 2 +- rust/src/types.rs | 2 +- rust/src/util.rs | 2 +- rust/src/writer.rs | 2 +- rust/test_helpers/Cargo.toml | 4 +- rust/test_helpers/src/lib.rs | 2 +- 38 files changed, 212 insertions(+), 183 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1c97ef..85788a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,17 +13,15 @@ jobs: default: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install rust stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Default build - uses: actions-rs/cargo@v1 - with: - command: check - args: --workspace + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo check + no-default: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo check --no-default-features features: runs-on: ubuntu-latest strategy: @@ -34,55 +32,33 @@ jobs: - derive - serde steps: - - uses: actions/checkout@v2 - - name: Install rust stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Feature ${{ matrix.feature }} - uses: actions-rs/cargo@v1 - with: - command: check - args: --no-default-features --features=${{ matrix.feature }} - - name: Defaults + ${{ matrix.feature }} - uses: actions-rs/cargo@v1 - with: - command: check - args: --features=${{ matrix.feature }} + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Feature ${{matrix.feature}} + run: cargo check --no-default-features --features=${{matrix.feature}} + - name: Feature ${{matrix.feature}} + run: cargo check --features=${{matrix.feature}} platforms: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ ubuntu-20.04, ubuntu-22.04, macos-12, macos-13, windows-2019, windows-2022 ] + os: [ ubuntu-22.04, ubuntu-latest, macos-13, macos-latest, windows-2019, windows-latest ] steps: - - uses: actions/checkout@v2 - - name: Install rust stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Build with all features - uses: actions-rs/cargo@v1 - with: - command: check - args: --workspace --all-targets --all-features + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Platform ${{matrix.os}} + run: cargo check --workspace --all-features # we skip test targets here to be sure that the main library can be built toolchains: runs-on: ubuntu-latest strategy: fail-fast: false matrix: - toolchain: [ nightly, beta, stable, 1.70.0 ] + toolchain: [ nightly, beta, stable, 1.75.0 ] steps: - - uses: actions/checkout@v2 - - name: Install rust ${{ matrix.toolchain }} - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.toolchain }} - override: true - - name: All features - uses: actions-rs/cargo@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: - command: check - args: --workspace --all-targets --all-features + toolchain: ${{matrix.toolchain}} + - name: Toolchain ${{matrix.toolchain}} + run: cargo +${{matrix.toolchain}} check --workspace --all-targets --all-features diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 2077319..544c313 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -13,39 +13,22 @@ jobs: codecov: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up toolchain - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly with: - profile: minimal - toolchain: stable - override: true - components: rustfmt, llvm-tools-preview - - name: Build - uses: actions-rs/cargo@v1 + components: llvm-tools-preview + - uses: taiki-e/install-action@cargo-llvm-cov + - uses: taiki-e/install-action@nextest + - name: Collect coverage data (including doctests) + run: | + cargo +nightly llvm-cov --no-report nextest --workspace --all-features + cargo +nightly llvm-cov --no-report --doc --workspace --all-features + cargo +nightly llvm-cov report --doctests --lcov --output-path lcov.info + - name: Upload coverage data to codecov + uses: codecov/codecov-action@v4 with: - command: build - args: --release - env: - CARGO_INCREMENTAL: "0" - RUSTFLAGS: "-Cinstrument-coverage" - RUSTDOCFLAGS: "-Cinstrument-coverage" - - name: Test - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features --no-fail-fast - env: - CARGO_INCREMENTAL: "0" - RUSTFLAGS: "-Cinstrument-coverage" - RUSTDOCFLAGS: "-Cinstrument-coverage" - - name: Install grcov - run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi - - name: Generate coverage - run: grcov . --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' -o coverage.lcov - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - files: ./coverage.lcov flags: rust + files: lcov.info fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3f51bde..80b09bc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,45 +13,27 @@ jobs: fmt: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install rustc nightly - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly - override: true components: rustfmt - - uses: actions-rs/cargo@v1 - name: Formatting - with: - command: fmt - args: --all -- --check + - name: Formatting + run: cargo +nightly fmt --all -- --check clippy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install rustc stable - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - override: true components: clippy - - uses: actions-rs/cargo@v1 - name: Clippy - with: - command: clippy - args: --workspace --all-features --all-targets -- -D warnings + - name: Formatting + run: cargo clippy --workspace --all-features --all-targets -- -D warnings doc: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install rustc nightly - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly - override: true components: rust-docs - - uses: actions-rs/cargo@v1 - name: Doc - with: - command: doc - args: --workspace --all-features + - name: Formatting + run: cargo +nightly doc --workspace --all-features diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3705ca1..f758f63 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,16 +11,23 @@ env: jobs: testing: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, macos-13, macos-latest, windows-latest ] + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Test ${{matrix.os}} + run: cargo test --workspace --all-features --no-fail-fast + wasm-testing: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install latest stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Build & test - uses: actions-rs/cargo@v1 - with: - command: test - args: --workspace --all-features --no-fail-fast + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - uses: jetli/wasm-pack-action@v0.4.0 + - name: Add wasm32 target + run: rustup target add wasm32-unknown-unknown + - name: Test in headless Chrome + run: wasm-pack test --headless --chrome diff --git a/Cargo.lock b/Cargo.lock index 0fbf96a..d2598c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -126,6 +126,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + [[package]] name = "crunchy" version = "0.2.2" @@ -187,8 +197,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -219,6 +231,15 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + [[package]] name = "lazy_static" version = "1.5.0" @@ -421,6 +442,12 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "serde" version = "1.0.205" @@ -468,11 +495,14 @@ name = "strict_encoding" version = "2.7.0-rc.1" dependencies = [ "amplify", + "getrandom", "half", "rand", "serde", "strict_encoding_derive", "strict_encoding_test", + "wasm-bindgen", + "wasm-bindgen-test", ] [[package]] @@ -492,7 +522,7 @@ dependencies = [ [[package]] name = "strict_encoding_test" -version = "2.7.0-beta.1" +version = "2.7.0-rc.1" dependencies = [ "amplify", "strict_encoding", @@ -648,6 +678,18 @@ dependencies = [ "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" version = "0.2.92" @@ -677,6 +719,41 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +[[package]] +name = "wasm-bindgen-test" +version = "0.3.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9bf62a58e0780af3e852044583deee40983e5886da43a271dd772379987667b" +dependencies = [ + "console_error_panic_hook", + "js-sys", + "scoped-tls", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-test-macro", +] + +[[package]] +name = "wasm-bindgen-test-macro" +version = "0.3.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", +] + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "winapi" version = "0.3.9" diff --git a/LICENSE b/LICENSE index f4a75e2..f3e21f9 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,8 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2022-2024 UBIDECO Institute, Switzerland + Copyright 2022-2024 UBIDECO Labs, + Institute for Distributed and Cognitive Systems, Switzerland Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/MAINTAINERS.md b/MAINTAINERS.md index a3af1e0..cf7a0d9 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -1,6 +1,6 @@ Maxim Orlovsky --------------- + - GitHub: [@dr-orlovsky](https://github.com/dr-orlovsky) - GPG: `EAE730CEC0C663763F028A5860094BAF18A26EC9` -- SSH: `BoSGFzbyOKC7Jm28MJElFboGepihCpHop60nS8OoG/A` -- EMail: [dr@orlovsky.ch](mailto:dr@orlovsky.ch) +- EMail: [orlovsky@ubideco.org](mailto:orlovsky@ubideco.org) diff --git a/MANIFEST.yml b/MANIFEST.yml index 1303676..7fec554 100644 --- a/MANIFEST.yml +++ b/MANIFEST.yml @@ -3,12 +3,11 @@ Type: Library Kind: Free software License: Apache-2.0 Language: Rust -Compiler: 1.70 +Compiler: 1.75 Author: Maxim Orlovsky -Maintained: UBIDECO Institute, Switzerland +Maintained: UBIDECO Labs, Institute for Distributed and Cognitive Computing, Switzerland Maintainers: Maxim Orlovsky: GitHub: @dr-orlovsky GPG: EAE730CEC0C663763F028A5860094BAF18A26EC9 - SSH: BoSGFzbyOKC7Jm28MJElFboGepihCpHop60nS8OoG/A - EMail: dr@orlovsky.ch + EMail: orlovsky@ubideco.org diff --git a/README.md b/README.md index 2d4a63f..cba4622 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ This is a set of libraries for deterministic binary serialization using [strict types] – type system made with category theory which ensures -provable properties and bounds for the in-memory and serialized type +provable properties and bounds for the in-memory and serialized type representation. -The development of the libraries is performed by -[UBIDECO Institute](https://ubideco.org). +The development of the libraries is performed by +[UBIDECO Labs](https://ubideco.org). ## Overview @@ -19,6 +19,7 @@ Strict types is a formal notation for defining and serializing and confined way. It is developed with [type theory] in mind. Strict Types are: + * __schema-based__ (with the schema being strict encoding notation), * __semantic__, i.e. defines types not just as they are layed out in memory, but also depending on their meaning, @@ -53,5 +54,7 @@ types in binary formats. The libraries are distributed on the terms of [Apache 2.0 license](LICENSE). [strict types]: https://strict-types.org + [gadt]: https://en.wikipedia.org/wiki/Algebraic_data_type + [type theory]: https://en.wikipedia.org/wiki/Type_theory diff --git a/codecov.yml b/codecov.yml index 240d731..be5b52d 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,5 +1,5 @@ codecov: - require_ci_to_pass: no + require_ci_to_pass: false coverage: precision: 1 diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 822031d..41719e9 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -20,10 +20,17 @@ half = { version = "2.4.1", optional = true } serde_crate = { workspace = true, optional = true } [dev-dependencies] -rand = "0.8.5" amplify = { workspace = true, features = ["proc_attr", "hex"] } strict_encoding_test = { version = "2.7.0-beta.1", path = "./test_helpers" } +[target.'cfg(target_arch = "wasm32")'.dependencies] +wasm-bindgen = "0.2" +rand = { version = "0.8.4", optional = true } +getrandom = { version = "0.2", features = ["js"], optional = true } + +[target.'cfg(target_arch = "wasm32")'.dev-dependencies] +wasm-bindgen-test = "0.3" + [features] default = [ "derive" diff --git a/rust/README.md b/rust/README.md index 457ad7d..bcfa744 100644 --- a/rust/README.md +++ b/rust/README.md @@ -7,7 +7,7 @@ [![crates.io](https://img.shields.io/crates/v/strict_encoding)](https://crates.io/crates/strict_encoding) [![Docs](https://docs.rs/strict_encoding/badge.svg)](https://docs.rs/strict_encoding) -[![Apache-2 licensed](https://img.shields.io/crates/l/strict_encoding)](./LICENSE) +[![Apache-2 licensed](https://img.shields.io/crates/l/strict_encoding)](../LICENSE) Deterministic binary serialization for client-side-validation. @@ -29,15 +29,14 @@ Client-side-validation is a paradigm for distributed computing, based on top of proof-of-publication/commitment medium layer, which may be a bitcoin blockchain or other type of distributed consensus system. -The development of the library is supported by +The development of the library is supported by [LNP/BP Standards Association](https://lnp-bp.org). -The library is designed after Peter Todd concepts of proofmarshall and -serialization principles for client-side-validated data and Dr Maxim Orlovsky -idea of universal network encodings. Both were shaped into the standards and +The library is designed after Peter Todd concepts of proofmarshall and +serialization principles for client-side-validated data and Dr Maxim Orlovsky +idea of universal network encodings. Both were shaped into the standards and implemented as a part of this library by Dr Maxim Orlovsky. - ## Documentation Detailed developer & API documentation for the library can be accessed @@ -47,7 +46,6 @@ To learn about the technologies enabled by the library please check [slides from our tech presentations](https://github.com/LNP-BP/FAQ/blob/master/Presentation%20slides/) and [LNP/BP tech talks videos](https://www.youtube.com/channel/UCK_Q3xcQ-H3ERwArGaMKsxg) - ## Usage To use the library, you just need to reference a latest version, in @@ -63,14 +61,15 @@ including the current one. Library defines two main traits, [`StrictEncode`] and [`StrictDecode`], which should be implemented on each type that requires to be represented -for client-side-validation. +for client-side-validation. -Library exports derivation macros `#[derive(StrictEncode, StrictDecode)]`, -which are a part of [`strict_encoding_derive`] sub-crate and controlled by a +Library exports derivation macros `#[derive(StrictEncode, StrictDecode)]`, +which are a part of [`strict_encoding_derive`] sub-crate and controlled by a default feature `derive`. Finally, it implements strict encoding traits for main data types defined by rust standard library and frequently used crates; the latter increases the number of dependencies and thus can be controlled with feature flags: + - `chrono` (used by default): date & time types from `chrono` crate - `miniscript`: types defined in bitcoin Miniscript - `crypto`: non-bitcoin cryptographic primitives, which include Ed25519 @@ -83,16 +82,15 @@ This crate requires `bitcoin` as an upstream dependency since many of strict-encoded formats are standardized as using *bitcoin consensus encoding*. - ## Contributing Contribution guidelines can be found in [CONTRIBUTING](../CONTRIBUTING.md) - ## Licensing The libraries are distributed on the terms of Apache 2.0 opensource license. See [LICENCE](LICENSE) file for the license details. [`client_side_validation`]: https://crates.io/crates/client_side_validation + [`strict_encoding_derive`]: https://crates.io/crates/strict_encoding_derive diff --git a/rust/derive/README.md b/rust/derive/README.md index dcea1d5..0a73845 100644 --- a/rust/derive/README.md +++ b/rust/derive/README.md @@ -14,35 +14,31 @@ Derivation macros for strict encoding. To learn more about the strict encoding please check [`strict_encoding`] crate. The development of the library is supported by -[UBIDECO Institute](https://ubideco.org). - +[UBIDECO Labs](https://ubideco.org). ## Documentation Detailed developer & API documentation for the library can be accessed at - ## Usage -To use the library, you need to reference the latest version of the -[`strict_encoding`] crate in`[dependencies]` section of your project -`Cargo.toml`. This crate includes derivation macros from the present library by +To use the library, you need to reference the latest version of the +[`strict_encoding`] crate in`[dependencies]` section of your project +`Cargo.toml`. This crate includes derivation macros from the present library by default. ```toml strict_encoding = "2.0" ``` -Library exports derivation macros `StrictType`, `StrictDumb`, `StrictEncode`, +Library exports derivation macros `StrictType`, `StrictDumb`, `StrictEncode`, `StrictDecode`. - ## Contributing Contribution guidelines can be found in [CONTRIBUTING](../../CONTRIBUTING.md) - ## Licensing The libraries are distributed on the terms of Apache 2.0 opensource license. diff --git a/rust/derive/src/derive_decode.rs b/rust/derive/src/derive_decode.rs index cb51045..4de9a51 100644 --- a/rust/derive/src/derive_decode.rs +++ b/rust/derive/src/derive_decode.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/derive/src/derive_dumb.rs b/rust/derive/src/derive_dumb.rs index a08d2e8..4d78b18 100644 --- a/rust/derive/src/derive_dumb.rs +++ b/rust/derive/src/derive_dumb.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/derive/src/derive_encode.rs b/rust/derive/src/derive_encode.rs index 0a64ca8..bb1e803 100644 --- a/rust/derive/src/derive_encode.rs +++ b/rust/derive/src/derive_encode.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/derive/src/derive_type.rs b/rust/derive/src/derive_type.rs index 2640fe3..8ddd98e 100644 --- a/rust/derive/src/derive_type.rs +++ b/rust/derive/src/derive_type.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/derive/src/lib.rs b/rust/derive/src/lib.rs index 7ddc621..1a83fc4 100644 --- a/rust/derive/src/lib.rs +++ b/rust/derive/src/lib.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/derive/src/params.rs b/rust/derive/src/params.rs index f6845e2..08f685a 100644 --- a/rust/derive/src/params.rs +++ b/rust/derive/src/params.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/derive/tests/base.rs b/rust/derive/tests/base.rs index 6417ddf..1d1db83 100644 --- a/rust/derive/tests/base.rs +++ b/rust/derive/tests/base.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/derive/tests/common/mod.rs b/rust/derive/tests/common/mod.rs index 3eaf392..f822ab5 100644 --- a/rust/derive/tests/common/mod.rs +++ b/rust/derive/tests/common/mod.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/derive/tests/dumb.rs b/rust/derive/tests/dumb.rs index bae2d9d..670571d 100644 --- a/rust/derive/tests/dumb.rs +++ b/rust/derive/tests/dumb.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/derive/tests/type.rs b/rust/derive/tests/type.rs index e37df12..ce13447 100644 --- a/rust/derive/tests/type.rs +++ b/rust/derive/tests/type.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/src/embedded.rs b/rust/src/embedded.rs index e350382..4a8f509 100644 --- a/rust/src/embedded.rs +++ b/rust/src/embedded.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/src/error.rs b/rust/src/error.rs index 4b20be3..e695e02 100644 --- a/rust/src/error.rs +++ b/rust/src/error.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/src/ident.rs b/rust/src/ident.rs index fbacf60..f974d81 100644 --- a/rust/src/ident.rs +++ b/rust/src/ident.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/src/lib.rs b/rust/src/lib.rs index a246981..40f9f65 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/src/macros.rs b/rust/src/macros.rs index 77ad71a..b9ade44 100644 --- a/rust/src/macros.rs +++ b/rust/src/macros.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/src/primitives.rs b/rust/src/primitives.rs index 4ae2c4f..fb7e323 100644 --- a/rust/src/primitives.rs +++ b/rust/src/primitives.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/src/reader.rs b/rust/src/reader.rs index cb13736..5f67c24 100644 --- a/rust/src/reader.rs +++ b/rust/src/reader.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/src/stl.rs b/rust/src/stl.rs index 4b7d82c..6edd335 100644 --- a/rust/src/stl.rs +++ b/rust/src/stl.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/src/test.rs b/rust/src/test.rs index fb49219..8e18df4 100644 --- a/rust/src/test.rs +++ b/rust/src/test.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/src/traits.rs b/rust/src/traits.rs index 7994aee..d53d8b2 100644 --- a/rust/src/traits.rs +++ b/rust/src/traits.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/src/types.rs b/rust/src/types.rs index 1bab123..da15d18 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/src/util.rs b/rust/src/util.rs index d1188ea..4daa095 100644 --- a/rust/src/util.rs +++ b/rust/src/util.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/src/writer.rs b/rust/src/writer.rs index 9c7f364..3e4b701 100644 --- a/rust/src/writer.rs +++ b/rust/src/writer.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rust/test_helpers/Cargo.toml b/rust/test_helpers/Cargo.toml index 7b83c29..7ea47e3 100644 --- a/rust/test_helpers/Cargo.toml +++ b/rust/test_helpers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "strict_encoding_test" -version = "2.7.0-beta.1" +version = { workspace = true } description = "Helper functions for testing strict encodings" keywords = ["strict-encoding", "test-helpers"] categories = ["encoding", "parsing", "development-tools"] @@ -16,4 +16,4 @@ readme = "../README.md" [dependencies] amplify = { workspace = true } -strict_encoding = { version = "2.7.0-beta.1", path = ".." } +strict_encoding = { version = "2.7.0-rc.1", path = ".." } diff --git a/rust/test_helpers/src/lib.rs b/rust/test_helpers/src/lib.rs index def308d..f4f033e 100644 --- a/rust/test_helpers/src/lib.rs +++ b/rust/test_helpers/src/lib.rs @@ -5,7 +5,7 @@ // Written in 2019-2024 by // Dr. Maxim Orlovsky // -// Copyright 2022-2024 UBIDECO Institute +// Copyright 2022-2024 UBIDECO Labs // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From cd9a05ea33154bb297bbac7209530b6a7a771ae4 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sat, 10 Aug 2024 15:52:18 +0200 Subject: [PATCH 4/6] ci: fix WASM tests --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f758f63..f1889a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,5 +29,7 @@ jobs: - uses: jetli/wasm-pack-action@v0.4.0 - name: Add wasm32 target run: rustup target add wasm32-unknown-unknown - - name: Test in headless Chrome - run: wasm-pack test --headless --chrome + - name: Test main lib in headless Chrome + run: wasm-pack test --headless --chrome rust + - name: Test derive lib in headless Chrome + run: wasm-pack test --headless --chrome rust/derive From 112a0fde283385abffcbf475b7094e708448a77a Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sat, 10 Aug 2024 16:19:31 +0200 Subject: [PATCH 5/6] ci: integrate nix --- .github/workflows/build.yml | 38 +++++++++------- .github/workflows/codecov.yml | 10 ++++- .github/workflows/lint.yml | 28 ++++++------ .github/workflows/test.yml | 20 +++++---- flake.lock | 85 +++++++++++++++++++++++++++++++++++ flake.nix | 71 +++++++++++++++++++++++++++++ 6 files changed, 212 insertions(+), 40 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 85788a6..9d70ac0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,15 @@ name: Build on: push: - branches: [ master ] + branches: + - master + - develop + - 'v[0-9]+.[0-9]+' pull_request: - branches: [ master ] + branches: + - master + - develop + - 'v[0-9]+.[0-9]+' env: CARGO_TERM_COLOR: always @@ -14,14 +20,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - run: cargo check + - uses: cachix/install-nix-action@v26 + - run: nix develop ".#stable" -c cargo check --workspace no-default: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - run: cargo check --no-default-features + - uses: cachix/install-nix-action@v26 + - run: nix develop ".#stable" -c cargo check --workspace --no-default-features features: runs-on: ubuntu-latest strategy: @@ -33,12 +39,14 @@ jobs: - serde steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - name: Install Nix + uses: cachix/install-nix-action@v26 - name: Feature ${{matrix.feature}} - run: cargo check --no-default-features --features=${{matrix.feature}} + run: nix develop ".#stable" -c cargo check --no-default-features --features=${{matrix.feature}} - name: Feature ${{matrix.feature}} - run: cargo check --features=${{matrix.feature}} + run: nix develop ".#stable" -c cargo check --features=${{matrix.feature}} platforms: + # NOTE: Don't use nix in platform checks everything should be based on the host system runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -47,18 +55,16 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - - name: Platform ${{matrix.os}} + - name: Check ${{matrix.os}} run: cargo check --workspace --all-features # we skip test targets here to be sure that the main library can be built toolchains: runs-on: ubuntu-latest strategy: fail-fast: false matrix: - toolchain: [ nightly, beta, stable, 1.75.0 ] + toolchain: [ nightly, beta, stable, msrv ] steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{matrix.toolchain}} - - name: Toolchain ${{matrix.toolchain}} - run: cargo +${{matrix.toolchain}} check --workspace --all-targets --all-features + - uses: cachix/install-nix-action@v26 + - name: Check ${{matrix.toolchain}} + run: nix develop ".#${{ matrix.toolchain }}" -c cargo check --workspace --all-targets --all-features diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 544c313..f701b9e 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -2,9 +2,15 @@ name: Codecov on: push: - branches: [ master ] + branches: + - master + - develop + - 'v[0-9]+.[0-9]+' pull_request: - branches: [ master ] + branches: + - master + - develop + - 'v[0-9]+.[0-9]+' env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 80b09bc..78583c8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,9 +2,15 @@ name: Lints on: push: - branches: [ master ] + branches: + - master + - develop + - 'v[0-9]+.[0-9]+' pull_request: - branches: [ master ] + branches: + - master + - develop + - 'v[0-9]+.[0-9]+' env: CARGO_TERM_COLOR: always @@ -14,26 +20,20 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@nightly - with: - components: rustfmt + - uses: cachix/install-nix-action@v26 - name: Formatting - run: cargo +nightly fmt --all -- --check + run: nix develop ".#nightly" -c cargo fmt --all -- --check clippy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - components: clippy + - uses: cachix/install-nix-action@v26 - name: Formatting - run: cargo clippy --workspace --all-features --all-targets -- -D warnings + run: nix develop ".#stable" -c cargo clippy --workspace --all-features --all-targets -- -D warnings doc: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@nightly - with: - components: rust-docs + - uses: cachix/install-nix-action@v26 - name: Formatting - run: cargo +nightly doc --workspace --all-features + run: nix develop ".#nightly" -c cargo doc --workspace --all-features diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f1889a2..4d62245 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,15 +2,22 @@ name: Tests on: push: - branches: [ master ] + branches: + - master + - develop + - 'v[0-9]+.[0-9]+' pull_request: - branches: [ master ] + branches: + - master + - develop + - 'v[0-9]+.[0-9]+' env: CARGO_TERM_COLOR: always jobs: testing: + # NOTE: Don't use nix in platform checks everything should be based on the host system runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -25,11 +32,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@nightly - - uses: jetli/wasm-pack-action@v0.4.0 - - name: Add wasm32 target - run: rustup target add wasm32-unknown-unknown + - uses: cachix/install-nix-action@v26 - name: Test main lib in headless Chrome - run: wasm-pack test --headless --chrome rust + run: nix develop .#wasm -c wasm-pack test --headless --chrome rust - name: Test derive lib in headless Chrome - run: wasm-pack test --headless --chrome rust/derive + run: nix develop .#wasm -c wasm-pack test --headless --chrome rust/derive diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..6894ac0 --- /dev/null +++ b/flake.lock @@ -0,0 +1,85 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1712439257, + "narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712542394, + "narHash": "sha256-UZebDBECRSrJqw4K+LxZ6qFdYnScu6q1XCwqtsu1cas=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "ece8bdb3c3b58def25f204b9a1261dee55d7c9c0", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..571cd9d --- /dev/null +++ b/flake.nix @@ -0,0 +1,71 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + rust-overlay = { + url = "github:oxalica/rust-overlay"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "flake-utils"; + }; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, rust-overlay, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + overlays = [ (import rust-overlay) ]; + pkgs = import nixpkgs { + inherit system overlays; + }; + + cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml); + + nightlyWithWasm = pkgs.rust-bin.nightly.latest.default.override { + extensions = [ ]; + targets = [ "wasm32-unknown-unknown" ]; + }; + + stableWithLlvm = pkgs.rust-bin.nightly.latest.default.override { + extensions = [ "rustfmt" "llvm-tools-preview" ]; + targets = [ ]; + }; + in + with pkgs; + { + devShells = rec { + default = msrv; + + msrv = mkShell { + buildInputs = [ + rust-bin.stable."${cargoToml.workspace.package."rust-version"}".default + ]; + }; + + stable = mkShell { + buildInputs = [ + rust-bin.stable.latest.default + ]; + }; + + beta = mkShell { + buildInputs = [ + rust-bin.beta.latest.default + ]; + }; + + nightly = mkShell { + buildInputs = [ + rust-bin.nightly.latest.default + ]; + }; + + wasm = mkShell { + buildInputs = [ + nightlyWithWasm + chromedriver + wasm-pack + ]; + }; + }; + } + ); +} From 30379b5877a06d0e8dd3b5bf7e20a7b45e014d3f Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sat, 10 Aug 2024 16:40:22 +0200 Subject: [PATCH 6/6] release v2.7.0-rc.1 --- rust/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 41719e9..c1599b0 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -15,13 +15,13 @@ exclude = ["derive", "test_helpers"] [dependencies] amplify = { workspace = true, features = ["proc_attr"] } -strict_encoding_derive = { version = "2.7.0-beta.3", path = "derive" } +strict_encoding_derive = { version = "2.7.0-rc.1", path = "derive" } half = { version = "2.4.1", optional = true } serde_crate = { workspace = true, optional = true } [dev-dependencies] amplify = { workspace = true, features = ["proc_attr", "hex"] } -strict_encoding_test = { version = "2.7.0-beta.1", path = "./test_helpers" } +strict_encoding_test = { path = "./test_helpers" } [target.'cfg(target_arch = "wasm32")'.dependencies] wasm-bindgen = "0.2"