From 45bf0694fdc8d24159c7062f995dc08dc5e150f7 Mon Sep 17 00:00:00 2001 From: "developing-today[bot]" <5454422+developing-today[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 10:01:15 -0600 Subject: [PATCH] =?UTF-8?q?feat(id):=20add=20id-native-shell=20crate=20?= =?UTF-8?q?=E2=80=94=20F13.6=20step=201=20(design=20#788,=20#5542)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New isolated Bevy app package at pkgs/id/crates/id-native-shell: workspace member outside default-members, so the default id build stays Bevy-free (verified: cargo tree -p id contains no bevy). Step 1 scope per doc/2026-11-01_design_id788.md §7: identity/connection bootstrap reusing the CLI client key (id::CLIENT_KEY_FILE + id::load_or_create_keypair), F13.1 contract frame builders with the contract bounds enforced (paste <= 4096 bytes, resize 1..=500 x 1..=200), the view fallback rule (validated surface text projection, else legacy data), and a transcript fixture checked against the machine-readable shell contract. The binary boots on Bevy MinimalPlugins; window/render plugins and the live parity harness are step 2. Verified on laptop: cargo check -p id-native-shell; cargo test -p id-native-shell (9 passed: 7 unit + 2 transcript). --- pkgs/id/Cargo.lock | 1229 ++++++++++++++++- pkgs/id/Cargo.toml | 2 +- pkgs/id/crates/id-native-shell/Cargo.toml | 38 + pkgs/id/crates/id-native-shell/src/lib.rs | 238 ++++ pkgs/id/crates/id-native-shell/src/main.rs | 27 + .../tests/fixtures/transcript_step1.json | 10 + .../id-native-shell/tests/transcript.rs | 103 ++ 7 files changed, 1634 insertions(+), 13 deletions(-) create mode 100644 pkgs/id/crates/id-native-shell/Cargo.toml create mode 100644 pkgs/id/crates/id-native-shell/src/lib.rs create mode 100644 pkgs/id/crates/id-native-shell/src/main.rs create mode 100644 pkgs/id/crates/id-native-shell/tests/fixtures/transcript_step1.json create mode 100644 pkgs/id/crates/id-native-shell/tests/transcript.rs diff --git a/pkgs/id/Cargo.lock b/pkgs/id/Cargo.lock index f75c2c0e74..7373aa10aa 100644 --- a/pkgs/id/Cargo.lock +++ b/pkgs/id/Cargo.lock @@ -2,6 +2,12 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "accesskit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf203f9d3bd8f29f98833d1fbef628df18f759248a547e7e01cfbf63cda36a99" + [[package]] name = "acto" version = "0.8.2" @@ -11,7 +17,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "rustc_version", - "smol_str", + "smol_str 0.1.24", "sync_wrapper", "tokio", "tracing", @@ -144,6 +150,37 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" +[[package]] +name = "android-activity" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" +dependencies = [ + "android-properties", + "bitflags", + "cc", + "jni 0.22.4", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum", + "thiserror 2.0.21", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_log-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84521a3cf562bc62942e294181d9eef17eb38ceb8c68677bc49f144e4c3d4f8d" + [[package]] name = "android_system_properties" version = "0.1.6" @@ -209,6 +246,15 @@ version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + [[package]] name = "arbitrary" version = "1.5.0" @@ -281,6 +327,29 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "assert_type_match" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f548ad2c4031f2902e3edc1f29c29e835829437de49562d8eb5dc5584d3a1043" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "async-broadcast" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + [[package]] name = "async-channel" version = "2.5.0" @@ -305,6 +374,42 @@ dependencies = [ "tokio", ] +[[package]] +name = "async-executor" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f426a31126c735126297bc5ea7a521263c9faff4f63ca415267ee625651c4f37" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8034a681df4aed8b8edbd7fbe472401ecf009251c8b40556b304567052e294c5" +dependencies = [ + "async-lock", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-lock" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0876700b0d007ad25d5508865a4259c3af9af6d296bf663a0d586d0bc3369f6f" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + [[package]] name = "async-stream" version = "0.3.6" @@ -327,6 +432,15 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" +dependencies = [ + "portable-atomic", +] + [[package]] name = "async-trait" version = "0.1.92" @@ -363,6 +477,19 @@ name = "atomic-waker" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "atomicow" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301801c08259e328a1c7da556608c0c22687708831b22024dbd3a57ea741e6de" +dependencies = [ + "portable-atomic", + "portable-atomic-util", +] [[package]] name = "attohttpc" @@ -533,6 +660,588 @@ dependencies = [ "sha2 0.11.0", ] +[[package]] +name = "bevy" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76d3ee8652fe0577fd8a99054e147740850140d530be8e044a9be4e23a3e8a24" +dependencies = [ + "bevy_internal", +] + +[[package]] +name = "bevy_a11y" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6702a82db1b383641fc7c503451847cdafb57076c203cd3bfe549d3eeef474c3" +dependencies = [ + "accesskit", + "bevy_app", + "bevy_derive", + "bevy_ecs", + "bevy_reflect", +] + +[[package]] +name = "bevy_android" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42b2d9435e9fe8d7107bb795a6140277872ad5b992cb3934f8d28cfd11040f6f" +dependencies = [ + "android-activity", +] + +[[package]] +name = "bevy_app" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e4fc5dfe9d1d9b8233e1878353b5e66a3f5910c2131d3abf68f9a4116b2d433" +dependencies = [ + "bevy_derive", + "bevy_ecs", + "bevy_platform", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "cfg-if", + "console_error_panic_hook", + "ctrlc", + "downcast-rs", + "log", + "thiserror 2.0.21", + "variadics_please", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "bevy_asset" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357787dbfaba3f73fd185e15d6df70605bddaa774f2ebbcab1aaa031f21fb6c2" +dependencies = [ + "async-broadcast", + "async-fs", + "async-lock", + "atomicow", + "bevy_android", + "bevy_app", + "bevy_asset_macros", + "bevy_ecs", + "bevy_platform", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "bitflags", + "blake3", + "crossbeam-channel", + "derive_more", + "disqualified", + "downcast-rs", + "either", + "futures-io", + "futures-lite", + "js-sys", + "parking_lot", + "ron", + "serde", + "stackfuture", + "thiserror 2.0.21", + "tracing", + "uuid", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "bevy_asset_macros" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa09271d4ca0bf31fda3a9ad57273775d448a05c4046d9367f71d29968d85b4" +dependencies = [ + "bevy_macro_utils", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "bevy_camera" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8af1d5a57fde6e577e7b1db58996afb381618294be75a37b3070a20d309678b0" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_mesh", + "bevy_reflect", + "bevy_transform", + "bevy_utils", + "bevy_window", + "derive_more", + "downcast-rs", + "serde", + "smallvec", + "thiserror 2.0.21", + "wgpu-types", +] + +[[package]] +name = "bevy_color" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49504fac6b9897f03b4bdc0189c04ef1ba0a9b37926343aa520a71619e90e116" +dependencies = [ + "bevy_math", + "bevy_reflect", + "bytemuck", + "derive_more", + "encase", + "serde", + "thiserror 2.0.21", + "wgpu-types", +] + +[[package]] +name = "bevy_derive" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9396b256b366a43d7f61d1f230cdab0a512fb4712cbf7d688f3d6fce4c5ea8a" +dependencies = [ + "bevy_macro_utils", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "bevy_diagnostic" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cdb0ed0c8423570fbbb7c4fc2719a203dd40928fefff45f76ef0889685a446" +dependencies = [ + "atomic-waker", + "bevy_app", + "bevy_ecs", + "bevy_platform", + "bevy_tasks", + "bevy_time", + "const-fnv1a-hash", + "log", + "serde", +] + +[[package]] +name = "bevy_ecs" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7dd5229dd00d00e70ac6b2fc0a139961252f6ce07d3d268cfcac0da86d5bde4" +dependencies = [ + "arrayvec", + "bevy_ecs_macros", + "bevy_platform", + "bevy_ptr", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "bitflags", + "bumpalo", + "concurrent-queue", + "derive_more", + "fixedbitset", + "indexmap", + "log", + "nonmax", + "serde", + "slotmap", + "smallvec", + "thiserror 2.0.21", + "variadics_please", +] + +[[package]] +name = "bevy_ecs_macros" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4d83bdd2285af4867e76c691406e0a4b55611b583d0c45b6ac7bcec1b45fd48" +dependencies = [ + "bevy_macro_utils", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "bevy_image" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d546bbe2486bfa14971517e7ef427a9384749817c201d3afc60de0325cf52f11" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_ecs", + "bevy_math", + "bevy_platform", + "bevy_reflect", + "bevy_utils", + "bitflags", + "bytemuck", + "futures-lite", + "guillotiere", + "half", + "image", + "rectangle-pack", + "serde", + "thiserror 2.0.21", + "tracing", + "wgpu-types", +] + +[[package]] +name = "bevy_input" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca955b99f4dc2059e9c8574f8d95a5dd5002809fda80d062a94a553c571a467" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_math", + "bevy_platform", + "bevy_reflect", + "derive_more", + "log", + "smol_str 0.2.2", + "thiserror 2.0.21", +] + +[[package]] +name = "bevy_input_focus" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de4d1d0e833e31beba1f28a77152b35f946e8c45df364ec4969d58788ab9de7f" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_input", + "bevy_math", + "bevy_picking", + "bevy_reflect", + "bevy_window", + "log", + "thiserror 2.0.21", +] + +[[package]] +name = "bevy_internal" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f5e645f9e1a24c9667c768b6233beaf4e241739d8ca4fbba59435cc27aabad5" +dependencies = [ + "bevy_a11y", + "bevy_android", + "bevy_app", + "bevy_color", + "bevy_derive", + "bevy_diagnostic", + "bevy_ecs", + "bevy_input", + "bevy_input_focus", + "bevy_math", + "bevy_platform", + "bevy_ptr", + "bevy_reflect", + "bevy_state", + "bevy_tasks", + "bevy_time", + "bevy_transform", + "bevy_utils", + "bevy_window", +] + +[[package]] +name = "bevy_log" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a2d4ea086ac4663ab9dfb056c7b85eee39e18f7e3e9a4ae6e39897eaa155c5" +dependencies = [ + "android_log-sys", + "bevy_app", + "bevy_ecs", + "bevy_platform", + "bevy_utils", + "tracing", + "tracing-log", + "tracing-oslog", + "tracing-subscriber", + "tracing-wasm", +] + +[[package]] +name = "bevy_macro_utils" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62d984f9f8bd0f0d9fb020492a955e641e30e7a425f3588bf346cb3e61fec3c3" +dependencies = [ + "parking_lot", + "proc-macro2", + "quote", + "syn 2.0.119", + "toml_edit 0.23.10+spec-1.0.0", +] + +[[package]] +name = "bevy_math" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fa74ae5d968749cc073da991757d3c7e3504ac6dbaac5f8c2a54b9d19b0b7ed" +dependencies = [ + "approx", + "bevy_reflect", + "derive_more", + "glam", + "itertools 0.14.0", + "libm", + "rand 0.9.5", + "rand_distr", + "serde", + "smallvec", + "thiserror 2.0.21", + "variadics_please", +] + +[[package]] +name = "bevy_mesh" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9a0ea86abbd17655bc6f9f8d94461dfcd0322431f752fc03748df8b335eff2" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_mikktspace", + "bevy_platform", + "bevy_reflect", + "bevy_transform", + "bitflags", + "bytemuck", + "derive_more", + "hexasphere", + "thiserror 2.0.21", + "tracing", + "wgpu-types", +] + +[[package]] +name = "bevy_mikktspace" +version = "0.17.0-dev" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef8e4b7e61dfe7719bb03c884dc270cd46a82efb40f93e9933b990c5c190c59" + +[[package]] +name = "bevy_picking" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b371779713b40dea83b24cdb95054fe999fe8372351a317c4fb768859ac5f010" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_derive", + "bevy_ecs", + "bevy_input", + "bevy_math", + "bevy_platform", + "bevy_reflect", + "bevy_time", + "bevy_transform", + "bevy_window", + "tracing", + "uuid", +] + +[[package]] +name = "bevy_platform" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4691af6d7cfd1b5deb2fc926a43a180a546cdc3fe1e5a013fcee60db9bb2c81f" +dependencies = [ + "critical-section", + "foldhash 0.2.0", + "futures-channel", + "getrandom 0.3.4", + "hashbrown 0.16.1", + "js-sys", + "portable-atomic", + "portable-atomic-util", + "serde", + "spin 0.10.1", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-time", +] + +[[package]] +name = "bevy_ptr" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17d24d7906c7de556033168b3485de36c59049fbaef0c2c44c715a23e0329b10" + +[[package]] +name = "bevy_reflect" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5472b91928c0f3e4e3988c0d036b00719f19520f53a0c3f8c2af72f00e693c5" +dependencies = [ + "assert_type_match", + "bevy_platform", + "bevy_ptr", + "bevy_reflect_derive", + "bevy_utils", + "derive_more", + "disqualified", + "downcast-rs", + "erased-serde", + "foldhash 0.2.0", + "glam", + "inventory", + "serde", + "smallvec", + "smol_str 0.2.2", + "thiserror 2.0.21", + "uuid", + "variadics_please", + "wgpu-types", +] + +[[package]] +name = "bevy_reflect_derive" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "083784255162fa39960aa3cf3c23af0e515db2daa7f2e796ae34df993f4d3f6c" +dependencies = [ + "bevy_macro_utils", + "indexmap", + "proc-macro2", + "quote", + "syn 2.0.119", + "uuid", +] + +[[package]] +name = "bevy_state" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e8556a55d548844fc067fac6657b62f8073c94bd7e13c86aa7573f4c2a67b3" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_platform", + "bevy_reflect", + "bevy_state_macros", + "bevy_utils", + "log", + "variadics_please", +] + +[[package]] +name = "bevy_state_macros" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcda45913b1d6470c6b751656e72fb3f25ca6b5b7b2ee055b294aaed1eb7e5ba" +dependencies = [ + "bevy_macro_utils", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "bevy_tasks" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcbbfa5a58a16c4228434d3018c23fde3d78dcd76ec5f5b2b482a21f4b158dd3" +dependencies = [ + "async-channel", + "async-executor", + "async-task", + "atomic-waker", + "bevy_platform", + "crossbeam-queue", + "derive_more", + "futures-lite", + "heapless 0.8.0", + "pin-project", +] + +[[package]] +name = "bevy_time" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32835c3dbe082fbbe7d4f2f37f655073421f2882d4320ac2d59f922474260de4" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_platform", + "bevy_reflect", + "crossbeam-channel", + "log", + "serde", +] + +[[package]] +name = "bevy_transform" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b41fabfeaa53f51ff5ccf4d87e66836293159d50d21f6d3e16c93efb7c30f969" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_log", + "bevy_math", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "derive_more", + "serde", + "thiserror 2.0.21", +] + +[[package]] +name = "bevy_utils" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "789d04f88c764877a4552e07745b402dbc45f5d0545e6d102558f2f1752a1d89" +dependencies = [ + "bevy_platform", + "disqualified", + "thread_local", +] + +[[package]] +name = "bevy_window" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae54ec7a0fc344278592a688a01b57b32182abc3ca7d47040773c4cbc2e15e0" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_input", + "bevy_math", + "bevy_platform", + "bevy_reflect", + "log", + "raw-window-handle", + "serde", +] + [[package]] name = "binary-merge" version = "0.1.2" @@ -592,6 +1301,9 @@ name = "bitflags" version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" +dependencies = [ + "serde_core", +] [[package]] name = "blake2" @@ -652,6 +1364,19 @@ dependencies = [ "objc2", ] +[[package]] +name = "blocking" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a70e4329df6cb94385eed412ec92375c3cdd8a6e502493d1229b6414e4036dfa" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + [[package]] name = "blowfish" version = "0.10.0" @@ -695,12 +1420,38 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.8", +] + [[package]] name = "byteorder" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + [[package]] name = "bytes" version = "1.12.1" @@ -1001,8 +1752,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", + "portable-atomic", ] +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "const-fnv1a-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" + [[package]] name = "const-oid" version = "0.9.6" @@ -1015,12 +1783,36 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" +[[package]] +name = "const_panic" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9603f79528ece8163c496f8932121cb36cfe46259e9c907bb3d8205139d7caa3" +dependencies = [ + "typewit", +] + +[[package]] +name = "const_soft_float" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ca1caa64ef4ed453e68bb3db612e51cf1b2f5b871337f0fcab1c8f87cc3dff" + [[package]] name = "constant_time_eq" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" +[[package]] +name = "constgebra" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1aaf9b65849a68662ac6c0810c8893a765c960b907dd7cfab9c4a50bf764fbc" +dependencies = [ + "const_soft_float", +] + [[package]] name = "convert_case" version = "0.10.0" @@ -1293,6 +2085,24 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" +[[package]] +name = "crossbeam-channel" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e8bd762f7479489c70ed6c768ddca99d7296857de437a68dcb2a94365b3fae" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.23" @@ -1399,6 +2209,17 @@ dependencies = [ "cipher 0.5.2", ] +[[package]] +name = "ctrlc" +version = "3.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162" +dependencies = [ + "dispatch2", + "nix", + "windows-sys 0.61.2", +] + [[package]] name = "ctutils" version = "0.4.3" @@ -1644,6 +2465,12 @@ dependencies = [ "syn 3.0.8", ] +[[package]] +name = "disqualified" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e90a5dd66beeca277ae954f8055b02a712792b6b6b43f2bc2f92b0b7d8291614" + [[package]] name = "distributed-topic-tracker" version = "0.3.5" @@ -1690,6 +2517,12 @@ dependencies = [ "litrs", ] +[[package]] +name = "downcast-rs" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "117240f60069e65410b3ae1bb213295bd828f707b5bec6596a1afc8793ce0cbc" + [[package]] name = "dunce" version = "1.0.5" @@ -1835,10 +2668,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" [[package]] -name = "embedded-io" -version = "0.6.1" +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + +[[package]] +name = "encase" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02ba239319a4f60905966390f5e52799d868103a533bb7e27822792332504ddd" +dependencies = [ + "const_panic", + "encase_derive", + "thiserror 2.0.21", +] + +[[package]] +name = "encase_derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5223d6c647f09870553224f6e37261fe5567bc5a4f4cf13ed337476e79990f2f" +dependencies = [ + "encase_derive_impl", +] + +[[package]] +name = "encase_derive_impl" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" +checksum = "1796db3d892515842ca2dfb11124c4bb4a9e58d9f2c5c1072e5bca1b2334507b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] [[package]] name = "encoding_rs" @@ -1895,6 +2759,17 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +[[package]] +name = "erased-serde" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e59b668157f32d3459d4bd634861a06ffa2503a461ca5f0916b9f0252605e66" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + [[package]] name = "errno" version = "0.3.14" @@ -1911,6 +2786,15 @@ version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b5343afd4a8365a643ac588dab4cf234a190c7f6c88c9f6dd6ffe00837661b7" +[[package]] +name = "euclid" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06" +dependencies = [ + "num-traits", +] + [[package]] name = "event-listener" version = "5.4.2" @@ -2326,9 +3210,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi 5.3.0", "wasip2", + "wasm-bindgen", ] [[package]] @@ -2377,6 +3263,18 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "glam" +version = "0.30.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19fc433e8437a212d1b6f1e68c7824af3aed907da60afa994e7f542d18d12aa9" +dependencies = [ + "bytemuck", + "libm", + "rand 0.9.5", + "serde_core", +] + [[package]] name = "glob" version = "0.3.4" @@ -2417,6 +3315,16 @@ dependencies = [ "subtle", ] +[[package]] +name = "guillotiere" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62d5865c036cb1393e23c50693df631d3f5d7bcca4c04fe4cc0fd592e74a782" +dependencies = [ + "euclid", + "svg_fmt", +] + [[package]] name = "h2" version = "0.4.20" @@ -2456,6 +3364,15 @@ dependencies = [ "byteorder", ] +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + [[package]] name = "hashbrown" version = "0.14.5" @@ -2479,6 +3396,11 @@ name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "equivalent", + "serde", + "serde_core", +] [[package]] name = "hashbrown" @@ -2544,13 +3466,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" dependencies = [ "atomic-polyfill", - "hash32", + "hash32 0.2.1", "rustc_version", "serde", "spin 0.9.9", "stable_deref_trait", ] +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32 0.3.1", + "portable-atomic", + "stable_deref_trait", +] + [[package]] name = "heck" version = "0.5.0" @@ -2572,6 +3505,17 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e712f64ec3850b98572bffac52e2c6f282b29fe6c5fa6d42334b30be438d95c1" +[[package]] +name = "hexasphere" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29a164ceff4500f2a72b1d21beaa8aa8ad83aec2b641844c659b190cb3ea2e0b" +dependencies = [ + "constgebra", + "glam", + "tinyvec", +] + [[package]] name = "hickory-proto" version = "0.26.3" @@ -3038,6 +3982,17 @@ dependencies = [ "vt100", ] +[[package]] +name = "id-native-shell" +version = "0.1.0" +dependencies = [ + "anyhow", + "bevy", + "id", + "iroh", + "serde_json", +] + [[package]] name = "identity-hash" version = "0.1.0" @@ -3085,6 +4040,18 @@ dependencies = [ "xmltree", ] +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "moxcms", + "num-traits", +] + [[package]] name = "indexmap" version = "2.14.2" @@ -3125,6 +4092,15 @@ dependencies = [ "smallvec", ] +[[package]] +name = "inventory" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6928282826c822ad91bf1c9a1cb90a30ba1c26770749929b4656cd6be829cd7c" +dependencies = [ + "rustversion", +] + [[package]] name = "ipconfig" version = "0.3.4" @@ -4016,6 +4992,16 @@ dependencies = [ "num-traits", ] +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + [[package]] name = "multer" version = "3.1.0" @@ -4140,12 +5126,35 @@ dependencies = [ "n0-future", ] +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "thiserror 1.0.69", +] + [[package]] name = "ndk-context" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + [[package]] name = "nested_enum_utils" version = "0.2.3" @@ -4357,6 +5366,12 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nonmax" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51" + [[package]] name = "noq" version = "1.3.0" @@ -4474,6 +5489,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -5016,6 +6032,17 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +[[package]] +name = "piper" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + [[package]] name = "pkcs1" version = "0.8.0-rc.4" @@ -5139,6 +6166,15 @@ dependencies = [ "serde", ] +[[package]] +name = "portable-atomic-util" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" +dependencies = [ + "portable-atomic", +] + [[package]] name = "portmapper" version = "0.19.3" @@ -5187,7 +6223,7 @@ dependencies = [ "cobs", "embedded-io 0.4.0", "embedded-io 0.6.1", - "heapless", + "heapless 0.7.17", "postcard-derive", "serde", ] @@ -5279,7 +6315,7 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit", + "toml_edit 0.25.17+spec-1.1.0", ] [[package]] @@ -5388,6 +6424,12 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "pxfm" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" + [[package]] name = "qrcode" version = "0.14.1" @@ -5526,6 +6568,16 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" +[[package]] +name = "rand_distr" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463" +dependencies = [ + "num-traits", + "rand 0.9.5", +] + [[package]] name = "rand_pcg" version = "0.10.2" @@ -5557,6 +6609,12 @@ dependencies = [ "smallvec", ] +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + [[package]] name = "rcgen" version = "0.14.10" @@ -5571,6 +6629,12 @@ dependencies = [ "yasna", ] +[[package]] +name = "rectangle-pack" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d463f2884048e7153449a55166f91028d5b0ea53c79377099ce4e8cf0cf9bb" + [[package]] name = "redb" version = "3.1.3" @@ -5773,6 +6837,19 @@ dependencies = [ "serde", ] +[[package]] +name = "ron" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beceb6f7bf81c73e73aeef6dd1356d9a1b2b4909e1f0fc3e59b034f9572d7b7f" +dependencies = [ + "base64 0.22.1", + "bitflags", + "serde", + "serde_derive", + "unicode-ident", +] + [[package]] name = "rpassword" version = "7.5.4" @@ -6581,6 +7658,15 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" +[[package]] +name = "slotmap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" +dependencies = [ + "version_check", +] + [[package]] name = "smallvec" version = "1.16.3" @@ -6596,6 +7682,15 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fad6c857cbab2627dcf01ec85a623ca4e7dcb5691cbaa3d7fb7653671f0d09c9" +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + [[package]] name = "socket2" version = "0.6.5" @@ -6637,6 +7732,9 @@ name = "spin" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "023a211cb3138dbc438680b32560ad89f699977624c9f8dbb95a47d5b4c07dd3" +dependencies = [ + "portable-atomic", +] [[package]] name = "spki" @@ -6729,6 +7827,15 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +[[package]] +name = "stackfuture" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115beb9c69db2393ff10b75a1b8587a51716e5551d015001e55320ed279d32f9" +dependencies = [ + "const_panic", +] + [[package]] name = "strsim" version = "0.11.1" @@ -6762,6 +7869,12 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "svg_fmt" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0193cc4331cfd2f3d2011ef287590868599a2f33c3e69bc22c1a3d3acf9e02fb" + [[package]] name = "swarm-discovery" version = "0.6.4" @@ -7140,10 +8253,19 @@ dependencies = [ "indexmap", "serde_core", "serde_spanned", - "toml_datetime", + "toml_datetime 1.1.2+spec-1.1.0", "toml_parser", "toml_writer", - "winnow", + "winnow 1.0.4", +] + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", ] [[package]] @@ -7155,6 +8277,18 @@ dependencies = [ "serde_core", ] +[[package]] +name = "toml_edit" +version = "0.23.10+spec-1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +dependencies = [ + "indexmap", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "winnow 0.7.15", +] + [[package]] name = "toml_edit" version = "0.25.17+spec-1.1.0" @@ -7162,9 +8296,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c" dependencies = [ "indexmap", - "toml_datetime", + "toml_datetime 1.1.2+spec-1.1.0", "toml_parser", - "winnow", + "winnow 1.0.4", ] [[package]] @@ -7173,7 +8307,7 @@ version = "1.1.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" dependencies = [ - "winnow", + "winnow 1.0.4", ] [[package]] @@ -7298,6 +8432,18 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-oslog" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76902d2a8d5f9f55a81155c08971734071968c90f2d9bfe645fe700579b2950" +dependencies = [ + "cc", + "cfg-if", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "tracing-serde" version = "0.2.0" @@ -7329,6 +8475,17 @@ dependencies = [ "tracing-serde", ] +[[package]] +name = "tracing-wasm" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4575c663a174420fa2d78f4108ff68f65bf2fbb7dd89f33749b6e826b3626e07" +dependencies = [ + "tracing", + "tracing-subscriber", + "wasm-bindgen", +] + [[package]] name = "try-lock" version = "0.2.5" @@ -7357,12 +8514,24 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + [[package]] name = "typenum" version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" +[[package]] +name = "typewit" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "214ca0b2191785cbc06209b9ca1861e048e39b5ba33574b3cedd58363d5bb5f6" + [[package]] name = "unarray" version = "0.1.4" @@ -7495,6 +8664,7 @@ checksum = "7cc1186384beb7dd8eedea376413fd654937285ea6c9cfbb928dc3043ea4b606" dependencies = [ "getrandom 0.4.3", "js-sys", + "serde_core", "wasm-bindgen", ] @@ -7504,6 +8674,17 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" +[[package]] +name = "variadics_please" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b6d82be61465f97d42bd1d15bf20f3b0a3a0905018f38f9d6f6962055b0b5c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "vcpkg" version = "0.2.15" @@ -7934,6 +9115,21 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "wgpu-types" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca7a8d8af57c18f57d393601a1fb159ace8b2328f1b6b5f80893f7d672c9ae2" +dependencies = [ + "bitflags", + "bytemuck", + "js-sys", + "log", + "serde", + "thiserror 2.0.21", + "web-sys", +] + [[package]] name = "widestring" version = "1.2.1" @@ -8240,6 +9436,15 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + [[package]] name = "winnow" version = "1.0.4" diff --git a/pkgs/id/Cargo.toml b/pkgs/id/Cargo.toml index 53fc0e0eef..3b751f6c3a 100644 --- a/pkgs/id/Cargo.toml +++ b/pkgs/id/Cargo.toml @@ -16,7 +16,7 @@ categories = ["command-line-utilities", "network-programming"] # id-core sub-crate under crates/; this package is the workspace root. [workspace] -members = ["crates/id-core"] +members = ["crates/id-core", "crates/id-native-shell"] # The vendored crates stay OUT of the workspace: as path dependencies inside # this directory Cargo would otherwise treat them as members, and a member's # feature graph joins the lock resolve — p2panda-sync's `test_utils` feature diff --git a/pkgs/id/crates/id-native-shell/Cargo.toml b/pkgs/id/crates/id-native-shell/Cargo.toml new file mode 100644 index 0000000000..12eac26a05 --- /dev/null +++ b/pkgs/id/crates/id-native-shell/Cargo.toml @@ -0,0 +1,38 @@ +[package] +name = "id-native-shell" +version = "0.1.0" +edition = "2024" +rust-version = "1.96" +description = "Native reference shell for id (F13.6, design #788): a Bevy client speaking the F13.1 shell contract" +license = "MIT OR Apache-2.0" + +# F13.6 step 1 (design doc/2026-11-01_design_id788.md §7): this crate is a +# workspace member but deliberately NOT a default member, so the ordinary +# `id` build never acquires Bevy or desktop-platform dependencies. +# Step 1 wires the application/bootstrap and the contract seam only; +# window/render plugins (bevy_window/bevy_winit/bevy_render) land in +# step 2 together with their flake system-library wiring. + +[dependencies] +anyhow = "1" +bevy = { version = "0.17", default-features = false, features = ["std"] } +id = { path = "../..", default-features = false, features = ["world"] } +iroh = "1" +serde_json = "1" + +[lints.rust] +unsafe_code = "warn" +rust_2018_idioms = { level = "warn", priority = -1 } +rust_2024_compatibility = { level = "warn", priority = -1 } +missing_debug_implementations = "warn" +missing_docs = "warn" +trivial_casts = "warn" +trivial_numeric_casts = "warn" +unused_lifetimes = "warn" +unused_qualifications = "warn" + +[lints.clippy] +all = { level = "warn", priority = -1 } +pedantic = { level = "warn", priority = -1 } +nursery = { level = "warn", priority = -1 } +cargo = { level = "warn", priority = -1 } diff --git a/pkgs/id/crates/id-native-shell/src/lib.rs b/pkgs/id/crates/id-native-shell/src/lib.rs new file mode 100644 index 0000000000..baab5f2044 --- /dev/null +++ b/pkgs/id/crates/id-native-shell/src/lib.rs @@ -0,0 +1,238 @@ +//! Native reference shell for `id` — F13.6, design #788 +//! (`doc/2026-11-01_design_id788.md`). +//! +//! This crate is the Bevy reference client for the F13.1 shell contract +//! (`pkgs/id/contract/shell-contract.v1.json`). It is a client only: it +//! connects to a world host over the existing session protocol, renders +//! the host's `view` frames, and emits only the client frames the +//! contract already names (`input`, `paste`, `resize`, `chat`). It adds +//! no frame kinds, needs no host change, and — per the design's WIT +//! decision — no shell frame depends on the guest ABI (F12.8/#1065 is a +//! separate layer a shell never sees). +//! +//! Step 1 (this code) lands the isolated app package, the identity / +//! connection bootstrap, the contract frame builders, and the view +//! fallback rule, with a transcript fixture checked against the +//! machine-readable contract. Step 2 adds the window/render plugins and +//! the live contract-parity session harness. + +use id::world_presentation::WorldSurface; +use serde_json::{Value, json}; + +/// Shell-contract name this client speaks (F13.1). +pub const CONTRACT_NAME: &str = "shell"; +/// Shell-contract major version implemented by this crate. +pub const CONTRACT_VERSION: u64 = 1; + +/// Maximum `paste` payload in bytes (contract v1: `paste.text`). +pub const MAX_PASTE_BYTES: usize = 4096; +/// Maximum `resize` width in columns (contract v1: `resize.width`). +pub const MAX_RESIZE_WIDTH: u16 = 500; +/// Maximum `resize` height in rows (contract v1: `resize.height`). +pub const MAX_RESIZE_HEIGHT: u16 = 200; + +/// Why a client frame could not be built within the contract bounds. +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum FrameError { + /// Paste text exceeds the contract's per-frame byte bound. + PasteTooLarge { + /// Actual UTF-8 byte length of the rejected text. + bytes: usize, + }, + /// Resize dimensions fall outside the contract's bounds. + ResizeOutOfRange { + /// Requested width in columns. + width: u16, + /// Requested height in rows. + height: u16, + }, +} + +impl std::fmt::Display for FrameError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::PasteTooLarge { bytes } => { + write!( + f, + "paste of {bytes} bytes exceeds the {MAX_PASTE_BYTES}-byte contract bound" + ) + } + Self::ResizeOutOfRange { width, height } => { + write!( + f, + "resize {width}x{height} is outside the contract bounds (width 1..={MAX_RESIZE_WIDTH}, height 1..={MAX_RESIZE_HEIGHT})" + ) + } + } + } +} + +impl std::error::Error for FrameError {} + +/// Connection configuration for one shell session. +/// +/// The client identity is the CLI's own: the keypair lives in +/// [`id::CLIENT_KEY_FILE`] and is loaded (or created) through +/// [`id::load_or_create_keypair`], so the native shell never mints a +/// second identity or copies CLI key policy. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct ShellConfig { + /// World (routing) name to join. + pub world: String, + /// Client key file name, relative to the working directory. + pub key_file: String, +} + +impl ShellConfig { + /// Configuration for `world` using the standard client key file. + #[must_use] + pub fn new(world: impl Into) -> Self { + Self { + world: world.into(), + key_file: id::CLIENT_KEY_FILE.to_string(), + } + } +} + +/// Load (or create) this client's keypair via the shared `id` helper. +/// +/// # Errors +/// Propagates whatever [`id::load_or_create_keypair`] returns when the +/// key file cannot be read or created. +pub async fn load_client_key(config: &ShellConfig) -> anyhow::Result { + id::load_or_create_keypair(&config.key_file).await +} + +/// Build the contract `input` frame for raw key bytes. +/// +/// Bytes travel hex-encoded in `data_hex`, exactly as the terminal and +/// web shells send them. +#[must_use] +pub fn input_frame(bytes: &[u8]) -> Value { + let mut hex = String::with_capacity(bytes.len() * 2); + for byte in bytes { + hex.push_str(&format!("{byte:02x}")); + } + json!({ "type": "input", "data_hex": hex }) +} + +/// Build the contract `paste` frame for clipboard text. +/// +/// # Errors +/// [`FrameError::PasteTooLarge`] when `text` exceeds +/// [`MAX_PASTE_BYTES`] UTF-8 bytes; the contract delivers a paste as +/// one bounded durable event, never a stream of input frames. +pub fn paste_frame(text: &str) -> Result { + if text.len() > MAX_PASTE_BYTES { + return Err(FrameError::PasteTooLarge { bytes: text.len() }); + } + Ok(json!({ "type": "paste", "text": text })) +} + +/// Build the contract `resize` frame (ephemeral; never journaled). +/// +/// # Errors +/// [`FrameError::ResizeOutOfRange`] when a dimension is zero or above +/// the contract maximum. +pub fn resize_frame(width: u16, height: u16) -> Result { + if width == 0 || width > MAX_RESIZE_WIDTH || height == 0 || height > MAX_RESIZE_HEIGHT { + return Err(FrameError::ResizeOutOfRange { width, height }); + } + Ok(json!({ "type": "resize", "width": width, "height": height })) +} + +/// Build the contract `chat` frame. +#[must_use] +pub fn chat_frame(text: &str) -> Value { + json!({ "type": "chat", "text": text }) +} + +/// Decide what the presenter shows for one host `view` frame. +/// +/// The contract's fallback rule: a shell that has a validated typed +/// `surface` renders it; otherwise it renders the legacy `data` text. +/// Here the surface's own deterministic text projection stands in for +/// the rendered cells until step 2's renderer consumes the surface +/// directly — the projection is escape-free and never interprets +/// guest-provided markup. +#[must_use] +pub fn present(data: &str, surface: Option<&WorldSurface>) -> String { + match surface { + Some(surface) => surface.text_projection(), + None => data.to_string(), + } +} + +#[cfg(test)] +mod tests { + use super::*; + use id::world_presentation::parse_surface; + + #[test] + fn input_frame_hex_encodes_bytes() { + assert_eq!( + input_frame(b"a\x1b"), + json!({ "type": "input", "data_hex": "611b" }) + ); + assert_eq!(input_frame(b""), json!({ "type": "input", "data_hex": "" })); + } + + #[test] + fn paste_frame_enforces_contract_bound() { + assert_eq!( + paste_frame("hello").unwrap(), + json!({ "type": "paste", "text": "hello" }) + ); + let at_bound = "x".repeat(MAX_PASTE_BYTES); + assert!(paste_frame(&at_bound).is_ok()); + let over = "x".repeat(MAX_PASTE_BYTES + 1); + assert_eq!( + paste_frame(&over), + Err(FrameError::PasteTooLarge { + bytes: MAX_PASTE_BYTES + 1 + }) + ); + } + + #[test] + fn resize_frame_enforces_contract_bounds() { + assert_eq!( + resize_frame(80, 24).unwrap(), + json!({ "type": "resize", "width": 80, "height": 24 }) + ); + assert!(resize_frame(0, 24).is_err()); + assert!(resize_frame(80, 0).is_err()); + assert!(resize_frame(MAX_RESIZE_WIDTH + 1, 24).is_err()); + assert!(resize_frame(80, MAX_RESIZE_HEIGHT + 1).is_err()); + assert!(resize_frame(MAX_RESIZE_WIDTH, MAX_RESIZE_HEIGHT).is_ok()); + } + + #[test] + fn present_falls_back_to_data_without_surface() { + assert_eq!(present("legacy text", None), "legacy text"); + } + + #[test] + fn present_uses_text_surface_projection() { + let surface = parse_surface(r#"{"kind":"text","version":1,"lines":["line one"]}"#) + .unwrap() + .expect("text surface"); + assert_eq!(present("ignored data", Some(&surface)), "line one"); + } + + #[test] + fn present_uses_screen_surface_projection() { + let surface = + parse_surface(r#"{"kind":"screen","version":1,"width":2,"height":1,"rows":["hi"]}"#) + .unwrap() + .expect("screen surface"); + assert_eq!(present("ignored data", Some(&surface)), "hi"); + } + + #[test] + fn config_uses_cli_client_key_file() { + let config = ShellConfig::new("some-world"); + assert_eq!(config.key_file, id::CLIENT_KEY_FILE); + assert_eq!(config.world, "some-world"); + } +} diff --git a/pkgs/id/crates/id-native-shell/src/main.rs b/pkgs/id/crates/id-native-shell/src/main.rs new file mode 100644 index 0000000000..95f5f2b7e6 --- /dev/null +++ b/pkgs/id/crates/id-native-shell/src/main.rs @@ -0,0 +1,27 @@ +//! `id-native-shell` binary: the Bevy application target for F13.6. +//! +//! Step 1 keeps the app on [`MinimalPlugins`] (no window yet) so the +//! package builds and starts without desktop system libraries; the +//! window/render plugin set and the live session loop are step 2 of +//! design #788. What step 1 proves is the shape the design requires: +//! an isolated Bevy app target that boots on the shared client +//! identity and speaks only F13.1 contract frames (see the library +//! crate for the frame builders and view fallback). + +use bevy::prelude::{App, MinimalPlugins, Startup}; +use id_native_shell::{CONTRACT_NAME, CONTRACT_VERSION}; + +fn main() { + App::new() + .add_plugins(MinimalPlugins) + .add_systems(Startup, announce) + .run(); +} + +/// Announce the shell and the contract it speaks, once, at startup. +fn announce() { + println!( + "id-native-shell: F13.6 native reference shell; {CONTRACT_NAME} contract v{CONTRACT_VERSION}; \ + window/session wiring lands in design #788 step 2" + ); +} diff --git a/pkgs/id/crates/id-native-shell/tests/fixtures/transcript_step1.json b/pkgs/id/crates/id-native-shell/tests/fixtures/transcript_step1.json new file mode 100644 index 0000000000..4f19887e86 --- /dev/null +++ b/pkgs/id/crates/id-native-shell/tests/fixtures/transcript_step1.json @@ -0,0 +1,10 @@ +{ + "description": "Step-1 fixture for the F13.6 native shell: the client frames a contract-parity session sends (join handled by WorldClient in step 2) and one host view, in the shapes pkgs/id/contract/shell-contract.v1.json declares.", + "frames": [ + { "type": "resize", "width": 80, "height": 24 }, + { "type": "view", "sequence": 1, "data": "welcome to the world\n", "view_revision": 1 }, + { "type": "input", "data_hex": "6c6f6f6b0d" }, + { "type": "paste", "text": "a pasted line" }, + { "type": "chat", "text": "hello from the native shell" } + ] +} diff --git a/pkgs/id/crates/id-native-shell/tests/transcript.rs b/pkgs/id/crates/id-native-shell/tests/transcript.rs new file mode 100644 index 0000000000..200529ee46 --- /dev/null +++ b/pkgs/id/crates/id-native-shell/tests/transcript.rs @@ -0,0 +1,103 @@ +//! Transcript fixture check: the recorded client frames in +//! `tests/fixtures/transcript_step1.json` must match the shapes the +//! machine-readable F13.1 contract (`pkgs/id/contract/shell-contract.v1.json`) +//! declares — same frame kinds, same fields, values inside the +//! contract's bounds. This is the step-1 stand-in for the live +//! `id world contract --check` session harness (step 2). + +use serde_json::Value; +use std::collections::BTreeSet; +use std::path::PathBuf; + +fn read_json(relative: &str) -> Value { + let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(relative); + let text = + std::fs::read_to_string(&path).unwrap_or_else(|e| panic!("read {}: {e}", path.display())); + serde_json::from_str(&text).unwrap_or_else(|e| panic!("parse {}: {e}", path.display())) +} + +#[test] +fn transcript_frames_match_contract_shapes() { + let contract = read_json("../../contract/shell-contract.v1.json"); + let transcript = read_json("tests/fixtures/transcript_step1.json"); + let client_frames = contract["client_frames"] + .as_object() + .expect("contract client_frames"); + let server_frames = contract["server_frames"] + .as_object() + .expect("contract server_frames"); + + let frames = transcript["frames"].as_array().expect("transcript frames"); + assert!( + !frames.is_empty(), + "transcript must record at least one frame" + ); + for frame in frames { + let kind = frame["type"].as_str().expect("frame type"); + let spec = client_frames + .get(kind) + .or_else(|| server_frames.get(kind)) + .unwrap_or_else(|| panic!("frame kind {kind} is not a contract frame")); + let allowed: BTreeSet<&str> = spec["fields"] + .as_object() + .expect("contract fields") + .keys() + .map(String::as_str) + .collect(); + for key in frame.as_object().expect("frame object").keys() { + if key == "type" { + continue; + } + assert!( + allowed.contains(key.as_str()), + "frame {kind} carries field {key} the contract does not declare" + ); + } + // Bounds the contract states numerically must hold for recorded frames. + if kind == "paste" { + let max = spec["fields"]["text"]["max_bytes"] + .as_u64() + .expect("paste bound") as usize; + assert!(frame["text"].as_str().expect("paste text").len() <= max); + } + if kind == "resize" { + for field in ["width", "height"] { + let bound = &spec["fields"][field]; + let value = frame[field].as_u64().expect("resize value"); + assert!( + value >= bound["min"].as_u64().expect("min") + && value <= bound["max"].as_u64().expect("max") + ); + } + } + if kind == "input" { + let hex = frame["data_hex"].as_str().expect("input data_hex"); + assert!( + hex.len() % 2 == 0 && hex.chars().all(|c| c.is_ascii_hexdigit()), + "data_hex must be hex" + ); + } + } +} + +#[test] +fn transcript_records_a_view_with_data() { + let transcript = read_json("tests/fixtures/transcript_step1.json"); + let views: Vec<&Value> = transcript["frames"] + .as_array() + .expect("frames") + .iter() + .filter(|f| f["type"] == "view") + .collect(); + assert_eq!( + views.len(), + 1, + "step-1 transcript records exactly one host view" + ); + assert!( + views[0]["data"] + .as_str() + .expect("view data") + .contains("welcome") + ); +}