diff --git a/.editorconfig b/.editorconfig index 9f804ad8..6579243a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,36 +8,48 @@ charset = utf-8 end_of_line = lf indent_style = space indent_size = 4 -insert_final_newline = false +insert_final_newline = true quote_type = double -trim_trailing_whitespace = false - -[*.{ts,tsx,js,jsx,cjs,mjs}] -indent_size = 2 -quote_type = single +trim_trailing_whitespace = true +# Common config files [*.{json,yaml,yml,toml}] indent_size = 2 -[*.{md,mdx}] -indent_size = 2 - -[*{toml}] -end_of_line = lf +# scripts +[*.{sh,bat}] indent_size = 2 - -[*.md] insert_final_newline = true -trim_trailing_whitespace = true +trim_trailing_whitespace = false +# Rust files [*.rs] indent_size = 4 +# Python files +[*.py] +indent_size = 4 + +# WebAssembly files +[*.{wat,wit}] +indent_size = 4 +insert_final_newline = false + +# Markdown files +[*.{md,mdx}] +indent_size = 2 + +# WebDev + +## JavaScript / TypeScript +[*.{ts,tsx,js,jsx,cjs,mjs}] +indent_size = 2 + +## HTML / XML [*.{html,htm,xml}] indent_size = 2 +## Stylesheets [*.{css,scss,sass,less}] indent_size = 2 -trim_trailing_whitespace = true -insert_final_newline = true diff --git a/.github/workflows/cargo-bench.yml b/.github/workflows/cargo-bench.yml deleted file mode 100644 index c010c93e..00000000 --- a/.github/workflows/cargo-bench.yml +++ /dev/null @@ -1,67 +0,0 @@ -# This workflow is used to benchmark a Rust project -name: cargo-bench -# The workflow may be manually triggered and is run automatically when: -# - a pull request is closed on the default branch (main/master) -# - a release is published -# - a repository_dispatch event with the type "cargo-bench" is received - -concurrency: - cancel-in-progress: false - group: ${{ github.workflow }}-${{ github.ref }} - -env: - CARGO_TERM_COLOR: always - RUST_BACKTRACE: full - -on: - pull_request: - branches: [main, master] - types: [closed] - push: - tags: [latest, v*.*.*, "*-nightly"] - repository_dispatch: - types: [cargo-bench] - workflow_dispatch: - -permissions: - contents: write - checks: write - -jobs: - cargo-bench: - name: Benchmark - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - features: [full] - target: [x86_64-unknown-linux-gnu] - outputs: - id: ${{ steps.artifacts.outputs.artifact-id }} - digest: ${{ steps.artifacts.outputs.artifact-digest }} - url: ${{ steps.artifacts.outputs.artifact-url }} - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - repository: ${{ github.repository }} - ref: ${{ github.event.client_payload.ref || github.ref }} - token: ${{ secrets.GITHUB_TOKEN }} - - name: Setup Rust - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - target: ${{ matrix.target }} - - uses: taiki-e/install-action@v2 - with: - tool: cargo-criterion - - name: Benchmark the workspace (${{ matrix.target }}) - run: cargo criterion -v --benches --locked --workspace --features ${{ matrix.features }} --target ${{ matrix.target }} - - name: Upload the results - id: artifacts - uses: actions/upload-artifact@v6 - with: - name: Benchmark Report (${{ github.run_id }}) - if-no-files-found: error - overwrite: true - path: target/criterion/ diff --git a/.github/workflows/cargo-clippy.yml b/.github/workflows/cargo-clippy.yml index 8d6a5743..81bb36f9 100644 --- a/.github/workflows/cargo-clippy.yml +++ b/.github/workflows/cargo-clippy.yml @@ -14,36 +14,34 @@ on: types: [clippy, cargo-clippy] workflow_dispatch: -permissions: - actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status - contents: read - security-events: write - statuses: write - jobs: clippy: runs-on: ubuntu-latest + permissions: + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + contents: read + security-events: write + statuses: write steps: - - uses: actions/checkout@v6 + - name: Checkout + uses: actions/checkout@v6 with: fetch-depth: 0 - repository: ${{ github.repository }} - ref: ${{ github.event.client_payload.ref || github.ref }} - token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Rust uses: actions-rust-lang/setup-rust-toolchain@v1 with: cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} components: clippy,rustfmt - - uses: taiki-e/install-action@v2 + - name: Install SARIF tools + uses: taiki-e/install-action@v2 with: tool: clippy-sarif sarif-fmt - - name: Run Clippy + - name: Run cargo clippy run: | cargo clippy \ --features full \ --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt - - name: Upload analysis + - name: Upload the results uses: github/codeql-action/upload-sarif@v4 with: sarif_file: rust-clippy-results.sarif diff --git a/.github/workflows/cargo-publish.yml b/.github/workflows/cargo-publish.yml index 0c332422..21d7d3c5 100644 --- a/.github/workflows/cargo-publish.yml +++ b/.github/workflows/cargo-publish.yml @@ -4,10 +4,6 @@ concurrency: cancel-in-progress: false group: ${{ github.workflow }}-${{ github.ref }} -env: - CARGO_TERM_COLOR: always - RUST_BACKTRACE: full - on: release: types: [published] @@ -15,21 +11,26 @@ on: types: [crates-io, cargo-publish] workflow_dispatch: +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: full + permissions: contents: read deployments: write jobs: crates-io: - environment: crates-io runs-on: ubuntu-latest - env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + environment: + name: crates-io + url: https://crates.io/crates/${{ matrix.package }} strategy: fail-fast: false max-parallel: 1 matrix: package: + # sdk - rstmt-traits - rstmt-core - rstmt-nrt @@ -40,12 +41,14 @@ jobs: uses: actions/checkout@v6 with: fetch-depth: 0 - ref: ${{ github.event.client_payload.ref || github.ref }} - repository: ${{ github.event.client_payload.repository || github.repository }} - token: ${{ secrets.GITHUB_TOKEN }} + ref: ${{ github.event.client_payload.ref || github.ref }} + repository: ${{ github.repository }} + token: ${{ github.token }} - name: Setup Rust uses: actions-rust-lang/setup-rust-toolchain@v1 with: cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Publish (${{ matrix.package }}) run: cargo publish --locked --package ${{ matrix.package }} + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index d7dc99d1..e740442b 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -5,8 +5,14 @@ on: types: [closed] jobs: - cache_cleanup: + pr_cache_cleanup: + if: github.event.pull_request.merged == true + name: Cleanup Pull Request Caches runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge permissions: actions: write steps: @@ -23,7 +29,3 @@ jobs: gh cache delete $cacheKey done echo "Done" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GH_REPO: ${{ github.repository }} - BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 7bd0856a..71490824 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -5,10 +5,8 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} on: - pull_request: - branches: [main, master] - types: [closed, opened, reopened] push: + branches: [main, master] tags: [latest, v*.*.*, "*-nightly"] repository_dispatch: types: [nix, nix-build] @@ -22,10 +20,10 @@ jobs: continue-on-error: true runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v6 + - uses: actions/checkout@v6 with: fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Nix uses: cachix/install-nix-action@v31 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1a9bc0a2..3177d517 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,28 +24,23 @@ permissions: jobs: release: + env: + IS_PRERELEASE: ${{ github.event.inputs.prerelease || false }} + IS_DRAFT: ${{ github.event.inputs.draft || false }} runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v6 + - uses: actions/checkout@v6 with: fetch-depth: 0 - ref: ${{ github.event.client_payload.ref || github.ref }} - repository: ${{ github.repository }} token: ${{ secrets.GITHUB_TOKEN }} - - name: Dispatch & Publish to crates.io - uses: peter-evans/repository-dispatch@v4 - with: - event-type: cargo-publish - client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' - token: ${{ secrets.GITHUB_TOKEN }} - - name: Create GitHub Release + ref: ${{ github.ref }} + - name: Create release uses: softprops/action-gh-release@v2 continue-on-error: true with: append_body: false - draft: ${{ inputs.prerelease || github.event.release.prerelease || false }} - prerelease: ${{ inputs.draft || github.event.release.draft || false }} + draft: ${{ env.IS_DRAFT }} + prerelease: ${{ env.IS_PRERELEASE }} tag_name: ${{ github.event.release.tag_name }} body: | ${{ github.event.release.body }} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 164ec765..de426aed 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,22 +7,29 @@ concurrency: on: pull_request: branches: [main, master] + # types: [auto_merge_enabled, opened, ready_for_review, reopened] types: [synchronize] paths: - ".github/workflows/rust.yml" - "Cargo.toml" - "Cargo.lock" - - "**/*.rs" + - "**.rs" push: branches: [main, master] - tags: [latest, v*.*.*, "*-nightly"] + tags: [latest, v*, "*-nightly"] repository_dispatch: types: [rust, rust-ci] + release: + types: [created] workflow_dispatch: inputs: + benchmark: + description: "Run benchmarks (requires cargo-criterion)" + required: false + type: boolean toolchain: default: stable - description: "Rust toolchain to test" + description: "Select a toolchain to test (stable, nightly)" required: true type: choice options: [stable, nightly] @@ -38,6 +45,7 @@ jobs: fail-fast: false matrix: target: [x86_64-unknown-linux-gnu] + toolchain: [stable] steps: - name: Checkout uses: actions/checkout@v6 @@ -48,12 +56,51 @@ jobs: with: cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} target: ${{ matrix.target }} - toolchain: ${{ github.event.inputs.toolchain || 'stable' }} + toolchain: ${{ matrix.toolchain }} override: true - name: Build the workspace run: cargo build -r --locked --workspace --features full --target ${{ matrix.target }} + benchmark: + if: github.event_name == 'workflow_dispatch' && github.event.inputs.benchmark || false + needs: build + runs-on: ubuntu-latest + outputs: + id: ${{ steps.artifacts.outputs.artifact-id }} + digest: ${{ steps.artifacts.outputs.artifact-digest }} + url: ${{ steps.artifacts.outputs.artifact-url }} + strategy: + fail-fast: false + matrix: + features: [full] + target: [x86_64-unknown-linux-gnu] + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + ref: ${{ github.event.client_payload.ref || github.ref }} + repository: ${{ github.repository }} + token: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Install cargo-criterion + uses: taiki-e/install-action@v2 + with: + tool: cargo-criterion + - name: Benchmark (${{ matrix.target }}) + run: cargo criterion --benches --locked --verbose --workspace --features ${{ matrix.features }} --target ${{ matrix.target }} + - name: Upload the benchmarks + id: artifacts + uses: actions/upload-artifact@v7 + with: + name: Benchmark Report (${{ github.run_id }}) + if-no-files-found: error + overwrite: true + path: target/criterion/ test: - if: github.event_name != 'workflow_dispatch' || github.event.inputs.toolchain == 'stable' + if: github.event_name != 'workflow_dispatch' || github.event.inputs.toolchain != 'nightly' needs: build runs-on: ubuntu-latest strategy: @@ -73,27 +120,31 @@ jobs: target: ${{ matrix.target }} toolchain: stable override: true + - name: Test (default) + if: matrix.features == 'default' + run: cargo test -r --locked --workspace --target ${{ matrix.target}} - name: Test (${{ matrix.features }}) + if: matrix.features != 'default' run: cargo test -r --locked --workspace --target ${{ matrix.target}} --features ${{ matrix.features }} test_nightly: - if: github.event_name == 'workflow_dispatch' && github.event.inputs.toolchain == 'nightly' + if: github.event_name == 'workflow_dispatch' && github.event.inputs.toolchain == 'nightly' || false + continue-on-error: true needs: build runs-on: ubuntu-latest - env: - RUSTFLAGS: "-C panic=abort -Z panic_abort_tests" strategy: fail-fast: false matrix: - package: [rstmt-traits] + target: [x86_64-unknown-linux-gnu] features: - all - no_std - "alloc,nightly" + package: + - rstm-state + - rstm-traits steps: - name: Checkout uses: actions/checkout@v6 - with: - fetch-depth: 0 - name: Setup Rust uses: actions-rust-lang/setup-rust-toolchain@v1 with: @@ -102,12 +153,16 @@ jobs: override: true - name: Test (all-features) if: matrix.features == 'all' - run: cargo test -r --locked --workspace --all-features + run: cargo test -r --locked --all-features --target ${{ matrix.target }} -p ${{ matrix.package }} - name: Test (no_std) continue-on-error: true if: matrix.features == 'no_std' - run: cargo test -r --locked --workspace --no-default-features -p ${{ matrix.package }} + run: cargo test -r --locked --no-default-features --target ${{ matrix.target }} -p ${{ matrix.package }} + env: + RUSTFLAGS: "-C panic=abort -Z panic_abort_tests" - name: Test (${{ matrix.features }}) continue-on-error: true if: matrix.features != 'all' && matrix.features != 'no_std' - run: cargo test -r --locked --workspace --no-default-features -p ${{ matrix.package }} -F ${{ matrix.features }} + run: cargo test -r --locked --no-default-features --target ${{ matrix.target }} -p ${{ matrix.package }} -F ${{ matrix.features }} + env: + RUSTFLAGS: "-C panic=abort -Z panic_abort_tests" diff --git a/.gitignore b/.gitignore index b9e3762d..9de4cd7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,152 +1,140 @@ # General -**/.artifacts/tmp/ -**/.docker/data - -**/.cache/ -**/.DS_Store - *.bk *.bk.* -*.bak -*.bak.* - -*.csv -*.csv.* - *.db *.db.* -*.db-*.* +*.log +*.log.* -*.error -*.error.* +*.pem +*.pem.* *.gz *.gz.* -*.log -*.log.* - *.sqlite *.sqlite.* +*.sqlite3 +*.sqlite3.* + *.zip *.zip.* -## Development Environments +## Directories +**/.artifacts/cache/ +**/.artifacts/temp/ +**/.artifacts/uploads/ -### IntelliJ Idea -**/.idea/ +!**/.artifacts/docs +!**/.artifacts/.gitkeep -**/*.iml -**/*.iml.* +**/.cache/ +**/coverage/ +**/build/ +**/coverage/ +**/dist/ +**/out/ +**/logs/ +**/tmp/ -**/*.iws -**/*.iws.* +## Development -### Visual Studio Code -**/.vscode/ +### Config Files +**/.config/*.config.* -!.vscode/settings.* -!.vscode/launch.* +!**/.config/default.config.* +!**/.config/docker.config.* +!**/.config/xtask.config.* -## Operating Systems +### dotenv +*.env +*.env.* -### Nix -!flake.lock +!*default.env* +!*.env.default -### Windows (WSL2) -**/*:Zone.Identifier +!*example.env* +!*.env.example -**/.artifacts/data/ -**/.docker/data/ +### IDEs -# Language Specific +#### Atom +**/.atom -## Rust -**/debug -**/target/ +#### JetBrains +**/.idea/ -*.bk -*.bk.* +*.iml +*.ipr +*.iws -*-clippy-results.* +#### Visual Studio Code +**/.vscode/ + +!**/.vscode/settings.json + +## Operating Systems + +### Linux -!Cargo.lock +#### NixOS +!**/flake.lock + +**/.nix-channels +**/.nix + +### Windows + +#### Windows Subsystem for Linux (WSL) +*:Zone.Identifier + +# Language Specific ## Python **/__pycache__/ -**/.pytest_cache/ **/venv/ -**/*.egg -**/*.egg.* +*.pyc +*.pyc.* -**/*.egg-info +*.pyo +*.pyd -**/*.pyc -**/*.pyc.* - -**/*.pyo -**/*.pyo.* +## Rust +**/target -**/*.pyz -**/*.pyz.* +!.cargo/config.toml +!**/Cargo.lock -**/*.pyzw -**/*.pyzw.* +*.rs.bk -**/*.whl -**/*.whl.* +# *.lock +*-lock.json -## Node.js +## Node.JS **/.DS_STORE -**/.pnp -**/.pnp.* -**/.vercel **/build -**/debug -**/dist **/node_modules -### TypeScript -**/*.tsbuildinfo +*.tsbuildinfo -### npm -!**/package-lock.json -**/npm-debug.log +**/.pnp +**/.pnp.* -### yarn **/.yarn/install-state.gz -**/yarn-error.log -**/yarn-debug.log - -### SvelteKit -**/__sapper__/ -**/.svelte-kit/ -### Deno -**/deno.json -**/deno.jsonc +### Frameworks -### Next.js +#### Next.js **/.next **/out **/next-env.d.ts -### Jest -**/.swc -**/coverage +# Services -### OpenNext (Cloudflare) -**/.open-next -**/.wrangler +## Vercel **/.vercel - -### Supabase -**/supabase/temp - -### Vercel -**/.vercel \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS index fde5d39e..4770e24f 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,3 +1,3 @@ -# The default codeowners for any source files within the repository +# The default codeowners for any source files within the repository # that are otherwise not matched by a following rule. -* @FL03 @Scattered-Systems +* @FL03 diff --git a/Cargo.lock b/Cargo.lock index 901574ba..a6f61835 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -49,9 +49,9 @@ checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anyhow" -version = "1.0.100" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "autocfg" @@ -65,11 +65,17 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "bitflags" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" + [[package]] name = "bumpalo" -version = "3.19.1" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "cast" @@ -79,9 +85,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.53" +version = "1.2.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "755d2fce177175ffca841e9a06afdb2c4ab0f593d53b4dee48147dfaade85932" +checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" dependencies = [ "find-msvc-tools", "shlex", @@ -93,11 +99,22 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +[[package]] +name = "chacha20" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" +dependencies = [ + "cfg-if", + "cpufeatures", + "rand_core 0.10.0", +] + [[package]] name = "chrono" -version = "0.4.43" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" dependencies = [ "iana-time-zone", "num-traits", @@ -134,18 +151,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.54" +version = "4.5.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394" +checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.54" +version = "4.5.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00" +checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876" dependencies = [ "anstyle", "clap_lex", @@ -153,9 +170,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" +checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831" [[package]] name = "contained" @@ -174,12 +191,12 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e390113196f3af3198f351253848f9e3f08ecdfb1401556ec9cbc21c0a2f25dd" dependencies = [ - "getrandom", + "getrandom 0.3.4", "hashbrown 0.16.1", "num-complex", "num-traits", "rand 0.9.2", - "rand_distr", + "rand_distr 0.5.1", "serde", "serde_derive", "serde_json", @@ -214,11 +231,20 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + [[package]] name = "criterion" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d883447757bb0ee46f233e9dc22eb84d93a9508c9b868687b274fc431d886bf" +checksum = "950046b2aa2492f9a536f5f4f9a3de7b9e2476e575e05bd6c333371add4d98f3" dependencies = [ "alloca", "anes", @@ -231,6 +257,7 @@ dependencies = [ "oorandom", "page_size", "plotters", + "rayon", "regex", "serde", "serde_json", @@ -240,9 +267,9 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed943f81ea2faa8dcecbbfa50164acf95d555afec96a27871663b300e387b2e4" +checksum = "d8d80a2f4f5b554395e47b5d8305bc3d27813bacb73493eb1001e8f76dae29ea" dependencies = [ "cast", "itertools 0.13.0", @@ -316,9 +343,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.5.5" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ "powerfmt", "serde_core", @@ -338,9 +365,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "find-msvc-tools" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "fnv" @@ -348,6 +375,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "foldhash" version = "0.2.0" @@ -359,12 +392,26 @@ name = "getrandom" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ "cfg-if", "js-sys", "libc", - "r-efi", + "r-efi 6.0.0", + "rand_core 0.10.0", "wasip2", + "wasip3", "wasm-bindgen", ] @@ -385,6 +432,15 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash 0.1.5", +] + [[package]] name = "hashbrown" version = "0.16.1" @@ -393,7 +449,7 @@ checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ "allocator-api2", "equivalent", - "foldhash", + "foldhash 0.2.0", "rayon", "rustc-std-workspace-alloc", "serde", @@ -414,9 +470,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "iana-time-zone" -version = "0.1.64" +version = "0.1.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -436,6 +492,12 @@ dependencies = [ "cc", ] +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "ident_case" version = "1.0.1" @@ -491,9 +553,9 @@ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "js-sys" -version = "0.3.85" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" dependencies = [ "once_cell", "wasm-bindgen", @@ -505,17 +567,23 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "libc" -version = "0.2.180" +version = "0.2.182" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" +checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" [[package]] name = "libm" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "log" @@ -544,9 +612,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "ndarray" @@ -586,9 +654,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" [[package]] name = "num-integer" @@ -650,9 +718,9 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pin-project-lite" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "plotters" @@ -684,15 +752,15 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "portable-atomic-util" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +checksum = "7a9db96d7fa8782dd8c15ce32ffe8680bbd1e978a43bf51a34d39483540495f5" dependencies = [ "portable-atomic", ] @@ -712,20 +780,30 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + [[package]] name = "proc-macro2" -version = "1.0.105" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.43" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -736,6 +814,12 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "rand" version = "0.8.5" @@ -757,6 +841,18 @@ dependencies = [ "serde", ] +[[package]] +name = "rand" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8" +dependencies = [ + "chacha20", + "getrandom 0.4.2", + "rand_core 0.10.0", + "serde", +] + [[package]] name = "rand_chacha" version = "0.9.0" @@ -782,10 +878,16 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ - "getrandom", + "getrandom 0.3.4", "serde", ] +[[package]] +name = "rand_core" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c8d0fd677905edcbeedbf2edb6494d676f0e98d54d5cf9bda0b061cb8fb8aba" + [[package]] name = "rand_distr" version = "0.5.1" @@ -798,6 +900,18 @@ dependencies = [ "serde_with", ] +[[package]] +name = "rand_distr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d431c2703ccf129de4d45253c03f49ebb22b97d6ad79ee3ecfc7e3f4862c1d8" +dependencies = [ + "num-traits", + "rand 0.10.0", + "serde", + "serde_with", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -828,9 +942,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.2" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -840,9 +954,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -851,9 +965,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "rshyper" @@ -879,7 +993,7 @@ dependencies = [ "rshyper-core", "serde", "serde_derive", - "strum", + "strum 0.27.2", "thiserror", "tracing", "wasm-bindgen", @@ -893,18 +1007,18 @@ checksum = "f72585c08e1c654d019184ffa6afabfa74b680280bb7d5b057d1499de5adb18d" dependencies = [ "anyhow", "contained", - "getrandom", + "getrandom 0.3.4", "hashbrown 0.16.1", "num-traits", "paste", "rand 0.9.2", - "rand_distr", + "rand_distr 0.5.1", "rayon", "serde", "serde_derive", "serde_json", "smart-default", - "strum", + "strum 0.27.2", "thiserror", "tracing", "variants", @@ -921,7 +1035,7 @@ dependencies = [ "num-traits", "paste", "rand 0.9.2", - "rand_distr", + "rand_distr 0.5.1", "rayon", "rshyper-algo", "rshyper-core", @@ -929,7 +1043,7 @@ dependencies = [ "serde_derive", "serde_json", "smart-default", - "strum", + "strum 0.27.2", "thiserror", "tracing", ] @@ -950,7 +1064,7 @@ dependencies = [ [[package]] name = "rstmt" -version = "0.0.13" +version = "0.1.0" dependencies = [ "anyhow", "criterion", @@ -964,18 +1078,18 @@ dependencies = [ [[package]] name = "rstmt-core" -version = "0.0.13" +version = "0.1.0" dependencies = [ "anyhow", "contained", - "getrandom", + "getrandom 0.4.2", "hashbrown 0.16.1", "num-complex", "num-integer", "num-traits", "paste", - "rand 0.9.2", - "rand_distr", + "rand 0.10.0", + "rand_distr 0.6.0", "rayon", "rspace-traits", "rstmt-traits", @@ -983,7 +1097,7 @@ dependencies = [ "serde_derive", "serde_json", "smart-default", - "strum", + "strum 0.28.0", "thiserror", "tracing", "variants", @@ -992,7 +1106,7 @@ dependencies = [ [[package]] name = "rstmt-macros" -version = "0.0.13" +version = "0.1.0" dependencies = [ "proc-macro2", "quote", @@ -1001,17 +1115,17 @@ dependencies = [ [[package]] name = "rstmt-nrt" -version = "0.0.13" +version = "0.1.0" dependencies = [ "anyhow", - "getrandom", + "getrandom 0.4.2", "hashbrown 0.16.1", "itertools 0.14.0", "num-complex", "num-traits", "paste", - "rand 0.9.2", - "rand_distr", + "rand 0.10.0", + "rand_distr 0.6.0", "rayon", "rshyper", "rspace-traits", @@ -1020,7 +1134,7 @@ dependencies = [ "serde_derive", "serde_json", "smart-default", - "strum", + "strum 0.28.0", "thiserror", "tracing", "wasm-bindgen", @@ -1028,7 +1142,7 @@ dependencies = [ [[package]] name = "rstmt-traits" -version = "0.0.13" +version = "0.1.0" dependencies = [ "hashbrown 0.16.1", "num-complex", @@ -1060,6 +1174,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + [[package]] name = "serde" version = "1.0.228" @@ -1177,7 +1297,16 @@ version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" dependencies = [ - "strum_macros", + "strum_macros 0.27.2", +] + +[[package]] +name = "strum" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" +dependencies = [ + "strum_macros 0.28.0", ] [[package]] @@ -1192,11 +1321,23 @@ dependencies = [ "syn", ] +[[package]] +name = "strum_macros" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "syn" -version = "2.0.114" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -1234,9 +1375,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.45" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", @@ -1249,15 +1390,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.25" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e552d1249bf61ac2a52db88179fd0673def1e1ad8243a00d9ec9ed71fee3dd" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ "num-conv", "time-core", @@ -1337,9 +1478,15 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "valuable" @@ -1393,18 +1540,27 @@ dependencies = [ [[package]] name = "wasip2" -version = "1.0.1+wasi-0.2.4" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.108" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" dependencies = [ "cfg-if", "once_cell", @@ -1417,9 +1573,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.108" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1427,9 +1583,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.108" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" dependencies = [ "bumpalo", "proc-macro2", @@ -1440,13 +1596,35 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.108" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap 2.13.0", + "wasm-encoder", + "wasmparser", +] + [[package]] name = "wasm_sync" version = "0.1.2" @@ -1458,11 +1636,23 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap 2.13.0", + "semver", +] + [[package]] name = "web-sys" -version = "0.3.85" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" dependencies = [ "js-sys", "wasm-bindgen", @@ -1569,24 +1759,106 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.46.0" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap 2.13.0", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags", + "indexmap 2.13.0", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap 2.13.0", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] [[package]] name = "zerocopy" -version = "0.8.33" +version = "0.8.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" +checksum = "a789c6e490b576db9f7e6b6d661bcc9799f7c0ac8352f56ea20193b2681532e5" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.33" +version = "0.8.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" +checksum = "f65c489a7071a749c849713807783f70672b28094011623e200cb86dcb835953" dependencies = [ "proc-macro2", "quote", @@ -1595,6 +1867,6 @@ dependencies = [ [[package]] name = "zmij" -version = "1.0.16" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfcd145825aace48cff44a8844de64bf75feec3080e0aa5cdbde72961ae51a65" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/Cargo.toml b/Cargo.toml index b501bd9b..4a1b4ea3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,6 @@ resolver = "3" [workspace.package] authors = [ "FL03 (https://github.com/FL03)", - "Scattered-Systems (https://github.com/scattered-systems)", ] categories = ["mathematics"] description = "A complete framework for computational music theory and composition based on topological and categorical methods." @@ -28,22 +27,22 @@ keywords = [ license = "Apache-2.0" readme = "README.md" repository = "https://github.com/FL03/rstmt.git" -rust-version = "1.86.0" -version = "0.0.13" +rust-version = "1.91.0" +version = "0.1.0" [workspace.dependencies] -rstmt = { default-features = false, path = "rstmt", version = "0.0.13" } -rstmt-core = { default-features = false, path = "core", version = "0.0.13" } -rstmt-macros = { path = "macros", version = "0.0.13" } -rstmt-nrt = { default-features = false, path = "nrt", version = "0.0.13" } -rstmt-traits = { default-features = false, path = "traits", version = "0.0.13" } +rstmt = { default-features = false, path = "rstmt", version = "0.1.0" } +rstmt-core = { default-features = false, path = "core", version = "0.1.0" } +rstmt-macros = { path = "macros", version = "0.1.0" } +rstmt-nrt = { default-features = false, path = "nrt", version = "0.1.0" } +rstmt-traits = { default-features = false, path = "traits", version = "0.1.0" } # custom contained = { default-features = false, features = ["derive", "macros"], version = "0.2.4" } rshyper = { default-features = false, features = ["macros"], version = "0.1.9" } rspace-traits = { default-features = false, version = "0.0.9" } variants = { default-features = false, features = ["derive"], version = "0.0.1" } # benchmarking & testing -criterion = { default-features = false, version = "0.8" } +criterion = { version = "0.8" } # concurrency & parallelism rayon = { default-features = false, version = "1" } # data structures @@ -56,9 +55,9 @@ num-complex = { default-features = false, version = "0.4" } num-integer = { default-features = false, version = "0.1" } num-traits = { default-features = false, version = "0.2" } # randomization -getrandom = { default-features = false, version = "0.3" } -rand = { default-features = false, version = "0.9" } -rand_distr = { default-features = false, version = "0.5" } +getrandom = { default-features = false, version = "0.4" } +rand = { default-features = false, version = "0.10" } +rand_distr = { default-features = false, version = "0.6" } # data & serialization serde = { default-features = false, features = ["derive"], version = "1" } serde_derive = { default-features = false, version = "1" } @@ -68,7 +67,7 @@ itertools = { default-features = false, version = "0.14" } lazy_static = { version = "1" } paste = { version = "1" } smart-default = { version = "0.7" } -strum = { default-features = false, features = ["derive"], version = "0.27" } +strum = { default-features = false, features = ["derive"], version = "0.28" } # logging tracing = { default-features = false, features = ["attributes"], version = "0.1" } tracing-subscriber = {features = ["env-filter", "fmt"], version = "0.3" } diff --git a/LICENSE b/LICENSE index ea3895e4..42bb656c 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2024 Joe McCain III + Copyright 2026 Joe McCain III [https://github.com/FL03] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/SECURITY.md b/SECURITY.md index 04ada075..011fd4f9 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,12 +6,12 @@ Checkout the current and supported packages below: | Version | Supported? | |:----------------|:-------------------| -| 0.0.12 (latest) | :white_check_mark: | -| >0.0.7,<=0.0.9 | :white_check_mark: | -| <=0.0.6 | :x: | +| 0.1.0 (latest) | :white_check_mark: | +| 0.0.9,<=0.0.13 | :white_check_mark: | +| <=0.0.8 | :x: | ## Reporting a Vulnerability -- Email our [support team](mailto:support@scsys.io) +- Email our [support team](mailto:support@pzzld.org) - Open an issue in our [GitHub repository](https://github.com/FL03/rstmt/issues) -- Visit our [website](https://scsys.io) for more information +- Visit our [website](https://pzzld.org) for more information diff --git a/clippy.toml b/clippy.toml index 55787ca3..b76dea15 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1 +1 @@ -msrv = "1.86.0" \ No newline at end of file +msrv = "1.91.0" \ No newline at end of file diff --git a/core/Cargo.toml b/core/Cargo.toml index 678fea4e..9b9f4feb 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -103,7 +103,7 @@ std = [ "num-complex?/std", "num-integer/std", "num-traits/std", - "rand?/std", + "rand?/default", "rand_distr?/std", "rspace-traits/std", "rstmt-traits/std", @@ -171,8 +171,8 @@ rayon = [ rng = [ "dep:getrandom", - "rand?/os_rng", - "rand?/small_rng", + "getrandom?/sys_rng", + "rand?/sys_rng", ] serde = [ diff --git a/core/src/freq/impls/impl_freq_rand.rs b/core/src/freq/impls/impl_freq_rand.rs index ce1a5a7f..ac68f36b 100644 --- a/core/src/freq/impls/impl_freq_rand.rs +++ b/core/src/freq/impls/impl_freq_rand.rs @@ -4,6 +4,7 @@ */ #![cfg(feature = "rand")] use crate::freq::Frequency; +use rand::{Rng, RngExt}; use rand_distr::uniform::{SampleRange, SampleUniform}; use rand_distr::{Distribution, StandardUniform}; @@ -22,10 +23,15 @@ impl Frequency where StandardUniform: Distribution, { + /// generates a random frequency. pub fn random() -> Self { - Frequency(rand::random()) + Frequency::random_with(&mut rand::rng()) } - pub fn random_in(rng: &mut R) -> Self { + /// generates a random frequency using the provided random number generator. + pub fn random_with(rng: &mut R) -> Self + where + R: ?Sized + Rng, + { Frequency(rng.random()) } } @@ -34,7 +40,10 @@ impl Distribution> for StandardUniform where StandardUniform: Distribution, { - fn sample(&self, rng: &mut R) -> Frequency { + fn sample(&self, rng: &mut R) -> Frequency + where + R: ?Sized + Rng, + { Frequency(rng.random()) } } diff --git a/core/src/octave/impl_octave_rand.rs b/core/src/octave/impl_octave_rand.rs index bb0af750..cce679e4 100644 --- a/core/src/octave/impl_octave_rand.rs +++ b/core/src/octave/impl_octave_rand.rs @@ -3,7 +3,7 @@ authors: @FL03 */ use crate::octave::Octave; -use rand::RngCore; +use rand::{Rng, RngExt}; use rand_distr::uniform::{SampleRange, SampleUniform}; use rand_distr::{Distribution, StandardNormal, StandardUniform}; @@ -18,19 +18,17 @@ impl Octave { /// generates a random octave using the provided random number generator. pub fn random_in(rng: &mut R) -> Self where - R: ?Sized + RngCore, + R: ?Sized + Rng, StandardUniform: Distribution, { - use rand::Rng; Octave(rng.random()) } /// generates a random octave using the provided random number generator. pub fn random_with(rng: &mut R, distr: Distr) -> Self where - R: ?Sized + RngCore, + R: ?Sized + Rng, Distr: Distribution, { - use rand::Rng; Octave(rng.sample(distr)) } /// generates a random octave within the specified range. diff --git a/core/src/pitch/impls/impl_pitch_rand.rs b/core/src/pitch/impls/impl_pitch_rand.rs index 3565d189..bf049b35 100644 --- a/core/src/pitch/impls/impl_pitch_rand.rs +++ b/core/src/pitch/impls/impl_pitch_rand.rs @@ -6,18 +6,19 @@ #![cfg(feature = "rand")] use crate::pitch::Pitch; -use rand::Rng; +use rand::{Rng, RngExt}; use rand_distr::{Distribution, StandardUniform}; impl Pitch where StandardUniform: Distribution, { + /// initialize a new pitch with a random value pub fn random() -> Self { - Pitch::random_in(&mut rand::rng()) + Pitch::rand_from_rng(&mut rand::rng()) } /// initialize a new pitch using the given random number generator - pub fn random_in(rng: &mut R) -> Self { + pub fn rand_from_rng(rng: &mut R) -> Self { Pitch(rng.random()) } } diff --git a/core/src/pitch/traits/accidental.rs b/core/src/pitch/traits/accidental.rs index 66b2cdfb..e6c185c2 100644 --- a/core/src/pitch/traits/accidental.rs +++ b/core/src/pitch/traits/accidental.rs @@ -211,7 +211,7 @@ impl ::core::str::FromStr for Flat { fn from_str(s: &str) -> Result { if s.to_lowercase() == "flat" || s == "♭" || s == "b" { - Ok(Self::default()) + Ok(Self) } else { Err(anyhow::anyhow!("Invalid accidental string: {}", s).into()) } @@ -224,7 +224,7 @@ impl ::core::str::FromStr for Sharp { fn from_str(s: &str) -> Result { if s.to_lowercase() == "sharp" || s == "♯" || s == "#" { - Ok(Self::default()) + Ok(Self) } else { Err(anyhow::anyhow!("Invalid accidental string: {}", s).into()) } diff --git a/default.nix b/default.nix index 55ddf119..f6967f3e 100644 --- a/default.nix +++ b/default.nix @@ -5,14 +5,19 @@ let overlays = [ (import rust-overlay) ]; }; - rustVersion = "1.85.0"; - wasmUnknownUknown = "wasm32-unknown-unknown"; - wasm32Wasi = "wasm32-wasi"; + rustVersion = "1.93.0"; + + wasm = "wasm32-unknown-unknown"; + wasi = "wasm32-wasip2"; rustDefaultTarget = rustPkgs.rust-bin.stable.${rustVersion}.default; - rustWithWasmTarget = rustPkgs.rust-bin.nightly.${rustVersion}.default.override { - targets = [ wasmUnknownUknown ]; + rustWithWasiTarget = rustPkgs.rust-bin.stable.${rustVersion}.default.override { + targets = [ wasi ]; + }; + + rustWithWasmTarget = rustPkgs.rust-bin.stable.${rustVersion}.default.override { + targets = [ wasm ]; }; rustPlatform = makeRustPlatform { @@ -20,14 +25,19 @@ let rustc = rustDefaultTarget; }; + rustPlatformWasi = makeRustPlatform { + cargo = rustWithWasiTarget; + rustc = rustWithWasiTarget; + }; + rustPlatformWasm = makeRustPlatform { cargo = rustWithWasmTarget; rustc = rustWithWasmTarget; }; common = { - version = "0.0.13"; - src = self; # ./.; + version = "0.1.0"; + src = self; cargoLock = { lockFile = ./Cargo.lock; @@ -37,7 +47,7 @@ let PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; }; in { - workspace = pkgs.rustPlatformWasm.buildRustPackage (common // { + workspace = rustPlatform.buildRustPackage (common // { cargoBuildFlags = "--release --workspace"; }); -} \ No newline at end of file +} diff --git a/flake.nix b/flake.nix index 31c6adee..1afd101b 100644 --- a/flake.nix +++ b/flake.nix @@ -15,7 +15,7 @@ { packages.default = rustPlatform.buildRustPackage { pname = "rstmt"; - version = "0.0.13"; + version = "0.1.0"; src = self; # "./."; # If Cargo.lock doesn't exist yet, remove or comment out this block: cargoLock = { diff --git a/nrt/Cargo.toml b/nrt/Cargo.toml index 0a48f0b9..e853958f 100644 --- a/nrt/Cargo.toml +++ b/nrt/Cargo.toml @@ -187,8 +187,8 @@ rayon = [ rng = [ "dep:getrandom", - "rand/small_rng", - "rand/thread_rng", + "getrandom?/sys_rng", + "rand?/sys_rng", "rshyper/rng", "rstmt-core/rng", ] diff --git a/nrt/src/motion/impls/impl_motion_planner.rs b/nrt/src/motion/impls/impl_motion_planner.rs index 53627b6d..b4eea8e4 100644 --- a/nrt/src/motion/impls/impl_motion_planner.rs +++ b/nrt/src/motion/impls/impl_motion_planner.rs @@ -26,7 +26,7 @@ where // For voice-leading distance, we use max of 1 as estimate // This ensures heuristic is admissible (never overestimates) match triad.contains(&target) { - true => return T::zero(), + true => T::zero(), false => T::one(), } } @@ -173,10 +173,10 @@ where while let Some(node) = open_set.pop() { // Skip if we've found a shorter path to this triad - if let Some(&prev_cost) = visited.get(node.triad.chord()) { - if prev_cost < node.cost { - continue; - } + if let Some(&prev_cost) = visited.get(node.triad.chord()) + && prev_cost < node.cost + { + continue; } // Check depth limit @@ -191,10 +191,10 @@ where let new_cost = node.cost + 1; // Skip if we've found a shorter path to this triad - if let Some(&prev_cost) = visited.get(next_triad.chord()) { - if prev_cost <= new_cost { - continue; - } + if let Some(&prev_cost) = visited.get(next_triad.chord()) + && prev_cost <= new_cost + { + continue; } // Update visited with this triad's path length @@ -640,7 +640,7 @@ where .par_bridge() .filter_map(|transform| { // Try applying the transformation - match transform.apply(&start_triad) { + match transform.try_apply(&start_triad) { Ok(next_triad) => { // Find edge ID if it exists let next_edge_id = self.tonnetz.triads.iter().find_map(|(&id, facet)| { diff --git a/nrt/src/motion/types/cache.rs b/nrt/src/motion/types/cache.rs index 959c0984..192de7e5 100644 --- a/nrt/src/motion/types/cache.rs +++ b/nrt/src/motion/types/cache.rs @@ -77,12 +77,13 @@ where let key = (from_triad, to_pitch); // If we're at capacity, evict the least used entry - if self.paths().len() >= self.capacity() && !self.paths().contains_key(&key) { - if let Some((lru_key, _)) = self.usage().iter().min_by_key(|(_, count)| **count) { - let lru_key = *lru_key; - self.paths_mut().remove(&lru_key); - self.usage_mut().remove(&lru_key); - } + if self.paths().len() >= self.capacity() + && !self.paths().contains_key(&key) + && let Some((lru_key, _)) = self.usage().iter().min_by_key(|(_, count)| **count) + { + let lru_key = *lru_key; + self.paths_mut().remove(&lru_key); + self.usage_mut().remove(&lru_key); } self.paths_mut().insert(key, Vec::from_iter(paths)); diff --git a/nrt/src/types/factors.rs b/nrt/src/types/factors.rs index 3003099d..66567bcf 100644 --- a/nrt/src/types/factors.rs +++ b/nrt/src/types/factors.rs @@ -153,7 +153,7 @@ macro_rules! impl_from_factor { 0 => Factors::Root, 1 => Factors::Third, 2 => Factors::Fifth, - _ => unreachable!("Modular arithmetic error"), + _ => unreachable!("Modular arithmetic error"), } } } @@ -171,7 +171,6 @@ macro_rules! impl_from_factor { impl_from_factor! { u8, u16, u32, u64, u128, usize, i8, i16, i32, i64, i128, isize } - #[cfg(test)] mod tests { use super::*; diff --git a/nrt/src/types/lpr.rs b/nrt/src/types/lpr.rs index 9cd61d8c..c0024eff 100644 --- a/nrt/src/types/lpr.rs +++ b/nrt/src/types/lpr.rs @@ -17,7 +17,7 @@ use rstmt_core::{Dirac, PitchMod}; /// the first and second notes (i.e., the root and third chord factors) meaning the effect of /// the transformation is dictated by whether the triad starts with a major or minor third. /// -/// With The transformations are: +/// The effects of each transformation can be described as follows: /// /// - Leading (L): /// - [Major] decrement the root by a semitone; move to the fifth @@ -129,7 +129,7 @@ impl LPR { TriadBase { chord: S::from_arr(notes), - class: ::rel(&rhs.class()), + class: ::rel(rhs.class()), octave: *rhs.octave(), } } diff --git a/scripts/nix.sh b/scripts/nix.sh index 0933d257..a2b48034 100755 --- a/scripts/nix.sh +++ b/scripts/nix.sh @@ -1,3 +1,29 @@ -#! /usr/bin/bash +#!/bin/bash + +# flags for the script: +# --no-link: don't create a symlink to the result in the current directory +# -b or --build: build the package and create a symlink to the result in the current directory (default) + +[ "$1" = "--no-link" ] && no_link=true && shift +[ "$1" = "-b" ] && build_flag=true && shift +[ "$1" = "--build" ] && build_flag=true && shift + +if [ "$no_link" = true ]; then + link_flag="--no-link" +else + link_flag="" +fi + +if [ -n "$build_flag" ]; then + echo "Building the package and creating a symlink to the result in the current directory..." +else + echo "Building the package without creating a symlink to the result in the current directory..." +fi + +if [ -n "$build_flag" ]; then + nix --extra-experimental-features 'nix-command flakes' build $link_flag --out-link .nix --allow-dirty "$@" +else + nix --extra-experimental-features 'nix-command flakes' "$@" +fi + -nix --extra-experimental-features nix-command --extra-experimental-features flakes "$@" \ No newline at end of file