From 4c7c9312c1deaa9db32bb3db92cdd32806f669ff Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 23 Sep 2024 00:24:48 +0800 Subject: [PATCH] change xous-ipc api to 0.10.0 --- Cargo.lock | 314 ++++++++++++++++----------- Cargo.toml | 27 ++- api/xous-api-log/Cargo.toml | 2 +- api/xous-api-names/Cargo.toml | 2 +- api/xous-api-susres/Cargo.toml | 2 +- api/xous-api-ticktimer/Cargo.toml | 2 +- apps/app-loader/Cargo.toml | 2 +- apps/ball/Cargo.toml | 2 +- apps/chat-test/Cargo.toml | 2 +- apps/hello/Cargo.toml | 2 +- apps/hidv2/Cargo.toml | 2 +- apps/mtxchat/Cargo.toml | 2 +- apps/mtxcli/Cargo.toml | 2 +- apps/repl/Cargo.toml | 2 +- apps/transientdisk/Cargo.toml | 2 +- apps/vault/Cargo.toml | 2 +- imports/getrandom/Cargo.toml | 24 +- imports/getrandom/src/xous.rs | 16 +- libs/chat/Cargo.toml | 2 +- libs/tls/Cargo.toml | 2 +- services/codec/Cargo.toml | 2 +- services/com/Cargo.toml | 2 +- services/cram-console/Cargo.toml | 2 +- services/cram-hal-service/Cargo.toml | 2 +- services/dns/Cargo.toml | 2 +- services/early_settings/Cargo.toml | 2 +- services/gam/Cargo.toml | 2 +- services/graphics-server/Cargo.toml | 2 +- services/ime-frontend/Cargo.toml | 2 +- services/ime-plugin-api/Cargo.toml | 2 +- services/ime-plugin-shell/Cargo.toml | 2 +- services/ime-plugin-tts/Cargo.toml | 2 +- services/jtag/Cargo.toml | 2 +- services/keyboard/Cargo.toml | 2 +- services/llio/Cargo.toml | 2 +- services/modals/Cargo.toml | 2 +- services/net/Cargo.toml | 2 +- services/pddb/Cargo.toml | 2 +- services/pddb/src/api.rs | 4 +- services/pddb/src/lib.rs | 70 +++--- services/pddb/src/libstd/senres.rs | 2 +- services/pddb/src/main.rs | 94 ++++++-- services/root-keys/Cargo.toml | 2 +- services/shellchat/Cargo.toml | 2 +- services/spinor/Cargo.toml | 2 +- services/status/Cargo.toml | 2 +- services/test-swapper/Cargo.toml | 2 +- services/trng/Cargo.toml | 2 +- services/tts/Cargo.toml | 2 +- services/usb-device-xous/Cargo.toml | 2 +- services/xous-log/Cargo.toml | 2 +- services/xous-names/Cargo.toml | 2 +- services/xous-susres/Cargo.toml | 2 +- services/xous-swapper/Cargo.toml | 2 +- services/xous-ticktimer/Cargo.toml | 2 +- xous-ipc/Cargo.toml | 2 +- 56 files changed, 394 insertions(+), 253 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e50a273b1..7a384e97a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -122,14 +122,14 @@ dependencies = [ "modals", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "ureq", "url", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -312,7 +312,7 @@ dependencies = [ "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -591,13 +591,13 @@ dependencies = [ "num-derive 0.3.3", "num-traits", "pddb", - "rkyv", + "rkyv 0.8.8", "trng", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -622,7 +622,7 @@ dependencies = [ "num-traits", "pddb", "percent-encoding", - "rkyv", + "rkyv 0.8.8", "serde", "tls", "trng", @@ -632,7 +632,7 @@ dependencies = [ "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -727,7 +727,7 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "trng", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", @@ -735,7 +735,7 @@ dependencies = [ "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -757,7 +757,7 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "trng", "typenum", "utralib 0.1.24", @@ -766,7 +766,7 @@ dependencies = [ "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", "xous-semver", ] @@ -823,7 +823,7 @@ version = "0.1.0" dependencies = [ "graphics-server", "log", - "rkyv", + "rkyv 0.8.8", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-names", ] @@ -873,7 +873,7 @@ dependencies = [ "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", "xous-pio", "xous-pl230", "xous-swapper", @@ -891,13 +891,13 @@ dependencies = [ "pio-proc", "rand_chacha 0.3.1", "rand_core 0.6.4", - "rkyv", + "rkyv 0.8.8", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", "xous-pio", "xous-pl230", ] @@ -939,7 +939,7 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "usb-device", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1495,7 +1495,7 @@ dependencies = [ "num-derive 0.3.3", "num-traits", "pddb", - "rkyv", + "rkyv 0.8.8", "sntpc", "trng", "userprefs", @@ -1505,7 +1505,7 @@ dependencies = [ "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -1522,7 +1522,7 @@ dependencies = [ "num-derive 0.3.3", "num-traits", "once_cell", - "rkyv", + "rkyv 0.8.8", "spinor", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1530,7 +1530,7 @@ dependencies = [ "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -2075,7 +2075,7 @@ dependencies = [ "num-derive 0.3.3", "num-traits", "qrcode", - "rkyv", + "rkyv 0.8.8", "sha2", "trng", "tts-frontend", @@ -2085,7 +2085,7 @@ dependencies = [ "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -2147,14 +2147,14 @@ dependencies = [ "compiler_builtins", "js-sys", "libc", - "rkyv", + "rkyv 0.8.8", "rustc-std-workspace-core", "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", "wasm-bindgen-test", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-names", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -2187,14 +2187,14 @@ dependencies = [ "minifb", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -2287,7 +2287,7 @@ dependencies = [ "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -2350,7 +2350,7 @@ dependencies = [ "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -2486,14 +2486,14 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "tts-frontend", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -2504,10 +2504,10 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-names", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -2518,13 +2518,13 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -2536,14 +2536,14 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "tts-frontend", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -2651,14 +2651,14 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -2690,7 +2690,7 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "spinor", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2698,7 +2698,7 @@ dependencies = [ "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -2818,14 +2818,14 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", "xous-semver", ] @@ -3005,7 +3005,7 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "trng", "tts-frontend", "utralib 0.1.24", @@ -3013,7 +3013,7 @@ dependencies = [ "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -3038,7 +3038,7 @@ dependencies = [ "num-traits", "pddb", "percent-encoding", - "rkyv", + "rkyv 0.8.8", "serde", "tls", "trng", @@ -3048,7 +3048,7 @@ dependencies = [ "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -3078,7 +3078,27 @@ dependencies = [ "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", +] + +[[package]] +name = "munge" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64142d38c84badf60abf06ff9bd80ad2174306a5b11bd4706535090a30a419df" +dependencies = [ + "munge_macro", +] + +[[package]] +name = "munge_macro" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bb5c1d8184f13f7d0ccbeeca0def2f9a181bce2624302793005f5ca8aa62e5e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", ] [[package]] @@ -3110,7 +3130,7 @@ dependencies = [ "num-derive 0.3.3", "num-traits", "pddb", - "rkyv", + "rkyv 0.8.8", "smoltcp", "trng", "utralib 0.1.24", @@ -3119,7 +3139,7 @@ dependencies = [ "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", "xous-semver", ] @@ -3537,7 +3557,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rand_core 0.6.4", - "rkyv", + "rkyv 0.8.8", "root-keys", "sha2", "spinor", @@ -3550,7 +3570,7 @@ dependencies = [ "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", "zeroize", "zeroize_derive", ] @@ -3895,7 +3915,16 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ - "ptr_meta_derive", + "ptr_meta_derive 0.1.4", +] + +[[package]] +name = "ptr_meta" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9e76f66d3f9606f44e45598d155cb13ecf09f4a28199e48daf8c8fc937ea90" +dependencies = [ + "ptr_meta_derive 0.3.0", ] [[package]] @@ -3909,6 +3938,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ptr_meta_derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca414edb151b4c8d125c12566ab0d74dc9cdba36fb80eb7b848c15f495fd32d1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "qrcode" version = "0.12.0" @@ -3954,6 +3994,15 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +[[package]] +name = "rancor" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf5f7161924b9d1cea0e4cabc97c372cea92b5f927fc13c6bca67157a0ad947" +dependencies = [ + "ptr_meta 0.3.0", +] + [[package]] name = "rand" version = "0.7.3" @@ -4146,6 +4195,12 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +[[package]] +name = "rend" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31c1f1959e4db12c985c0283656be0925f1539549db1e47c4bd0b8b599e1ef7" + [[package]] name = "repl" version = "0.1.0" @@ -4168,7 +4223,7 @@ dependencies = [ "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -4203,13 +4258,13 @@ dependencies = [ "getrandom 0.2.12", "libc", "log", - "rkyv", + "rkyv 0.4.3", "spin", "untrusted 0.9.0", "windows-sys 0.52.0", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-names", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.9.63", ] [[package]] @@ -4219,9 +4274,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70de01b38fe7baba4ecdd33b777096d2b326993d8ea99bc5b6ede691883d3010" dependencies = [ "memoffset", - "ptr_meta", - "rkyv_derive", - "seahash", + "ptr_meta 0.1.4", + "rkyv_derive 0.4.0", +] + +[[package]] +name = "rkyv" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "395027076c569819ea6035ee62e664f5e03d74e281744f55261dd1afd939212b" +dependencies = [ + "bytes", + "hashbrown 0.14.3", + "indexmap 2.2.2", + "munge", + "ptr_meta 0.3.0", + "rancor", + "rend", + "rkyv_derive 0.8.8", + "tinyvec", + "uuid", ] [[package]] @@ -4235,6 +4307,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "rkyv_derive" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cb82b74b4810f07e460852c32f522e979787691b0b7b7439fe473e49d49b2f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "root-keys" version = "0.1.0" @@ -4261,7 +4344,7 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "rand_core 0.6.4", - "rkyv", + "rkyv 0.8.8", "sha2", "spinor", "subtle", @@ -4274,7 +4357,7 @@ dependencies = [ "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", "xous-semver", "zeroize", ] @@ -4428,12 +4511,6 @@ dependencies = [ "version-compare", ] -[[package]] -name = "seahash" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" - [[package]] name = "sec1" version = "0.3.0" @@ -4567,7 +4644,6 @@ dependencies = [ [[package]] name = "sha2" version = "0.10.8" -source = "git+https://github.com/betrusted-io/hashes.git?branch=sha2-v0.10.8-xous#2e4898726bead595335b6e75c88999f3316b7739" dependencies = [ "cfg-if", "cpufeatures", @@ -4577,13 +4653,13 @@ dependencies = [ "num-derive 0.3.3", "num-traits", "rand 0.8.5", - "rkyv", + "rkyv 0.8.8", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-susres", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -4645,7 +4721,7 @@ dependencies = [ "rand_xorshift", "random-pick", "ring", - "rkyv", + "rkyv 0.8.8", "root-keys", "rustls", "sha2", @@ -4668,7 +4744,7 @@ dependencies = [ "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -4772,7 +4848,7 @@ dependencies = [ "num-derive 0.3.3", "num-traits", "rand 0.8.5", - "rkyv", + "rkyv 0.8.8", "trng", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4780,7 +4856,7 @@ dependencies = [ "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -4849,7 +4925,7 @@ dependencies = [ "num-derive 0.3.3", "num-traits", "pddb", - "rkyv", + "rkyv 0.8.8", "root-keys", "sha2", "trng", @@ -4861,7 +4937,7 @@ dependencies = [ "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", "xous-semver", ] @@ -5007,13 +5083,13 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-susres", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -5158,7 +5234,7 @@ dependencies = [ "num-derive 0.3.3", "num-traits", "pddb", - "rkyv", + "rkyv 0.8.8", "rustls", "rustls-webpki", "sct", @@ -5170,7 +5246,7 @@ dependencies = [ "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -5291,7 +5367,7 @@ dependencies = [ "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -5304,14 +5380,14 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rand_core 0.6.4", - "rkyv", + "rkyv 0.8.8", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -5322,13 +5398,13 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", "xous-tts-backend", ] @@ -5482,7 +5558,7 @@ dependencies = [ "packed_struct", "rand 0.8.5", "rand_chacha 0.3.1", - "rkyv", + "rkyv 0.8.8", "trng", "usb-device", "usbd-serial", @@ -5495,7 +5571,7 @@ dependencies = [ "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", "xous-semver", "xous-usb-hid", ] @@ -5655,6 +5731,12 @@ dependencies = [ "svd2utra 0.1.22", ] +[[package]] +name = "uuid" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" + [[package]] name = "valuable" version = "0.1.0" @@ -5695,7 +5777,7 @@ dependencies = [ "rand 0.8.5", "rand_core 0.6.4", "random-pick", - "rkyv", + "rkyv 0.8.8", "sha1", "sha2", "sntpc", @@ -5710,7 +5792,7 @@ dependencies = [ "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", "xous-usb-hid", ] @@ -6268,63 +6350,55 @@ dependencies = [ [[package]] name = "xous-api-log" version = "0.1.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc03209afc102ee02405cdf80a8bc133a656a2cd5ed92e0194e1008786d5281" dependencies = [ "log", "num-derive 0.3.3", "num-traits", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] name = "xous-api-names" version = "0.9.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0029321b0a8b0dde9adee3ee510d288703f3045ab7e23c46cc48f45c16020e88" dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] name = "xous-api-susres" version = "0.9.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62792c6d43d71cf0c6d65a804307100e5f2a1d539add0f8aa4a9c2a8e6433ca4" dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] name = "xous-api-ticktimer" version = "0.9.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff030ff92a5b114cf43143ebd5e5d39fbce7e3e4acf53e3d7d6e60df5f3dd9b6" dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-susres", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", "xous-semver", ] @@ -6351,20 +6425,20 @@ dependencies = [ [[package]] name = "xous-ipc" version = "0.9.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47c88158f43d35c03454af8eba9d6f85ad140a71c150512cdbe68bf54bd8dc34" dependencies = [ "bitflags 1.3.2", - "rkyv", + "rkyv 0.4.3", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "xous-ipc" -version = "0.9.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c88158f43d35c03454af8eba9d6f85ad140a71c150512cdbe68bf54bd8dc34" +version = "0.10.0" dependencies = [ "bitflags 1.3.2", - "rkyv", + "rkyv 0.8.8", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -6398,11 +6472,11 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -6412,12 +6486,12 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -6470,13 +6544,13 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-susres", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -6493,7 +6567,7 @@ dependencies = [ "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] @@ -6503,30 +6577,28 @@ dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "utralib 0.1.24", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", "xous-api-names", "xous-api-susres", "xous-api-ticktimer", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", "xous-semver", ] [[package]] name = "xous-tts-backend" version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4201314c50898a02150ab2d5e46fd58283e36506ffabc3e13b22e3f1b85873ba" dependencies = [ "log", "num-derive 0.3.3", "num-traits", - "rkyv", + "rkyv 0.8.8", "xous 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-names", - "xous-ipc 0.9.63 (registry+https://github.com/rust-lang/crates.io-index)", + "xous-ipc 0.10.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 0c8ccda13..42fa49697 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -140,8 +140,8 @@ opt-level = "s" # z,s: Optimize for size instead of performance; 1 for easier de # prefer hardware-accelerated versions of services [patch.crates-io] -sha2 = { git = "https://github.com/betrusted-io/hashes.git", branch = "sha2-v0.10.8-xous" } -# sha2 = { path = "../hashes/sha2" } +# sha2 = { git = "https://github.com/betrusted-io/hashes.git", branch = "sha2-v0.10.8-xous" } +sha2 = { path = "../hashes/sha2" } [patch.crates-io.aes] path = "services/aes" @@ -186,13 +186,16 @@ path = "./utralib" path = "./svd2utra" # [patch.crates-io.xous] # path = "./xous-rs" -# [patch.crates-io.xous-ipc] -# path = "./xous-ipc" -# [patch.crates-io.xous-api-names] -# path = "./api/xous-api-names" -# [patch.crates-io.xous-api-susres] -# path = "./api/xous-api-susres" -# [patch.crates-io.xous-api-log] -# path = "./api/xous-api-log" -# [patch.crates-io.xous-api-ticktimer] -# path = "./api/xous-api-ticktimer" +[patch.crates-io.xous-ipc] +path = "./xous-ipc" +[patch.crates-io.xous-api-names] +path = "./api/xous-api-names" +[patch.crates-io.xous-api-susres] +path = "./api/xous-api-susres" +[patch.crates-io.xous-api-log] +path = "./api/xous-api-log" +[patch.crates-io.xous-api-ticktimer] +path = "./api/xous-api-ticktimer" + +[patch.crates-io.xous-tts-backend] +path = "../tts-backend" diff --git a/api/xous-api-log/Cargo.toml b/api/xous-api-log/Cargo.toml index 63acf121c..82cd71440 100644 --- a/api/xous-api-log/Cargo.toml +++ b/api/xous-api-log/Cargo.toml @@ -11,7 +11,7 @@ homepage = "https://betrusted.io/xous-book/" # Dependency versions enforced by Cargo.lock. [dependencies] xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } diff --git a/api/xous-api-names/Cargo.toml b/api/xous-api-names/Cargo.toml index d6dc259b8..248d6fac6 100644 --- a/api/xous-api-names/Cargo.toml +++ b/api/xous-api-names/Cargo.toml @@ -12,7 +12,7 @@ homepage = "https://betrusted.io/" [dependencies] log-server = { package = "xous-api-log", version = "0.1.59" } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } log = "0.4.14" diff --git a/api/xous-api-susres/Cargo.toml b/api/xous-api-susres/Cargo.toml index 9e28ed746..9f9df2b78 100644 --- a/api/xous-api-susres/Cargo.toml +++ b/api/xous-api-susres/Cargo.toml @@ -11,7 +11,7 @@ homepage = "https://betrusted.io/xous-book/" # Dependency versions enforced by Cargo.lock. [dependencies] xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } log = "0.4.14" diff --git a/api/xous-api-ticktimer/Cargo.toml b/api/xous-api-ticktimer/Cargo.toml index febced260..0a5115334 100644 --- a/api/xous-api-ticktimer/Cargo.toml +++ b/api/xous-api-ticktimer/Cargo.toml @@ -11,7 +11,7 @@ homepage = "https://betrusted.io/xous-book/" # Dependency versions enforced by Cargo.lock. [dependencies] xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } susres = { package = "xous-api-susres", version = "0.9.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } diff --git a/apps/app-loader/Cargo.toml b/apps/app-loader/Cargo.toml index ff5d73cf4..2341ddf64 100644 --- a/apps/app-loader/Cargo.toml +++ b/apps/app-loader/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } log = "0.4.14" xous-names = { package = "xous-api-names", version = "0.9.61" } diff --git a/apps/ball/Cargo.toml b/apps/ball/Cargo.toml index f13c0c66d..214e79919 100644 --- a/apps/ball/Cargo.toml +++ b/apps/ball/Cargo.toml @@ -11,7 +11,7 @@ log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } diff --git a/apps/chat-test/Cargo.toml b/apps/chat-test/Cargo.toml index 898511c44..85679188a 100644 --- a/apps/chat-test/Cargo.toml +++ b/apps/chat-test/Cargo.toml @@ -11,7 +11,7 @@ log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } diff --git a/apps/hello/Cargo.toml b/apps/hello/Cargo.toml index bfb0e8a56..24132ac62 100644 --- a/apps/hello/Cargo.toml +++ b/apps/hello/Cargo.toml @@ -8,7 +8,7 @@ log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } gam = { path = "../../services/gam" } diff --git a/apps/hidv2/Cargo.toml b/apps/hidv2/Cargo.toml index 0ad1591bf..7d9713d76 100644 --- a/apps/hidv2/Cargo.toml +++ b/apps/hidv2/Cargo.toml @@ -8,7 +8,7 @@ log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } gam = { path = "../../services/gam" } diff --git a/apps/mtxchat/Cargo.toml b/apps/mtxchat/Cargo.toml index a33b3f52c..845cd8268 100644 --- a/apps/mtxchat/Cargo.toml +++ b/apps/mtxchat/Cargo.toml @@ -11,7 +11,7 @@ log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } diff --git a/apps/mtxcli/Cargo.toml b/apps/mtxcli/Cargo.toml index 1771fd2ef..40bb7dcd2 100644 --- a/apps/mtxcli/Cargo.toml +++ b/apps/mtxcli/Cargo.toml @@ -11,7 +11,7 @@ log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } diff --git a/apps/repl/Cargo.toml b/apps/repl/Cargo.toml index 1758ceb3e..bf4f36a5c 100644 --- a/apps/repl/Cargo.toml +++ b/apps/repl/Cargo.toml @@ -11,7 +11,7 @@ log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } diff --git a/apps/transientdisk/Cargo.toml b/apps/transientdisk/Cargo.toml index 761d8c747..b3816ab38 100644 --- a/apps/transientdisk/Cargo.toml +++ b/apps/transientdisk/Cargo.toml @@ -10,7 +10,7 @@ log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } gam = { path = "../../services/gam" } diff --git a/apps/vault/Cargo.toml b/apps/vault/Cargo.toml index cd31c9225..169e1909d 100644 --- a/apps/vault/Cargo.toml +++ b/apps/vault/Cargo.toml @@ -8,7 +8,7 @@ log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" rkyv = { version = "0.8.8", default-features = false, features = [ "std", "alloc", diff --git a/imports/getrandom/Cargo.toml b/imports/getrandom/Cargo.toml index 1c1434437..eec3aa991 100644 --- a/imports/getrandom/Cargo.toml +++ b/imports/getrandom/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "getrandom" -version = "0.2.12" # Also update html_root_url in lib.rs when bumping this +version = "0.2.12" # Also update html_root_url in lib.rs when bumping this edition = "2018" authors = ["The Rand Project Developers"] license = "MIT OR Apache-2.0" @@ -30,11 +30,13 @@ js-sys = { version = "0.3", optional = true } wasm-bindgen-test = "0.3.18" [target.'cfg(target_os = "xous")'.dependencies] -xous-names = {package = "xous-api-names", version = "0.9.61"} +xous-names = { package = "xous-api-names", version = "0.9.61" } xous = "0.9.63" -xous-ipc = "0.9.63" -rkyv = {version = "0.4.3", default-features = false, features = ["const_generics"]} - +xous-ipc = "0.10.0" +rkyv = { version = "0.8.8", default-features = false, features = [ + "std", + "alloc", +] } [features] # Implement std-only traits for getrandom::Error @@ -62,10 +64,10 @@ rustdoc-args = ["--cfg", "docsrs"] # workaround for https://github.com/cross-rs/cross/issues/1345 [package.metadata.cross.target.x86_64-unknown-netbsd] pre-build = [ - "mkdir -p /tmp/netbsd", - "curl https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.2/amd64/binary/sets/base.tar.xz -O", - "tar -C /tmp/netbsd -xJf base.tar.xz", - "cp /tmp/netbsd/usr/lib/libexecinfo.so /usr/local/x86_64-unknown-netbsd/lib", - "rm base.tar.xz", - "rm -rf /tmp/netbsd", + "mkdir -p /tmp/netbsd", + "curl https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.2/amd64/binary/sets/base.tar.xz -O", + "tar -C /tmp/netbsd -xJf base.tar.xz", + "cp /tmp/netbsd/usr/lib/libexecinfo.so /usr/local/x86_64-unknown-netbsd/lib", + "rm base.tar.xz", + "rm -rf /tmp/netbsd", ] diff --git a/imports/getrandom/src/xous.rs b/imports/getrandom/src/xous.rs index ef7ea3660..85fd10326 100644 --- a/imports/getrandom/src/xous.rs +++ b/imports/getrandom/src/xous.rs @@ -1,3 +1,9 @@ +use core::mem::MaybeUninit; +use core::sync::atomic::AtomicU32; +use core::sync::atomic::Ordering; + +use xous_ipc::Buffer; + /// Fill `dest` with random bytes from the system's preferred random number /// source. /// @@ -12,11 +18,6 @@ /// significantly slower than a user-space CSPRNG; for the latter consider /// [`rand::thread_rng`](https://docs.rs/rand/*/rand/fn.thread_rng.html). use crate::util::slice_as_uninit; -use core::sync::atomic::AtomicU32; -use core::sync::atomic::Ordering; -use core::mem::MaybeUninit; - -use xous_ipc::Buffer; static TRNG_CONN: AtomicU32 = AtomicU32::new(0); @@ -52,8 +53,9 @@ pub fn fill_buf(data: &mut [u32]) { let mut buf = Buffer::into_buf(tb).unwrap(); buf.lend_mut(TRNG_CONN.load(Ordering::SeqCst), 1 /* FillTrng */).unwrap(); let rtb = buf.as_flat::().unwrap(); - assert!(rtb.len as usize == data.len()); - data.copy_from_slice(&rtb.data); + assert!(usize::from(rtb.len) == data.len()); + // FIXME + // data.copy_from_slice(&rtb.data); } pub fn next_u32() -> u32 { diff --git a/libs/chat/Cargo.toml b/libs/chat/Cargo.toml index 5d660c019..7f951dde2 100644 --- a/libs/chat/Cargo.toml +++ b/libs/chat/Cargo.toml @@ -11,7 +11,7 @@ log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } diff --git a/libs/tls/Cargo.toml b/libs/tls/Cargo.toml index 635d33220..3413ff488 100644 --- a/libs/tls/Cargo.toml +++ b/libs/tls/Cargo.toml @@ -10,7 +10,7 @@ log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } diff --git a/services/codec/Cargo.toml b/services/codec/Cargo.toml index ca2826b63..2987a692c 100644 --- a/services/codec/Cargo.toml +++ b/services/codec/Cargo.toml @@ -16,7 +16,7 @@ susres = { package = "xous-api-susres", version = "0.9.59" } llio = { path = "../llio" } trng = { path = "../trng" } -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } rkyv = { version = "0.8.8", default-features = false, features = [ diff --git a/services/com/Cargo.toml b/services/com/Cargo.toml index 6956e410d..334f3a397 100644 --- a/services/com/Cargo.toml +++ b/services/com/Cargo.toml @@ -14,7 +14,7 @@ ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } susres = { package = "xous-api-susres", version = "0.9.59" } typenum = "1.12" xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" xous-names = { package = "xous-api-names", version = "0.9.61" } trng = { path = "../trng" } llio = { path = "../llio" } diff --git a/services/cram-console/Cargo.toml b/services/cram-console/Cargo.toml index 63bfc1d11..984bca3b7 100644 --- a/services/cram-console/Cargo.toml +++ b/services/cram-console/Cargo.toml @@ -10,7 +10,7 @@ utralib = { version = "0.1.24", optional = true, default-features = false } xous-names = { package = "xous-api-names", version = "0.9.61" } ticktimer = { package = "xous-api-ticktimer", version = "0.9.59" } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } diff --git a/services/cram-hal-service/Cargo.toml b/services/cram-hal-service/Cargo.toml index e059b29ad..86fc779be 100644 --- a/services/cram-hal-service/Cargo.toml +++ b/services/cram-hal-service/Cargo.toml @@ -12,7 +12,7 @@ utralib = { version = "0.1.24", optional = true, default-features = false, featu xous-names = { package = "xous-api-names", version = "0.9.61" } ticktimer = { package = "xous-api-ticktimer", version = "0.9.59" } xous = { version = "0.9.63", features = ["raw-trng"] } -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } log = "0.4.14" cramium-hal = { path = "../../libs/cramium-hal", features = [ diff --git a/services/dns/Cargo.toml b/services/dns/Cargo.toml index f18e2d1e0..066b13286 100644 --- a/services/dns/Cargo.toml +++ b/services/dns/Cargo.toml @@ -15,7 +15,7 @@ log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } net = { path = "../net" } -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" rkyv = { version = "0.8.8", default-features = false, features = [ "std", "alloc", diff --git a/services/early_settings/Cargo.toml b/services/early_settings/Cargo.toml index 24d455d85..827a3fe41 100644 --- a/services/early_settings/Cargo.toml +++ b/services/early_settings/Cargo.toml @@ -14,7 +14,7 @@ log = { version = "0.4", features = [ log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" xous-names = { package = "xous-api-names", version = "0.9.61" } susres = { package = "xous-api-susres", version = "0.9.59" } spinor = { path = "../../services/spinor" } diff --git a/services/gam/Cargo.toml b/services/gam/Cargo.toml index e42ebb1d3..1a8a97daf 100644 --- a/services/gam/Cargo.toml +++ b/services/gam/Cargo.toml @@ -18,7 +18,7 @@ log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } trng = { path = "../trng", optional = true } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" xous-names = { package = "xous-api-names", version = "0.9.61" } num-derive = { version = "0.3.3", default-features = false } diff --git a/services/graphics-server/Cargo.toml b/services/graphics-server/Cargo.toml index 913c09650..595d029e5 100644 --- a/services/graphics-server/Cargo.toml +++ b/services/graphics-server/Cargo.toml @@ -15,7 +15,7 @@ susres = { package = "xous-api-susres", version = "0.9.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } locales = { path = "../../locales" } -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" xous-names = { package = "xous-api-names", version = "0.9.61" } num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } diff --git a/services/ime-frontend/Cargo.toml b/services/ime-frontend/Cargo.toml index b8cef96a2..2df85cf2e 100644 --- a/services/ime-frontend/Cargo.toml +++ b/services/ime-frontend/Cargo.toml @@ -16,7 +16,7 @@ log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous = "0.9.63" locales = { path = "../../locales" } -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" xous-names = { package = "xous-api-names", version = "0.9.61" } num-derive = { version = "0.3.3", default-features = false } diff --git a/services/ime-plugin-api/Cargo.toml b/services/ime-plugin-api/Cargo.toml index 09d3ad445..cdb6aaf6d 100644 --- a/services/ime-plugin-api/Cargo.toml +++ b/services/ime-plugin-api/Cargo.toml @@ -10,7 +10,7 @@ version = "0.1.0" graphics-server = { path = "../graphics-server" } # this is used by the IMEF portion of the API log = "0.4.14" xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" xous-names = { package = "xous-api-names", version = "0.9.61" } # used by the IMEF for registering listeners num-derive = { version = "0.3.3", default-features = false } diff --git a/services/ime-plugin-shell/Cargo.toml b/services/ime-plugin-shell/Cargo.toml index e0af44841..8a8b9f09f 100644 --- a/services/ime-plugin-shell/Cargo.toml +++ b/services/ime-plugin-shell/Cargo.toml @@ -12,7 +12,7 @@ log = "0.4.14" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" xous-names = { package = "xous-api-names", version = "0.9.61" } num-derive = { version = "0.3.3", default-features = false } diff --git a/services/ime-plugin-tts/Cargo.toml b/services/ime-plugin-tts/Cargo.toml index 3998d788f..7a8863d65 100644 --- a/services/ime-plugin-tts/Cargo.toml +++ b/services/ime-plugin-tts/Cargo.toml @@ -12,7 +12,7 @@ log = "0.4.14" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" xous-names = { package = "xous-api-names", version = "0.9.61" } num-derive = { version = "0.3.3", default-features = false } diff --git a/services/jtag/Cargo.toml b/services/jtag/Cargo.toml index 77987be5c..75805c5d3 100644 --- a/services/jtag/Cargo.toml +++ b/services/jtag/Cargo.toml @@ -16,7 +16,7 @@ num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } susres = { package = "xous-api-susres", version = "0.9.59" } -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" rkyv = { version = "0.8.8", default-features = false, features = [ "std", "alloc", diff --git a/services/keyboard/Cargo.toml b/services/keyboard/Cargo.toml index d2a84191b..8eb3fe471 100644 --- a/services/keyboard/Cargo.toml +++ b/services/keyboard/Cargo.toml @@ -14,7 +14,7 @@ log = { version = "0.4", features = [ log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" xous-names = { package = "xous-api-names", version = "0.9.61" } llio = { path = "../llio" } susres = { package = "xous-api-susres", version = "0.9.59" } diff --git a/services/llio/Cargo.toml b/services/llio/Cargo.toml index 1f4f7d045..9faaeafb0 100644 --- a/services/llio/Cargo.toml +++ b/services/llio/Cargo.toml @@ -11,7 +11,7 @@ log = "0.4.14" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" xous-names = { package = "xous-api-names", version = "0.9.61" } susres = { package = "xous-api-susres", version = "0.9.59" } diff --git a/services/modals/Cargo.toml b/services/modals/Cargo.toml index 297727218..461a3a347 100644 --- a/services/modals/Cargo.toml +++ b/services/modals/Cargo.toml @@ -14,7 +14,7 @@ xous-names = { package = "xous-api-names", version = "0.9.61" } log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" rkyv = { version = "0.8.8", default-features = false, features = [ "std", "alloc", diff --git a/services/net/Cargo.toml b/services/net/Cargo.toml index f81465625..8ee92894c 100644 --- a/services/net/Cargo.toml +++ b/services/net/Cargo.toml @@ -8,7 +8,7 @@ description = "Network middleware" # Dependency versions enforced by Cargo.lock. [dependencies] xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } diff --git a/services/pddb/Cargo.toml b/services/pddb/Cargo.toml index 68c8267ce..1af99c1aa 100644 --- a/services/pddb/Cargo.toml +++ b/services/pddb/Cargo.toml @@ -9,7 +9,7 @@ description = "Plausibly Deniable Database" [dependencies] bitflags = { version = "1" } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } diff --git a/services/pddb/src/api.rs b/services/pddb/src/api.rs index ab392138d..c5169d217 100644 --- a/services/pddb/src/api.rs +++ b/services/pddb/src/api.rs @@ -270,7 +270,7 @@ pub struct PddbBasisList { pub num: u32, } -#[derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize, Debug)] +#[derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize, Debug, Clone)] pub enum PddbRequestCode { Create = 0, Open = 1, @@ -302,7 +302,7 @@ pub struct PddbBasisRequest { pub code: PddbRequestCode, pub policy: Option, } -#[derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)] +#[derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize, Clone)] pub struct PddbDictRequest { pub basis_specified: bool, pub basis: String, diff --git a/services/pddb/src/lib.rs b/services/pddb/src/lib.rs index 84e27141b..6137ba4b3 100644 --- a/services/pddb/src/lib.rs +++ b/services/pddb/src/lib.rs @@ -1075,9 +1075,7 @@ impl Pddb { } else { DEFAULT_LIMIT }; - let mut msg_mem = - xous::map_memory(None, None, alloc_target, xous::MemoryFlags::R | xous::MemoryFlags::W) - .expect("Likely OOM in allocating read_dict buffer"); + let mut buf = Buffer::new(alloc_target); // setup the request arguments let mut request = PddbDictRequest { @@ -1097,40 +1095,47 @@ impl Pddb { let mut check_total_keys; let mut check_key_index = 0; loop { - let mut serializer = WriteSerializer::new(AlignedVec::new()); - let pos = serializer.serialize_value(&request).unwrap(); - let buf = serializer.into_inner(); - // Safety: `u8` contains no undefined values - unsafe { msg_mem.as_slice_mut()[..buf.len()].copy_from_slice(buf.as_slice()) }; + // serializes PddbDictRequest into a buffer whose size is set as `alloc_target` + buf.replace(request.clone()).expect("Xous internal error"); + let (pages, used) = buf.into_inner().expect("API failure"); + // initiate the request: assemble a MemoryMessage let msg = xous::MemoryMessage { id: Opcode::DictBulkRead.to_usize().unwrap(), - buf: msg_mem, - offset: xous::MemoryAddress::new(pos), - valid: xous::MemorySize::new(buf.len()), + buf: pages, + offset: xous::MemoryAddress::new(used), + valid: xous::MemorySize::new(alloc_target), }; // do a mutable lend to the server let (_pos, _valid) = match xous::send_message(self.conn, Message::MutableBorrow(msg)) { Ok(xous::Result::MemoryReturned(offset, valid)) => (offset, valid), - _ => return Err(Error::new(ErrorKind::Other, "Xous internal error")), + _ => { + xous::unmap_memory(pages).unwrap(); + return Err(Error::new(ErrorKind::Other, "Xous internal error")); + } }; - // unpack the return code. The result is not a single rkyv struct, it's hand-packed binary data. + // unpack the return code. The result is not a single rkyv struct, it's hand-packed binary data, + // with a directly-written `repr(C)` BulkReadHeader record at the top which recordes where in the + // message we can find the individual rkyv'd structs. // Unpack it. let mut index = 0; let mut header = BulkReadHeader::default(); // Safety: `u8` contains no undefined values header .deref_mut() - .copy_from_slice(unsafe { &msg_mem.as_slice()[index..index + size_of::()] }); + .copy_from_slice(unsafe { &pages.as_slice()[index..index + size_of::()] }); index += size_of::(); + match FromPrimitive::from_u32(header.code).unwrap_or(PddbBulkReadCode::InternalError) { PddbBulkReadCode::NotFound => { + xous::unmap_memory(pages).unwrap(); return Err(Error::new( ErrorKind::NotFound, format!("Bulk Read: dictionary '{}' not found", dict), )); } PddbBulkReadCode::Busy => { + xous::unmap_memory(pages).unwrap(); return Err(Error::new(ErrorKind::TimedOut, "PDDB server busy or request timed out")); } PddbBulkReadCode::Streaming | PddbBulkReadCode::Last => { @@ -1148,38 +1153,36 @@ impl Pddb { let mut key_count = 0; log::debug!("header: {:?}", header); while key_count < header.len { - if index + size_of::() * 2 > msg_mem.len() { + if index + size_of::() * 2 > pages.len() { // quit if we don't have enough space to decode at least another two indices break; } // Safety: `u32` contains no undefined values let size = unsafe { u32::from_le_bytes( - msg_mem.as_slice()[index..index + size_of::()].try_into().unwrap(), + pages.as_slice()[index..index + size_of::()].try_into().unwrap(), ) }; index += size_of::(); // Safety: `u32` contains no undefined values let pos = unsafe { u32::from_le_bytes( - msg_mem.as_slice()[index..index + size_of::()].try_into().unwrap(), + pages.as_slice()[index..index + size_of::()].try_into().unwrap(), ) }; index += size_of::(); log::trace!("unpacking message at {}({})", size, pos); if size != 0 && pos != 0 { - //log::info!("extract archive: {}, {}, {}, {}", index, size, pos, msg_mem.len()); - //log::info!("{:x?}", &msg_mem.as_slice::()[index..index + (size as usize)]); - let archived = unsafe { - archived_value::( - &msg_mem.as_slice()[index..index + (size as usize)], - pos as usize, + //log::info!("extract archive: {}, {}, {}, {}", index, size, pos, pages.len()); + //log::info!("{:x?}", &pages.as_slice::()[index..index + (size as usize)]); + let r = unsafe { + rkyv::access_unchecked::( + &pages.as_slice()[index..index + (size as usize)], ) }; //log::info!("increment index"); index += size as usize; - //log::info!("new index: {}", index); - let key = match archived.deserialize(&mut AllocDeserializer) { + let key = match rkyv::deserialize::(r) { Ok(r) => r, Err(e) => { log::error!("deserialization error: {:?}", e); @@ -1201,11 +1204,17 @@ impl Pddb { } // if this is the last block, quit the loop if header.code == (PddbBulkReadCode::Last as u32) { + xous::unmap_memory(pages).unwrap(); break; } } - _ => return Err(Error::new(ErrorKind::Other, "Bulk read invalid return value")), + _ => { + xous::unmap_memory(pages).unwrap(); + return Err(Error::new(ErrorKind::Other, "Bulk read invalid return value")); + } } + // safety: safe because we're re-constituting from a previously blown up buffer + buf = unsafe { Buffer::from_inner(pages, used) }; } if check_total_keys != check_key_index { log::error!( @@ -1214,7 +1223,14 @@ impl Pddb { check_key_index ); } - xous::unmap_memory(msg_mem).unwrap(); + // blow up the buffer and de-allocate its interior memory. I think this could also be + // accomplished by just setting should_drop = `true` and letting Drop happen as it goes + // out of scope, but I find the explicit unmap matching the map at the top to be comforting. + // + // It also brings into relief the fact that I think we're leaking memory whenever we return + // with an API failure: the unmap_memory() path is missing in those cases. + // let (pages, _used) = buf.into_inner().expect("API failure"); + // xous::unmap_memory(pages).unwrap(); Ok(ret) } diff --git a/services/pddb/src/libstd/senres.rs b/services/pddb/src/libstd/senres.rs index e09ce1771..a041b34cb 100644 --- a/services/pddb/src/libstd/senres.rs +++ b/services/pddb/src/libstd/senres.rs @@ -158,7 +158,7 @@ pub trait Senres { Self: core::marker::Sized, { let reader = Reader { backing: self, offset: core::cell::Cell::new(0) }; - if SENRES_V1_MAGIC != reader.try_get_from().ok()? { + if SENRES_V1_MAGIC != reader.try_get_from::().ok()? { return None; } let target_fourcc: [u8; 4] = reader.try_get_from().ok()?; diff --git a/services/pddb/src/main.rs b/services/pddb/src/main.rs index 1a7fe27f4..226a4a520 100644 --- a/services/pddb/src/main.rs +++ b/services/pddb/src/main.rs @@ -370,6 +370,7 @@ use api::*; mod backend; use backend::*; mod ux; +use rkyv::with::Identity; use ux::*; mod menu; use menu::*; @@ -391,6 +392,8 @@ use core::mem::size_of; use core::ops::Deref; use std::collections::{BTreeSet, HashMap}; use std::io::ErrorKind; +use std::marker::PhantomData; +use std::mem::MaybeUninit; use std::rc::Rc; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; @@ -399,9 +402,11 @@ use std::thread; use locales::t; use num_traits::*; use rkyv::{ - de::deserializers::AllocDeserializer, - ser::{serializers::BufferSerializer, Serializer}, - Deserialize, + api::low::LowSerializer, + rancor::Panic, + ser::{allocator::SubAllocator, writer::Buffer as RkyvBuffer, Positional}, + with::{ArchiveWith, SerializeWith}, + Archive, Place, Serialize, }; use xous::{msg_blocking_scalar_unpack, send_message, Message}; use xous_ipc::Buffer; @@ -413,8 +418,8 @@ const FILE_ID_SERVICES_PDDB_SRC_DICTIONARY: u32 = 1; #[derive(Debug, rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)] pub(crate) struct BasisRequestPassword { - db_name: String<{ crate::api::BASIS_NAME_LEN }>, - plaintext_pw: Option>, + db_name: String, + plaintext_pw: Option, } #[derive(Debug, PartialEq, Eq)] pub(crate) enum PasswordState { @@ -457,6 +462,31 @@ fn main() -> ! { std::thread::Builder::new().stack_size(stack_size).spawn(wrapped_main).unwrap().join().unwrap() } +/// For manual serialization to rkyv in this crate. +type Serializer<'a, 'b> = LowSerializer, SubAllocator<'a>, Panic>; +struct Wrap<'a, F, T>(&'a T, PhantomData); + +impl Archive for Wrap<'_, F, T> +where + F: ArchiveWith, +{ + type Archived = >::Archived; + type Resolver = >::Resolver; + + fn resolve(&self, resolver: Self::Resolver, out: Place) { + F::resolve_with(self.0, resolver, out) + } +} + +impl<'a, 'b, F, T> Serialize> for Wrap<'_, F, T> +where + F: SerializeWith>, +{ + fn serialize(&self, serializer: &mut Serializer<'a, 'b>) -> core::result::Result { + F::serialize_with(self.0, serializer) + } +} + fn wrapped_main() -> ! { log_server::init_wait().unwrap(); log::set_max_level(log::LevelFilter::Info); @@ -627,6 +657,9 @@ fn wrapped_main() -> ! { #[cfg(feature = "perfcounter")] pddb_os.set_use_perf(true); + // for alloc-less serializations + let mut scratch = [MaybeUninit::::uninit(); 256]; + // register a suspend/resume listener let mut susres = susres::Susres::new(Some(susres::SuspendOrder::Early), &xns, Opcode::SuspendResume as u32, my_cid) @@ -889,7 +922,8 @@ fn wrapped_main() -> ! { let mut mgmt = buffer.to_original::().unwrap(); match mgmt.code { PddbRequestCode::Create => { - let request = BasisRequestPassword { db_name: mgmt.name, plaintext_pw: None }; + let request = + BasisRequestPassword { db_name: mgmt.name.to_string(), plaintext_pw: None }; let mut buf = Buffer::into_buf(request).unwrap(); buf.lend_mut(pw_cid, PwManagerOpcode::RequestPassword.to_u32().unwrap()).unwrap(); let ret = buf.to_original::().unwrap(); @@ -929,7 +963,8 @@ fn wrapped_main() -> ! { PddbRequestCode::Open => { let mut finished = false; while !finished { - let request = BasisRequestPassword { db_name: mgmt.name, plaintext_pw: None }; + let request = + BasisRequestPassword { db_name: mgmt.name.to_string(), plaintext_pw: None }; let mut buf = Buffer::into_buf(request).unwrap(); buf.lend_mut(pw_cid, PwManagerOpcode::RequestPassword.to_u32().unwrap()).unwrap(); let ret = buf.to_original::().unwrap(); @@ -1698,9 +1733,13 @@ fn wrapped_main() -> ! { // unpack the descriptor #[cfg(feature = "perfcounter")] pddb_os.perf_entry(FILE_ID_SERVICES_PDDB_SRC_MAIN, perflib::PERFMETA_NONE, 5, std::line!()); - let pos = range.offset.map(|o| o.get()).unwrap_or_default(); - let r = unsafe { rkyv::archived_value::(buf, pos) }; - let bulk_descriptor = r.deserialize(&mut AllocDeserializer).unwrap(); + let r = unsafe { + rkyv::access_unchecked::( + &buf[..range.offset.expect("Missing offset in DictBulkRead request").get()], + ) + }; + let bulk_descriptor = rkyv::deserialize::(r) + .expect("malformed DictBulkRead request"); // check for a timeout; retire state if we did timeout #[cfg(feature = "perfcounter")] pddb_os.perf_entry(FILE_ID_SERVICES_PDDB_SRC_MAIN, perflib::PERFMETA_NONE, 5, std::line!()); @@ -1871,13 +1910,17 @@ fn wrapped_main() -> ! { }; state.read_total += attr.len; // commit the read length early let (prebuf, sbuf) = buf.split_at_mut(size_of::() * 2); - let mut serializer = BufferSerializer::new(sbuf); - let len = size_of::(); - match serializer.serialize_value(&rec) { - Ok(pos) => SerializeResult::Success( - pos, - len, - serializer.into_inner(), + + let wrap = Wrap(&rec, PhantomData::); + let writer = RkyvBuffer::from(&mut *sbuf); + let alloc = SubAllocator::new(&mut scratch); + match rkyv::api::low::to_bytes_in_with_alloc::<_, _, Panic>( + &wrap, writer, alloc, + ) { + Ok(serbuf) => SerializeResult::Success( + serbuf.pos(), + size_of::(), + sbuf, key_name, prebuf, ), @@ -1908,13 +1951,16 @@ fn wrapped_main() -> ! { data: None, }; let (pre_buf, buf) = buf.split_at_mut(size_of::() * 2); - let mut serializer = BufferSerializer::new(buf); - let len = size_of::(); - match serializer.serialize_value(&rec) { - Ok(pos) => SerializeResult::Success( - pos, - len, - serializer.into_inner(), + let wrap = Wrap(&rec, PhantomData::); + let writer = RkyvBuffer::from(&mut *buf); + let alloc = SubAllocator::new(&mut scratch); + match rkyv::api::low::to_bytes_in_with_alloc::<_, _, Panic>( + &wrap, writer, alloc, + ) { + Ok(serbuf) => SerializeResult::Success( + serbuf.pos(), + size_of::(), + buf, key_name, pre_buf, ), diff --git a/services/root-keys/Cargo.toml b/services/root-keys/Cargo.toml index dcdd32de3..d76394549 100644 --- a/services/root-keys/Cargo.toml +++ b/services/root-keys/Cargo.toml @@ -20,7 +20,7 @@ com = { path = "../com" } xous-semver = "0.1.2" utralib = { version = "0.1.24", optional = true, default-features = false } -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" num-derive = { version = "0.4.1", default-features = false } num-traits = { version = "0.2.14", default-features = false } rkyv = { version = "0.8.8", default-features = false, features = [ diff --git a/services/shellchat/Cargo.toml b/services/shellchat/Cargo.toml index bd58dfd97..adbb8e349 100644 --- a/services/shellchat/Cargo.toml +++ b/services/shellchat/Cargo.toml @@ -19,7 +19,7 @@ log = "0.4.14" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" xous-names = { package = "xous-api-names", version = "0.9.61" } keyboard = { path = "../keyboard" } susres = { package = "xous-api-susres", version = "0.9.59" } diff --git a/services/spinor/Cargo.toml b/services/spinor/Cargo.toml index b0fbf8e88..e55750135 100644 --- a/services/spinor/Cargo.toml +++ b/services/spinor/Cargo.toml @@ -21,7 +21,7 @@ rkyv = { version = "0.8.8", default-features = false, features = [ "std", "alloc", ] } -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } diff --git a/services/status/Cargo.toml b/services/status/Cargo.toml index b52cf8621..e6152c481 100644 --- a/services/status/Cargo.toml +++ b/services/status/Cargo.toml @@ -15,7 +15,7 @@ ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } trng = { path = "../trng" } llio = { path = "../llio" } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" xous-names = { package = "xous-api-names", version = "0.9.61" } graphics-server = { path = "../graphics-server" } gam = { path = "../gam" } diff --git a/services/test-swapper/Cargo.toml b/services/test-swapper/Cargo.toml index 160a94cb7..d55afb076 100644 --- a/services/test-swapper/Cargo.toml +++ b/services/test-swapper/Cargo.toml @@ -14,7 +14,7 @@ xous-api-susres = "0.9.59" xous-names = { package = "xous-api-names", version = "0.9.61" } log-server = { package = "xous-api-log", version = "0.1.59" } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } diff --git a/services/trng/Cargo.toml b/services/trng/Cargo.toml index 107052cb1..9c39f9042 100644 --- a/services/trng/Cargo.toml +++ b/services/trng/Cargo.toml @@ -19,7 +19,7 @@ rkyv = { version = "0.8.8", default-features = false, features = [ "std", "alloc", ] } -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" rand_core = "0.6.4" # the 0.6.4 API is necessary for compatibility with curve25519-dalek crates utralib = { version = "0.1.24", optional = true, default-features = false } diff --git a/services/tts/Cargo.toml b/services/tts/Cargo.toml index 659055356..c08b439d9 100644 --- a/services/tts/Cargo.toml +++ b/services/tts/Cargo.toml @@ -8,7 +8,7 @@ description = "Text to speech integration server" # Dependency versions enforced by Cargo.lock. [dependencies] xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } diff --git a/services/usb-device-xous/Cargo.toml b/services/usb-device-xous/Cargo.toml index 0dbd17f04..981bf5da5 100644 --- a/services/usb-device-xous/Cargo.toml +++ b/services/usb-device-xous/Cargo.toml @@ -8,7 +8,7 @@ description = "Xous USB device drivers" # Dependency versions enforced by Cargo.lock. [dependencies] xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log-server = { package = "xous-api-log", version = "0.1.59" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.59" } xous-names = { package = "xous-api-names", version = "0.9.61" } diff --git a/services/xous-log/Cargo.toml b/services/xous-log/Cargo.toml index a8af8fd45..4af1c385c 100644 --- a/services/xous-log/Cargo.toml +++ b/services/xous-log/Cargo.toml @@ -12,7 +12,7 @@ homepage = "https://betrusted.io/xous-book/" [dependencies] xous-api-log = { package = "xous-api-log", version = "0.1.59" } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } diff --git a/services/xous-names/Cargo.toml b/services/xous-names/Cargo.toml index e2db1509f..fd3fe168f 100644 --- a/services/xous-names/Cargo.toml +++ b/services/xous-names/Cargo.toml @@ -13,7 +13,7 @@ homepage = "https://betrusted.io/" xous-api-names = "0.9.61" log-server = { package = "xous-api-log", version = "0.1.59" } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } log = "0.4.14" diff --git a/services/xous-susres/Cargo.toml b/services/xous-susres/Cargo.toml index 431dbd9b7..5f9418860 100644 --- a/services/xous-susres/Cargo.toml +++ b/services/xous-susres/Cargo.toml @@ -14,7 +14,7 @@ xous-api-susres = "0.9.59" xous-names = { package = "xous-api-names", version = "0.9.61" } log-server = { package = "xous-api-log", version = "0.1.59" } xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" log = "0.4.14" num-derive = { version = "0.3.3", default-features = false } diff --git a/services/xous-swapper/Cargo.toml b/services/xous-swapper/Cargo.toml index f58c72f28..a1688ede3 100644 --- a/services/xous-swapper/Cargo.toml +++ b/services/xous-swapper/Cargo.toml @@ -13,7 +13,7 @@ homepage = "https://betrusted.io/" xous-api-names = "0.9.61" log-server = { package = "xous-api-log", version = "0.1.59" } xous = { version = "0.9.63", features = ["swap"] } -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" num-derive = { version = "0.3.3", default-features = false } num-traits = { version = "0.2.14", default-features = false } log = "0.4.14" diff --git a/services/xous-ticktimer/Cargo.toml b/services/xous-ticktimer/Cargo.toml index cc0061670..180b297a0 100644 --- a/services/xous-ticktimer/Cargo.toml +++ b/services/xous-ticktimer/Cargo.toml @@ -12,7 +12,7 @@ homepage = "https://betrusted.io/xous-book/" [dependencies] xous-api-ticktimer = "0.9.59" xous = "0.9.63" -xous-ipc = "0.9.63" +xous-ipc = "0.10.0" xous-names = { package = "xous-api-names", version = "0.9.61" } log-server = { package = "xous-api-log", version = "0.1.59" } susres = { package = "xous-api-susres", version = "0.9.59" } diff --git a/xous-ipc/Cargo.toml b/xous-ipc/Cargo.toml index a4cca5118..ac0a1a144 100644 --- a/xous-ipc/Cargo.toml +++ b/xous-ipc/Cargo.toml @@ -4,7 +4,7 @@ description = "System call interface for Xous" edition = "2018" license = "MIT OR Apache-2.0" name = "xous-ipc" -version = "0.9.63" +version = "0.10.0" repository = "https://github.com/betrusted-io/xous-core/" homepage = "https://betrusted.io/"