diff --git a/.cargo/config.toml b/.cargo/config.toml index 97f634a..8eea7a8 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,12 +1,144 @@ +# Copy this file to `config.toml` to speed up your builds. +# +# # Faster linker +# +# One of the slowest aspects of compiling large Rust programs is the linking time. This file configures an +# alternate linker that may improve build times. When choosing a new linker, you have two options: +# +# ## LLD +# +# LLD is a linker from the LLVM project that supports Linux, Windows, macOS, and Wasm. It has the greatest +# platform support and the easiest installation process. It is enabled by default in this file for Windows. +# LLD is the default linker in Rust itself for Linux, so no configuration is needed. +# On macOS, the default linker yields higher performance than LLD and is used instead. +# +# To install, please scroll to the corresponding table for your target (eg. `[target.x86_64-pc-windows-msvc]` +# for Windows) and follow the steps under `LLD linker`. +# +# For more information, please see LLD's website at . +# +# ## Mold +# +# Mold is a newer linker written by one of the authors of LLD. It boasts even greater performance, specifically +# through its high parallelism, though it only supports Linux. +# +# Mold is disabled by default in this file. If you wish to enable it, follow the installation instructions for +# your corresponding target, disable LLD by commenting out its `-Clink-arg=...` line (not applicable for Linux anymore), +# and enable Mold by *uncommenting* its `-Clink-arg=...` line. +# +# There is a fork of Mold named Sold that supports macOS, but it is unmaintained and is about the same speed as +# the default ld64 linker. For this reason, it is not included in this file. +# +# For more information, please see Mold's repository at . +# +# # Nightly configuration +# +# Be warned that the following features require nightly Rust, which is experimental and may contain bugs. If you +# are having issues, skip this section and use stable Rust instead. +# +# There are a few unstable features that can improve performance. To use them, first install nightly Rust +# through Rustup: +# +# ``` +# rustup toolchain install nightly +# ``` +# +# Finally, uncomment the lines under the `Nightly` heading for your corresponding target table (eg. +# `[target.x86_64-unknown-linux-gnu]` for Linux) to enable the following features: +# +# ## `share-generics` +# +# Usually rustc builds each crate separately, then combines them all together at the end. `share-generics` forces +# crates to share monomorphized generic code, so they do not duplicate work. +# +# In other words, instead of crate 1 generating `Foo` and crate 2 generating `Foo` separately, +# only one crate generates `Foo` and the other adds on to the pre-existing work. +# +# Note that you may have some issues with this flag on Windows. If compiling fails due to the 65k symbol limit, +# you may have to disable this setting. For more information and possible solutions to this error, see +# . +# +# ## `threads` +# +# This option enables rustc's parallel frontend, which improves performance when parsing, type checking, borrow +# checking, and more. We currently set `threads=0`, which defaults to the amount of cores in your CPU. +# +# For more information, see the blog post at . + [target.x86_64-unknown-linux-gnu] -linker = "clang" -rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold", "-Zshare-generics=y"] +rustflags = [ + # Mold linker + # + # You may need to install it: + # + # - Ubuntu: `sudo apt-get install mold clang` + # - Fedora: `sudo dnf install mold clang` + # - Arch: `sudo pacman -S mold clang` + "-Clink-arg=-fuse-ld=mold", + + # Nightly + "-Zshare-generics=y", + "-Zthreads=0", +] +# Some systems may experience linker performance issues when running doc tests. +# See https://github.com/bevyengine/bevy/issues/12207 for details. +rustdocflags = [ + # Mold linker + "-Clink-arg=-fuse-ld=mold", +] + +[target.x86_64-apple-darwin] +rustflags = [ + # LLD linker + # + # The default ld64 linker is faster, you should continue using it instead. + # + # You may need to install it: + # + # Brew: `brew install llvm` + # Manually: + # "-Clink-arg=-fuse-ld=/usr/local/opt/llvm/bin/ld64.lld", + + # Nightly + # "-Zshare-generics=y", + # "-Zthreads=0", +] + +[target.aarch64-apple-darwin] +rustflags = [ + # LLD linker + # + # The default ld64 linker is faster, you should continue using it instead. + # + # You may need to install it: + # + # Brew: `brew install llvm` + # Manually: + # "-Clink-arg=-fuse-ld=/opt/homebrew/opt/llvm/bin/ld64.lld", -[unstable] -codegen-backend = true + # Nightly + # "-Zshare-generics=y", + # "-Zthreads=0", +] -[profile.dev] -codegen-backend = "cranelift" +[target.x86_64-pc-windows-msvc] +# LLD linker +# +# You may need to install it: +# +# ``` +# cargo install -f cargo-binutils +# rustup component add llvm-tools +# ``` +linker = "rust-lld.exe" +rustdocflags = ["-Clinker=rust-lld.exe"] +rustflags = [ + # Nightly + # "-Zshare-generics=n", # This needs to be off if you use dynamic linking on Windows. + # "-Zthreads=0", +] -[profile.dev.package."*"] -codegen-backend = "llvm" +# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only'. +# In most cases the gains are negligible, but if you are on macOS and have slow compile times you should see significant gains. +# [profile.dev] +# debug = 1 diff --git a/.cargo/config_fast_builds.toml b/.cargo/config_fast_builds.toml new file mode 100644 index 0000000..2ca2efb --- /dev/null +++ b/.cargo/config_fast_builds.toml @@ -0,0 +1,144 @@ +# Copy this file to `config.toml` to speed up your builds. +# +# # Faster linker +# +# One of the slowest aspects of compiling large Rust programs is the linking time. This file configures an +# alternate linker that may improve build times. When choosing a new linker, you have two options: +# +# ## LLD +# +# LLD is a linker from the LLVM project that supports Linux, Windows, macOS, and Wasm. It has the greatest +# platform support and the easiest installation process. It is enabled by default in this file for Windows. +# LLD is the default linker in Rust itself for Linux, so no configuration is needed. +# On macOS, the default linker yields higher performance than LLD and is used instead. +# +# To install, please scroll to the corresponding table for your target (eg. `[target.x86_64-pc-windows-msvc]` +# for Windows) and follow the steps under `LLD linker`. +# +# For more information, please see LLD's website at . +# +# ## Mold +# +# Mold is a newer linker written by one of the authors of LLD. It boasts even greater performance, specifically +# through its high parallelism, though it only supports Linux. +# +# Mold is disabled by default in this file. If you wish to enable it, follow the installation instructions for +# your corresponding target, disable LLD by commenting out its `-Clink-arg=...` line (not applicable for Linux anymore), +# and enable Mold by *uncommenting* its `-Clink-arg=...` line. +# +# There is a fork of Mold named Sold that supports macOS, but it is unmaintained and is about the same speed as +# the default ld64 linker. For this reason, it is not included in this file. +# +# For more information, please see Mold's repository at . +# +# # Nightly configuration +# +# Be warned that the following features require nightly Rust, which is experimental and may contain bugs. If you +# are having issues, skip this section and use stable Rust instead. +# +# There are a few unstable features that can improve performance. To use them, first install nightly Rust +# through Rustup: +# +# ``` +# rustup toolchain install nightly +# ``` +# +# Finally, uncomment the lines under the `Nightly` heading for your corresponding target table (eg. +# `[target.x86_64-unknown-linux-gnu]` for Linux) to enable the following features: +# +# ## `share-generics` +# +# Usually rustc builds each crate separately, then combines them all together at the end. `share-generics` forces +# crates to share monomorphized generic code, so they do not duplicate work. +# +# In other words, instead of crate 1 generating `Foo` and crate 2 generating `Foo` separately, +# only one crate generates `Foo` and the other adds on to the pre-existing work. +# +# Note that you may have some issues with this flag on Windows. If compiling fails due to the 65k symbol limit, +# you may have to disable this setting. For more information and possible solutions to this error, see +# . +# +# ## `threads` +# +# This option enables rustc's parallel frontend, which improves performance when parsing, type checking, borrow +# checking, and more. We currently set `threads=0`, which defaults to the amount of cores in your CPU. +# +# For more information, see the blog post at . + +[target.x86_64-unknown-linux-gnu] +rustflags = [ + # Mold linker + # + # You may need to install it: + # + # - Ubuntu: `sudo apt-get install mold clang` + # - Fedora: `sudo dnf install mold clang` + # - Arch: `sudo pacman -S mold clang` + # "-Clink-arg=-fuse-ld=mold", + + # Nightly + # "-Zshare-generics=y", + # "-Zthreads=0", +] +# Some systems may experience linker performance issues when running doc tests. +# See https://github.com/bevyengine/bevy/issues/12207 for details. +rustdocflags = [ + # Mold linker + # "-Clink-arg=-fuse-ld=mold", +] + +[target.x86_64-apple-darwin] +rustflags = [ + # LLD linker + # + # The default ld64 linker is faster, you should continue using it instead. + # + # You may need to install it: + # + # Brew: `brew install llvm` + # Manually: + # "-Clink-arg=-fuse-ld=/usr/local/opt/llvm/bin/ld64.lld", + + # Nightly + # "-Zshare-generics=y", + # "-Zthreads=0", +] + +[target.aarch64-apple-darwin] +rustflags = [ + # LLD linker + # + # The default ld64 linker is faster, you should continue using it instead. + # + # You may need to install it: + # + # Brew: `brew install llvm` + # Manually: + # "-Clink-arg=-fuse-ld=/opt/homebrew/opt/llvm/bin/ld64.lld", + + # Nightly + # "-Zshare-generics=y", + # "-Zthreads=0", +] + +[target.x86_64-pc-windows-msvc] +# LLD linker +# +# You may need to install it: +# +# ``` +# cargo install -f cargo-binutils +# rustup component add llvm-tools +# ``` +linker = "rust-lld.exe" +rustdocflags = ["-Clinker=rust-lld.exe"] +rustflags = [ + # Nightly + # "-Zshare-generics=n", # This needs to be off if you use dynamic linking on Windows. + # "-Zthreads=0", +] + +# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only'. +# In most cases the gains are negligible, but if you are on macOS and have slow compile times you should see significant gains. +# [profile.dev] +# debug = 1 diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..4dbe7c1 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[.github/workflows/*.{yaml,yml}] +indent_size = 2 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..95e6900 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,186 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: true + +env: + # Reduce compile time and cache size. + RUSTFLAGS: -Dwarnings -Zshare-generics=y -Zthreads=0 + RUSTDOCFLAGS: -Dwarnings -Zshare-generics=y -Zthreads=0 + # Use the same Rust toolchain across jobs so they can share a cache. + toolchain: nightly-2025-06-26 + +jobs: + # Check formatting. + format: + name: Format + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.toolchain }} + components: rustfmt + + - name: Check formatting + run: cargo fmt --all -- --check + + # Check documentation. + docs: + name: Docs + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.toolchain }} + + - name: Restore Rust cache + id: cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: ci + save-if: false + + - name: Install build dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev + + - name: Check documentation + run: cargo doc --locked --workspace --profile ci --all-features --document-private-items --no-deps + + # Run Clippy lints. + clippy-lints: + name: Clippy lints + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.toolchain }} + components: clippy + + - name: Restore Rust cache + id: cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: ci + save-if: ${{ github.ref == 'refs/heads/main' }} + + - name: Install build dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev + + - name: Run Clippy lints + run: cargo clippy --locked --workspace --all-targets --profile ci --all-features + + # Run Bevy lints. + bevy-lints: + name: Bevy lints + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain (plus bevy_lint) + uses: TheBevyFlock/bevy_cli/bevy_lint@lint-v0.4.0 + with: + cache: true + save-cache-if: ${{ github.ref == 'refs/heads/main' }} + + - name: Restore Rust cache + id: cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: ci + save-if: false + + - name: Install build dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev + + - name: Run Bevy lints + run: bevy_lint --locked --workspace --all-targets --profile ci --all-features + + # Run tests. + tests: + name: Tests + runs-on: ubuntu-latest + timeout-minutes: 40 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up environment + run: echo "RUSTFLAGS=${RUSTFLAGS:+$RUSTFLAGS }-Zcodegen-backend=cranelift" >> "${GITHUB_ENV}" + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.toolchain }} + components: rustc-codegen-cranelift-preview + + - name: Restore Rust cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: test + cache-directories: ${{ env.LD_LIBRARY_PATH }} + save-if: ${{ github.ref == 'refs/heads/main' }} + + - name: Install build dependencies + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev + + - name: Run tests + run: cargo test --locked --workspace --all-targets --profile ci --no-fail-fast + + # Check that the web build compiles. + check-web: + name: Check web + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up environment + run: echo "RUSTFLAGS=${RUSTFLAGS:+$RUSTFLAGS }--cfg getrandom_backend=\"wasm_js\"" >> "${GITHUB_ENV}" + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.toolchain }} + targets: wasm32-unknown-unknown + + - name: Restore Rust cache + id: cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: web-ci + save-if: ${{ github.ref == 'refs/heads/main' }} + + - name: Install build dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev + + - name: Check web + run: cargo check --config 'profile.web.inherits="dev"' --profile ci --no-default-features --features dev --target wasm32-unknown-unknown diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..1d2f63b --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,383 @@ +name: Release + +on: + # Trigger this workflow on a manual workflow dispatch. + workflow_dispatch: + inputs: + version: + description: "Version number in the format `v1.2.3`" + required: true + type: string + build_for_windows: + description: "Build for Windows (WARNING: slow!)" + default: true + type: boolean + build_for_macos: + description: "Build for macOS" + default: true + type: boolean + build_for_linux: + description: "Build for Linux" + default: true + type: boolean + build_for_web: + description: "Build for web" + default: true + type: boolean + upload_to_github: + description: "Upload to GitHub releases" + default: true + type: boolean + deploy_to_itch: + description: "Deploy to itch.io (if configured)" + default: true + type: boolean + deploy_to_github_pages: + description: "Deploy web build to GitHub Pages" + default: false + type: boolean + deny_warnings: + description: "Deny warnings" + default: false + type: boolean + +# Cancel the release workflow when a more recent workflow begins. +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: true + +# Configure the release workflow by editing the following values. +env: + # The base filename of the binary produced by `cargo build`. + cargo_build_binary_name: bevy_cli_generated + + # The path to the assets directory. + assets_path: assets + + # The itch.io project to deploy to in the format `user-name/project-name`. + # There will be no deployment to itch.io if this is commented out. + itch_page: JodaInteractive/space-journey + + # The ID of the app produced by this workflow. + # Applies to macOS releases. + # Must contain only A-Z, a-z, 0-9, hyphen, and period: . + app_id: joda-interactive.bevy-cli-generated + + # The base filename of the binary in the package produced by this workflow. + # Applies to Windows, macOS, and Linux releases. + # Defaults to `cargo_build_binary_name` if commented out. + #app_binary_name: bevy_cli_generated + + # The name of the `.zip` or `.dmg` file produced by this workflow. + # Defaults to `app_binary_name` if commented out. + #app_package_name: bevy-cli-generated + + # The display name of the app produced by this workflow. + # Applies to macOS releases. + # Defaults to `app_package_name` if commented out. + #app_display_name: Bevy Cli Generated + + # The short display name of the app produced by this workflow. + # Applies to macOS releases. + # Must be 15 or fewer characters: . + # Defaults to `app_display_name` if commented out. + #app_short_name: Bevy Cli Gen… + + # Before enabling LFS, please take a look at GitHub's documentation for costs and quota limits: + # + git_lfs: false + + # Enabling this only helps with consecutive releases to the same version (and takes up cache storage space). + # See: . + use_github_cache: false + +jobs: + # Forward some environment variables as outputs of this job. + # This is needed because the `env` context can't be used in the `if:` condition of a job: + # + forward-env: + runs-on: ubuntu-latest + steps: + - name: Do nothing + run: "true" + outputs: + itch_page: ${{ env.itch_page }} + + # Determine the version number for this workflow. + get-version: + runs-on: ubuntu-latest + steps: + - name: Determine version number + id: tag + run: echo "ref=${GITHUB_REF#refs/*/}" >> "${GITHUB_OUTPUT}" + outputs: + # Use the input from workflow dispatch, or fall back to the git ref. + version: ${{ inputs.version || steps.ref.outputs.ref }} + + # Build and package a release for each platform. + build: + needs: + - get-version + env: + version: ${{ needs.get-version.outputs.version }} + # Avoid rate-limiting. See: . + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + strategy: + matrix: + include: + - platform: web + targets: wasm32-unknown-unknown + package_ext: .zip + runner: ubuntu-latest + + - platform: linux + targets: x86_64-unknown-linux-gnu + package_ext: .zip + runner: ubuntu-latest + + - platform: windows + targets: x86_64-pc-windows-msvc + binary_ext: .exe + package_ext: .zip + runner: windows-latest + + - platform: macos + targets: x86_64-apple-darwin aarch64-apple-darwin + app_suffix: .app/Contents/MacOS + package_ext: .dmg + runner: macos-latest + runs-on: ${{ matrix.runner }} + permissions: + # Required to create a GitHub release: . + contents: write + defaults: + run: + shell: bash + + steps: + - name: Set up environment + run: | + # Default values: + echo "app_binary_name=${app_binary_name:=${{ env.cargo_build_binary_name }}}" >> "${GITHUB_ENV}" + echo "app_package_name=${app_package_name:=${app_binary_name}}" >> "${GITHUB_ENV}" + echo "app_display_name=${app_display_name:=${app_package_name}}" >> "${GITHUB_ENV}" + echo "app_short_name=${app_short_name:=${app_display_name}}" >> "${GITHUB_ENV}" + + # File paths: + echo "app=tmp/app/${app_package_name}"'${{ matrix.app_suffix }}' >> "${GITHUB_ENV}" + echo "package=${app_package_name}-"'${{ matrix.platform }}${{ matrix.package_ext }}' >> "${GITHUB_ENV}" + + # Rustflags: + RUSTFLAGS='-Zthreads=0' + if [ '${{ matrix.platform }}' != 'windows' ]; then + RUSTFLAGS="${RUSTFLAGS:+$RUSTFLAGS }"'-Zshare-generics=y' + fi + if [ '${{ inputs.deny_warnings }}' = 'true' ]; then + RUSTFLAGS="${RUSTFLAGS:+$RUSTFLAGS }"'-Dwarnings' + fi + echo "RUSTFLAGS=${RUSTFLAGS}" >> "${GITHUB_ENV}" + + # macOS environment: + if [ '${{ matrix.platform }}' = 'macos' ]; then + echo 'MACOSX_DEPLOYMENT_TARGET=11.0' >> "${GITHUB_ENV}" # macOS 11.0 Big Sur is the first version to support universal binaries. + echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> "${GITHUB_ENV}" + fi + + # Check if building for this platform is enabled. + echo 'is_platform_enabled=${{ + (matrix.platform == 'web' && inputs.build_for_web) || + (matrix.platform == 'linux' && inputs.build_for_linux) || + (matrix.platform == 'windows' && inputs.build_for_windows) || + (matrix.platform == 'macos' && inputs.build_for_macos) + }}' >> "${GITHUB_ENV}" + + - name: Checkout repository + if: ${{ env.is_platform_enabled == 'true' }} + uses: actions/checkout@v4 + with: + lfs: ${{ env.git_lfs }} + + - name: Install Rust toolchain + if: ${{ env.is_platform_enabled == 'true' }} + uses: dtolnay/rust-toolchain@nightly + with: + targets: ${{ matrix.targets }} + + - name: Restore Rust cache + if: ${{ env.is_platform_enabled == 'true' && env.use_github_cache == 'true' }} + uses: Swatinem/rust-cache@v2 + with: + shared-key: release + save-if: ${{ github.ref == 'refs/heads/main' }} + + - name: Install build dependencies (Linux) + if: ${{ env.is_platform_enabled == 'true' && matrix.platform == 'linux' }} + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev + + - name: Prepare output directories + if: ${{ env.is_platform_enabled == 'true' }} + run: rm -rf tmp; mkdir -p tmp/binary '${{ env.app }}' + + - name: Install cargo-binstall + if: ${{ env.is_platform_enabled == 'true' }} + uses: cargo-bins/cargo-binstall@main + + - name: Install Bevy CLI + if: ${{ env.is_platform_enabled == 'true' }} + run: cargo binstall --version 0.1.0-alpha.2 --locked --no-confirm --force --git='https://github.com/TheBevyFlock/bevy_cli' bevy_cli + + - name: Build and add web bundle to app (Web) + if: ${{ env.is_platform_enabled == 'true' && matrix.platform == 'web' }} + run: | + cargo binstall --locked --no-confirm --force wasm-bindgen-cli + cargo binstall --locked --no-confirm --force wasm-opt + bevy build --locked --release --features='${{ matrix.features }}' --yes web --bundle + mv 'target/bevy_web/web-release/${{ env.cargo_build_binary_name }}' '${{ env.app }}' + + - name: Build and add binaries to app (non-Web) + if: ${{ env.is_platform_enabled == 'true' && matrix.platform != 'web' }} + run: | + for target in ${{ matrix.targets }}; do + bevy build --locked --release --target="${target}" --features='${{ matrix.features }}' + mv target/"${target}"/release/'${{ env.cargo_build_binary_name }}${{ matrix.binary_ext }}' tmp/binary/"${target}"'${{ matrix.binary_ext }}' + done + if [ '${{ matrix.platform }}' = 'macos' ]; then + lipo tmp/binary/*'${{ matrix.binary_ext }}' -create -output '${{ env.app }}/${{ env.app_binary_name }}${{ matrix.binary_ext }}' + else + mv tmp/binary/*'${{ matrix.binary_ext }}' '${{ env.app }}/${{ env.app_binary_name }}${{ matrix.binary_ext }}' + fi + + - name: Add assets to app (non-Web) + if: ${{ env.is_platform_enabled == 'true' && matrix.platform != 'web' }} + run: cp -R ./'${{ env.assets_path }}' '${{ env.app }}' || true # Ignore error if assets folder does not exist. + + - name: Add metadata to app (macOS) + if: ${{ env.is_platform_enabled == 'true' && matrix.platform == 'macos' }} + run: | + cat >'${{ env.app }}/../Info.plist' < + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${{ env.app_display_name }} + CFBundleExecutable + ${{ env.app_binary_name }} + CFBundleIdentifier + ${{ env.app_id }} + CFBundleName + ${{ env.app_short_name }} + CFBundleShortVersionString + ${{ env.version }} + CFBundleVersion + ${{ env.version }} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSupportedPlatforms + + MacOSX + + + + EOF + + - name: Package app (non-Windows) + if: ${{ env.is_platform_enabled == 'true' && matrix.platform != 'windows' }} + working-directory: tmp/app + run: | + if [ '${{ matrix.platform }}' = 'macos' ]; then + ln -s /Applications . + hdiutil create -fs HFS+ -volname '${{ env.app_package_name }}' -srcfolder . '${{ env.package }}' + else + zip --recurse-paths '${{ env.package }}' '${{ env.app_package_name }}' + fi + + - name: Package app (Windows) + if: ${{ env.is_platform_enabled == 'true' && matrix.platform == 'windows' }} + working-directory: tmp/app + shell: pwsh + run: Compress-Archive -Path '${{ env.app_package_name }}' -DestinationPath '${{ env.package }}' + + - name: Upload package to workflow artifacts + if: ${{ env.is_platform_enabled == 'true' }} + uses: actions/upload-artifact@v4 + with: + path: tmp/app/${{ env.package }} + name: package-${{ matrix.platform }} + retention-days: 1 + + - name: Upload web bundle to workflow artifacts for GitHub Pages (Web) + if: ${{ env.is_platform_enabled == 'true' && matrix.platform == 'web' && inputs.deploy_to_github_pages }} + uses: actions/upload-pages-artifact@v3 + with: + path: ${{ env.app }}/${{ env.cargo_build_binary_name }} + + - name: Upload package to GitHub release + if: ${{ env.is_platform_enabled == 'true' && inputs.upload_to_github }} + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: tmp/app/${{ env.package }} + asset_name: ${{ env.package }} + release_name: ${{ env.version }} + tag: ${{ env.version }} + overwrite: true + + # Deploy to itch.io. + deploy-to-itch: + runs-on: ubuntu-latest + needs: + - forward-env + - get-version + - build + if: ${{ inputs.deploy_to_itch && needs.forward-env.outputs.itch_page != '' }} + + steps: + - name: Download packages + uses: actions/download-artifact@v4 + with: + pattern: package-(windows|macos|linux|web) + path: tmp + + - name: Install butler + run: | + curl -L -o butler.zip 'https://broth.itch.zone/butler/linux-amd64/LATEST/archive/default' + unzip butler.zip + chmod +x butler + ./butler -V + + - name: Upload packages to itch.io + env: + BUTLER_API_KEY: ${{ secrets.BUTLER_CREDENTIALS }} + run: | + for package in $(ls tmp); do + ./butler push \ + --fix-permissions \ + --userversion='${{ needs.get-version.outputs.version }}' \ + tmp/"${package}"/* \ + '${{ env.itch_page }}':"${package#package-}" + done + + # Deploy to GitHub Pages. + deploy-to-github-pages: + runs-on: ubuntu-latest + needs: build + permissions: + # Required to deploy to GitHub Pages. + pages: write + # Required for GitHub Pages to verify the source of the deployment. + # See: . + id-token: write + environment: + name: github-pages + url: ${{ steps.deploy.outputs.page_url }} + if: ${{ inputs.deploy_to_github_pages && inputs.build_for_web }} + + steps: + - name: Deploy to GitHub Pages + id: deploy + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index ea8c4bf..a6b95ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +.cargo/config.toml diff --git a/.vscode/bevy.code-snippets b/.vscode/bevy.code-snippets new file mode 100644 index 0000000..bcf1a81 --- /dev/null +++ b/.vscode/bevy.code-snippets @@ -0,0 +1,68 @@ +{ + "Bevy: New top-level function Plugin": { + "scope": "rust", + "prefix": "plugin", + "body": [ + "use bevy::prelude::*;", + "", + "pub(super) fn plugin(app: &mut App) {", + "\t$0", + "}" + ] + }, + "Bevy: New Component": { + "scope": "rust", + "prefix": "component", + "body": [ + "#[derive(Component, Reflect, Debug)]", + "#[reflect(Component)]", + "struct $1;" + ] + }, + "Bevy: New Resource": { + "scope": "rust", + "prefix": "resource", + "body": [ + "#[derive(Resource, Reflect, Debug, Default)]", + "#[reflect(Resource)]", + "struct $1;" + ] + }, + "Bevy: New Event": { + "scope": "rust", + "prefix": "event", + "body": [ + "#[derive(Event, Debug)]", + "struct $1;" + ] + }, + "Bevy: New SystemSet": { + "scope": "rust", + "prefix": "systemset", + "body": [ + "#[derive(SystemSet, Copy, Clone, Eq, PartialEq, Hash, Debug)]", + "enum $1 {", + "\t$0", + "}" + ] + }, + "Bevy: New Schedule": { + "scope": "rust", + "prefix": "schedule", + "body": [ + "#[derive(ScheduleLabel, Copy, Clone, Eq, PartialEq, Hash, Debug)]", + "struct $1;" + ] + }, + "Bevy: New States": { + "scope": "rust", + "prefix": "states", + "body": [ + "#[derive(States, Copy, Clone, Eq, PartialEq, Hash, Debug, Default)]", + "enum $1 {", + "\t#[default]", + "\t$0", + "}" + ] + } +} \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..e484c6b --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + "recommendations": [ + "fill-labs.dependi", + "editorconfig.editorconfig", + "tamasfe.even-better-toml", + "rust-lang.rust-analyzer", + "a5huynh.vscode-ron" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..711a0f1 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + // Allow `rust-analyzer` and `cargo` to run simultaneously. + // This uses extra storage space, so consider commenting it out. + "rust-analyzer.cargo.targetDir": true, + // Display the directory of `mod.rs` files in the tab above the text editor. + "workbench.editor.customLabels.patterns": { + "**/mod.rs": "${dirname}/mod.rs" + }, +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..8d79dcb --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,84 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Run native dev", + "type": "process", + "command": "bevy", + "args": [ + "run" + ], + "options": { + "env": { + "RUST_BACKTRACE": "full" + } + }, + "presentation": { + "clear": true + }, + "problemMatcher": [ + "$rustc" + ], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Run native release", + "type": "process", + "command": "bevy", + "args": [ + "run", + "--release" + ], + "presentation": { + "clear": true + }, + "problemMatcher": [ + "$rustc" + ], + "group": "build" + }, + { + "label": "Run web dev", + "type": "process", + "command": "bevy", + "args": [ + "run", + "--yes", + "web" + ], + "options": { + "env": { + "RUST_BACKTRACE": "full" + } + }, + "presentation": { + "clear": true + }, + "problemMatcher": [ + "$rustc" + ], + "group": "build" + }, + { + "label": "Run web release", + "type": "process", + "command": "bevy", + "args": [ + "run", + "--yes", + "--release", + "web" + ], + "presentation": { + "clear": true + }, + "problemMatcher": [ + "$rustc" + ], + "group": "build" + } + ] +} diff --git a/Cargo.lock b/Cargo.lock index 5b5e2ba..f599a1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -79,15 +79,6 @@ dependencies = [ "winit", ] -[[package]] -name = "addr2line" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" version = "2.0.1" @@ -116,28 +107,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "alsa" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7572b7ba83a31e20d1b48970ee402d2e3e0537dcfe0a3ff4d6eb7508617d43" -dependencies = [ - "alsa-sys", - "bitflags 2.9.4", - "cfg-if", - "libc", -] - -[[package]] -name = "alsa-sys" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8fee663d06c4e303404ef5f40488a53e062f89ba8bfed81f42325aafad1527" -dependencies = [ - "libc", - "pkg-config", -] - [[package]] name = "android-activity" version = "0.6.0" @@ -152,9 +121,9 @@ dependencies = [ "jni-sys", "libc", "log", - "ndk 0.9.0", + "ndk", "ndk-context", - "ndk-sys 0.6.0+11769913", + "ndk-sys", "num_enum", "thiserror 1.0.69", ] @@ -180,12 +149,6 @@ dependencies = [ "libc", ] -[[package]] -name = "anyhow" -version = "1.0.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" - [[package]] name = "approx" version = "0.5.1" @@ -282,24 +245,6 @@ dependencies = [ "futures-lite", ] -[[package]] -name = "async-io" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" -dependencies = [ - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-io", - "futures-lite", - "parking", - "polling", - "rustix 1.1.2", - "slab", - "windows-sys 0.61.1", -] - [[package]] name = "async-lock" version = "3.4.1" @@ -345,21 +290,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "backtrace" -version = "0.3.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-link 0.2.0", -] - [[package]] name = "base64" version = "0.22.1" @@ -372,6 +302,7 @@ version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "342f7e9335416dc98642d5747c4ed8a6ad9f7244a36d5b2b7a1b7910e4d8f524" dependencies = [ + "bevy_dylib", "bevy_internal", ] @@ -398,50 +329,6 @@ dependencies = [ "android-activity", ] -[[package]] -name = "bevy_animation" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d2eadb9c20d87ab3a5528a8df483492d5b8102d3f2d61c7b1ed23f40a79166" -dependencies = [ - "bevy_animation_macros", - "bevy_app", - "bevy_asset", - "bevy_color", - "bevy_derive", - "bevy_ecs", - "bevy_math", - "bevy_mesh", - "bevy_platform", - "bevy_reflect", - "bevy_time", - "bevy_transform", - "bevy_utils", - "blake3", - "derive_more", - "downcast-rs 2.0.2", - "either", - "petgraph", - "ron", - "serde", - "smallvec", - "thiserror 2.0.17", - "thread_local", - "tracing", - "uuid", -] - -[[package]] -name = "bevy_animation_macros" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aec80b84926f730f6df81b9bc07255c120f57aaf7ac577f38d12dd8e1a0268ad" -dependencies = [ - "bevy_macro_utils", - "quote", - "syn", -] - [[package]] name = "bevy_anti_alias" version = "0.17.2" @@ -515,6 +402,7 @@ dependencies = [ "futures-io", "futures-lite", "js-sys", + "notify-debouncer-full", "parking_lot", "ron", "serde", @@ -539,24 +427,6 @@ dependencies = [ "syn", ] -[[package]] -name = "bevy_audio" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83620c82f281848c02ed4b65133a0364512b4eca2b39cd21a171e50e2986d89" -dependencies = [ - "bevy_app", - "bevy_asset", - "bevy_ecs", - "bevy_math", - "bevy_reflect", - "bevy_transform", - "coreaudio-sys", - "cpal", - "rodio", - "tracing", -] - [[package]] name = "bevy_camera" version = "0.17.2" @@ -639,6 +509,32 @@ dependencies = [ "syn", ] +[[package]] +name = "bevy_dev_tools" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1187d400fa44e1f2b741396fccda2e3ff8cb2775f7eeac508c6b6b068f2050ed" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_diagnostic", + "bevy_ecs", + "bevy_math", + "bevy_picking", + "bevy_reflect", + "bevy_render", + "bevy_shader", + "bevy_state", + "bevy_text", + "bevy_time", + "bevy_ui", + "bevy_ui_render", + "bevy_window", + "tracing", +] + [[package]] name = "bevy_diagnostic" version = "0.17.2" @@ -654,7 +550,15 @@ dependencies = [ "const-fnv1a-hash", "log", "serde", - "sysinfo", +] + +[[package]] +name = "bevy_dylib" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7834bd6b49e3459b94fe2ee2f532de820fd8b91183976e375bf88098e48fe2" +dependencies = [ + "bevy_internal", ] [[package]] @@ -756,7 +660,6 @@ dependencies = [ "bevy_light", "bevy_math", "bevy_mesh", - "bevy_pbr", "bevy_reflect", "bevy_render", "bevy_shader", @@ -779,41 +682,6 @@ dependencies = [ "syn", ] -[[package]] -name = "bevy_gltf" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d67e954b20551818f7cdb33f169ab4db64506ada66eb4d60d3cb8861103411" -dependencies = [ - "base64", - "bevy_animation", - "bevy_app", - "bevy_asset", - "bevy_camera", - "bevy_color", - "bevy_ecs", - "bevy_image", - "bevy_light", - "bevy_math", - "bevy_mesh", - "bevy_pbr", - "bevy_platform", - "bevy_reflect", - "bevy_render", - "bevy_scene", - "bevy_tasks", - "bevy_transform", - "fixedbitset", - "gltf", - "itertools 0.14.0", - "percent-encoding", - "serde", - "serde_json", - "smallvec", - "thiserror 2.0.17", - "tracing", -] - [[package]] name = "bevy_image" version = "0.17.2" @@ -834,7 +702,6 @@ dependencies = [ "guillotiere", "half", "image", - "ktx2", "rectangle-pack", "ruzstd", "serde", @@ -886,34 +753,29 @@ checksum = "f43985739584f3a5d43026aa1edd772f064830be46c497518f05f7dfbc886bba" dependencies = [ "bevy_a11y", "bevy_android", - "bevy_animation", "bevy_anti_alias", "bevy_app", "bevy_asset", - "bevy_audio", "bevy_camera", "bevy_color", "bevy_core_pipeline", "bevy_derive", + "bevy_dev_tools", "bevy_diagnostic", "bevy_ecs", "bevy_gilrs", "bevy_gizmos", - "bevy_gltf", "bevy_image", "bevy_input", "bevy_input_focus", - "bevy_light", "bevy_log", "bevy_math", "bevy_mesh", "bevy_pbr", "bevy_picking", "bevy_platform", - "bevy_post_process", "bevy_ptr", "bevy_reflect", - "bevy_remote", "bevy_render", "bevy_scene", "bevy_shader", @@ -993,7 +855,7 @@ dependencies = [ "bevy_reflect", "derive_more", "glam", - "itertools 0.14.0", + "itertools", "libm", "rand", "rand_distr", @@ -1084,13 +946,11 @@ dependencies = [ "bevy_ecs", "bevy_input", "bevy_math", - "bevy_mesh", "bevy_platform", "bevy_reflect", "bevy_time", "bevy_transform", "bevy_window", - "crossbeam-channel", "tracing", "uuid", ] @@ -1116,36 +976,6 @@ dependencies = [ "web-time", ] -[[package]] -name = "bevy_post_process" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26ee8ab6043f8bbe43e9c16bbdde0c5e7289b99e62cd8aad1a2a4166a7f2bce6" -dependencies = [ - "bevy_app", - "bevy_asset", - "bevy_camera", - "bevy_color", - "bevy_core_pipeline", - "bevy_derive", - "bevy_ecs", - "bevy_image", - "bevy_math", - "bevy_platform", - "bevy_reflect", - "bevy_render", - "bevy_shader", - "bevy_transform", - "bevy_utils", - "bevy_window", - "bitflags 2.9.4", - "nonmax", - "radsort", - "smallvec", - "thiserror 2.0.17", - "tracing", -] - [[package]] name = "bevy_ptr" version = "0.17.2" @@ -1170,7 +1000,6 @@ dependencies = [ "foldhash 0.2.0", "glam", "inventory", - "petgraph", "serde", "smallvec", "smol_str", @@ -1194,31 +1023,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "bevy_remote" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5e053684d1735e62d8e491cb68f5d9f7219edcb6528d1ac5fe179f24e5fe497" -dependencies = [ - "anyhow", - "async-channel", - "async-io", - "bevy_app", - "bevy_asset", - "bevy_derive", - "bevy_ecs", - "bevy_log", - "bevy_platform", - "bevy_reflect", - "bevy_tasks", - "bevy_utils", - "http-body-util", - "hyper", - "serde", - "serde_json", - "smol-hyper", -] - [[package]] name = "bevy_render" version = "0.17.2" @@ -1333,7 +1137,6 @@ dependencies = [ "bevy_image", "bevy_math", "bevy_mesh", - "bevy_picking", "bevy_reflect", "bevy_text", "bevy_transform", @@ -1410,7 +1213,6 @@ checksum = "18839182775f30d26f0f84d9de85d25361bb593c99517a80b64ede6cbaf41adc" dependencies = [ "async-channel", "async-executor", - "async-io", "async-task", "atomic-waker", "bevy_platform", @@ -1498,7 +1300,6 @@ dependencies = [ "bevy_image", "bevy_input", "bevy_math", - "bevy_picking", "bevy_platform", "bevy_reflect", "bevy_sprite", @@ -1512,7 +1313,6 @@ dependencies = [ "taffy", "thiserror 2.0.17", "tracing", - "uuid", ] [[package]] @@ -1564,9 +1364,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f582478606d6b6e5c53befbe7612f038fdfb73f8a27f7aae644406637347acd4" dependencies = [ "bevy_app", - "bevy_asset", "bevy_ecs", - "bevy_image", "bevy_input", "bevy_math", "bevy_platform", @@ -1588,10 +1386,8 @@ dependencies = [ "bevy_a11y", "bevy_android", "bevy_app", - "bevy_asset", "bevy_derive", "bevy_ecs", - "bevy_image", "bevy_input", "bevy_input_focus", "bevy_log", @@ -1600,33 +1396,13 @@ dependencies = [ "bevy_reflect", "bevy_tasks", "bevy_window", - "bytemuck", "cfg-if", "tracing", "wasm-bindgen", "web-sys", - "wgpu-types", "winit", ] -[[package]] -name = "bindgen" -version = "0.72.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" -dependencies = [ - "bitflags 2.9.4", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "proc-macro2", - "quote", - "regex", - "rustc-hash 2.1.1", - "shlex", - "syn", -] - [[package]] name = "bit-set" version = "0.8.0" @@ -1793,15 +1569,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-if" version = "1.0.3" @@ -1814,17 +1581,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "codespan-reporting" version = "0.12.0" @@ -1963,26 +1719,6 @@ dependencies = [ "libc", ] -[[package]] -name = "coreaudio-rs" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "321077172d79c662f64f5071a03120748d5bb652f5231570141be24cfcd2bace" -dependencies = [ - "bitflags 1.3.2", - "core-foundation-sys", - "coreaudio-sys", -] - -[[package]] -name = "coreaudio-sys" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceec7a6067e62d6f931a2baf6f3a751f4a892595bcec1461a3c94ef9949864b6" -dependencies = [ - "bindgen", -] - [[package]] name = "cosmic-text" version = "0.14.2" @@ -1993,7 +1729,7 @@ dependencies = [ "fontdb", "log", "rangemap", - "rustc-hash 1.1.0", + "rustc-hash", "rustybuzz", "self_cell", "smol_str", @@ -2006,29 +1742,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "cpal" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "873dab07c8f743075e57f524c583985fbaf745602acbe916a01539364369a779" -dependencies = [ - "alsa", - "core-foundation-sys", - "coreaudio-rs", - "dasp_sample", - "jni", - "js-sys", - "libc", - "mach2", - "ndk 0.8.0", - "ndk-context", - "oboe", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows 0.54.0", -] - [[package]] name = "crc32fast" version = "1.5.0" @@ -2091,12 +1804,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" -[[package]] -name = "dasp_sample" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" - [[package]] name = "data-encoding" version = "2.9.0" @@ -2311,6 +2018,15 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "file-id" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1fc6a637b6dc58414714eddd9170ff187ecb0933d4c7024d1abbd23a3cc26e9" +dependencies = [ + "windows-sys 0.60.2", +] + [[package]] name = "find-msvc-tools" version = "0.1.3" @@ -2410,6 +2126,15 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" +[[package]] +name = "fsevent-sys" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" +dependencies = [ + "libc", +] + [[package]] name = "futures-channel" version = "0.3.31" @@ -2502,12 +2227,6 @@ dependencies = [ "windows 0.62.1", ] -[[package]] -name = "gimli" -version = "0.32.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" - [[package]] name = "gl_generator" version = "0.14.0" @@ -2531,12 +2250,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - [[package]] name = "glow" version = "0.16.0" @@ -2549,42 +2262,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "gltf" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ce1918195723ce6ac74e80542c5a96a40c2b26162c1957a5cd70799b8cacf7" -dependencies = [ - "byteorder", - "gltf-json", - "lazy_static", - "serde_json", -] - -[[package]] -name = "gltf-derive" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14070e711538afba5d6c807edb74bcb84e5dbb9211a3bf5dea0dfab5b24f4c51" -dependencies = [ - "inflections", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "gltf-json" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6176f9d60a7eab0a877e8e96548605dedbde9190a7ae1e80bbcc1c9af03ab14" -dependencies = [ - "gltf-derive", - "serde", - "serde_derive", - "serde_json", -] - [[package]] name = "glutin_wgl_sys" version = "0.6.1" @@ -2734,73 +2411,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" -[[package]] -name = "http" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" -dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" -dependencies = [ - "atomic-waker", - "bytes", - "futures-channel", - "futures-core", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "pin-utils", - "smallvec", - "tokio", -] - [[package]] name = "image" version = "0.25.8" @@ -2826,12 +2436,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "inflections" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a257582fdcde896fd96463bf2d40eefea0580021c0712a0e2b028b60b47a837a" - [[package]] name = "inotify" version = "0.11.0" @@ -2871,26 +2475,6 @@ dependencies = [ "mach2", ] -[[package]] -name = "io-uring" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" -dependencies = [ - "bitflags 2.9.4", - "cfg-if", - "libc", -] - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.14.0" @@ -2900,12 +2484,6 @@ dependencies = [ "either", ] -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - [[package]] name = "jni" version = "0.21.1" @@ -2966,12 +2544,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] -name = "ktx2" -version = "0.4.0" +name = "kqueue" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff7f53bdf698e7aa7ec916411bbdc8078135da11b66db5182675b2227f6c0d07" +checksum = "eac30106d7dce88daf4a3fcb4879ea939476d5074a9b7ddd0fb97fa4bed5596a" dependencies = [ - "bitflags 2.9.4", + "kqueue-sys", + "libc", +] + +[[package]] +name = "kqueue-sys" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" +dependencies = [ + "bitflags 1.3.2", + "libc", ] [[package]] @@ -2980,17 +2569,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "ldg-jam-3" -version = "0.1.0" -dependencies = [ - "bevy", - "bevy_embedded_assets", - "leafwing-input-manager", - "log", - "rand", -] - [[package]] name = "leafwing-input-manager" version = "0.18.0" @@ -3001,7 +2579,7 @@ dependencies = [ "dyn-clone", "dyn-eq", "dyn-hash", - "itertools 0.14.0", + "itertools", "leafwing_input_manager_macros", "serde", "serde_flexitos", @@ -3015,19 +2593,8 @@ checksum = "2226cb83129176a6c634f2ce0828c2c29896ea0898fc198636f98696b8056890" dependencies = [ "proc-macro-crate", "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "lewton" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777b48df9aaab155475a83a7df3070395ea1ac6902f5cd062b8f2b028075c030" -dependencies = [ - "byteorder", - "ogg", - "tinyvec", + "quote", + "syn", ] [[package]] @@ -3163,12 +2730,6 @@ dependencies = [ "paste", ] -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.8.9" @@ -3186,6 +2747,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", + "log", "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.59.0", ] @@ -3221,7 +2783,7 @@ dependencies = [ "num-traits", "once_cell", "pp-rs", - "rustc-hash 1.1.0", + "rustc-hash", "spirv", "thiserror 2.0.17", "unicode-ident", @@ -3238,26 +2800,12 @@ dependencies = [ "indexmap", "naga", "regex", - "rustc-hash 1.1.0", + "rustc-hash", "thiserror 2.0.17", "tracing", "unicode-ident", ] -[[package]] -name = "ndk" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" -dependencies = [ - "bitflags 2.9.4", - "jni-sys", - "log", - "ndk-sys 0.5.0+25.2.9519653", - "num_enum", - "thiserror 1.0.69", -] - [[package]] name = "ndk" version = "0.9.0" @@ -3267,7 +2815,7 @@ dependencies = [ "bitflags 2.9.4", "jni-sys", "log", - "ndk-sys 0.6.0+11769913", + "ndk-sys", "num_enum", "raw-window-handle", "thiserror 1.0.69", @@ -3279,15 +2827,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" -[[package]] -name = "ndk-sys" -version = "0.5.0+25.2.9519653" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" -dependencies = [ - "jni-sys", -] - [[package]] name = "ndk-sys" version = "0.6.0+11769913" @@ -3309,16 +2848,6 @@ dependencies = [ "libc", ] -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "nonmax" version = "0.5.5" @@ -3326,32 +2855,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51" [[package]] -name = "ntapi" -version = "0.4.1" +name = "notify" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" dependencies = [ - "winapi", + "bitflags 2.9.4", + "fsevent-sys", + "inotify", + "kqueue", + "libc", + "log", + "mio", + "notify-types", + "walkdir", + "windows-sys 0.60.2", ] [[package]] -name = "nu-ansi-term" -version = "0.50.1" +name = "notify-debouncer-full" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" +checksum = "d2d88b1a7538054351c8258338df7c931a590513fb3745e8c15eb9ff4199b8d1" dependencies = [ - "windows-sys 0.52.0", + "file-id", + "log", + "notify", + "notify-types", + "walkdir", ] [[package]] -name = "num-derive" -version = "0.4.2" +name = "notify-types" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" + +[[package]] +name = "nu-ansi-term" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" dependencies = [ - "proc-macro2", - "quote", - "syn", + "windows-sys 0.52.0", ] [[package]] @@ -3463,15 +3009,6 @@ dependencies = [ "objc2-foundation", ] -[[package]] -name = "objc2-core-foundation" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" -dependencies = [ - "bitflags 2.9.4", -] - [[package]] name = "objc2-core-image" version = "0.2.2" @@ -3515,16 +3052,6 @@ dependencies = [ "objc2", ] -[[package]] -name = "objc2-io-kit" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71c1c64d6120e51cd86033f67176b1cb66780c2efe34dec55176f77befd93c0a" -dependencies = [ - "libc", - "objc2-core-foundation", -] - [[package]] name = "objc2-link-presentation" version = "0.2.2" @@ -3617,38 +3144,6 @@ dependencies = [ "objc2-foundation", ] -[[package]] -name = "object" -version = "0.37.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" -dependencies = [ - "memchr", -] - -[[package]] -name = "oboe" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8b61bebd49e5d43f5f8cc7ee2891c16e0f41ec7954d36bcb6c14c5e0de867fb" -dependencies = [ - "jni", - "ndk 0.8.0", - "ndk-context", - "num-derive", - "num-traits", - "oboe-sys", -] - -[[package]] -name = "oboe-sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8bb09a4a2b1d668170cfe0a7d5bc103f8999fb316c98099b6a9939c9f2e79d" -dependencies = [ - "cc", -] - [[package]] name = "offset-allocator" version = "0.2.0" @@ -3659,15 +3154,6 @@ dependencies = [ "nonmax", ] -[[package]] -name = "ogg" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6951b4e8bf21c8193da321bcce9c9dd2e13c858fe078bf9054a288b419ae5d6e" -dependencies = [ - "byteorder", -] - [[package]] name = "once_cell" version = "1.21.3" @@ -3742,19 +3228,6 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" -[[package]] -name = "petgraph" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" -dependencies = [ - "fixedbitset", - "hashbrown 0.15.5", - "indexmap", - "serde", - "serde_derive", -] - [[package]] name = "pin-project" version = "1.1.10" @@ -3781,12 +3254,6 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - [[package]] name = "piper" version = "0.2.4" @@ -4059,16 +3526,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" -[[package]] -name = "rodio" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ceb6607dd738c99bc8cb28eff249b7cd5c8ec88b9db96c0608c1480d140fb1" -dependencies = [ - "cpal", - "lewton", -] - [[package]] name = "ron" version = "0.10.1" @@ -4088,24 +3545,12 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" -[[package]] -name = "rustc-demangle" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" - [[package]] name = "rustc-hash" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustc-hash" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" - [[package]] name = "rustix" version = "0.38.44" @@ -4164,12 +3609,6 @@ dependencies = [ "twox-hash", ] -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - [[package]] name = "same-file" version = "1.0.6" @@ -4256,19 +3695,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_json" -version = "1.0.145" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", - "serde_core", -] - [[package]] name = "sharded-slab" version = "0.1.7" @@ -4349,19 +3775,6 @@ dependencies = [ "xkeysym", ] -[[package]] -name = "smol-hyper" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7428a49d323867702cd12b97b08a6b0104f39ec13b49117911f101271321bc1a" -dependencies = [ - "async-executor", - "async-io", - "futures-io", - "hyper", - "pin-project-lite", -] - [[package]] name = "smol_str" version = "0.2.2" @@ -4371,6 +3784,18 @@ dependencies = [ "serde", ] +[[package]] +name = "space_journey" +version = "0.1.0" +dependencies = [ + "bevy", + "bevy_embedded_assets", + "getrandom", + "leafwing-input-manager", + "log", + "rand", +] + [[package]] name = "spin" version = "0.10.0" @@ -4450,20 +3875,6 @@ dependencies = [ "libc", ] -[[package]] -name = "sysinfo" -version = "0.37.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16607d5caffd1c07ce073528f9ed972d88db15dd44023fa57142963be3feb11f" -dependencies = [ - "libc", - "memchr", - "ntapi", - "objc2-core-foundation", - "objc2-io-kit", - "windows 0.61.3", -] - [[package]] name = "taffy" version = "0.7.7" @@ -4574,20 +3985,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" -[[package]] -name = "tokio" -version = "1.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" -dependencies = [ - "backtrace", - "io-uring", - "libc", - "mio", - "pin-project-lite", - "slab", -] - [[package]] name = "toml_datetime" version = "0.7.2" @@ -5121,7 +4518,7 @@ dependencies = [ "portable-atomic", "profiling", "raw-window-handle", - "rustc-hash 1.1.0", + "rustc-hash", "smallvec", "thiserror 2.0.17", "wgpu-core-deps-apple", @@ -5187,7 +4584,7 @@ dependencies = [ "log", "metal", "naga", - "ndk-sys 0.6.0+11769913", + "ndk-sys", "objc", "ordered-float", "parking_lot", @@ -5221,22 +4618,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" version = "0.1.11" @@ -5246,22 +4627,6 @@ dependencies = [ "windows-sys 0.61.1", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.54.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" -dependencies = [ - "windows-core 0.54.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.58.0" @@ -5315,16 +4680,6 @@ dependencies = [ "windows-core 0.62.1", ] -[[package]] -name = "windows-core" -version = "0.54.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" -dependencies = [ - "windows-result 0.1.2", - "windows-targets 0.52.6", -] - [[package]] name = "windows-core" version = "0.58.0" @@ -5462,15 +4817,6 @@ dependencies = [ "windows-link 0.2.0", ] -[[package]] -name = "windows-result" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-result" version = "0.2.0" @@ -5553,6 +4899,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.4", +] + [[package]] name = "windows-sys" version = "0.61.1" @@ -5586,13 +4941,30 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d42b7b7f66d2a06854650af09cfdf8713e427a439c97ad65a6375318033ac4b" +dependencies = [ + "windows-link 0.2.0", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + [[package]] name = "windows-threading" version = "0.1.0" @@ -5623,6 +4995,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -5635,6 +5013,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -5647,12 +5031,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -5665,6 +5061,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -5677,6 +5079,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -5689,6 +5097,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -5701,6 +5115,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + [[package]] name = "winit" version = "0.30.12" @@ -5723,7 +5143,7 @@ dependencies = [ "js-sys", "libc", "memmap2", - "ndk 0.9.0", + "ndk", "objc2", "objc2-app-kit", "objc2-foundation", diff --git a/Cargo.toml b/Cargo.toml index 5a2640d..78129b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,27 @@ [package] -name = "ldg-jam-3" +name = "space_journey" +authors = ["Joda "] version = "0.1.0" edition = "2024" [dependencies] -bevy = { version = "0.17.2", features = ["bevy_remote"] } +bevy = { version = "0.17.2", default-features = false, features = [ + "bevy_log", + "bevy_asset", + "bevy_core_pipeline", + "bevy_sprite", + "bevy_sprite_render", + "bevy_text", + "bevy_window", + "bevy_winit", + "bevy_state", + "png", + "std", + "webgl2", + "x11", + "zstd_rust", + "wayland" + ] } bevy_embedded_assets = "0.14.0" leafwing-input-manager = "0.18.0" log = { version = "*", features = [ @@ -13,17 +30,100 @@ log = { version = "*", features = [ ] } rand = "0.9.2" +[target.wasm32-unknown-unknown.dependencies] +getrandom = { version = "0.3", features = ["wasm_js"] } + +[features] +# Default to a native dev build. +default = ["dev_native"] +dev = [ + # Improve compile times for dev builds by linking Bevy as a dynamic library. + "bevy/dynamic_linking", + "bevy/bevy_dev_tools", + "bevy/bevy_ui_debug", + # Improve error messages coming from Bevy + "bevy/track_location", +] +dev_native = [ + "dev", + # Enable asset hot reloading for native dev builds. + "bevy/file_watcher", + # Enable embedded asset hot reloading for native dev builds. + "bevy/embedded_watcher", +] + + +[package.metadata.bevy_cli.release] +# Disable dev features for release builds. +default-features = false + +[package.metadata.bevy_cli.web] +# Disable native features for web builds. +default-features = false + +[package.metadata.bevy_cli.web.dev] +features = ["dev"] + + +[lints.rust] +# Mark `bevy_lint` as a valid `cfg`, as it is set when the Bevy linter runs. +unexpected_cfgs = { level = "warn", check-cfg = ["cfg(bevy_lint)"] } + +[lints.clippy] +# Bevy supplies arguments to systems via dependency injection, so it's natural for systems to +# request more than 7 arguments, which would undesirably trigger this lint. +too_many_arguments = "allow" +# Queries may access many components, which would undesirably trigger this lint. +type_complexity = "allow" +# Make sure macros use their standard braces, such as `[]` for `bevy_ecs::children!`. +nonstandard_macro_braces = "warn" + +# You can configure the warning levels of Bevy lints here. For a list of all lints, see: +# +[package.metadata.bevy_lint] +# panicking_methods = "deny" +# pedantic = "warn" + + +# Compile with Performance Optimizations: +# + +# Enable a small amount of optimization in the dev profile. [profile.dev] opt-level = 1 +# Enable a large amount of optimization in the dev profile for dependencies. [profile.dev.package."*"] opt-level = 3 +# Remove expensive debug assertions due to +[profile.dev.package.wgpu-types] +debug-assertions = false + [profile.release] +# Compile the entire crate as one unit. +# Slows compile times, marginal improvements. codegen-units = 1 +# Do a second optimization pass over the entire program, including dependencies. +# Slows compile times, marginal improvements. lto = "thin" -[profile.wasm-release] +# This profile will be used by `bevy run web` automatically. +[profile.web-release] +# Default to release profile values. inherits = "release" +# Optimize with size in mind (also try "z", sometimes it is better). +# Slightly slows compile times, great improvements to file size and runtime performance. opt-level = "s" +# Strip all debugging information from the binary to slightly reduce file size. strip = "debuginfo" + +# Optimize for build time in CI. +[profile.ci] +inherits = "dev" +opt-level = 0 +debug = "line-tables-only" +codegen-units = 4 + +[profile.ci.package."*"] +opt-level = 0 diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 0000000..af8b632 --- /dev/null +++ b/clippy.toml @@ -0,0 +1,2 @@ +# Require `bevy_ecs::children!` to use `[]` braces, instead of `()` or `{}`. +standard-macro-braces = [{ name = "children", brace = "[" }] diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index 5d56faf..0000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -channel = "nightly" diff --git a/src/main.rs b/src/main.rs index a296886..ff93bbd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,6 @@ use bevy::{ asset::AssetMetaCheck, prelude::*, - remote::{RemotePlugin, http::RemoteHttpPlugin}, window::{WindowMode, WindowResolution}, }; use bevy_embedded_assets::{EmbeddedAssetPlugin, PluginMode}; @@ -46,9 +45,6 @@ impl Plugin for AppPlugin { app.add_plugins(InputPlugin); - app.add_plugins(RemotePlugin::default()); - app.add_plugins(RemoteHttpPlugin::default()); - app.add_plugins(screens::plugin); app.init_state::(); diff --git a/src/screens/game.rs b/src/screens/game.rs index 0a0eadd..ad49dec 100644 --- a/src/screens/game.rs +++ b/src/screens/game.rs @@ -16,18 +16,18 @@ pub(super) fn plugin(app: &mut App) { app.add_systems(OnEnter(GameState::Play), spawn_game_screen); app.add_systems(OnEnter(GameState::GameOver), spawn_game_over); app.add_systems(OnExit(GameState::GameOver), despawn_game_screen); - app.configure_sets(Startup, GameSet::Play); - app.configure_sets(Startup, GameSet::Environment); - app.configure_sets(Startup, GameSet::GameOver); + app.configure_sets(Startup, GameSystems::Play); + app.configure_sets(Startup, GameSystems::Environment); + app.configure_sets(Startup, GameSystems::GameOver); app.add_systems( FixedUpdate, - (player_input, update_projectiles).in_set(GameSet::Play), + (player_input, update_projectiles).in_set(GameSystems::Play), ); - app.add_systems(Update, (pause).in_set(GameSet::Play)); + app.add_systems(Update, (pause).in_set(GameSystems::Play)); - app.add_systems(Update, (game_over_input).in_set(GameSet::GameOver)); + app.add_systems(Update, (game_over_input).in_set(GameSystems::GameOver)); app.add_systems( FixedUpdate, @@ -36,7 +36,7 @@ pub(super) fn plugin(app: &mut App) { update_asteroids, collide_with_asteroid_check, ) - .in_set(GameSet::Environment), + .in_set(GameSystems::Environment), ); app.insert_resource(AsteroidSpawnTimer(Timer::from_seconds( @@ -92,7 +92,7 @@ fn despawn_game_screen( } #[derive(SystemSet, Debug, Clone, Hash, Eq, PartialEq)] -enum GameSet { +enum GameSystems { Play, Environment, GameOver, @@ -255,7 +255,7 @@ fn spawn_asteroid( size: Vec2, ) { let image_index = random_range(1..=2); - let image = format!("sprites/asteroids/asteroid{}.png", image_index); + let image = format!("sprites/asteroids/asteroid{image_index}.png"); commands.spawn(( Name::new("Asteroid"), Sprite {