Hybrid native AES via node:crypto for large inputs #43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| NODE_VERSION: 24 | |
| jobs: | |
| fmt-clippy: | |
| name: Rust Format & Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: nightly-2026-01-30 | |
| components: rustfmt, clippy | |
| targets: wasm32-unknown-unknown | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Cargo fmt --check | |
| run: cargo fmt --all -- --check | |
| - name: Cargo clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| build-and-test: | |
| name: Build + Test (Bun) + Benchmark (Node.js) | |
| runs-on: ubuntu-latest | |
| needs: fmt-clippy | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: nightly-2026-01-30 | |
| targets: wasm32-unknown-unknown | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install wasm-pack | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: wasm-pack | |
| - name: Install Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Install JavaScript dependencies | |
| run: bun install | |
| - name: Install Binaryen (wasm-opt) | |
| run: | | |
| BINARYEN_VERSION=129 | |
| curl -fsSL "https://github.com/WebAssembly/binaryen/releases/download/version_${BINARYEN_VERSION}/binaryen-version_${BINARYEN_VERSION}-x86_64-linux.tar.gz" | tar -xz -C /tmp | |
| echo "/tmp/binaryen-version_${BINARYEN_VERSION}/bin" >> "$GITHUB_PATH" | |
| - name: Build (dual wasm + bundle + .d.ts) | |
| run: bun run build | |
| - name: Run Tests with Bun | |
| run: bun test | |
| env: | |
| # Optional: make test output clearer | |
| CI: true | |
| - name: Run Benchmarks with Node.js 24 | |
| run: | | |
| bun run bench:node | |
| env: | |
| CI: true | |
| success: | |
| name: All checks passed | |
| if: success() | |
| needs: [fmt-clippy, build-and-test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "All checks passed!" |