diff --git a/.cargo/config_ci.toml b/.cargo/config_ci.toml new file mode 100644 index 0000000..56db71c --- /dev/null +++ b/.cargo/config_ci.toml @@ -0,0 +1,70 @@ +# This config is used for the CI workflow. +# Feel free to also use it locally for fast builds if you have the required setup! + +[unstable] +codegen-backend = true + +[profile.dev] +codegen-backend = "cranelift" + +# Consider using llvm for this setting if you use tests that `#[should_panic]`, +# as cranelift only supports `panic = abort`. +# Since Foxtrot does not use `#[should_panic]` so far, we can use cranelift for speed increases. +[profile.dev.package."*"] +codegen-backend = "cranelift" + +# Disable cranelift for release profile +[profile.release] +codegen-backend = "llvm" + +# cranelift cannot build wasm32-unknown-unknown out of the box +[profile.web] +codegen-backend = "llvm" + +[profile.web.package."*"] +codegen-backend = "llvm" + +# Override the high opt-level from the dev profile for the test profile +[profile.test.package."*"] +opt-level = 1 + +[target.wasm32-unknown-unknown] +# Clang does not support wasm32-unknown-unknown, +# so it's hard to use a better linker. +# Note that Wasm already uses rust-lld by default. +rustflags = [ + "-Dwarnings", + "-Cdebuginfo=line-tables-only", + "--cfg", + "getrandom_backend=\"wasm_js\"", + # Nightly + "-Zshare-generics=y", + "-Zthreads=0", +] +rustdocflags = [ + "-Dwarnings", + # Nightly + "-Zshare-generics=y", + "-Zthreads=0", +] + + +[target.x86_64-unknown-linux-gnu] +linker = "clang" +rustflags = [ + "-Dwarnings", + "-Cdebuginfo=line-tables-only", + # Faster linker + "-Clink-arg=--ld-path=wild", + # Nightly + "-Zshare-generics=y", + "-Zthreads=0", +] +rustdocflags = [ + "-Dwarnings", + # Faster linker + "-Clink-arg=--ld-path=wild", + # Nightly + "-Zshare-generics=y", + "-Zthreads=0", +] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4890f6e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,197 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + # Use the same Rust toolchain across jobs so they can share a cache. + toolchain: nightly-2026-01-22 + +jobs: + # Run tests. + test: + name: Tests + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + components: rustc-codegen-cranelift-preview + toolchain: ${{ env.toolchain }} + + - name: Set LD_LIBRARY_PATH + id: ld_library_path + run: | + # Setting LD_LIBRARY_PATH is a workaround for . + echo "LD_LIBRARY_PATH=$(rustc --print target-libdir)" >> $GITHUB_ENV + + - name: Populate target directory from cache + uses: Swatinem/rust-cache@v2 + with: + save-if: ${{ github.ref == 'refs/heads/main' }} + cache-directories: ${{ env.LD_LIBRARY_PATH }} + + - name: Install dependencies + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev + + - name: Active CI cargo config + run: mv .cargo/config_ci.toml .cargo/config.toml + + - name: Install cargo binstall + uses: cargo-bins/cargo-binstall@main + + - name: Install Wild + run: cargo binstall wild-linker --locked --force + + - name: Install nextest + run: cargo binstall cargo-nextest --locked --force + + - name: Run tests + run: cargo nextest run --locked --workspace --all-targets --no-fail-fast --no-tests warn + + # Running doc tests separately is a workaround for . + - name: Run doctests + run: cargo test --locked --workspace --doc + + # Run clippy lints. + clippy: + name: Clippy + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + components: clippy, rustc-codegen-cranelift-preview + toolchain: ${{ env.toolchain }} + + - name: Active CI cargo config + run: mv .cargo/config_ci.toml .cargo/config.toml + + - name: Install cargo binstall + uses: cargo-bins/cargo-binstall@main + + - name: Install Wild + run: cargo binstall wild-linker --locked --force + + - name: Install dependencies + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev + + - name: Populate target directory from cache + uses: Swatinem/rust-cache@v2 + with: + save-if: false + shared-key: lints + + - name: Run clippy lints + run: cargo clippy --locked --workspace --all-targets -- --deny warnings + + # Check formatting. + format: + name: Format + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + components: rustfmt + toolchain: ${{ env.toolchain }} + + - name: Run cargo fmt + run: cargo fmt --all -- --check + + # Check documentation. + doc: + name: Docs + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + components: rustc-codegen-cranelift-preview + toolchain: ${{ env.toolchain }} + + - name: Active CI cargo config + run: mv .cargo/config_ci.toml .cargo/config.toml + + - name: Install cargo binstall + uses: cargo-bins/cargo-binstall@main + + - name: Install Wild + run: cargo binstall wild-linker --locked --force + + - name: Install dependencies + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev + + - name: Populate target directory from cache + uses: Swatinem/rust-cache@v2 + with: + save-if: false + shared-key: lints + + - name: Check documentation + run: cargo doc --locked --workspace --document-private-items --no-deps + + # Run Bevy lints. + bevy-lint: + name: Bevy linter + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + components: rustc-codegen-cranelift-preview, rustc-dev, llvm-tools-preview + toolchain: ${{ env.toolchain }} + + - name: Install dependencies + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev + + - name: Populate target directory from cache + uses: Swatinem/rust-cache@v2 + with: + save-if: ${{ github.ref == 'refs/heads/main' }} + shared-key: lints + + - name: Install Bevy linter + run: cargo install --git https://github.com/TheBevyFlock/bevy_cli --locked bevy_lint + + - name: Add cranelift to rustc + run: rustup component add rustc-codegen-cranelift-preview --toolchain ${{ env.toolchain }} + + - name: Active CI cargo config + run: mv .cargo/config_ci.toml .cargo/config.toml + + - name: Install cargo binstall + uses: cargo-bins/cargo-binstall@main + + - name: Install Wild + run: cargo binstall wild-linker --locked --force + + - name: Run Bevy linter + run: bevy_lint --locked --workspace --all-targets diff --git a/Cargo.lock b/Cargo.lock index f541458..add331c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -314,26 +314,20 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "beef" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" - [[package]] name = "bevy" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "342f7e9335416dc98642d5747c4ed8a6ad9f7244a36d5b2b7a1b7910e4d8f524" +checksum = "ec689b5a79452b6f777b889bbff22d3216b82a8d2ab7814d4a0eb571e9938d97" dependencies = [ "bevy_internal", ] [[package]] name = "bevy_a11y" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3917cd35096fb2fe176632740b68a4b53cb61006cfff13d66ef47ee2c2478d53" +checksum = "ef69b6d2dec07cbf407c63f6987e1746e4b735a9beea51f4bfc25ad49e344f75" dependencies = [ "accesskit", "bevy_app", @@ -344,18 +338,18 @@ dependencies = [ [[package]] name = "bevy_android" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a9dd9488c77fa2ea31b5da2f978aab7f1cc82e6d2c3be0adf637d9fd7cb6c8" +checksum = "008133458cfe0d43a8870bfc4c5a729467cc5d9246611462add38bcf45ed896f" dependencies = [ "android-activity", ] [[package]] name = "bevy_animation" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d2eadb9c20d87ab3a5528a8df483492d5b8102d3f2d61c7b1ed23f40a79166" +checksum = "13c852457843456c695ed22562969c83c3823454c3c40d359f92415371208ee7" dependencies = [ "bevy_animation_macros", "bevy_app", @@ -386,9 +380,9 @@ dependencies = [ [[package]] name = "bevy_animation_macros" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aec80b84926f730f6df81b9bc07255c120f57aaf7ac577f38d12dd8e1a0268ad" +checksum = "ac120bfd5a74e05f96013817d28318dc716afaa68864af069c7ffc3ccaf9d153" dependencies = [ "bevy_macro_utils", "quote", @@ -397,9 +391,9 @@ dependencies = [ [[package]] name = "bevy_anti_alias" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c1adb85fe0956d6c3b6f90777b829785bb7e29a48f58febeeefd2bad317713" +checksum = "b418087f7c36a62c9886b55be6278e7b3d21c9943b107953aa2068000956a736" dependencies = [ "bevy_app", "bevy_asset", @@ -419,9 +413,9 @@ dependencies = [ [[package]] name = "bevy_app" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f582409b4ed3850d9b66ee94e71a0e2c20e7068121d372530060c4dfcba66fa" +checksum = "2271a0123a7cc355c3fe98754360c75aa84b29f2a6b1a9f8c00aac427570d174" dependencies = [ "bevy_derive", "bevy_ecs", @@ -442,17 +436,19 @@ dependencies = [ [[package]] name = "bevy_asset" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e6ee42e74a64a46ab91bd1c0155f8abe5b732bdb948a9b26e541456cc7940e5" +checksum = "b1f7361669d1426a3359cb92f890ef9c62bd6e6b67f0190d2c5279d25ce24168" dependencies = [ "async-broadcast", + "async-channel", "async-fs", "async-lock", "atomicow", "bevy_android", "bevy_app", "bevy_asset_macros", + "bevy_diagnostic", "bevy_ecs", "bevy_platform", "bevy_reflect", @@ -467,8 +463,8 @@ dependencies = [ "either", "futures-io", "futures-lite", + "futures-util", "js-sys", - "parking_lot", "ron", "serde", "stackfuture", @@ -482,9 +478,9 @@ dependencies = [ [[package]] name = "bevy_asset_macros" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d03711d2c087227f64ba85dd38a99d4d6893f80d2475c2e77fb90a883760a055" +checksum = "288e1edf17069afe2e02a0c0e7e5936b3d22a67c7d2dc9201a27e4451875f909" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -494,9 +490,9 @@ dependencies = [ [[package]] name = "bevy_audio" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83620c82f281848c02ed4b65133a0364512b4eca2b39cd21a171e50e2986d89" +checksum = "e3cbecfc6c5d3860f224f56d3152b14aa313168d35c16e847f5a0202a992c3af" dependencies = [ "bevy_app", "bevy_asset", @@ -512,9 +508,9 @@ dependencies = [ [[package]] name = "bevy_camera" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b70d79ccbd8bfefc79f33a104dfd82ae2f5276ce04d6df75787bfa3edc4c4c1a" +checksum = "48c7e1f2a5da1755cd58e45c762f4ea2d72cef6c480f9c8ddbadbd2a4380c616" dependencies = [ "bevy_app", "bevy_asset", @@ -538,9 +534,9 @@ dependencies = [ [[package]] name = "bevy_color" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94dc78477c1c208c0cd221c64e907aba8ba165f39bebb72adc6180e1a13e8938" +checksum = "74727302424d7ffc23528a974dbb44a34708662926e1a3bfc5040493f858886e" dependencies = [ "bevy_math", "bevy_reflect", @@ -554,15 +550,16 @@ dependencies = [ [[package]] name = "bevy_core_pipeline" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c866a2fe33ec27a612d883223d30f1857aa852766b21a9603628735dace632f" +checksum = "a9e6bf0ba878bb5dd00ad4d70875b08eb11367829668c70d95785f5483ddb1cb" dependencies = [ "bevy_app", "bevy_asset", "bevy_camera", "bevy_color", "bevy_derive", + "bevy_diagnostic", "bevy_ecs", "bevy_image", "bevy_math", @@ -583,20 +580,49 @@ dependencies = [ [[package]] name = "bevy_derive" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8c733807158f8fcac68e23222e69ed91a6492ae9410fc2c145b9bb182cfd63e" +checksum = "70b6a05c31f54c83d681f1b8699bbaf581f06b25a40c9a6bb815625f731f5ba9" dependencies = [ "bevy_macro_utils", "quote", "syn", ] +[[package]] +name = "bevy_dev_tools" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3183daa165acce210c50c170c47433c90b1d55932ead9734ebca14b7cd242c4" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_diagnostic", + "bevy_ecs", + "bevy_image", + "bevy_input", + "bevy_math", + "bevy_picking", + "bevy_reflect", + "bevy_render", + "bevy_shader", + "bevy_state", + "bevy_text", + "bevy_time", + "bevy_transform", + "bevy_ui", + "bevy_ui_render", + "bevy_window", + "tracing", +] + [[package]] name = "bevy_diagnostic" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12fa32312818c08aa4035bebe9fb3f62aaf7efae33688e718dd6ee6c0147493" +checksum = "aca4caa8a9014a435dca382b1bdebaee4363e9be69882c598fc4ff4d7cd56e6a" dependencies = [ "atomic-waker", "bevy_app", @@ -612,9 +638,9 @@ dependencies = [ [[package]] name = "bevy_ecs" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d929d32190cfcde6efd2df493601c4dbc18a691fd9775a544c951c3c112e1a" +checksum = "24637a7c8643cab493f4085cda6bde4895f0e0816699c59006f18819da2ca0b8" dependencies = [ "arrayvec", "bevy_ecs_macros", @@ -640,9 +666,9 @@ dependencies = [ [[package]] name = "bevy_ecs_macros" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eeddfb80a2e000663e87be9229c26b4da92bddbc06c8776bc0d1f4a7f679079" +checksum = "6eb14c18ca71e11c69fbae873c2db129064efac6d52e48d0127d37bfba1acfa8" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -652,9 +678,9 @@ dependencies = [ [[package]] name = "bevy_encase_derive" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7449e5903594a00f007732ba232af0c527ad4e6e3d29bc3e195ec78dbd20c8b2" +checksum = "0f89146a8fcbfe47310fc929ee762dd3b08d4de3e3371c601529cfa8eeb861de" dependencies = [ "bevy_macro_utils", "encase_derive_impl", @@ -662,9 +688,9 @@ dependencies = [ [[package]] name = "bevy_gilrs" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28ff35087f25406006338e6d57f31f313a60f3a5e09990ab7c7b5203b0b55077" +checksum = "6c76417261ff3cd7ecda532b58514224aee06e76fbd87636c3a80695be7c8192" dependencies = [ "bevy_app", "bevy_ecs", @@ -678,50 +704,67 @@ dependencies = [ [[package]] name = "bevy_gizmos" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d3f174faa13041634060dd99f6f59c29997fd62f40252f0466c2ebea8603d4d" +checksum = "bc78a5699580c2dce078f4c099028d26525a5a38e8eb587a31854c660a3c5ff7" dependencies = [ "bevy_app", "bevy_asset", "bevy_camera", "bevy_color", - "bevy_core_pipeline", "bevy_ecs", "bevy_gizmos_macros", - "bevy_image", "bevy_light", "bevy_math", - "bevy_mesh", - "bevy_pbr", "bevy_reflect", - "bevy_render", - "bevy_shader", - "bevy_sprite_render", "bevy_time", "bevy_transform", "bevy_utils", - "bytemuck", - "tracing", ] [[package]] name = "bevy_gizmos_macros" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714273aa7f285c0aaa874b7fbe37fe4e6e45355e3e6f3321aefa1b78cda259e0" +checksum = "60bb92e0ef80ff7c59429133244765515db3d313fae77ee67ffe94dab5b2725d" dependencies = [ "bevy_macro_utils", "quote", "syn", ] +[[package]] +name = "bevy_gizmos_render" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fde3172a31f81033b4f497dd9df84476f527fadb00936ede380fb646c402eb" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_core_pipeline", + "bevy_ecs", + "bevy_gizmos", + "bevy_image", + "bevy_math", + "bevy_mesh", + "bevy_pbr", + "bevy_render", + "bevy_shader", + "bevy_sprite_render", + "bevy_transform", + "bevy_utils", + "bytemuck", + "tracing", +] + [[package]] name = "bevy_gltf" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d67e954b20551818f7cdb33f169ab4db64506ada66eb4d60d3cb8861103411" +checksum = "08372f222676dba313061fc71128209b82f9711e7c5cba222b5c34bf1c5c70fe" dependencies = [ + "async-lock", "base64", "bevy_animation", "bevy_app", @@ -753,9 +796,9 @@ dependencies = [ [[package]] name = "bevy_image" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168de8239b2aedd2eeef9f76ae1909b2fdf859b11dcdb4d4d01b93f5f2c771be" +checksum = "809101ebe678a76c4c5ba3ecad255cde9be3ae0af591cf0143ba2c157afb55e9" dependencies = [ "bevy_app", "bevy_asset", @@ -782,9 +825,9 @@ dependencies = [ [[package]] name = "bevy_input" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf4074b2d0d6680b4deb308ded7b4e8b1b99181c0502e2632e78af815b26f01" +checksum = "9c2853993baf27b963a417d3603a73e02e39c5041913cd1ba7211b0a3037b191" dependencies = [ "bevy_app", "bevy_ecs", @@ -799,9 +842,9 @@ dependencies = [ [[package]] name = "bevy_input_focus" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70761eba0f616a1caa761457bff2b8ae80c9916f39d167fab8c2d5c98d2b8951" +checksum = "05fc0fae5e4e081180f7f7bf8023a2b97dad13dcb5fa79eba50cda5bb95699a9" dependencies = [ "bevy_app", "bevy_ecs", @@ -816,9 +859,9 @@ dependencies = [ [[package]] name = "bevy_internal" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43985739584f3a5d43026aa1edd772f064830be46c497518f05f7dfbc886bba" +checksum = "57463815630ea71221c0b8e7bff72d816a3071a89507c45f9e2686fbb5e1956b" dependencies = [ "bevy_a11y", "bevy_android", @@ -831,10 +874,12 @@ dependencies = [ "bevy_color", "bevy_core_pipeline", "bevy_derive", + "bevy_dev_tools", "bevy_diagnostic", "bevy_ecs", "bevy_gilrs", "bevy_gizmos", + "bevy_gizmos_render", "bevy_gltf", "bevy_image", "bevy_input", @@ -868,9 +913,9 @@ dependencies = [ [[package]] name = "bevy_light" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad00ab66d1e93edb928be66606a71066f3b1cbc9f414720e290ef5361eb6237" +checksum = "4f9968b8f8a6a766a88b66144474c39d1415edc277d042fec1526eae85e1f8b4" dependencies = [ "bevy_app", "bevy_asset", @@ -889,9 +934,9 @@ dependencies = [ [[package]] name = "bevy_log" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae217a035714a37b779487f82edc4c7c1223f7088d7ad94054f29f524d61c51" +checksum = "406304a9b867a2de98c3edf0cc9e5a608fad1a1ddc567e15e72c186a8273ef51" dependencies = [ "android_log-sys", "bevy_app", @@ -907,11 +952,10 @@ dependencies = [ [[package]] name = "bevy_macro_utils" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17dbc3f8948da58b3c17767d20fd3cd35fe4721ed19a9a3204a6f1d6c9951bdd" +checksum = "0b7272fca0bf30d8ca2571a803598856104b63e5c596d52850f811ed37c5e1e3" dependencies = [ - "parking_lot", "proc-macro2", "quote", "syn", @@ -920,11 +964,12 @@ dependencies = [ [[package]] name = "bevy_math" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a41e368ffa95ae2a353197d1ae3993f4d3d471444d80b65c932db667ea7b9e" +checksum = "6a815c514b8a6f7b11508cdc8b3a4bf0761e96a14227af40aa93cb1160989ce0" dependencies = [ "approx", + "arrayvec", "bevy_reflect", "derive_more", "glam", @@ -933,16 +978,15 @@ dependencies = [ "rand", "rand_distr", "serde", - "smallvec", "thiserror 2.0.17", "variadics_please", ] [[package]] name = "bevy_mesh" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6255244b71153b305fddb4e6f827cb97ed51f276b6e632f5fc46538647948f6" +checksum = "aacf09d0ffd1a15baf8d201c4a34b918912a506395c2817aa55ab3d3776c09f2" dependencies = [ "bevy_app", "bevy_asset", @@ -980,9 +1024,9 @@ dependencies = [ [[package]] name = "bevy_pbr" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf8c76337a6ae9d73d50be168aeee974d05fdeda9129a413eaff719e3b7b5fea" +checksum = "69cc361c65035f7e531b592d99bce95b6ab3f643cae2abe97dfa7681363159a6" dependencies = [ "bevy_app", "bevy_asset", @@ -994,6 +1038,7 @@ dependencies = [ "bevy_ecs", "bevy_image", "bevy_light", + "bevy_log", "bevy_math", "bevy_mesh", "bevy_platform", @@ -1016,9 +1061,9 @@ dependencies = [ [[package]] name = "bevy_picking" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a232a8ea4dc9b83c08226f56b868acb1ead06946a95d8b9c8cbbcc860cd8090" +checksum = "e4d10bb2a776087e1d8a9b87e8deb091d25bcedbe6160c613df2dc5fe069c3c5" dependencies = [ "bevy_app", "bevy_asset", @@ -1040,15 +1085,14 @@ dependencies = [ [[package]] name = "bevy_platform" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10cf8cda162688c95250e74cffaa1c3a04597f105d4ca35554106f107308ea57" +checksum = "9b29ea749a8e85f98186ab662f607b885b97c804bb14cdb0cdf838164496d474" dependencies = [ "critical-section", "foldhash 0.2.0", "futures-channel", - "getrandom", - "hashbrown 0.16.0", + "hashbrown 0.16.1", "js-sys", "portable-atomic", "portable-atomic-util", @@ -1061,9 +1105,9 @@ dependencies = [ [[package]] name = "bevy_post_process" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26ee8ab6043f8bbe43e9c16bbdde0c5e7289b99e62cd8aad1a2a4166a7f2bce6" +checksum = "e8e1116cbc35637f267a29c7d2fe376e020f2b4402d6b525d328bae9c10460c7" dependencies = [ "bevy_app", "bevy_asset", @@ -1091,15 +1135,15 @@ dependencies = [ [[package]] name = "bevy_ptr" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28ab4074e7b781bab84e9b0a41ede245d673d1f75646ce0db27643aedcfb3a85" +checksum = "4f98cbc6d34bbdb58240b72ed1731931b4991a893b3a3238bb7c42ae054aa676" [[package]] name = "bevy_reflect" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "333df3f5947b7e62728eb5c0b51d679716b16c7c5283118fed4563f13230954e" +checksum = "2b2a977e2b8dba65b6e9c11039c5f9ef108be428f036b3d1cac13ad86ec59f9c" dependencies = [ "assert_type_match", "bevy_platform", @@ -1112,6 +1156,7 @@ dependencies = [ "erased-serde", "foldhash 0.2.0", "glam", + "indexmap", "inventory", "petgraph", "serde", @@ -1125,9 +1170,9 @@ dependencies = [ [[package]] name = "bevy_reflect_derive" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0205dce9c5a4d8d041b263bcfd96e9d9d6f3d49416e12db347ab5778b3071fe1" +checksum = "067af30072b1611fda1a577f1cb678b8ea2c9226133068be808dd49aac30cef0" dependencies = [ "bevy_macro_utils", "indexmap", @@ -1139,9 +1184,9 @@ dependencies = [ [[package]] name = "bevy_render" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d6a5d47ebb247e4ecaaf4a3b0310b7c518728ff2362c69f4220d0d3228e17d" +checksum = "d6b2c9a276646bde8ba58a7e15711b459fb4a5cdf46c47059b7a310f97a70d9c" dependencies = [ "async-channel", "bevy_app", @@ -1170,6 +1215,7 @@ dependencies = [ "downcast-rs 2.0.2", "encase", "fixedbitset", + "glam", "image", "indexmap", "js-sys", @@ -1188,9 +1234,9 @@ dependencies = [ [[package]] name = "bevy_render_macros" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e8b553adf0a4f9f059c5c2dcb52d9ac09abede1c322a92b43b9f4bb11c3843" +checksum = "03e16b8cac95b87021399ed19f6ab79c0b1e03101a448e3a0240934f78f66a56" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -1200,9 +1246,9 @@ dependencies = [ [[package]] name = "bevy_scene" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e601ffeebbdaba1193f823dbdc9fc8787a24cf83225a72fee4def5c27a18778a" +checksum = "0046bb071ee358619f2fa9409ccced47375502b098b4107ec3385f3a1acf6600" dependencies = [ "bevy_app", "bevy_asset", @@ -1214,6 +1260,7 @@ dependencies = [ "bevy_transform", "bevy_utils", "derive_more", + "ron", "serde", "thiserror 2.0.17", "uuid", @@ -1221,9 +1268,9 @@ dependencies = [ [[package]] name = "bevy_shader" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cef8f8e53776d286eb62bb60164f30671f07005ff407e94ec1176e9426d1477" +checksum = "4a14cb0991b2482a66b94728cbcf7482d1b74364be017197396435d3d542b8d3" dependencies = [ "bevy_asset", "bevy_platform", @@ -1238,9 +1285,9 @@ dependencies = [ [[package]] name = "bevy_sprite" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74bb52fa52caa1cc8d95acf45e52efc0c72b59755c2f0801a30fdab367921db0" +checksum = "b2b3921ce1a8ce801c29d9552cbc204548bfeb16b9b829045c9e82b5917d99cc" dependencies = [ "bevy_app", "bevy_asset", @@ -1263,9 +1310,9 @@ dependencies = [ [[package]] name = "bevy_sprite_render" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31bb90a9139b04568bd30b2492ba61234092d95a7f7e3c84b55369b16d7e261b" +checksum = "ed40642fa0e1330df65b6a1bf0b14aa32fcd9d7f3306e08e0784c10362bd6265" dependencies = [ "bevy_app", "bevy_asset", @@ -1295,9 +1342,9 @@ dependencies = [ [[package]] name = "bevy_state" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4e955f36cdc7b31556e4619a653dcf65d46967d90d36fb788f746c8e89257e" +checksum = "9453325ca0c185a043f4515158daa15a8ab19139a60fd1edaf87fbe896cb7f83" dependencies = [ "bevy_app", "bevy_ecs", @@ -1311,9 +1358,9 @@ dependencies = [ [[package]] name = "bevy_state_macros" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c3e4e32b1b96585740a2b447661af7db1b9d688db5e4d96da50461cd8f5ce63" +checksum = "d733081e57e49b3c43bdf3766d1de74c7df32e0f4db20c20437c85b1d18908de" dependencies = [ "bevy_macro_utils", "quote", @@ -1322,9 +1369,9 @@ dependencies = [ [[package]] name = "bevy_tasks" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18839182775f30d26f0f84d9de85d25361bb593c99517a80b64ede6cbaf41adc" +checksum = "990ffedd374dd2c4fe8f0fd4bcefd5617d1ee59164b6c3fcc356a69b48e26e8e" dependencies = [ "async-channel", "async-executor", @@ -1341,9 +1388,9 @@ dependencies = [ [[package]] name = "bevy_text" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc1b759cf2ed8992132bd541ebb9ffcfa777d2faf3596d418fb25984bc6677d8" +checksum = "ecbb6eeaa9a63d1f8aae8c0d79f8d5e14c584a962a4ef9f69115fd7d10941101" dependencies = [ "bevy_app", "bevy_asset", @@ -1367,9 +1414,9 @@ dependencies = [ [[package]] name = "bevy_time" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a52edd3d30ed94074f646ba1c9914e407af9abe5b6fb7a4322c855341a536cc" +checksum = "e4c68b78e7ca1cc10c811cd1ded8350f53f2be11eb46946879a74c684026bff7" dependencies = [ "bevy_app", "bevy_ecs", @@ -1382,9 +1429,9 @@ dependencies = [ [[package]] name = "bevy_transform" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7995ae14430b1a268d1e4f098ab770e8af880d2df5e4e37161b47d8d9e9625bd" +checksum = "b30e3957de42c2f7d88dfe8428e739b74deab8932d2a8bbb9d4eefbd64b6aa34" dependencies = [ "bevy_app", "bevy_ecs", @@ -1425,9 +1472,9 @@ dependencies = [ [[package]] name = "bevy_ui" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc999815a67a6b2fc911df9eea27af703ff656aed6fd31d8606dced701f07fd6" +checksum = "889c6892e9c5c308ab225a1322d07fb2358ccf39493526cda4d5f083d717773d" dependencies = [ "accesskit", "bevy_a11y", @@ -1439,6 +1486,7 @@ dependencies = [ "bevy_ecs", "bevy_image", "bevy_input", + "bevy_input_focus", "bevy_math", "bevy_picking", "bevy_platform", @@ -1458,9 +1506,9 @@ dependencies = [ [[package]] name = "bevy_ui_render" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adae9770089e04339d003afe7abe7153fe71600d81c828f964c7ac329b04d5b9" +checksum = "b649395e32a4761d4f17aeff37170a4421c94a14c505645397b8ee8510eb19e9" dependencies = [ "bevy_app", "bevy_asset", @@ -1489,9 +1537,9 @@ dependencies = [ [[package]] name = "bevy_utils" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080254083c74d5f6eb0649d7cd6181bda277e8fe3c509ec68990a5d56ec23f24" +checksum = "e258c44d869f9c41ac0f88a16815c67f2569eb9fff4716828a40273d127b6f84" dependencies = [ "bevy_platform", "disqualified", @@ -1500,9 +1548,9 @@ dependencies = [ [[package]] name = "bevy_window" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f582478606d6b6e5c53befbe7612f038fdfb73f8a27f7aae644406637347acd4" +checksum = "869a56f1da2544641734018e1f1caa660299cd6e3af794f3fa0df72293d8eed2" dependencies = [ "bevy_app", "bevy_asset", @@ -1519,9 +1567,9 @@ dependencies = [ [[package]] name = "bevy_winit" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb0ccf2faca4b4c156a26284d1bbf90a8cac8568a273adcd6c1a270c1342f3df" +checksum = "8142a3749fc491eeae481c30bb3830cf5a71d2fa3dba4d450a42792f6d39eb2d" dependencies = [ "accesskit", "accesskit_winit", @@ -1543,6 +1591,7 @@ dependencies = [ "bevy_window", "bytemuck", "cfg-if", + "js-sys", "tracing", "wasm-bindgen", "web-sys", @@ -1909,6 +1958,15 @@ dependencies = [ "libc", ] +[[package]] +name = "core_maths" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30" +dependencies = [ + "libm", +] + [[package]] name = "coreaudio-rs" version = "0.11.3" @@ -1931,21 +1989,22 @@ dependencies = [ [[package]] name = "cosmic-text" -version = "0.14.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da46a9d5a8905cc538a4a5bceb6a4510de7a51049c5588c0114efce102bcbbe8" +checksum = "c4cadaea21e24c49c0c82116f2b465ae6a49d63c90e428b0f8d9ae1f638ac91f" dependencies = [ "bitflags 2.10.0", "fontdb", + "harfrust", + "linebender_resource_handle", "log", "rangemap", "rustc-hash 1.1.0", - "rustybuzz", "self_cell", + "skrifa 0.39.0", "smol_str", "swash", "sys-locale", - "ttf-parser 0.21.1", "unicode-bidi", "unicode-linebreak", "unicode-script", @@ -2126,30 +2185,29 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "encase" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02ba239319a4f60905966390f5e52799d868103a533bb7e27822792332504ddd" +checksum = "6e3e0ff2ee0b7aa97428308dd9e1e42369cb22f5fb8dc1c55546637443a60f1e" dependencies = [ "const_panic", "encase_derive", - "glam", "thiserror 2.0.17", ] [[package]] name = "encase_derive" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5223d6c647f09870553224f6e37261fe5567bc5a4f4cf13ed337476e79990f2f" +checksum = "a4d90c5d7d527c6cb8a3b114efd26a6304d9ab772656e73d8f4e32b1f3d601a2" dependencies = [ "encase_derive_impl", ] [[package]] name = "encase_derive_impl" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1796db3d892515842ca2dfb11124c4bb4a9e58d9f2c5c1072e5bca1b2334507b" +checksum = "c8bad72d8308f7a382de2391ec978ddd736e0103846b965d7e2a63a75768af30" dependencies = [ "proc-macro2", "quote", @@ -2270,9 +2328,9 @@ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "font-types" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "511e2c18a516c666d27867d2f9821f76e7d591f762e9fc41dd6cc5c90fe54b0b" +checksum = "39a654f404bbcbd48ea58c617c2993ee91d1cb63727a37bf2323a4edeed1b8c5" dependencies = [ "bytemuck", ] @@ -2288,16 +2346,16 @@ dependencies = [ [[package]] name = "fontdb" -version = "0.16.2" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0299020c3ef3f60f526a4f64ab4a3d4ce116b1acbf24cdd22da0068e5d81dc3" +checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905" dependencies = [ "fontconfig-parser", "log", "memmap2", "slotmap", "tinyvec", - "ttf-parser 0.20.0", + "ttf-parser", ] [[package]] @@ -2338,9 +2396,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-io" @@ -2361,6 +2419,36 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "futures-macro" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-util" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +dependencies = [ + "futures-core", + "futures-macro", + "futures-task", + "pin-project-lite", + "slab", +] + [[package]] name = "gethostname" version = "1.1.0" @@ -2378,11 +2466,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", - "js-sys", "libc", "r-efi", "wasip2", - "wasm-bindgen", ] [[package]] @@ -2437,6 +2523,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd47b05dddf0005d850e5644cae7f2b14ac3df487979dbfff3b56f20b1a6ae46" dependencies = [ "bytemuck", + "encase", "libm", "rand", "serde_core", @@ -2558,9 +2645,9 @@ dependencies = [ [[package]] name = "grid" -version = "0.15.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36119f3a540b086b4e436bb2b588cf98a68863470e0e880f4d0842f112a3183a" +checksum = "f9e2d4c0a8296178d8802098410ca05d86b17a10bb5ab559b3fb404c1f948220" [[package]] name = "guillotiere" @@ -2584,6 +2671,19 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "harfrust" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0caaee032384c10dd597af4579c67dee16650d862a9ccbe1233ff1a379abc07" +dependencies = [ + "bitflags 2.10.0", + "bytemuck", + "core_maths", + "read-fonts 0.36.0", + "smallvec", +] + [[package]] name = "hash32" version = "0.3.1" @@ -2604,19 +2704,21 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ "equivalent", + "foldhash 0.2.0", "serde", + "serde_core", ] [[package]] name = "heapless" -version = "0.8.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +checksum = "2af2455f757db2b292a9b1768c4b70186d443bcb3b316252d6b540aec1cd89ed" dependencies = [ "hash32", "portable-atomic", @@ -2666,7 +2768,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" dependencies = [ "equivalent", - "hashbrown 0.16.0", + "hashbrown 0.16.1", "serde", "serde_core", ] @@ -2774,9 +2876,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.82" +version = "0.3.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" +checksum = "14dc6f6450b3f6d4ed5b16327f38fed626d375a886159ca555bd7822c0c3a5a6" dependencies = [ "once_cell", "wasm-bindgen", @@ -2868,6 +2970,12 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "linebender_resource_handle" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" + [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -2903,34 +3011,32 @@ checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "logos" -version = "0.15.1" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff472f899b4ec2d99161c51f60ff7075eeb3097069a36050d8037a6325eb8154" +checksum = "eb2c55a318a87600ea870ff8c2012148b44bf18b74fad48d0f835c38c7d07c5f" dependencies = [ "logos-derive", ] [[package]] name = "logos-codegen" -version = "0.15.1" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "192a3a2b90b0c05b27a0b2c43eecdb7c415e29243acc3f89cc8247a5b693045c" +checksum = "58b3ffaa284e1350d017a57d04ada118c4583cf260c8fb01e0fe28a2e9cf8970" dependencies = [ - "beef", "fnv", - "lazy_static", "proc-macro2", "quote", + "regex-automata", "regex-syntax", - "rustc_version", "syn", ] [[package]] name = "logos-derive" -version = "0.15.1" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "605d9697bcd5ef3a42d38efc51541aa3d6a4a25f7ab6d1ed0da5ac632a26b470" +checksum = "52d3a9855747c17eaf4383823f135220716ab49bea5fbea7dd42cc9a92f8aa31" dependencies = [ "logos-codegen", ] @@ -3020,9 +3126,9 @@ dependencies = [ [[package]] name = "naga" -version = "26.0.0" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "916cbc7cb27db60be930a4e2da243cf4bc39569195f22fd8ee419cd31d5b662c" +checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8" dependencies = [ "arrayvec", "bit-set", @@ -3031,7 +3137,7 @@ dependencies = [ "cfg_aliases", "codespan-reporting 0.12.0", "half", - "hashbrown 0.15.5", + "hashbrown 0.16.1", "hexf-parse", "indexmap", "libm", @@ -3047,9 +3153,9 @@ dependencies = [ [[package]] name = "naga_oil" -version = "0.19.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b586d3cf5c9b7e13fe2af6e114406ff70773fd80881960378933b63e76f37dd" +checksum = "310c347db1b30e69581f3b84dc9a5c311ed583f67851b39b77953cb7a066c97f" dependencies = [ "codespan-reporting 0.12.0", "data-encoding", @@ -3507,7 +3613,7 @@ version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" dependencies = [ - "ttf-parser 0.25.1", + "ttf-parser", ] [[package]] @@ -3812,6 +3918,17 @@ dependencies = [ "font-types", ] +[[package]] +name = "read-fonts" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eaa2941a4c05443ee3a7b26ab076a553c343ad5995230cc2b1d3e993bdc6345" +dependencies = [ + "bytemuck", + "core_maths", + "font-types", +] + [[package]] name = "rectangle-pack" version = "0.4.2" @@ -3883,14 +4000,15 @@ dependencies = [ [[package]] name = "ron" -version = "0.10.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beceb6f7bf81c73e73aeef6dd1356d9a1b2b4909e1f0fc3e59b034f9572d7b7f" +checksum = "fd490c5b18261893f14449cbd28cb9c0b637aebf161cd77900bfdedaff21ec32" dependencies = [ - "base64", "bitflags 2.10.0", + "once_cell", "serde", "serde_derive", + "typeid", "unicode-ident", ] @@ -3912,15 +4030,6 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - [[package]] name = "rustix" version = "0.38.44" @@ -3953,23 +4062,6 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" -[[package]] -name = "rustybuzz" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c" -dependencies = [ - "bitflags 2.10.0", - "bytemuck", - "libm", - "smallvec", - "ttf-parser 0.21.1", - "unicode-bidi-mirroring", - "unicode-ccc", - "unicode-properties", - "unicode-script", -] - [[package]] name = "ruzstd" version = "0.8.1" @@ -4025,12 +4117,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16c2f82143577edb4921b71ede051dac62ca3c16084e918bf7b40c96ae10eb33" -[[package]] -name = "semver" -version = "1.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" - [[package]] name = "send_wrapper" version = "0.6.0" @@ -4108,7 +4194,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c31071dedf532758ecf3fed987cdb4bd9509f900e026ab684b4ecb81ea49841" dependencies = [ "bytemuck", - "read-fonts", + "read-fonts 0.35.0", +] + +[[package]] +name = "skrifa" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9eb0b904a04d09bd68c65d946617b8ff733009999050f3b851c32fb3cfb60e" +dependencies = [ + "bytemuck", + "read-fonts 0.36.0", ] [[package]] @@ -4220,7 +4316,7 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47846491253e976bdd07d0f9cc24b7daf24720d11309302ccbbc6e6b6e53550a" dependencies = [ - "skrifa", + "skrifa 0.37.0", "yazi", "zeno", ] @@ -4261,9 +4357,9 @@ dependencies = [ [[package]] name = "taffy" -version = "0.7.7" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4f4d046dd956a47a7e1a2947083d7ac3e6aa3cfaaead36173ceaa5ab11878c" +checksum = "41ba83ebaf2954d31d05d67340fd46cebe99da2b7133b0dd68d70c65473a437b" dependencies = [ "arrayvec", "grid", @@ -4513,23 +4609,14 @@ dependencies = [ "ustr", ] -[[package]] -name = "ttf-parser" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" - -[[package]] -name = "ttf-parser" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" - [[package]] name = "ttf-parser" version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" +dependencies = [ + "core_maths", +] [[package]] name = "twox-hash" @@ -4555,18 +4642,6 @@ version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" -[[package]] -name = "unicode-bidi-mirroring" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" - -[[package]] -name = "unicode-ccc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" - [[package]] name = "unicode-ident" version = "1.0.20" @@ -4579,12 +4654,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" -[[package]] -name = "unicode-properties" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" - [[package]] name = "unicode-script" version = "0.5.7" @@ -4683,9 +4752,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.105" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" +checksum = "60722a937f594b7fde9adb894d7c092fc1bb6612897c46368d18e7a20208eff2" dependencies = [ "cfg-if", "once_cell", @@ -4696,11 +4765,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.55" +version = "0.4.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" +checksum = "8a89f4650b770e4521aa6573724e2aed4704372151bd0de9d16a3bbabb87441a" dependencies = [ "cfg-if", + "futures-util", "js-sys", "once_cell", "wasm-bindgen", @@ -4709,9 +4779,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.105" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" +checksum = "0fac8c6395094b6b91c4af293f4c79371c163f9a6f56184d2c9a85f5a95f3950" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4719,9 +4789,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.105" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" +checksum = "ab3fabce6159dc20728033842636887e4877688ae94382766e00b180abac9d60" dependencies = [ "bumpalo", "proc-macro2", @@ -4732,9 +4802,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.105" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" +checksum = "de0e091bdb824da87dc01d967388880d017a0a9bc4f3bdc0d86ee9f9336e3bb5" dependencies = [ "unicode-ident", ] @@ -4849,9 +4919,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.82" +version = "0.3.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1" +checksum = "705eceb4ce901230f8625bd1d665128056ccbe4b7408faa625eec1ba80f59a97" dependencies = [ "js-sys", "wasm-bindgen", @@ -4869,16 +4939,16 @@ dependencies = [ [[package]] name = "wgpu" -version = "26.0.1" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b6ff82bbf6e9206828e1a3178e851f8c20f1c9028e74dd3a8090741ccd5798" +checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77" dependencies = [ "arrayvec", "bitflags 2.10.0", "cfg-if", "cfg_aliases", "document-features", - "hashbrown 0.15.5", + "hashbrown 0.16.1", "js-sys", "log", "naga", @@ -4896,17 +4966,18 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "26.0.1" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f62f1053bd28c2268f42916f31588f81f64796e2ff91b81293515017ca8bd9" +checksum = "27a75de515543b1897b26119f93731b385a19aea165a1ec5f0e3acecc229cae7" dependencies = [ "arrayvec", "bit-set", "bit-vec", "bitflags 2.10.0", + "bytemuck", "cfg_aliases", "document-features", - "hashbrown 0.15.5", + "hashbrown 0.16.1", "indexmap", "log", "naga", @@ -4927,36 +4998,36 @@ dependencies = [ [[package]] name = "wgpu-core-deps-apple" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18ae5fbde6a4cbebae38358aa73fcd6e0f15c6144b67ef5dc91ded0db125dbdf" +checksum = "0772ae958e9be0c729561d5e3fd9a19679bcdfb945b8b1a1969d9bfe8056d233" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-wasm" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03b9f9e1a50686d315fc6debe4980cc45cd37b0e919351917df494e8fdc8885" +checksum = "9b1027dcf3b027a877e44819df7ceb0e2e98578830f8cd34cd6c3c7c2a7a50b7" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-windows-linux-android" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "720a5cb9d12b3d337c15ff0e24d3e97ed11490ff3f7506e7f3d98c68fa5d6f14" +checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-hal" -version = "26.0.6" +version = "27.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d0e67224cc7305b3b4eb2cc57ca4c4c3afc665c1d1bee162ea806e19c47bdd" +checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce" dependencies = [ "android_system_properties", "arrayvec", @@ -4973,7 +5044,7 @@ dependencies = [ "gpu-alloc", "gpu-allocator", "gpu-descriptor", - "hashbrown 0.15.5", + "hashbrown 0.16.1", "js-sys", "khronos-egl", "libc", @@ -4983,6 +5054,7 @@ dependencies = [ "naga", "ndk-sys 0.6.0+11769913", "objc", + "once_cell", "ordered-float", "parking_lot", "portable-atomic", @@ -5002,9 +5074,9 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "26.0.0" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca7a8d8af57c18f57d393601a1fb159ace8b2328f1b6b5f80893f7d672c9ae2" +checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" dependencies = [ "bitflags 2.10.0", "bytemuck", diff --git a/Cargo.toml b/Cargo.toml index 6bc0c83..8dc9618 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,20 +2,30 @@ name = "trill" version = "0.1.0" edition = "2024" +license = "MIT OR Apache-2.0 " [workspace] members = ["crates/*", "demo"] [workspace.dependencies] -bevy_app = "0.17.2" -bevy_asset = "0.17.2" -bevy_ecs = { version = "0.17.2", default-features = false } -bevy_reflect = "0.17.2" -bevy_tasks = "0.17.2" +bevy_mod_props = { version = "0.1.0", path = "crates/bevy_mod_props", default-features = false } +trill_core = { version = "0.1.0", path = "crates/trill_core" } +trill_script = { version = "0.1.0", path = "crates/trill_script" } +bevy_trill = { version = "0.1.0", path = "crates/bevy_trill" } + +bevy_app = "0.18.0" +bevy_asset = "0.18.0" +bevy_ecs = { version = "0.18.0", default-features = false } +bevy_reflect = "0.18.0" +bevy_tasks = "0.18.0" + +# default features are only used in examples and demo +bevy = "0.18.0" codespan-reporting = "0.13.1" itertools = "0.14.0" -logos = "0.15.1" +logos = "0.16" +# keeping this on 0.9 until Bevy updates it rand = "0.9.2" rapidhash = "4.1.1" thiserror = "2.0.17" diff --git a/LICENSE-APACHE.txt b/LICENSE-APACHE.txt new file mode 100644 index 0000000..d9a10c0 --- /dev/null +++ b/LICENSE-APACHE.txt @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/LICENSE-MIT.txt b/LICENSE-MIT.txt new file mode 100644 index 0000000..6802bc4 --- /dev/null +++ b/LICENSE-MIT.txt @@ -0,0 +1,19 @@ +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..1a31d7d --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Trill + +A cool dialogue system. diff --git a/crates/bevy_mod_props/src/lib.rs b/crates/bevy_mod_props/src/lib.rs index bdf4590..709a458 100644 --- a/crates/bevy_mod_props/src/lib.rs +++ b/crates/bevy_mod_props/src/lib.rs @@ -53,7 +53,7 @@ //! # use bevy_ecs::prelude::*; //! //! fn props_resource_system(props: Res) { -//! props.get("thingy"); +//! props.get::("thingy"); //! } //! //! fn props_world_system(world: &mut World) { diff --git a/crates/bevy_mod_props/src/props/mod.rs b/crates/bevy_mod_props/src/props/mod.rs index 1bf480c..faac4dc 100644 --- a/crates/bevy_mod_props/src/props/mod.rs +++ b/crates/bevy_mod_props/src/props/mod.rs @@ -673,7 +673,7 @@ impl Props { } /// Gets the given key’s corresponding entry in the map for in-place manipulation. - pub fn entry(&mut self, name: impl Into) -> Entry { + pub fn entry(&mut self, name: impl Into) -> Entry<'_, Ustr, Value> { self.properties.entry(name.into()) } @@ -724,12 +724,12 @@ impl Props { } /// Creates a borrowing iterator over all property names and values. - pub fn iter(&self) -> Iter { + pub fn iter(&self) -> Iter<'_, Ustr, Value> { self.properties.iter() } /// Creates a borrowing iterator over property names. - pub fn keys(&self) -> Keys { + pub fn keys(&self) -> Keys<'_, Ustr, Value> { self.properties.keys() } @@ -739,7 +739,7 @@ impl Props { } /// Creates a borrowing iterator over property values. - pub fn values(&self) -> Values { + pub fn values(&self) -> Values<'_, Ustr, Value> { self.properties.values() } @@ -749,7 +749,7 @@ impl Props { } /// Creates a mutable borrowing iterator over property values. - pub fn values_mut(&mut self) -> ValuesMut { + pub fn values_mut(&mut self) -> ValuesMut<'_, Ustr, Value> { self.properties.values_mut() } } diff --git a/crates/bevy_mod_props/src/registry/ext.rs b/crates/bevy_mod_props/src/registry/ext.rs index 76fbaf3..9091e65 100644 --- a/crates/bevy_mod_props/src/registry/ext.rs +++ b/crates/bevy_mod_props/src/registry/ext.rs @@ -1,7 +1,10 @@ //! Defines extension traits for using the registry with bevy use bevy_ecs::{ - entity::{Entity, EntityDoesNotExistError, EntityHashSet}, + entity::{ + Entity, EntityHashSet, EntityNotSpawnedError, EntityValidButNotSpawnedError, + InvalidEntityError, + }, system::EntityCommands, world::{ DeferredWorld, EntityMut, EntityRef, EntityWorldMut, World, WorldEntityFetch, @@ -68,7 +71,9 @@ impl<'w> RegistryCommandsExt for EntityCommands<'w> { #[error("{0}")] pub enum EntityNamedError { EntityNotFound(#[from] EntityNotFoundError), - EntityDoesNotExist(#[from] EntityDoesNotExistError), + InvalidEntity(#[from] InvalidEntityError), + EntityValidButNotSpawned(#[from] EntityValidButNotSpawnedError), + EntityNotSpawned(#[from] EntityNotSpawnedError), } pub trait RegistryLookupExt { @@ -76,9 +81,9 @@ pub trait RegistryLookupExt { fn lookup_class(&self, class: impl Into) -> &EntityHashSet; - fn entity_named(&self, name: impl Into) -> Result; + fn entity_named(&self, name: impl Into) -> Result, EntityNamedError>; - fn entity_class(&self, class: impl Into) -> EntityClassIter; + fn entity_class(&self, class: impl Into) -> EntityClassIter<'_>; } pub struct EntityClassIter<'w> { @@ -112,13 +117,13 @@ impl RegistryLookupExt for World { } } - fn entity_named(&self, name: impl Into) -> Result { + fn entity_named(&self, name: impl Into) -> Result, EntityNamedError> { let entity = self.lookup_name(name)?; let entity_ref = self.get_entity(entity)?; Ok(entity_ref) } - fn entity_class(&self, class: impl Into) -> EntityClassIter { + fn entity_class(&self, class: impl Into) -> EntityClassIter<'_> { EntityClassIter { entities: self.lookup_class(class).clone().into_iter(), world: self, @@ -143,13 +148,13 @@ impl<'w> RegistryLookupExt for DeferredWorld<'w> { } } - fn entity_named(&self, name: impl Into) -> Result { + fn entity_named(&self, name: impl Into) -> Result, EntityNamedError> { let entity = self.lookup_name(name)?; let entity_ref = self.get_entity(entity)?; Ok(entity_ref) } - fn entity_class(&self, class: impl Into) -> EntityClassIter { + fn entity_class(&self, class: impl Into) -> EntityClassIter<'_> { EntityClassIter { entities: self.lookup_class(class).clone().into_iter(), world: self, @@ -171,9 +176,9 @@ pub trait RegistryLookupMutExt { fn entity_mut_named( &mut self, name: impl Into, - ) -> Result; + ) -> Result, EntityNamedMutError>; - fn entity_mut_class(&mut self, class: impl Into) -> EntityClassMutIter; + fn entity_mut_class(&mut self, class: impl Into) -> EntityClassMutIter<'_>; } pub struct EntityClassMutIter<'w> { @@ -196,13 +201,13 @@ impl RegistryLookupMutExt for World { fn entity_mut_named( &mut self, name: impl Into, - ) -> Result { + ) -> Result, EntityNamedMutError> { let entity = self.lookup_name(name)?; let entity_mut = self.get_entity_mut(entity)?; Ok(entity_mut) } - fn entity_mut_class(&mut self, class: impl Into) -> EntityClassMutIter { + fn entity_mut_class(&mut self, class: impl Into) -> EntityClassMutIter<'_> { EntityClassMutIter { entities: self.lookup_class(class).clone().into_iter(), world_cell: self.as_unsafe_world_cell(), @@ -214,23 +219,25 @@ impl RegistryLookupMutExt for World { // Deferred mutable registry lookups pub trait RegistryLookupDeferredExt { - fn entity_mut_named(&mut self, name: impl Into) - -> Result; + fn entity_mut_named( + &mut self, + name: impl Into, + ) -> Result, EntityNamedMutError>; - fn entity_mut_class(&mut self, class: impl Into) -> EntityClassDeferredIter; + fn entity_mut_class(&mut self, class: impl Into) -> EntityClassDeferredIter<'_>; } impl<'w> RegistryLookupDeferredExt for DeferredWorld<'w> { fn entity_mut_named( &mut self, name: impl Into, - ) -> Result { + ) -> Result, EntityNamedMutError> { let entity = self.lookup_name(name)?; let entity_mut = self.get_entity_mut(entity)?; Ok(entity_mut) } - fn entity_mut_class(&mut self, class: impl Into) -> EntityClassDeferredIter { + fn entity_mut_class(&mut self, class: impl Into) -> EntityClassDeferredIter<'_> { EntityClassDeferredIter { entities: self.lookup_class(class).clone().into_iter(), world_cell: self.as_unsafe_world_cell_readonly(), diff --git a/crates/bevy_trill/Cargo.toml b/crates/bevy_trill/Cargo.toml index b08ce36..91c90b1 100644 --- a/crates/bevy_trill/Cargo.toml +++ b/crates/bevy_trill/Cargo.toml @@ -5,7 +5,7 @@ edition = "2024" [dependencies] trill = { path = "../.." } -bevy_mod_props = { path = "../bevy_mod_props" } +bevy_mod_props = { workspace = true, default-features = true } bevy_app.workspace = true bevy_asset.workspace = true @@ -13,6 +13,6 @@ bevy_ecs.workspace = true bevy_reflect.workspace = true bevy_tasks.workspace = true -rand.workspace = true +rand.workspace = true thiserror.workspace = true ustr.workspace = true diff --git a/crates/bevy_trill/src/lib.rs b/crates/bevy_trill/src/lib.rs index 7f00d73..7436416 100644 --- a/crates/bevy_trill/src/lib.rs +++ b/crates/bevy_trill/src/lib.rs @@ -52,7 +52,7 @@ pub enum TrillFileError { NonUTF8(#[from] std::string::FromUtf8Error), } -#[derive(Default)] +#[derive(Default, TypePath)] struct TrillFileLoader; impl AssetLoader for TrillFileLoader { @@ -66,7 +66,10 @@ impl AssetLoader for TrillFileLoader { _settings: &Self::Settings, load_context: &mut LoadContext<'_>, ) -> Result { - let name = format!("{}", load_context.path().file_stem().unwrap().display()); + let name = format!( + "{}", + load_context.path().path().file_stem().unwrap().display() + ); let mut bytes = Vec::new(); reader.read_to_end(&mut bytes).await?; let source = String::from_utf8(bytes)?; diff --git a/crates/trill_core/Cargo.toml b/crates/trill_core/Cargo.toml index 6c6529c..dfd3269 100644 --- a/crates/trill_core/Cargo.toml +++ b/crates/trill_core/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2024" [dependencies] -bevy_mod_props = { path = "../bevy_mod_props", default-feature = false } +bevy_mod_props.workspace = true itertools.workspace = true rand.workspace = true diff --git a/crates/trill_core/src/engine.rs b/crates/trill_core/src/engine.rs index f135e7a..d2de46e 100644 --- a/crates/trill_core/src/engine.rs +++ b/crates/trill_core/src/engine.rs @@ -296,7 +296,7 @@ impl ResponseDispatcher { .choose_weighted(rng, |i| weights[candidates[*i]]) .ok()?; let i = candidates.remove(*i); - if candidates.len() == 0 { + if candidates.is_empty() { *candidates = (0..weights.len()).collect(); let _ = candidates.remove(i); } diff --git a/crates/trill_script/Cargo.toml b/crates/trill_script/Cargo.toml index 29daf19..5ff0443 100644 --- a/crates/trill_script/Cargo.toml +++ b/crates/trill_script/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2024" [dependencies] -trill_core = { path = "../trill_core" } +trill_core.workspace = true logos.workspace = true ustr.workspace = true @@ -12,4 +12,3 @@ codespan-reporting.workspace = true [dev-dependencies] rand.workspace = true - diff --git a/crates/trill_script/src/error.rs b/crates/trill_script/src/error.rs index ad7efbe..ea355a5 100644 --- a/crates/trill_script/src/error.rs +++ b/crates/trill_script/src/error.rs @@ -210,7 +210,7 @@ impl ScriptReport { } => { let location = self.rule_locations.get(&in_rule).unwrap(); Diagnostic::error() - .with_message(format!("variable used twice within the same rule",)) + .with_message("variable used twice within the same rule".to_string()) .with_label( Label::primary(location.file_id, location.span.clone()).with_message( format!( diff --git a/crates/trill_script/src/lib.rs b/crates/trill_script/src/lib.rs index 56ada85..378ec6f 100644 --- a/crates/trill_script/src/lib.rs +++ b/crates/trill_script/src/lib.rs @@ -112,8 +112,8 @@ impl ScriptCompiler { #[cfg(test)] mod test { - use trill_core::engine::StatementSet; - use ustr::Ustr; + // use trill_core::engine::StatementSet; + // use ustr::Ustr; use crate::ScriptCompiler; @@ -144,6 +144,7 @@ mod test { assert!(engine.is_some()); } + /* #[test] fn compile_script() { let script = r#" @@ -192,4 +193,5 @@ mod test { assert_eq!(line, "Oh hi! I'm Miles"); } + */ } diff --git a/demo/Cargo.toml b/demo/Cargo.toml index e6d7615..1630063 100644 --- a/demo/Cargo.toml +++ b/demo/Cargo.toml @@ -4,6 +4,6 @@ version = "0.1.0" edition = "2024" [dependencies] -bevy = "0.17.2" -bevy_trill = { path = "../crates/bevy_trill" } -bevy_mod_props = { path = "../crates/bevy_mod_props" } +bevy.workspace = true +bevy_trill.workspace = true +bevy_mod_props.workspace = true