From b758e9dbf085cbb4dfb4045e88a57d18e37ec09c Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 22 May 2023 19:20:58 +0200 Subject: [PATCH] Update accesskit to 0.11 (#3012) * Update accesskit to 0.11 * Add instructions on how to test the web viewer to CONTRIBUTING.md Also removed dependency on `jq` Closes https://github.com/emilk/egui/issues/2859 --- ARCHITECTURE.md | 2 +- CONTRIBUTING.md | 9 ++++++++- Cargo.lock | 24 ++++++++++++------------ crates/egui-winit/Cargo.toml | 2 +- crates/egui/Cargo.toml | 2 +- scripts/build_demo_web.sh | 3 ++- scripts/start_server.sh | 4 ++-- 7 files changed, 27 insertions(+), 19 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 00386a97..71d2d1ae 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -1,7 +1,7 @@ # Architecture This document describes how the crates that make up egui are all connected. -Also see [`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md) for what to do before opening a PR. +Also see [`CONTRIBUTING.md`](CONTRIBUTING.md) for what to do before opening a PR. ## Crate overview diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ff84e3a5..28ff70d4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,7 +27,7 @@ If you are filing a bug, please provide a way to reproduce it. First file an issue (or find an existing one) and announce that you plan to work on something. That way we will avoid having several people doing double work. Please ask for feedback before you start working on something non-trivial! -Browse through [`ARCHITECTURE.md`](https://github.com/emilk/egui/blob/master/ARCHITECTURE.md) to get a sense of how all pieces connects. +Browse through [`ARCHITECTURE.md`](ARCHITECTURE.md) to get a sense of how all pieces connects. You can test your code locally by running `./scripts/check.sh`. @@ -50,6 +50,13 @@ I will add a link to it from the `egui` README.md so others can easily find it. Read the section on integrations at . +## Testing the web viewer +* Install some tools with `scripts/setup_web.sh` +* Build with `scripts/build_demo_web.sh` +* Host with `scripts/start_server.sh` +* Open + + ## Code Conventions Conventions unless otherwise specified: diff --git a/Cargo.lock b/Cargo.lock index 186a410b..795a0aa4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,9 +20,9 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "accesskit" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704d532b1cd3d912bb37499c55a81ac748cc1afa737eedd100ba441acdd47d38" +checksum = "02c98a5d094590335462354da402d754fe2cb78f0e6ce5024611c28ed539c1de" dependencies = [ "enumn", "serde", @@ -30,18 +30,18 @@ dependencies = [ [[package]] name = "accesskit_consumer" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba8b23cfca3944012ee2e5c71c02077a400e034c720eed6bd927cb6b4d1fd9" +checksum = "ca541e0fdb600916d196a940228df99b86d804fd2e6ef13894d7814f2799db43" dependencies = [ "accesskit", ] [[package]] name = "accesskit_macos" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58d062544d6cc36f4213323b7cb3a0d74ddff4b0d2311ab5e7596f4278bb2cc9" +checksum = "cfea17e5bb5dcbfcf5b256ab2f5889a3e6f6582de78b9db9b6689adad3b002f3" dependencies = [ "accesskit", "accesskit_consumer", @@ -51,9 +51,9 @@ dependencies = [ [[package]] name = "accesskit_unix" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f8df4021f31969877b295fa80c4b07fcc7eb83f1985b0d3aa4f889c3427c3d5" +checksum = "b4d1517421278cc8e67422d0786a18cf4291093ebe49eadf1cf989ff80e57f90" dependencies = [ "accesskit", "accesskit_consumer", @@ -66,9 +66,9 @@ dependencies = [ [[package]] name = "accesskit_windows" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf5b3c3828397ee832ba4a72fb1a4ace10f781e31885f774cbd531014059115" +checksum = "e11c7f177739f23bd19bb856e4a64fdd96eb8638ec0a6a6dde9a7019a9e91c53" dependencies = [ "accesskit", "accesskit_consumer", @@ -80,9 +80,9 @@ dependencies = [ [[package]] name = "accesskit_winit" -version = "0.12.4" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbcb615217efc79c4bed3094c4ca76c4bc554751d1da16f3ed4ba0459b1e8f31" +checksum = "3f741b54fba827e49a73d55fdd43e8d3d5133aa7710a48581013c7802f232b83" dependencies = [ "accesskit", "accesskit_macos", diff --git a/crates/egui-winit/Cargo.toml b/crates/egui-winit/Cargo.toml index 62343486..9b9c5b9f 100644 --- a/crates/egui-winit/Cargo.toml +++ b/crates/egui-winit/Cargo.toml @@ -63,7 +63,7 @@ raw-window-handle = "0.5.0" #! ### Optional dependencies # feature accesskit -accesskit_winit = { version = "0.12.0", optional = true } +accesskit_winit = { version = "0.14.0", optional = true } ## Enable this when generating docs. document-features = { version = "0.2", optional = true } diff --git a/crates/egui/Cargo.toml b/crates/egui/Cargo.toml index 65b9538f..a5659b24 100644 --- a/crates/egui/Cargo.toml +++ b/crates/egui/Cargo.toml @@ -73,7 +73,7 @@ nohash-hasher = "0.2" #! ### Optional dependencies ## Exposes detailed accessibility implementation required by platform ## accessibility APIs. Also requires support in the egui integration. -accesskit = { version = "0.10.1", optional = true } +accesskit = { version = "0.11", optional = true } ## Enable this when generating docs. document-features = { version = "0.2", optional = true } diff --git a/scripts/build_demo_web.sh b/scripts/build_demo_web.sh index 60892c44..d77279b7 100755 --- a/scripts/build_demo_web.sh +++ b/scripts/build_demo_web.sh @@ -85,7 +85,8 @@ echo "Building rust…" ) # Get the output directory (in the workspace it is in another location) -TARGET=`cargo metadata --format-version=1 | jq --raw-output .target_directory` +# TARGET=`cargo metadata --format-version=1 | jq --raw-output .target_directory` +TARGET="target" echo "Generating JS bindings for wasm…" TARGET_NAME="${CRATE_NAME}.wasm" diff --git a/scripts/start_server.sh b/scripts/start_server.sh index 3382c1b8..30b5a15e 100755 --- a/scripts/start_server.sh +++ b/scripts/start_server.sh @@ -14,5 +14,5 @@ cargo install basic-http-server echo "starting server…" echo "serving at http://localhost:${PORT}" -(cd docs && basic-http-server --addr 127.0.0.1:${PORT} .) -# (cd docs && python3 -m http.server ${PORT} --bind 127.0.0.1) +(cd docs && basic-http-server --addr 0.0.0.0:${PORT} .) +# (cd docs && python3 -m http.server ${PORT} --bind 0.0.0.0)