mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Compile Platform impl
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Generated
+1
-378
@@ -212,17 +212,6 @@ version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9"
|
||||
|
||||
[[package]]
|
||||
name = "async-channel"
|
||||
version = "1.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833"
|
||||
dependencies = [
|
||||
"concurrent-queue",
|
||||
"event-listener",
|
||||
"futures-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-executor"
|
||||
version = "1.5.1"
|
||||
@@ -237,41 +226,6 @@ dependencies = [
|
||||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-global-executor"
|
||||
version = "2.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"async-executor",
|
||||
"async-io",
|
||||
"async-lock",
|
||||
"blocking",
|
||||
"futures-lite",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-io"
|
||||
version = "1.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af"
|
||||
dependencies = [
|
||||
"async-lock",
|
||||
"autocfg",
|
||||
"cfg-if",
|
||||
"concurrent-queue",
|
||||
"futures-lite",
|
||||
"log",
|
||||
"parking",
|
||||
"polling",
|
||||
"rustix 0.37.19",
|
||||
"slab",
|
||||
"socket2",
|
||||
"waker-fn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-lock"
|
||||
version = "2.7.0"
|
||||
@@ -281,32 +235,6 @@ dependencies = [
|
||||
"event-listener",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-std"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"async-global-executor",
|
||||
"async-io",
|
||||
"async-lock",
|
||||
"crossbeam-utils",
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
"futures-lite",
|
||||
"gloo-timers",
|
||||
"kv-log-macro",
|
||||
"log",
|
||||
"memchr",
|
||||
"once_cell",
|
||||
"pin-project-lite",
|
||||
"pin-utils",
|
||||
"slab",
|
||||
"wasm-bindgen-futures",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-task"
|
||||
version = "4.4.0"
|
||||
@@ -330,12 +258,6 @@ version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba"
|
||||
|
||||
[[package]]
|
||||
name = "atomic-waker"
|
||||
version = "1.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3"
|
||||
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.14"
|
||||
@@ -515,21 +437,6 @@ dependencies = [
|
||||
"byte-tools",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "blocking"
|
||||
version = "1.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"async-lock",
|
||||
"async-task",
|
||||
"atomic-waker",
|
||||
"fastrand",
|
||||
"futures-lite",
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bounded-collections"
|
||||
version = "0.1.7"
|
||||
@@ -836,50 +743,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-bforest"
|
||||
version = "0.95.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70"
|
||||
dependencies = [
|
||||
"cranelift-entity",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-codegen"
|
||||
version = "0.95.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"cranelift-bforest",
|
||||
"cranelift-codegen-meta",
|
||||
"cranelift-codegen-shared",
|
||||
"cranelift-entity",
|
||||
"cranelift-isle",
|
||||
"gimli",
|
||||
"hashbrown 0.13.2",
|
||||
"log",
|
||||
"regalloc2",
|
||||
"smallvec",
|
||||
"target-lexicon",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-codegen-meta"
|
||||
version = "0.95.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da"
|
||||
dependencies = [
|
||||
"cranelift-codegen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-codegen-shared"
|
||||
version = "0.95.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8"
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-entity"
|
||||
version = "0.95.1"
|
||||
@@ -889,51 +752,6 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-frontend"
|
||||
version = "0.95.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d"
|
||||
dependencies = [
|
||||
"cranelift-codegen",
|
||||
"log",
|
||||
"smallvec",
|
||||
"target-lexicon",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-isle"
|
||||
version = "0.95.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba"
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-native"
|
||||
version = "0.95.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00"
|
||||
dependencies = [
|
||||
"cranelift-codegen",
|
||||
"libc",
|
||||
"target-lexicon",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-wasm"
|
||||
version = "0.95.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac"
|
||||
dependencies = [
|
||||
"cranelift-codegen",
|
||||
"cranelift-entity",
|
||||
"cranelift-frontend",
|
||||
"itertools",
|
||||
"log",
|
||||
"smallvec",
|
||||
"wasmparser",
|
||||
"wasmtime-types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crc32fast"
|
||||
version = "1.3.2"
|
||||
@@ -1573,15 +1391,6 @@ dependencies = [
|
||||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fxhash"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "generic-array"
|
||||
version = "0.12.4"
|
||||
@@ -1935,12 +1744,6 @@ dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "id-arena"
|
||||
version = "2.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005"
|
||||
|
||||
[[package]]
|
||||
name = "ident_case"
|
||||
version = "1.0.1"
|
||||
@@ -2204,15 +2007,6 @@ dependencies = [
|
||||
"cpufeatures",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kv-log-macro"
|
||||
version = "1.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f"
|
||||
dependencies = [
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
@@ -2312,9 +2106,6 @@ name = "log"
|
||||
version = "0.4.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de"
|
||||
dependencies = [
|
||||
"value-bag",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lru"
|
||||
@@ -2770,22 +2561,6 @@ dependencies = [
|
||||
"plotters-backend",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "polling"
|
||||
version = "2.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"bitflags",
|
||||
"cfg-if",
|
||||
"concurrent-queue",
|
||||
"libc",
|
||||
"log",
|
||||
"pin-project-lite",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "poly1305"
|
||||
version = "0.7.2"
|
||||
@@ -2892,17 +2667,6 @@ dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pulldown-cmark"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ffade02495f22453cd593159ea2f59827aae7f53fa8323f756799b670881dcf8"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"memchr",
|
||||
"unicase",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.28"
|
||||
@@ -3040,18 +2804,6 @@ dependencies = [
|
||||
"syn 2.0.16",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regalloc2"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621"
|
||||
dependencies = [
|
||||
"fxhash",
|
||||
"log",
|
||||
"slice-group-by",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.8.3"
|
||||
@@ -3580,12 +3332,6 @@ dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "slice-group-by"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7"
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.10.0"
|
||||
@@ -3598,7 +3344,6 @@ version = "0.6.0"
|
||||
dependencies = [
|
||||
"arrayvec 0.7.2",
|
||||
"async-lock",
|
||||
"async-std",
|
||||
"atomic",
|
||||
"base64 0.21.2",
|
||||
"bip39",
|
||||
@@ -3625,7 +3370,6 @@ dependencies = [
|
||||
"num-traits",
|
||||
"parity-scale-codec",
|
||||
"pbkdf2 0.12.1",
|
||||
"pin-project",
|
||||
"rand 0.8.5",
|
||||
"rand_chacha 0.3.1",
|
||||
"ruzstd",
|
||||
@@ -3637,11 +3381,9 @@ dependencies = [
|
||||
"slab",
|
||||
"smallvec",
|
||||
"snow",
|
||||
"soketto",
|
||||
"tiny-keccak",
|
||||
"twox-hash",
|
||||
"wasmi",
|
||||
"wasmtime",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3649,7 +3391,6 @@ name = "smoldot-light"
|
||||
version = "0.4.0"
|
||||
dependencies = [
|
||||
"async-lock",
|
||||
"async-std",
|
||||
"blake2-rfc",
|
||||
"derive_more",
|
||||
"either",
|
||||
@@ -3662,7 +3403,6 @@ dependencies = [
|
||||
"itertools",
|
||||
"log",
|
||||
"lru",
|
||||
"parking_lot",
|
||||
"rand 0.8.5",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -4220,6 +3960,7 @@ dependencies = [
|
||||
"either",
|
||||
"frame-metadata",
|
||||
"futures",
|
||||
"futures-executor",
|
||||
"futures-timer",
|
||||
"futures-util",
|
||||
"getrandom 0.2.9",
|
||||
@@ -4487,7 +4228,6 @@ dependencies = [
|
||||
"bytes",
|
||||
"libc",
|
||||
"mio",
|
||||
"num_cpus",
|
||||
"pin-project-lite",
|
||||
"socket2",
|
||||
"tokio-macros",
|
||||
@@ -4750,15 +4490,6 @@ dependencies = [
|
||||
"static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicase"
|
||||
version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
|
||||
dependencies = [
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-bidi"
|
||||
version = "0.3.13"
|
||||
@@ -4825,12 +4556,6 @@ version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
|
||||
|
||||
[[package]]
|
||||
name = "value-bag"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a4d330786735ea358f3bc09eea4caa098569c1c93f342d9aca0514915022fe7e"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.4"
|
||||
@@ -5021,7 +4746,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
"bincode",
|
||||
"cfg-if",
|
||||
"indexmap",
|
||||
@@ -5034,10 +4758,7 @@ dependencies = [
|
||||
"serde",
|
||||
"target-lexicon",
|
||||
"wasmparser",
|
||||
"wasmtime-component-macro",
|
||||
"wasmtime-cranelift",
|
||||
"wasmtime-environ",
|
||||
"wasmtime-fiber",
|
||||
"wasmtime-jit",
|
||||
"wasmtime-runtime",
|
||||
"windows-sys 0.45.0",
|
||||
@@ -5052,64 +4773,6 @@ dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-component-macro"
|
||||
version = "8.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "267096ed7cc93b4ab15d3daa4f195e04dbb7e71c7e5c6457ae7d52e9dd9c3607"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
"wasmtime-component-util",
|
||||
"wasmtime-wit-bindgen",
|
||||
"wit-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-component-util"
|
||||
version = "8.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "74e02ca7a4a3c69d72b88f26f0192e333958df6892415ac9ab84dcc42c9000c2"
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-cranelift"
|
||||
version = "8.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cranelift-codegen",
|
||||
"cranelift-entity",
|
||||
"cranelift-frontend",
|
||||
"cranelift-native",
|
||||
"cranelift-wasm",
|
||||
"gimli",
|
||||
"log",
|
||||
"object",
|
||||
"target-lexicon",
|
||||
"thiserror",
|
||||
"wasmparser",
|
||||
"wasmtime-cranelift-shared",
|
||||
"wasmtime-environ",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-cranelift-shared"
|
||||
version = "8.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd041e382ef5aea1b9fc78442394f1a4f6d676ce457e7076ca4cb3f397882f8b"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cranelift-codegen",
|
||||
"cranelift-native",
|
||||
"gimli",
|
||||
"object",
|
||||
"target-lexicon",
|
||||
"wasmtime-environ",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-environ"
|
||||
version = "8.0.1"
|
||||
@@ -5129,19 +4792,6 @@ dependencies = [
|
||||
"wasmtime-types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-fiber"
|
||||
version = "8.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ab182d5ab6273a133ab88db94d8ca86dc3e57e43d70baaa4d98f94ddbd7d10a"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"cfg-if",
|
||||
"rustix 0.36.14",
|
||||
"wasmtime-asm-macros",
|
||||
"windows-sys 0.45.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-jit"
|
||||
version = "8.0.1"
|
||||
@@ -5205,7 +4855,6 @@ dependencies = [
|
||||
"rustix 0.36.14",
|
||||
"wasmtime-asm-macros",
|
||||
"wasmtime-environ",
|
||||
"wasmtime-fiber",
|
||||
"wasmtime-jit-debug",
|
||||
"windows-sys 0.45.0",
|
||||
]
|
||||
@@ -5222,17 +4871,6 @@ dependencies = [
|
||||
"wasmparser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-wit-bindgen"
|
||||
version = "8.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "983db9cc294d1adaa892a53ff6a0dc6605fc0ab1a4da5d8a2d2d4bde871ff7dd"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"heck",
|
||||
"wit-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "web-sys"
|
||||
version = "0.3.63"
|
||||
@@ -5469,21 +5107,6 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wit-parser"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f887c3da527a51b321076ebe6a7513026a4757b6d4d144259946552d6fc728b3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"id-arena",
|
||||
"indexmap",
|
||||
"log",
|
||||
"pulldown-cmark",
|
||||
"unicode-xid",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wyz"
|
||||
version = "0.5.1"
|
||||
|
||||
+2
-2
@@ -63,7 +63,7 @@ serde = { version = "1.0.163" }
|
||||
serde_json = { version = "1.0.96" }
|
||||
syn = { version = "2.0.15", features = ["full", "extra-traits"] }
|
||||
thiserror = "1.0.40"
|
||||
tokio = { version = "1.28", features = ["macros", "time", "rt-multi-thread"] }
|
||||
tokio = { version = "1.28", default-features = false, features = ["macros", "time", "rt"] }
|
||||
tracing = "0.1.34"
|
||||
tracing-wasm = "0.2.1"
|
||||
tracing-subscriber = "0.3.17"
|
||||
@@ -79,7 +79,7 @@ smoldot-light-wasm = { path = "/home/lexnv/workspace/smoldot/wasm-node/rust", de
|
||||
wasm-bindgen-futures = { version = "0.4.19" }
|
||||
futures-timer = { version = "3" }
|
||||
gloo-net = { version = "0.2.6", default-features = false, features = ["json", "websocket"] }
|
||||
|
||||
futures-executor = { version = "0.3.28", default-features = false }
|
||||
|
||||
tokio-stream = "0.1.14"
|
||||
futures-util = "0.3.28"
|
||||
|
||||
@@ -62,7 +62,7 @@ pub fn fetch_metadata_hex_blocking(
|
||||
|
||||
// Block on some tokio runtime for sync contexts
|
||||
fn tokio_block_on<T, Fut: std::future::Future<Output = T>>(fut: Fut) -> T {
|
||||
tokio::runtime::Builder::new_multi_thread()
|
||||
tokio::runtime::Builder::new_current_thread()
|
||||
.enable_all()
|
||||
.build()
|
||||
.unwrap()
|
||||
|
||||
+9
-4
@@ -42,10 +42,14 @@ unstable-metadata = []
|
||||
|
||||
# Activate this to expose the Light Client functionality.
|
||||
# Note that this feature is experimental and things may break or not work as expected.
|
||||
|
||||
# TODO: WE NEED smoldot-light/std to build in non-wasm environments!!
|
||||
unstable-light-client = [
|
||||
"smoldot",
|
||||
"smoldot-light/std",
|
||||
"smoldot-light-wasm",
|
||||
# "smoldot-light/std",
|
||||
"smoldot-light",
|
||||
# "futures-executor",
|
||||
# "smoldot-light-wasm",
|
||||
"tokio-stream",
|
||||
"tokio/sync",
|
||||
"tokio/rt",
|
||||
@@ -62,7 +66,7 @@ scale-value = { workspace = true }
|
||||
scale-bits = { workspace = true }
|
||||
scale-decode = { workspace = true }
|
||||
scale-encode = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
futures = { workspace = true, features = ["executor"] }
|
||||
hex = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true, features = ["raw_value"] }
|
||||
@@ -99,6 +103,7 @@ smoldot-light-wasm = { workspace = true, optional = true }
|
||||
wasm-bindgen-futures = { workspace = true, optional = true }
|
||||
futures-timer = { workspace = true, optional = true }
|
||||
gloo-net = { workspace = true, optional = true }
|
||||
futures-executor = { workspace = true, optional = true }
|
||||
|
||||
|
||||
tokio = { workspace = true, optional = true }
|
||||
@@ -112,7 +117,7 @@ getrandom = { workspace = true, features = ["js"] }
|
||||
bitvec = { workspace = true }
|
||||
codec = { workspace = true, features = ["derive", "bit-vec"] }
|
||||
scale-info = { workspace = true, features = ["bit-vec"] }
|
||||
tokio = { workspace = true, features = ["macros", "time", "rt-multi-thread"] }
|
||||
tokio = { workspace = true, features = ["macros", "time", "rt"] }
|
||||
sp-core = { workspace = true }
|
||||
sp-runtime = { workspace = true }
|
||||
sp-keyring = { workspace = true }
|
||||
|
||||
@@ -11,6 +11,7 @@ use crate::{
|
||||
};
|
||||
use core::time::Duration;
|
||||
use futures::{lock::Mutex as AsyncMutex, stream::StreamExt, Stream};
|
||||
|
||||
#[cfg(feature = "jsonrpsee-ws")]
|
||||
use jsonrpsee::{
|
||||
async_client::ClientBuilder,
|
||||
@@ -19,7 +20,8 @@ use jsonrpsee::{
|
||||
rpc_params,
|
||||
};
|
||||
use serde_json::value::RawValue;
|
||||
use smoldot_light::{platform::async_std::AsyncStdTcpWebSocket, ChainId};
|
||||
// use smoldot_light::{platform::async_std::AsyncStdTcpWebSocket, ChainId};
|
||||
use smoldot_light::ChainId;
|
||||
use std::{
|
||||
iter,
|
||||
num::NonZeroU32,
|
||||
@@ -32,7 +34,9 @@ use std::{
|
||||
use tokio::sync::{mpsc, oneshot};
|
||||
use tokio_stream::wrappers::ReceiverStream;
|
||||
|
||||
use smoldot_light_wasm::platform::Platform as WasmPlatform;
|
||||
// use smoldot_light_wasm::platform::Platform as WasmPlatform;
|
||||
|
||||
use super::platform::Platform as MyPlatform;
|
||||
|
||||
const LOG_TARGET: &str = "light-client";
|
||||
|
||||
@@ -41,7 +45,7 @@ struct LightClientInner {
|
||||
/// Smoldot light client implementation that leverages the `AsyncStdTcpWebSocket`.
|
||||
///
|
||||
/// Note: `AsyncStdTcpWebSocket` is not wasm compatible.
|
||||
client: smoldot_light::Client<WasmPlatform>,
|
||||
client: smoldot_light::Client<MyPlatform>,
|
||||
/// The ID of the chain used to identify the chain protocol (ie. substrate).
|
||||
///
|
||||
/// Note: A single chain is supported for a client. This aligns with the subxt's
|
||||
@@ -443,7 +447,7 @@ impl LightClient {
|
||||
// env!("CARGO_PKG_VERSION").into(),
|
||||
// );
|
||||
|
||||
let platform = WasmPlatform::new();
|
||||
let platform = MyPlatform::new();
|
||||
|
||||
let mut client = smoldot_light::Client::new(platform);
|
||||
|
||||
@@ -496,7 +500,8 @@ impl LightClient {
|
||||
// `json_rpc_responses` can only be `None` if we had passed `json_rpc: Disabled`.
|
||||
let rpc_responses = json_rpc_responses.expect("Light client RPC configured; qed");
|
||||
|
||||
tokio::spawn(async move {
|
||||
wasm_bindgen_futures::spawn_local(async move {
|
||||
// tokio::spawn(async move {
|
||||
let mut task = BackgroundTask::new();
|
||||
task.start_task(backend, rpc_responses).await;
|
||||
});
|
||||
|
||||
@@ -4,10 +4,15 @@ use futures_util::{future, FutureExt};
|
||||
use gloo_net::websocket::{futures::WebSocket, Message, WebSocketError};
|
||||
use smoldot::libp2p::multiaddr::{Multiaddr, ProtocolRef};
|
||||
|
||||
use futures::SinkExt;
|
||||
use futures_util::stream::{SplitSink, SplitStream, StreamExt};
|
||||
|
||||
use futures_util::lock::Mutex;
|
||||
use smoldot_light::platform::ConnectError;
|
||||
use smoldot_light::platform::PlatformConnection;
|
||||
use smoldot_light::platform::PlatformSubstreamDirection;
|
||||
|
||||
use std::sync::Arc;
|
||||
use std::sync::Mutex;
|
||||
use std::{
|
||||
io::IoSlice,
|
||||
net::{IpAddr, SocketAddr},
|
||||
@@ -34,13 +39,25 @@ impl smoldot_light::platform::PlatformRef for Platform {
|
||||
|
||||
type Connection = std::convert::Infallible;
|
||||
|
||||
type Stream = ConnectionSocket;
|
||||
type Stream = ConnectionStream;
|
||||
|
||||
type ConnectFuture = future::BoxFuture<'static, Result<ConnectionSocket, ConnectError>>;
|
||||
type ConnectFuture = future::BoxFuture<
|
||||
'static,
|
||||
Result<PlatformConnection<Self::Stream, Self::Connection>, ConnectError>,
|
||||
>;
|
||||
|
||||
// type ConnectFuture = future::BoxFuture<
|
||||
// 'static,
|
||||
// Result<
|
||||
// smoldot_light::platform::PlatformConnection<Self::Stream, Self::Connection>,
|
||||
// ConnectError,
|
||||
// >,
|
||||
// >;
|
||||
|
||||
type StreamUpdateFuture<'a> = future::BoxFuture<'a, ()>;
|
||||
|
||||
type NextSubstreamFuture<'a> = future::Pending<()>;
|
||||
type NextSubstreamFuture<'a> =
|
||||
future::Pending<Option<(Self::Stream, PlatformSubstreamDirection)>>;
|
||||
|
||||
fn now_from_unix_epoch(&self) -> std::time::Duration {
|
||||
std::time::UNIX_EPOCH
|
||||
@@ -82,7 +99,11 @@ impl smoldot_light::platform::PlatformRef for Platform {
|
||||
}
|
||||
|
||||
fn connect(&self, url: &str) -> Self::ConnectFuture {
|
||||
let url = url.to_string();
|
||||
|
||||
Box::pin(async move {
|
||||
// let url = url.to_string();
|
||||
|
||||
let multiaddr = url.parse::<Multiaddr>().map_err(|_| ConnectError {
|
||||
message: format!("Address {url} is not a valid multiaddress"),
|
||||
is_bad_addr: true,
|
||||
@@ -142,122 +163,195 @@ impl smoldot_light::platform::PlatformRef for Platform {
|
||||
message: "Cannot stablish WebSocket connection".to_string(),
|
||||
})?;
|
||||
|
||||
let (to_sender, from_sender) = mpsc::channel(1024);
|
||||
let (to_receiver, from_receiver) = mpsc::channel(1024);
|
||||
// let (to_sender, from_sender) = mpsc::channel(1024);
|
||||
// let (to_receiver, from_receiver) = mpsc::channel(1024);
|
||||
|
||||
// TODO: Spawn a task:
|
||||
// enun Protocol
|
||||
/*
|
||||
|
||||
enum Protocol {
|
||||
Send(String),
|
||||
Recv(String),
|
||||
}
|
||||
|
||||
bg_task {
|
||||
while ..
|
||||
Future:
|
||||
A: if Send() .. self.send();
|
||||
B: self.next() -> recv_end.send("Msg");
|
||||
|
||||
}
|
||||
|
||||
from fn send(&self, stream: &mut Self::Stream, data: &[u8]) {
|
||||
let str: String = data.into();
|
||||
sender.send(str);
|
||||
}
|
||||
|
||||
from fn read_buffer<'a> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
*
|
||||
*/
|
||||
|
||||
// Note: WebSocket is not `Send`, work around that with a spawned task.
|
||||
|
||||
wasm_bindgen_futures::spawn_local(async move {
|
||||
let backend_event = tokio_stream::wrappers::ReceiverStream::new(from_sender);
|
||||
|
||||
let rpc_responses_event =
|
||||
futures_util::stream::unfold(rpc_responses, |mut rpc_responses| async {
|
||||
rpc_responses
|
||||
.next()
|
||||
.await
|
||||
.map(|result| (result, rpc_responses))
|
||||
});
|
||||
// wasm_bindgen_futures::spawn_local(async move {
|
||||
// let sender = tokio_stream::wrappers::ReceiverStream::new(from_sender);
|
||||
// let receiver = tokio_stream::wrappers::ReceiverStream::new(from_receiver);
|
||||
|
||||
tokio::pin!(backend_event, rpc_responses_event);
|
||||
// // let rpc_responses_event =
|
||||
// // futures_util::stream::unfold(rpc_responses, |mut rpc_responses| async {
|
||||
// // rpc_responses
|
||||
// // .next()
|
||||
// // .await
|
||||
// // .map(|result| (result, rpc_responses))
|
||||
// // });
|
||||
|
||||
let mut backend_event_fut = backend_event.next();
|
||||
let mut rpc_responses_fut = rpc_responses_event.next();
|
||||
// tokio::pin!(backend_event, rpc_responses_event);
|
||||
|
||||
loop {
|
||||
match future::select(backend_event_fut, rpc_responses_fut).await {
|
||||
// Message received from the backend: user registered.
|
||||
Either::Left((backend_value, previous_fut)) => {
|
||||
let Some(message) = backend_value else {
|
||||
tracing::trace!(target: LOG_TARGET, "Frontend channel closed");
|
||||
break;
|
||||
};
|
||||
tracing::trace!(
|
||||
target: LOG_TARGET,
|
||||
"Received register message {:?}",
|
||||
message
|
||||
);
|
||||
// let mut backend_event_fut = backend_event.next();
|
||||
// let mut rpc_responses_fut = rpc_responses_event.next();
|
||||
|
||||
self.handle_register(message).await;
|
||||
// loop {
|
||||
// match future::select(backend_event_fut, rpc_responses_fut).await {
|
||||
// // Message received from the backend: user registered.
|
||||
// Either::Left((backend_value, previous_fut)) => {
|
||||
// let Some(message) = backend_value else {
|
||||
// println!("Frontend channel closed");
|
||||
// break;
|
||||
// };
|
||||
// tracing::trace!(
|
||||
// target: LOG_TARGET,
|
||||
// "Received register message {:?}",
|
||||
// message
|
||||
// );
|
||||
|
||||
backend_event_fut = backend_event.next();
|
||||
rpc_responses_fut = previous_fut;
|
||||
}
|
||||
// Message received from rpc handler: lightclient response.
|
||||
Either::Right((response, previous_fut)) => {
|
||||
// Smoldot returns `None` if the chain has been removed (which subxt does not remove).
|
||||
let Some(response) = response else {
|
||||
tracing::trace!(target: LOG_TARGET, "Smoldot RPC responses channel closed");
|
||||
break;
|
||||
};
|
||||
tracing::trace!(
|
||||
target: LOG_TARGET,
|
||||
"Received smoldot RPC result {:?}",
|
||||
response
|
||||
);
|
||||
// self.handle_register(message).await;
|
||||
|
||||
self.handle_rpc_response(response).await;
|
||||
// backend_event_fut = backend_event.next();
|
||||
// rpc_responses_fut = previous_fut;
|
||||
// }
|
||||
// // Message received from rpc handler: lightclient response.
|
||||
// Either::Right((response, previous_fut)) => {
|
||||
// // Smoldot returns `None` if the chain has been removed (which subxt does not remove).
|
||||
// let Some(response) = response else {
|
||||
// println!("Smoldot RPC responses channel closed");
|
||||
// break;
|
||||
// };
|
||||
// println!("Received smoldot RPC result {:?}", response);
|
||||
|
||||
// Advance backend, save frontend.
|
||||
backend_event_fut = previous_fut;
|
||||
rpc_responses_fut = rpc_responses_event.next();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
// self.handle_rpc_response(response).await;
|
||||
|
||||
// // Advance backend, save frontend.
|
||||
// backend_event_fut = previous_fut;
|
||||
// rpc_responses_fut = rpc_responses_event.next();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
let (sender, receiver) = websocket.split();
|
||||
Ok(ConnectionSocket { sender, receiver })
|
||||
let conn = ConnectionStream {
|
||||
inner: Arc::new(Mutex::new(ConnectionInner { sender, receiver })),
|
||||
};
|
||||
|
||||
Ok(PlatformConnection::SingleStreamMultistreamSelectNoiseYamux(
|
||||
conn,
|
||||
))
|
||||
})
|
||||
}
|
||||
|
||||
fn open_out_substream(&self, _connection: &mut Self::Connection) {
|
||||
// Called from MultiStream connections that are not supported.
|
||||
// Called from MultiStream connections that are never opened for this implementation.
|
||||
}
|
||||
|
||||
fn next_substream<'a>(
|
||||
&self,
|
||||
connection: &'a mut Self::Connection,
|
||||
) -> Self::NextSubstreamFuture<'a> {
|
||||
// Called from MultiStream connections that are not supported.
|
||||
// Called from MultiStream connections that are never opened for this implementation.
|
||||
// futures::future::pending::<Option<(ConnectionStream, PlatformSubstreamDirection)>>()
|
||||
futures::future::pending()
|
||||
}
|
||||
|
||||
fn update_stream<'a>(&self, stream: &'a mut Self::Stream) -> Self::StreamUpdateFuture<'a> {
|
||||
todo!()
|
||||
Box::pin(async move {})
|
||||
}
|
||||
|
||||
fn read_buffer<'a>(
|
||||
&self,
|
||||
stream: &'a mut Self::Stream,
|
||||
) -> smoldot_light::platform::ReadBuffer<'a> {
|
||||
todo!()
|
||||
let mut locked = stream
|
||||
.inner
|
||||
.lock()
|
||||
.expect("Mutex should not be poised; qed");
|
||||
|
||||
// let fut = locked.receiver.next();
|
||||
|
||||
// let msg = futures_executor::block_on(async {
|
||||
let msg = futures::executor::block_on(async {
|
||||
match locked.receiver.next().await {
|
||||
Some(Ok(msg)) => Some(msg),
|
||||
_ => None,
|
||||
}
|
||||
});
|
||||
|
||||
match msg {
|
||||
Some(msg) => {
|
||||
let msg = Box::leak(Box::new(msg));
|
||||
|
||||
match msg {
|
||||
Message::Text(text) => {
|
||||
smoldot_light::platform::ReadBuffer::Open(text.as_bytes())
|
||||
}
|
||||
Message::Bytes(bytes) => smoldot_light::platform::ReadBuffer::Open(bytes),
|
||||
}
|
||||
}
|
||||
None => smoldot_light::platform::ReadBuffer::Closed,
|
||||
}
|
||||
}
|
||||
|
||||
fn advance_read_cursor(&self, stream: &mut Self::Stream, bytes: usize) {
|
||||
todo!()
|
||||
}
|
||||
fn advance_read_cursor(&self, stream: &mut Self::Stream, bytes: usize) {}
|
||||
|
||||
fn writable_bytes(&self, stream: &mut Self::Stream) -> usize {
|
||||
todo!()
|
||||
1024
|
||||
}
|
||||
|
||||
fn send(&self, stream: &mut Self::Stream, data: &[u8]) {
|
||||
todo!()
|
||||
let mut locked = stream
|
||||
.inner
|
||||
.lock()
|
||||
.expect("Mutex should not be poised; qed");
|
||||
|
||||
if let Ok(message) = String::from_utf8(data.into()) {
|
||||
let _ = locked.sender.send(Message::Text(message));
|
||||
}
|
||||
}
|
||||
|
||||
fn close_send(&self, stream: &mut Self::Stream) {
|
||||
todo!()
|
||||
}
|
||||
fn close_send(&self, stream: &mut Self::Stream) {}
|
||||
}
|
||||
|
||||
/// Error potentially returned by [`PlatformRef::connect`].
|
||||
pub struct ConnectError {
|
||||
/// Human-readable error message.
|
||||
pub message: String,
|
||||
/// `true` if the error is caused by the address to connect to being forbidden or unsupported.
|
||||
pub is_bad_addr: bool,
|
||||
// pub struct ConnectError {
|
||||
// /// Human-readable error message.
|
||||
// pub message: String,
|
||||
// /// `true` if the error is caused by the address to connect to being forbidden or unsupported.
|
||||
// pub is_bad_addr: bool,
|
||||
// }
|
||||
|
||||
pub struct ConnectionInner {
|
||||
sender: SplitSink<WebSocket, Message>,
|
||||
receiver: SplitStream<WebSocket>,
|
||||
}
|
||||
|
||||
pub struct ConnectionSocket {
|
||||
sender: SplitSink<WebSocket, Message>,
|
||||
receiver: SSplitStream<WebSocket>,
|
||||
unsafe impl Send for ConnectionInner {}
|
||||
|
||||
pub struct ConnectionStream {
|
||||
inner: Arc<Mutex<ConnectionInner>>,
|
||||
}
|
||||
|
||||
unsafe impl Send for ConnectionStream {}
|
||||
|
||||
Generated
+811
-23
File diff suppressed because it is too large
Load Diff
@@ -13,3 +13,6 @@ tracing-wasm = "0.2.1"
|
||||
console_error_panic_hook = "0.1.7"
|
||||
serde_json = "1"
|
||||
subxt = { path = "../../subxt", default-features = false, features = ["jsonrpsee-web", "unstable-light-client"] }
|
||||
|
||||
[profile.release]
|
||||
debug = true
|
||||
|
||||
@@ -21,9 +21,12 @@ async fn wasm_ws_transport_works() {
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
async fn light_client_transport_works() {
|
||||
let light_client = LightClient::new(include_str!("../../artifacts/dev_spec.json")).unwrap();
|
||||
let client = subxt::client::OnlineClient::<PolkadotConfig>::from_rpc_client(Arc::new(light_client)).await.unwrap();
|
||||
|
||||
let chain = client.rpc().system_chain().await.unwrap();
|
||||
assert_eq!(&chain, "Development");
|
||||
println!("Creating lightclient");
|
||||
|
||||
let light_client = LightClient::new(include_str!("../../../artifacts/dev_spec.json")).unwrap();
|
||||
// let client = subxt::client::OnlineClient::<PolkadotConfig>::from_rpc_client(Arc::new(light_client)).await.unwrap();
|
||||
|
||||
// let chain = client.rpc().system_chain().await.unwrap();
|
||||
// assert_eq!(&chain, "Development");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user