From d8e95b01e5be18ed8f0bbe5edf3c44b39f61169d Mon Sep 17 00:00:00 2001 From: Dan Draper Date: Fri, 13 Dec 2024 16:04:52 +1100 Subject: [PATCH 01/19] First commit --- .github/.env | 5 + .github/actions/setup/action.yml | 76 +++++++++ .github/workflows/build.yml | 137 ++++++++++++++++ .github/workflows/release.yml | 135 ++++++++++++++++ .github/workflows/test.yml | 71 +++++++++ .gitignore | 8 + Cargo.lock | 209 ++++++++++++++++++++++++ Cargo.toml | 3 + README.md | 104 ++++++++++++ crates/cpu-count/Cargo.toml | 14 ++ crates/cpu-count/src/lib.rs | 42 +++++ package-lock.json | 212 +++++++++++++++++++++++++ package.json | 53 +++++++ platforms/darwin-arm64/README.md | 3 + platforms/darwin-arm64/package.json | 25 +++ platforms/darwin-x64/README.md | 3 + platforms/darwin-x64/package.json | 25 +++ platforms/linux-arm64-gnu/README.md | 3 + platforms/linux-arm64-gnu/package.json | 25 +++ platforms/linux-x64-gnu/README.md | 3 + platforms/linux-x64-gnu/package.json | 25 +++ platforms/win32-x64-msvc/README.md | 3 + platforms/win32-x64-msvc/package.json | 25 +++ src/index.cts | 25 +++ src/index.mts | 3 + src/load.cts | 17 ++ tsconfig.json | 9 ++ 27 files changed, 1263 insertions(+) create mode 100644 .github/.env create mode 100644 .github/actions/setup/action.yml create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test.yml create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 README.md create mode 100644 crates/cpu-count/Cargo.toml create mode 100644 crates/cpu-count/src/lib.rs create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 platforms/darwin-arm64/README.md create mode 100644 platforms/darwin-arm64/package.json create mode 100644 platforms/darwin-x64/README.md create mode 100644 platforms/darwin-x64/package.json create mode 100644 platforms/linux-arm64-gnu/README.md create mode 100644 platforms/linux-arm64-gnu/package.json create mode 100644 platforms/linux-x64-gnu/README.md create mode 100644 platforms/linux-x64-gnu/package.json create mode 100644 platforms/win32-x64-msvc/README.md create mode 100644 platforms/win32-x64-msvc/package.json create mode 100644 src/index.cts create mode 100644 src/index.mts create mode 100644 src/load.cts create mode 100644 tsconfig.json diff --git a/.github/.env b/.github/.env new file mode 100644 index 0000000..cbe24b0 --- /dev/null +++ b/.github/.env @@ -0,0 +1,5 @@ +NODE_VERSION=20.x +NPM_REGISTRY=https://registry.npmjs.org +RUST_VERSION=stable +ACTIONS_USER=github-actions +ACTIONS_EMAIL=github-actions@github.com diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 0000000..f3255c1 --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,76 @@ +name: 'Setup Neon' +description: 'Setup the Neon toolchain.' +inputs: + platform: + description: 'Platform being built for.' + required: false + default: '' + use-rust: + description: 'Install Rust?' + required: false + default: 'true' + use-cross: + description: 'Install cross-rs?' + required: false + default: 'false' + workspace: + description: 'Path to workspace being setup.' + required: false + default: '.' +outputs: + rust: + description: 'Rust version installed.' + value: ${{ steps.rust.outputs.version }} + node: + description: 'Node version installed.' + value: ${{ steps.node.outputs.version }} + target: + description: 'Rust target architecture installed.' + value: ${{ steps.target.outputs.target }} +runs: + using: "composite" + steps: + - name: Set Environment Variables + uses: falti/dotenv-action@d1cd55661714e830a6e26f608f81d36e23424fed # v1.1.2 + with: + path: ./.github/.env + export-variables: true + keys-case: bypass + - name: Install Node + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + registry-url: ${{ env.NPM_REGISTRY }} + cache: npm + - name: Install Dependencies + shell: bash + run: npm ci + - name: Compute Rust Target + if: ${{ inputs['use-rust'] == 'true' }} + id: target + shell: bash + run: echo target=$(npx neon list-platforms | jq -r '.["${{ inputs.platform }}"]') | tee -a $GITHUB_OUTPUT + working-directory: ${{ inputs.workspace }} + - name: Install Rust + if: ${{ inputs['use-rust'] == 'true' }} + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.RUST_VERSION }} + target: ${{ steps.target.outputs.target }} + override: true + - name: Install cross-rs + if: ${{ inputs['use-cross'] == 'true' }} + uses: baptiste0928/cargo-install@v2 + with: + crate: cross + - name: Node Version + id: node + shell: bash + run: | + echo version=$(node -e 'console.log(process.versions.node)') | tee -a $GITHUB_OUTPUT + - name: Rust Version + if: ${{ inputs['use-rust'] == 'true' }} + id: rust + shell: bash + run: | + echo version=$(cargo -Vv | fgrep release: | cut -d' ' -f2) | tee -a $GITHUB_OUTPUT diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a74d770 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,137 @@ +name: Build + +on: + workflow_call: + inputs: + ref: + description: 'The branch, tag, or SHA to check out' + required: true + type: string + update-version: + description: 'Update version before building?' + required: false + type: boolean + default: false + version: + description: 'Version update (ignored if update-version is false)' + required: false + type: string + default: 'patch' + github-release: + description: 'Publish GitHub release?' + required: false + type: boolean + default: false + tag: + description: 'The release tag (ignored if github-release is false)' + required: false + type: string + default: '' + +jobs: + matrix: + name: Matrix + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.matrix.outputs.result }} + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + ref: ${{ inputs.ref }} + - name: Setup Neon Environment + uses: ./.github/actions/setup + with: + use-rust: false + - name: Look Up Matrix Data + id: matrixData + shell: bash + run: echo "json=$(npx neon show ci github | jq -rc)" | tee -a $GITHUB_OUTPUT + - name: Compute Matrix + id: matrix + uses: actions/github-script@v7 + with: + script: | + const platforms = ${{ steps.matrixData.outputs.json }}; + const macOS = platforms.macOS.map(platform => { + return { os: "macos-latest", platform, script: "build" }; + }); + const windows = platforms.Windows.map(platform => { + return { os: "windows-latest", platform, script: "build" }; + }); + const linux = platforms.Linux.map(platform => { + return { os: "ubuntu-latest", platform, script: "cross" }; + }); + return [...macOS, ...windows, ...linux]; + + binaries: + name: Binaries + needs: [matrix] + strategy: + matrix: + cfg: ${{ fromJSON(needs.matrix.outputs.matrix) }} + runs-on: ${{ matrix.cfg.os }} + permissions: + contents: write + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + ref: ${{ inputs.ref }} + - name: Setup Neon Environment + id: neon + uses: ./.github/actions/setup + with: + use-cross: ${{ matrix.cfg.script == 'cross' }} + platform: ${{ matrix.cfg.platform }} + - name: Update Version + if: ${{ inputs.update-version }} + shell: bash + run: | + git config --global user.name $ACTIONS_USER + git config --global user.email $ACTIONS_EMAIL + npm version ${{ inputs.version }} -m "v%s" + - name: Build + shell: bash + env: + CARGO_BUILD_TARGET: ${{ steps.neon.outputs.target }} + NEON_BUILD_PLATFORM: ${{ matrix.cfg.platform }} + run: npm run ${{ matrix.cfg.script }} + - name: Pack + id: pack + shell: bash + run: | + mkdir -p dist + echo filename=$(basename $(npm pack ./platforms/${{ matrix.cfg.platform }} --silent --pack-destination=./dist --json | jq -r '.[0].filename')) | tee -a $GITHUB_OUTPUT + - name: Release + if: ${{ inputs.github-release }} + uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2.0.4 + with: + files: ./dist/${{ steps.pack.outputs.filename }} + tag_name: ${{ inputs.tag }} + + main: + name: Main + needs: [matrix] + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + ref: ${{ inputs.ref }} + - name: Setup Neon Environment + uses: ./.github/actions/setup + with: + use-rust: false + - name: Pack + id: pack + shell: bash + run: | + mkdir -p dist + echo "filename=$(npm pack --silent --pack-destination=./dist)" | tee -a $GITHUB_OUTPUT + - name: Release + if: ${{ inputs.github-release }} + uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2.0.4 + with: + files: ./dist/${{ steps.pack.outputs.filename }} + tag_name: ${{ inputs.tag }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1a86f9e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,135 @@ +name: Release + +run-name: | + ${{ (inputs.dryrun && 'Dry run') + || format('Release: {0}', (inputs.version == 'custom' && inputs.custom) || inputs.version) }} + +on: + workflow_dispatch: + inputs: + dryrun: + description: 'Dry run (no npm publish)' + required: false + type: boolean + default: true + version: + description: 'Version component to update (or "custom" to provide exact version)' + required: true + type: choice + options: + - patch + - minor + - major + - prepatch + - preminor + - premajor + - prerelease + - custom + custom: + description: 'Custom version' + required: false + default: '' + +jobs: + setup: + name: Setup + runs-on: ubuntu-latest + permissions: + contents: write + outputs: + dryrun: ${{ steps.dryrun.outputs.dryrun }} + publish: ${{ steps.publish.outputs.publish }} + ref: ${{ steps.tag.outputs.tag || github.event.repository.default_branch }} + tag: ${{ steps.tag.outputs.tag || '' }} + steps: + - name: Validate Workflow Inputs + if: ${{ inputs.version == 'custom' && inputs.custom == '' }} + shell: bash + run: | + echo '::error::No custom version number provided' + exit 1 + - id: dryrun + name: Validate Dry Run Event + if: ${{ inputs.dryrun }} + shell: bash + run: echo dryrun=true | tee -a $GITHUB_OUTPUT + - id: publish + name: Validate Publish Event + if: ${{ !inputs.dryrun }} + shell: bash + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + if [[ -z $NPM_TOKEN ]]; then + echo "::error::Secret NPM_TOKEN is not defined for this GitHub repo." + echo "::error::To publish to npm, this action requires:" + echo "::error:: • an npm access token;" + echo "::error:: • with Read-Write access to this project's npm packages;" + echo "::error:: • stored as a repo secret named NPM_TOKEN." + echo "::error::See https://docs.npmjs.com/about-access-tokens for info about creating npm tokens." + echo "::error:: 💡 The simplest method is to create a Classic npm token of type Automation." + echo "::error:: 💡 For greater security, consider using a Granual access token." + echo "::error::See https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions for info about how to store GitHub repo secrets." + exit 1 + fi + echo publish=true | tee -a $GITHUB_OUTPUT + - name: Checkout Code + uses: actions/checkout@v3 + - name: Setup Neon Environment + uses: ./.github/actions/setup + with: + use-rust: false + - name: Tag Release + if: ${{ !inputs.dryrun }} + id: tag + shell: bash + run: | + git config --global user.name $ACTIONS_USER + git config --global user.email $ACTIONS_EMAIL + npm version -m 'v%s' '${{ (inputs.version == 'custom' && inputs.custom) || inputs.version }}' + git push --follow-tags + echo tag=$(git describe --abbrev=0) | tee -a $GITHUB_OUTPUT + + build: + name: Build + needs: [setup] + permissions: + contents: write + uses: ./.github/workflows/build.yml + with: + ref: ${{ needs.setup.outputs.ref }} + tag: ${{ needs.setup.outputs.tag }} + update-version: ${{ !!needs.setup.outputs.dryrun }} + version: ${{ (inputs.version == 'custom' && inputs.custom) || inputs.version }} + github-release: ${{ !!needs.setup.outputs.publish }} + + publish: + name: Publish + if: ${{ needs.setup.outputs.publish }} + needs: [setup, build] + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + ref: ${{ needs.setup.outputs.ref }} + - name: Setup Neon Environment + uses: ./.github/actions/setup + with: + use-rust: false + - name: Fetch + uses: robinraju/release-downloader@c39a3b234af58f0cf85888573d361fb6fa281534 # v1.10 + with: + tag: ${{ needs.setup.outputs.tag }} + fileName: "*.tgz" + out-file-path: ./dist + - name: Publish + shell: bash + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + for p in ./dist/*.tgz ; do + npm publish --access public $p + done diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..8814e4a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,71 @@ +name: Test + +run-name: | + ${{ (github.event_name == 'pull_request' && format('Test (PR #{0}): {1}', github.event.number, github.event.pull_request.title)) + || format('Test: {0}', github.event.head_commit.message) }} + +on: + # Event: A maintainer has pushed commits or merged a PR to main. + push: + # Limiting push events to 'main' prevents duplicate runs of this workflow + # when maintainers push to internal PRs. + branches: + - main + + # Event: A contributor has created or updated a PR. + pull_request: + types: [opened, synchronize, reopened, labeled] + branches: + - main + +jobs: + pr: + name: Pull Request Details + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + outputs: + branch: ${{ steps.pr-ref.outputs.branch || github.event.repository.default_branch }} + steps: + - name: PR Branch + id: pr-ref + shell: bash + run: echo "branch=$(gh pr view $PR_NO --repo $REPO --json headRefName --jq '.headRefName')" | tee -a "$GITHUB_OUTPUT" + env: + REPO: ${{ github.repository }} + PR_NO: ${{ github.event.number }} + GH_TOKEN: ${{ github.token }} + + # Labeling a PR with a `ci:full-matrix` label does a full matrix build on + # every run of this workflow for that PR, in addition to the other tests. + full-matrix: + name: Build + if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci:full-matrix') }} + needs: [pr] + permissions: + contents: write + uses: ./.github/workflows/build.yml + with: + ref: ${{ needs.pr.outputs.branch }} + update-version: true + github-release: false + + unit-tests: + name: Unit Tests + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + - name: Setup Neon Environment + id: neon + uses: ./.github/actions/setup + with: + platform: linux-x64-gnu + - name: Build + shell: bash + env: + CARGO_BUILD_TARGET: ${{ steps.neon.outputs.target }} + NEON_BUILD_PLATFORM: linux-x64-gnu + run: npm run debug + - name: Test + shell: bash + run: npm test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8ec40c7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +target +index.node +**/node_modules +**/.DS_Store +npm-debug.log* +lib +cargo.log +cross.log diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..a44c025 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,209 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cpu-count" +version = "0.1.0" +dependencies = [ + "neon", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "libc" +version = "0.2.168" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" + +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "neon" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d75440242411c87dc39847b0e33e961ec1f10326a9d8ecf9c1ea64a3b3c13dc" +dependencies = [ + "getrandom", + "libloading", + "neon-macros", + "once_cell", + "semver", + "send_wrapper", + "smallvec", +] + +[[package]] +name = "neon-macros" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6813fde79b646e47e7ad75f480aa80ef76a5d9599e2717407961531169ee38b" +dependencies = [ + "quote", + "syn", + "syn-mid", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "proc-macro2" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "syn" +version = "2.0.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-mid" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5dc35bb08dd1ca3dfb09dce91fd2d13294d6711c88897d9a9d60acf39bce049" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "unicode-ident" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[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_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..ba3b2e3 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,3 @@ +[workspace] +members = ["crates/cpu-count"] +resolver = "2" diff --git a/README.md b/README.md new file mode 100644 index 0000000..72fe1b5 --- /dev/null +++ b/README.md @@ -0,0 +1,104 @@ +# cpu-count + +This project was bootstrapped by [create-neon](https://www.npmjs.com/package/create-neon). + +## Building cpu-count + +Building cpu-count requires a [supported version of Node and Rust](https://github.com/neon-bindings/neon#platform-support). + +To run the build, run: + +```sh +$ npm run build +``` + +This command uses the [@neon-rs/cli](https://www.npmjs.com/package/@neon-rs/cli) utility to assemble the binary Node addon from the output of `cargo`. + +## Exploring cpu-count + +After building cpu-count, you can explore its exports at the Node console: + +```sh +$ npm i +$ npm run build +$ node +> require('.').greeting() +{ message: 'hello node' } +``` + +## Available Scripts + +In the project directory, you can run: + +#### `npm run build` + +Builds the Node addon (`index.node`) from source, generating a release build with `cargo --release`. + +Additional [`cargo build`](https://doc.rust-lang.org/cargo/commands/cargo-build.html) arguments may be passed to `npm run build` and similar commands. For example, to enable a [cargo feature](https://doc.rust-lang.org/cargo/reference/features.html): + +``` +npm run build -- --feature=beetle +``` + +#### `npm run debug` + +Similar to `npm run build` but generates a debug build with `cargo`. + +#### `npm run cross` + +Similar to `npm run build` but uses [cross-rs](https://github.com/cross-rs/cross) to cross-compile for another platform. Use the [`CARGO_BUILD_TARGET`](https://doc.rust-lang.org/cargo/reference/config.html#buildtarget) environment variable to select the build target. + +#### `npm run release` + +Initiate a full build and publication of a new patch release of this library via GitHub Actions. + +#### `npm run dryrun` + +Initiate a dry run of a patch release of this library via GitHub Actions. This performs a full build but does not publish the final result. + +#### `npm test` + +Runs the unit tests by calling `cargo test`. You can learn more about [adding tests to your Rust code](https://doc.rust-lang.org/book/ch11-01-writing-tests.html) from the [Rust book](https://doc.rust-lang.org/book/). + +## Project Layout + +The directory structure of this project is: + +``` +cpu-count/ +├── Cargo.toml +├── README.md +├── lib/ +├── src/ +| ├── index.mts +| └── index.cts +├── crates/ +| └── cpu-count/ +| └── src/ +| └── lib.rs +├── platforms/ +├── package.json +└── target/ +``` + +| Entry | Purpose | +|----------------|------------------------------------------------------------------------------------------------------------------------------------------| +| `Cargo.toml` | The Cargo [manifest file](https://doc.rust-lang.org/cargo/reference/manifest.html), which informs the `cargo` command. | +| `README.md` | This file. | +| `lib/` | The directory containing the generated output from [tsc](https://typescriptlang.org). | +| `src/` | The directory containing the TypeScript source files. | +| `index.mts` | Entry point for when this library is loaded via [ESM `import`](https://nodejs.org/api/esm.html#modules-ecmascript-modules) syntax. | +| `index.cts` | Entry point for when this library is loaded via [CJS `require`](https://nodejs.org/api/modules.html#requireid). | +| `crates/` | The directory tree containing the Rust source code for the project. | +| `lib.rs` | Entry point for the Rust source code. | +| `platforms/` | The directory containing distributions of the binary addon backend for each platform supported by this library. | +| `package.json` | The npm [manifest file](https://docs.npmjs.com/cli/v7/configuring-npm/package-json), which informs the `npm` command. | +| `target/` | Binary artifacts generated by the Rust build. | + +## Learn More + +Learn more about: + +- [Neon](https://neon-bindings.com). +- [Rust](https://www.rust-lang.org). +- [Node](https://nodejs.org). diff --git a/crates/cpu-count/Cargo.toml b/crates/cpu-count/Cargo.toml new file mode 100644 index 0000000..4b38177 --- /dev/null +++ b/crates/cpu-count/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "cpu-count" +version = "0.1.0" +license = "ISC" +edition = "2021" +exclude = ["index.node"] + +[lib] +crate-type = ["cdylib"] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +neon = "1" diff --git a/crates/cpu-count/src/lib.rs b/crates/cpu-count/src/lib.rs new file mode 100644 index 0000000..50be2c5 --- /dev/null +++ b/crates/cpu-count/src/lib.rs @@ -0,0 +1,42 @@ +use neon::prelude::*; + +fn create_eql_payload(mut cx: FunctionContext) -> JsResult { + let value = cx.argument::(0)?.value(&mut cx); + let table: Handle = cx.argument(1)?; + let column: Handle = cx.argument(2)?; + + let callback = cx.argument::(3)?.root(&mut cx); + let channel = cx.channel(); + + println!("value: {:?}", value); + println!("table: {:?}", table); + println!("column: {:?}", column); + + std::thread::spawn(move || { + // Do the heavy lifting inside the background thread. + do_encrypt(value, callback, channel); + }); + + Ok(cx.undefined()) +} + +fn do_encrypt(value: String, callback: Root, channel: Channel) { + let result = value.to_uppercase(); + + // Send the result back to the main thread. + channel.send(move |mut cx| { + let this = cx.undefined(); + + let callback = callback.into_inner(&mut cx); + let result = cx.string(result); + callback.call(&mut cx, this, vec![result.upcast::()])?; + + Ok(()) + }); +} + +#[neon::main] +fn main(mut cx: ModuleContext) -> NeonResult<()> { + cx.export_function("createEqlPayload", create_eql_payload)?; + Ok(()) +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..274e34c --- /dev/null +++ b/package-lock.json @@ -0,0 +1,212 @@ +{ + "name": "cpu-count", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "cpu-count", + "version": "0.1.0", + "license": "ISC", + "dependencies": { + "@neon-rs/load": "^0.1.82" + }, + "devDependencies": { + "@neon-rs/cli": "^0.1.82", + "@tsconfig/node20": "^20.1.4", + "@types/node": "^20.11.16", + "typescript": "^5.3.3" + } + }, + "node_modules/@cargo-messages/android-arm-eabi": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/android-arm-eabi/-/android-arm-eabi-0.1.81.tgz", + "integrity": "sha512-cpRbgb56e9LmAj96Tixtz9/bTlaJAeplWNNv4obu+eqQyZd3ZjX04TJd9fM1bjHDGVyR9GTVlgBsbQEntIGkwg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@cargo-messages/darwin-arm64": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/darwin-arm64/-/darwin-arm64-0.1.81.tgz", + "integrity": "sha512-OwGqsw+tbJx37a/vH4T8R9qkrrFYoTIOnckbA9+MhQodE2FSWyk3HvLh+z8jjl+QZa1RSOU9Ax6gt/46h0BiTg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@cargo-messages/darwin-x64": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/darwin-x64/-/darwin-x64-0.1.81.tgz", + "integrity": "sha512-Iu761bPk25Ce6yUdDCjjeVuT8/xbBmczyaNB7oYBmAZEE5rshvCJ42TqSShYYP+S7pKkN42nBhkFooaZrqaz9g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@cargo-messages/linux-arm-gnueabihf": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm-gnueabihf/-/linux-arm-gnueabihf-0.1.81.tgz", + "integrity": "sha512-iIuy7KTJAEhbiqlIlcxQOdW6opI6M9LXlgd/jdsHbP2FjmTyhTLnd3JCJ6JeAeidwknCDs+CFlaVmPxTKSytsg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cargo-messages/linux-arm64-gnu": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm64-gnu/-/linux-arm64-gnu-0.1.81.tgz", + "integrity": "sha512-QPQRsHj9m/9ga8wRBlLh8t2AXyr40+/H55FIKVj7zIjV++waY/TbSTPofDZQhMycd5VSGLKztfhahiCO7c/RAQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cargo-messages/linux-arm64-musl": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm64-musl/-/linux-arm64-musl-0.1.81.tgz", + "integrity": "sha512-9O0ATesIOjDTz2L01OtlGHYwP86I31/mzXMC+ryQkzbbIKj7KUiSqmEc29I14I517UYO8/sMeow6q6MVBpehlA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cargo-messages/linux-x64-gnu": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/linux-x64-gnu/-/linux-x64-gnu-0.1.81.tgz", + "integrity": "sha512-wEFYxCdtHNiEvp5KEg17CfRCUdfRTtkL+1GASROyvYEUV6DQf6TXxfHuuWg2xlVxh5fqiTGFSRfiqFrCDL/xrw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cargo-messages/linux-x64-musl": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/linux-x64-musl/-/linux-x64-musl-0.1.81.tgz", + "integrity": "sha512-zi5pKIh60oPwOCDQapAZ3Mya4y56MI2BoGvY8JtztYaXTorGmAoyf6jjb50Wt+HfoYYjM3OlPt03XMlCFZJnIQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cargo-messages/win32-arm64-msvc": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/win32-arm64-msvc/-/win32-arm64-msvc-0.1.81.tgz", + "integrity": "sha512-oyiT8AYLoguF7cFOMYDsPv3eirzBcFafOOfRsFyd3+wmaPTl/DdbCq446oThRmSAsEGJpzhzj7TafcnXMBkHbg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@cargo-messages/win32-x64-msvc": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/win32-x64-msvc/-/win32-x64-msvc-0.1.81.tgz", + "integrity": "sha512-B5Ukf4AohtIv27uCP/AgM+7vYwQ4RacI6m8ZBr2XKeSrjZXcXguzlZd+wD7bD5+wa0capvXKUskZDnpG/DcYiA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@neon-rs/cli": { + "version": "0.1.82", + "resolved": "https://registry.npmjs.org/@neon-rs/cli/-/cli-0.1.82.tgz", + "integrity": "sha512-QrlGPQp9KOGuMvjjua79lEV2QTcE16m8JatG5ITdQpBAwRQpDw5xab57W9130y2iUEfMzYtp7v6pcN1fUB0Exg==", + "dev": true, + "bin": { + "neon": "index.js" + }, + "optionalDependencies": { + "@cargo-messages/android-arm-eabi": "0.1.81", + "@cargo-messages/darwin-arm64": "0.1.81", + "@cargo-messages/darwin-x64": "0.1.81", + "@cargo-messages/linux-arm-gnueabihf": "0.1.81", + "@cargo-messages/linux-arm64-gnu": "0.1.81", + "@cargo-messages/linux-arm64-musl": "0.1.81", + "@cargo-messages/linux-x64-gnu": "0.1.81", + "@cargo-messages/linux-x64-musl": "0.1.81", + "@cargo-messages/win32-arm64-msvc": "0.1.81", + "@cargo-messages/win32-x64-msvc": "0.1.81" + } + }, + "node_modules/@neon-rs/load": { + "version": "0.1.82", + "resolved": "https://registry.npmjs.org/@neon-rs/load/-/load-0.1.82.tgz", + "integrity": "sha512-H4Gu2o5kPp+JOEhRrOQCnJnf7X6sv9FBLttM/wSbb4efsgFWeHzfU/ItZ01E5qqEk+U6QGdeVO7lxXIAtYHr5A==" + }, + "node_modules/@tsconfig/node20": { + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.4.tgz", + "integrity": "sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.17.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.10.tgz", + "integrity": "sha512-/jrvh5h6NXhEauFFexRin69nA0uHJ5gwk4iDivp/DeoEua3uwCUto6PC86IpRITBOs4+6i2I56K5x5b6WYGXHA==", + "dev": true, + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/typescript": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..857937e --- /dev/null +++ b/package.json @@ -0,0 +1,53 @@ +{ + "name": "cpu-count", + "version": "0.1.0", + "description": "", + "main": "./lib/index.cjs", + "scripts": { + "test": "tsc &&cargo test", + "cargo-build": "tsc &&cargo build --message-format=json-render-diagnostics > cargo.log", + "cross-build": "tsc &&cross build --message-format=json-render-diagnostics > cross.log", + "postcargo-build": "neon dist < cargo.log", + "postcross-build": "neon dist -m /target < cross.log", + "debug": "npm run cargo-build --", + "build": "npm run cargo-build -- --release", + "cross": "npm run cross-build -- --release", + "prepack": "tsc &&neon update", + "version": "neon bump --binaries platforms && git add .", + "release": "gh workflow run release.yml -f dryrun=false -f version=patch", + "dryrun": "gh workflow run publish.yml -f dryrun=true" + }, + "author": "", + "license": "ISC", + "exports": { + ".": { + "import": { + "types": "./lib/index.d.mts", + "default": "./lib/index.mjs" + }, + "require": { + "types": "./lib/index.d.cts", + "default": "./lib/index.cjs" + } + } + }, + "types": "./lib/index.d.cts", + "files": [ + "lib/**/*.?({c,m}){t,j}s" + ], + "neon": { + "type": "library", + "org": "@cpu-count", + "platforms": "common", + "load": "./src/load.cts" + }, + "devDependencies": { + "@neon-rs/cli": "^0.1.82", + "@tsconfig/node20": "^20.1.4", + "@types/node": "^20.11.16", + "typescript": "^5.3.3" + }, + "dependencies": { + "@neon-rs/load": "^0.1.82" + } +} diff --git a/platforms/darwin-arm64/README.md b/platforms/darwin-arm64/README.md new file mode 100644 index 0000000..1f67cdc --- /dev/null +++ b/platforms/darwin-arm64/README.md @@ -0,0 +1,3 @@ +# `@cpu-count/darwin-arm64` + +Prebuilt binary package for `cpu-count` on `darwin-arm64`. diff --git a/platforms/darwin-arm64/package.json b/platforms/darwin-arm64/package.json new file mode 100644 index 0000000..ee77cb4 --- /dev/null +++ b/platforms/darwin-arm64/package.json @@ -0,0 +1,25 @@ +{ + "name": "@cpu-count/darwin-arm64", + "description": "Prebuilt binary package for `cpu-count` on `darwin-arm64`.", + "version": "0.1.0", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "index.node", + "files": [ + "index.node" + ], + "neon": { + "type": "binary", + "rust": "aarch64-apple-darwin", + "node": "darwin-arm64", + "os": "darwin", + "arch": "arm64", + "abi": null + }, + "author": "", + "license": "ISC" +} diff --git a/platforms/darwin-x64/README.md b/platforms/darwin-x64/README.md new file mode 100644 index 0000000..a57322f --- /dev/null +++ b/platforms/darwin-x64/README.md @@ -0,0 +1,3 @@ +# `@cpu-count/darwin-x64` + +Prebuilt binary package for `cpu-count` on `darwin-x64`. diff --git a/platforms/darwin-x64/package.json b/platforms/darwin-x64/package.json new file mode 100644 index 0000000..2b40bef --- /dev/null +++ b/platforms/darwin-x64/package.json @@ -0,0 +1,25 @@ +{ + "name": "@cpu-count/darwin-x64", + "description": "Prebuilt binary package for `cpu-count` on `darwin-x64`.", + "version": "0.1.0", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "index.node", + "files": [ + "index.node" + ], + "neon": { + "type": "binary", + "rust": "x86_64-apple-darwin", + "node": "darwin-x64", + "os": "darwin", + "arch": "x64", + "abi": null + }, + "author": "", + "license": "ISC" +} diff --git a/platforms/linux-arm64-gnu/README.md b/platforms/linux-arm64-gnu/README.md new file mode 100644 index 0000000..7a38448 --- /dev/null +++ b/platforms/linux-arm64-gnu/README.md @@ -0,0 +1,3 @@ +# `@cpu-count/linux-arm64-gnu` + +Prebuilt binary package for `cpu-count` on `linux-arm64-gnu`. diff --git a/platforms/linux-arm64-gnu/package.json b/platforms/linux-arm64-gnu/package.json new file mode 100644 index 0000000..77a9374 --- /dev/null +++ b/platforms/linux-arm64-gnu/package.json @@ -0,0 +1,25 @@ +{ + "name": "@cpu-count/linux-arm64-gnu", + "description": "Prebuilt binary package for `cpu-count` on `linux-arm64-gnu`.", + "version": "0.1.0", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "index.node", + "files": [ + "index.node" + ], + "neon": { + "type": "binary", + "rust": "aarch64-unknown-linux-gnu", + "node": "linux-arm64-gnu", + "os": "linux", + "arch": "arm64", + "abi": "gnu" + }, + "author": "", + "license": "ISC" +} diff --git a/platforms/linux-x64-gnu/README.md b/platforms/linux-x64-gnu/README.md new file mode 100644 index 0000000..1ca1bfc --- /dev/null +++ b/platforms/linux-x64-gnu/README.md @@ -0,0 +1,3 @@ +# `@cpu-count/linux-x64-gnu` + +Prebuilt binary package for `cpu-count` on `linux-x64-gnu`. diff --git a/platforms/linux-x64-gnu/package.json b/platforms/linux-x64-gnu/package.json new file mode 100644 index 0000000..115a205 --- /dev/null +++ b/platforms/linux-x64-gnu/package.json @@ -0,0 +1,25 @@ +{ + "name": "@cpu-count/linux-x64-gnu", + "description": "Prebuilt binary package for `cpu-count` on `linux-x64-gnu`.", + "version": "0.1.0", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "index.node", + "files": [ + "index.node" + ], + "neon": { + "type": "binary", + "rust": "x86_64-unknown-linux-gnu", + "node": "linux-x64-gnu", + "os": "linux", + "arch": "x64", + "abi": "gnu" + }, + "author": "", + "license": "ISC" +} diff --git a/platforms/win32-x64-msvc/README.md b/platforms/win32-x64-msvc/README.md new file mode 100644 index 0000000..d713a7d --- /dev/null +++ b/platforms/win32-x64-msvc/README.md @@ -0,0 +1,3 @@ +# `@cpu-count/win32-x64-msvc` + +Prebuilt binary package for `cpu-count` on `win32-x64-msvc`. diff --git a/platforms/win32-x64-msvc/package.json b/platforms/win32-x64-msvc/package.json new file mode 100644 index 0000000..2004074 --- /dev/null +++ b/platforms/win32-x64-msvc/package.json @@ -0,0 +1,25 @@ +{ + "name": "@cpu-count/win32-x64-msvc", + "description": "Prebuilt binary package for `cpu-count` on `win32-x64-msvc`.", + "version": "0.1.0", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "index.node", + "files": [ + "index.node" + ], + "neon": { + "type": "binary", + "rust": "x86_64-pc-windows-msvc", + "node": "win32-x64-msvc", + "os": "win32", + "arch": "x64", + "abi": "msvc" + }, + "author": "", + "license": "ISC" +} diff --git a/src/index.cts b/src/index.cts new file mode 100644 index 0000000..1e0f7f0 --- /dev/null +++ b/src/index.cts @@ -0,0 +1,25 @@ +// This module is the CJS entry point for the library. + +// The Rust addon. +import * as addon from './load.cjs'; + +// Use this declaration to assign types to the addon's exports, +// which otherwise by default are `any`. +declare module "./load.cjs" { + function createEqlPayload(value: string, table: string, column: string, callback: callback): string; +} + +type callback = (result: string) => void; + + +export interface EqlPayload { // TODO: Make generic + value: string, + table: string, + column: string +} + +export function createEqlPayload({ value, table, column}: EqlPayload): Promise { + return new Promise((resolve, reject) => { + addon.createEqlPayload(value, table, column, (result: string) => resolve(result)); + }) +} diff --git a/src/index.mts b/src/index.mts new file mode 100644 index 0000000..5e1ab26 --- /dev/null +++ b/src/index.mts @@ -0,0 +1,3 @@ +// This module is the ESM entry point for the library. + +export * from './index.cjs'; diff --git a/src/load.cts b/src/load.cts new file mode 100644 index 0000000..e567ac8 --- /dev/null +++ b/src/load.cts @@ -0,0 +1,17 @@ +// This module loads the platform-specific build of the addon on +// the current system. The supported platforms are registered in +// the `platforms` object below, whose entries can be managed by +// by the Neon CLI: +// +// https://www.npmjs.com/package/@neon-rs/cli + +module.exports = require('@neon-rs/load').proxy({ + platforms: { + 'win32-x64-msvc': () => require('@cpu-count/win32-x64-msvc'), + 'darwin-x64': () => require('@cpu-count/darwin-x64'), + 'darwin-arm64': () => require('@cpu-count/darwin-arm64'), + 'linux-x64-gnu': () => require('@cpu-count/linux-x64-gnu'), + 'linux-arm64-gnu': () => require('@cpu-count/linux-arm64-gnu') + }, + debug: () => require('../index.node') +}); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..2bb48f6 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@tsconfig/node20/tsconfig.json", + "compilerOptions": { + "module": "node16", + "declaration": true, + "outDir": "lib", + }, + "exclude": ["lib"] +} From 1cc663c0083da7b9b2f2d71d6152d2e4c8a33ccd Mon Sep 17 00:00:00 2001 From: Dan Draper Date: Mon, 16 Dec 2024 16:53:47 +1100 Subject: [PATCH 02/19] Working prototype --- Cargo.lock | 14 +- Cargo.toml | 2 +- README.md | 18 +- crates/{cpu-count => jseql-ffi}/Cargo.toml | 2 +- crates/{cpu-count => jseql-ffi}/src/lib.rs | 4 +- mise.toml | 3 + package-lock.json | 212 --------------------- package.json | 4 +- platforms/darwin-arm64/README.md | 4 +- platforms/darwin-arm64/package.json | 4 +- platforms/darwin-x64/README.md | 4 +- platforms/darwin-x64/package.json | 4 +- platforms/linux-arm64-gnu/README.md | 4 +- platforms/linux-arm64-gnu/package.json | 4 +- platforms/linux-x64-gnu/README.md | 4 +- platforms/linux-x64-gnu/package.json | 4 +- platforms/win32-x64-msvc/README.md | 4 +- platforms/win32-x64-msvc/package.json | 4 +- src/load.cts | 10 +- 19 files changed, 51 insertions(+), 258 deletions(-) rename crates/{cpu-count => jseql-ffi}/Cargo.toml (92%) rename crates/{cpu-count => jseql-ffi}/src/lib.rs (84%) create mode 100644 mise.toml delete mode 100644 package-lock.json diff --git a/Cargo.lock b/Cargo.lock index a44c025..7d62433 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,13 +8,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cpu-count" -version = "0.1.0" -dependencies = [ - "neon", -] - [[package]] name = "getrandom" version = "0.2.15" @@ -26,6 +19,13 @@ dependencies = [ "wasi", ] +[[package]] +name = "jseql-ffi" +version = "0.1.0" +dependencies = [ + "neon", +] + [[package]] name = "libc" version = "0.2.168" diff --git a/Cargo.toml b/Cargo.toml index ba3b2e3..e020532 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,3 @@ [workspace] -members = ["crates/cpu-count"] +members = ["crates/jseql-ffi"] resolver = "2" diff --git a/README.md b/README.md index 72fe1b5..d80425c 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# cpu-count +# jseql-ffi This project was bootstrapped by [create-neon](https://www.npmjs.com/package/create-neon). -## Building cpu-count +## Building -Building cpu-count requires a [supported version of Node and Rust](https://github.com/neon-bindings/neon#platform-support). +Building requires a [supported version of Node and Rust](https://github.com/neon-bindings/neon#platform-support). To run the build, run: @@ -14,16 +14,16 @@ $ npm run build This command uses the [@neon-rs/cli](https://www.npmjs.com/package/@neon-rs/cli) utility to assemble the binary Node addon from the output of `cargo`. -## Exploring cpu-count +## Exploring -After building cpu-count, you can explore its exports at the Node console: +After building `jseql-ffi`, you can explore its exports at the Node console: ```sh $ npm i $ npm run build $ node -> require('.').greeting() -{ message: 'hello node' } +> const { createEqlPayload } = require('.') +> let y = await createEqlPayload({value: "foo", table: "bar", column: "wee"}) ``` ## Available Scripts @@ -65,7 +65,7 @@ Runs the unit tests by calling `cargo test`. You can learn more about [adding te The directory structure of this project is: ``` -cpu-count/ +jseql-ffi/ ├── Cargo.toml ├── README.md ├── lib/ @@ -73,7 +73,7 @@ cpu-count/ | ├── index.mts | └── index.cts ├── crates/ -| └── cpu-count/ +| └── jseql-ffi/ | └── src/ | └── lib.rs ├── platforms/ diff --git a/crates/cpu-count/Cargo.toml b/crates/jseql-ffi/Cargo.toml similarity index 92% rename from crates/cpu-count/Cargo.toml rename to crates/jseql-ffi/Cargo.toml index 4b38177..b61f44b 100644 --- a/crates/cpu-count/Cargo.toml +++ b/crates/jseql-ffi/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "cpu-count" +name = "jseql-ffi" version = "0.1.0" license = "ISC" edition = "2021" diff --git a/crates/cpu-count/src/lib.rs b/crates/jseql-ffi/src/lib.rs similarity index 84% rename from crates/cpu-count/src/lib.rs rename to crates/jseql-ffi/src/lib.rs index 50be2c5..d3c5762 100644 --- a/crates/cpu-count/src/lib.rs +++ b/crates/jseql-ffi/src/lib.rs @@ -20,7 +20,9 @@ fn create_eql_payload(mut cx: FunctionContext) -> JsResult { Ok(cx.undefined()) } -fn do_encrypt(value: String, callback: Root, channel: Channel) { +fn do_encrypt<'a>(value: String, callback: Root, channel: Channel) { + // TODO: Do the actual encryption and creation of the Eql Encrypted payload here + // uppercase is not a very strong cipher :) let result = value.to_uppercase(); // Send the result back to the main thread. diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..7b93134 --- /dev/null +++ b/mise.toml @@ -0,0 +1,3 @@ +[tools] +node = "latest" +rust = "latest" diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 274e34c..0000000 --- a/package-lock.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "name": "cpu-count", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "cpu-count", - "version": "0.1.0", - "license": "ISC", - "dependencies": { - "@neon-rs/load": "^0.1.82" - }, - "devDependencies": { - "@neon-rs/cli": "^0.1.82", - "@tsconfig/node20": "^20.1.4", - "@types/node": "^20.11.16", - "typescript": "^5.3.3" - } - }, - "node_modules/@cargo-messages/android-arm-eabi": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/android-arm-eabi/-/android-arm-eabi-0.1.81.tgz", - "integrity": "sha512-cpRbgb56e9LmAj96Tixtz9/bTlaJAeplWNNv4obu+eqQyZd3ZjX04TJd9fM1bjHDGVyR9GTVlgBsbQEntIGkwg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@cargo-messages/darwin-arm64": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/darwin-arm64/-/darwin-arm64-0.1.81.tgz", - "integrity": "sha512-OwGqsw+tbJx37a/vH4T8R9qkrrFYoTIOnckbA9+MhQodE2FSWyk3HvLh+z8jjl+QZa1RSOU9Ax6gt/46h0BiTg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@cargo-messages/darwin-x64": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/darwin-x64/-/darwin-x64-0.1.81.tgz", - "integrity": "sha512-Iu761bPk25Ce6yUdDCjjeVuT8/xbBmczyaNB7oYBmAZEE5rshvCJ42TqSShYYP+S7pKkN42nBhkFooaZrqaz9g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@cargo-messages/linux-arm-gnueabihf": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm-gnueabihf/-/linux-arm-gnueabihf-0.1.81.tgz", - "integrity": "sha512-iIuy7KTJAEhbiqlIlcxQOdW6opI6M9LXlgd/jdsHbP2FjmTyhTLnd3JCJ6JeAeidwknCDs+CFlaVmPxTKSytsg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@cargo-messages/linux-arm64-gnu": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm64-gnu/-/linux-arm64-gnu-0.1.81.tgz", - "integrity": "sha512-QPQRsHj9m/9ga8wRBlLh8t2AXyr40+/H55FIKVj7zIjV++waY/TbSTPofDZQhMycd5VSGLKztfhahiCO7c/RAQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@cargo-messages/linux-arm64-musl": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm64-musl/-/linux-arm64-musl-0.1.81.tgz", - "integrity": "sha512-9O0ATesIOjDTz2L01OtlGHYwP86I31/mzXMC+ryQkzbbIKj7KUiSqmEc29I14I517UYO8/sMeow6q6MVBpehlA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@cargo-messages/linux-x64-gnu": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/linux-x64-gnu/-/linux-x64-gnu-0.1.81.tgz", - "integrity": "sha512-wEFYxCdtHNiEvp5KEg17CfRCUdfRTtkL+1GASROyvYEUV6DQf6TXxfHuuWg2xlVxh5fqiTGFSRfiqFrCDL/xrw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@cargo-messages/linux-x64-musl": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/linux-x64-musl/-/linux-x64-musl-0.1.81.tgz", - "integrity": "sha512-zi5pKIh60oPwOCDQapAZ3Mya4y56MI2BoGvY8JtztYaXTorGmAoyf6jjb50Wt+HfoYYjM3OlPt03XMlCFZJnIQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@cargo-messages/win32-arm64-msvc": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/win32-arm64-msvc/-/win32-arm64-msvc-0.1.81.tgz", - "integrity": "sha512-oyiT8AYLoguF7cFOMYDsPv3eirzBcFafOOfRsFyd3+wmaPTl/DdbCq446oThRmSAsEGJpzhzj7TafcnXMBkHbg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@cargo-messages/win32-x64-msvc": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/win32-x64-msvc/-/win32-x64-msvc-0.1.81.tgz", - "integrity": "sha512-B5Ukf4AohtIv27uCP/AgM+7vYwQ4RacI6m8ZBr2XKeSrjZXcXguzlZd+wD7bD5+wa0capvXKUskZDnpG/DcYiA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@neon-rs/cli": { - "version": "0.1.82", - "resolved": "https://registry.npmjs.org/@neon-rs/cli/-/cli-0.1.82.tgz", - "integrity": "sha512-QrlGPQp9KOGuMvjjua79lEV2QTcE16m8JatG5ITdQpBAwRQpDw5xab57W9130y2iUEfMzYtp7v6pcN1fUB0Exg==", - "dev": true, - "bin": { - "neon": "index.js" - }, - "optionalDependencies": { - "@cargo-messages/android-arm-eabi": "0.1.81", - "@cargo-messages/darwin-arm64": "0.1.81", - "@cargo-messages/darwin-x64": "0.1.81", - "@cargo-messages/linux-arm-gnueabihf": "0.1.81", - "@cargo-messages/linux-arm64-gnu": "0.1.81", - "@cargo-messages/linux-arm64-musl": "0.1.81", - "@cargo-messages/linux-x64-gnu": "0.1.81", - "@cargo-messages/linux-x64-musl": "0.1.81", - "@cargo-messages/win32-arm64-msvc": "0.1.81", - "@cargo-messages/win32-x64-msvc": "0.1.81" - } - }, - "node_modules/@neon-rs/load": { - "version": "0.1.82", - "resolved": "https://registry.npmjs.org/@neon-rs/load/-/load-0.1.82.tgz", - "integrity": "sha512-H4Gu2o5kPp+JOEhRrOQCnJnf7X6sv9FBLttM/wSbb4efsgFWeHzfU/ItZ01E5qqEk+U6QGdeVO7lxXIAtYHr5A==" - }, - "node_modules/@tsconfig/node20": { - "version": "20.1.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.4.tgz", - "integrity": "sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.17.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.10.tgz", - "integrity": "sha512-/jrvh5h6NXhEauFFexRin69nA0uHJ5gwk4iDivp/DeoEua3uwCUto6PC86IpRITBOs4+6i2I56K5x5b6WYGXHA==", - "dev": true, - "dependencies": { - "undici-types": "~6.19.2" - } - }, - "node_modules/typescript": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", - "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", - "dev": true - } - } -} diff --git a/package.json b/package.json index 857937e..6ff865e 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "cpu-count", + "name": "jseql-ffi", "version": "0.1.0", "description": "", "main": "./lib/index.cjs", @@ -37,7 +37,7 @@ ], "neon": { "type": "library", - "org": "@cpu-count", + "org": "@cipherstash", "platforms": "common", "load": "./src/load.cts" }, diff --git a/platforms/darwin-arm64/README.md b/platforms/darwin-arm64/README.md index 1f67cdc..808fba9 100644 --- a/platforms/darwin-arm64/README.md +++ b/platforms/darwin-arm64/README.md @@ -1,3 +1,3 @@ -# `@cpu-count/darwin-arm64` +# `@cipherstash/jseql-ffi-darwin-arm64` -Prebuilt binary package for `cpu-count` on `darwin-arm64`. +Prebuilt binary package for `@cipherstash/jseql-ffi` on `darwin-arm64`. diff --git a/platforms/darwin-arm64/package.json b/platforms/darwin-arm64/package.json index ee77cb4..94e66c5 100644 --- a/platforms/darwin-arm64/package.json +++ b/platforms/darwin-arm64/package.json @@ -1,6 +1,6 @@ { - "name": "@cpu-count/darwin-arm64", - "description": "Prebuilt binary package for `cpu-count` on `darwin-arm64`.", + "name": "@cipherstash/jseql-ffi-darwin-arm64", + "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `darwin-arm64`.", "version": "0.1.0", "os": [ "darwin" diff --git a/platforms/darwin-x64/README.md b/platforms/darwin-x64/README.md index a57322f..861e7e2 100644 --- a/platforms/darwin-x64/README.md +++ b/platforms/darwin-x64/README.md @@ -1,3 +1,3 @@ -# `@cpu-count/darwin-x64` +# `@cipherstash/jseql-ffi-darwin-x64` -Prebuilt binary package for `cpu-count` on `darwin-x64`. +Prebuilt binary package for `@cipherstash/jseql-ffi` on `darwin-x64`. diff --git a/platforms/darwin-x64/package.json b/platforms/darwin-x64/package.json index 2b40bef..d49c8b1 100644 --- a/platforms/darwin-x64/package.json +++ b/platforms/darwin-x64/package.json @@ -1,6 +1,6 @@ { - "name": "@cpu-count/darwin-x64", - "description": "Prebuilt binary package for `cpu-count` on `darwin-x64`.", + "name": "@cipherstash/jseql-ffi-darwin-x64", + "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `darwin-x64`.", "version": "0.1.0", "os": [ "darwin" diff --git a/platforms/linux-arm64-gnu/README.md b/platforms/linux-arm64-gnu/README.md index 7a38448..19ad930 100644 --- a/platforms/linux-arm64-gnu/README.md +++ b/platforms/linux-arm64-gnu/README.md @@ -1,3 +1,3 @@ -# `@cpu-count/linux-arm64-gnu` +# `@cipherstash/jseql-ffi-linux-arm64-gnu` -Prebuilt binary package for `cpu-count` on `linux-arm64-gnu`. +Prebuilt binary package for `@cipherstash/jseql-ffi` on `linux-arm64-gnu`. diff --git a/platforms/linux-arm64-gnu/package.json b/platforms/linux-arm64-gnu/package.json index 77a9374..70e6409 100644 --- a/platforms/linux-arm64-gnu/package.json +++ b/platforms/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { - "name": "@cpu-count/linux-arm64-gnu", - "description": "Prebuilt binary package for `cpu-count` on `linux-arm64-gnu`.", + "name": "@cipherstash/jseql-ffi-linux-arm64-gnu", + "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `linux-arm64-gnu`.", "version": "0.1.0", "os": [ "linux" diff --git a/platforms/linux-x64-gnu/README.md b/platforms/linux-x64-gnu/README.md index 1ca1bfc..57a448a 100644 --- a/platforms/linux-x64-gnu/README.md +++ b/platforms/linux-x64-gnu/README.md @@ -1,3 +1,3 @@ -# `@cpu-count/linux-x64-gnu` +# `@cipherstash/jseql-ffi-linux-x64-gnu` -Prebuilt binary package for `cpu-count` on `linux-x64-gnu`. +Prebuilt binary package for `@cipherstash/jseql-ffi` on `linux-x64-gnu`. diff --git a/platforms/linux-x64-gnu/package.json b/platforms/linux-x64-gnu/package.json index 115a205..8fa89c8 100644 --- a/platforms/linux-x64-gnu/package.json +++ b/platforms/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { - "name": "@cpu-count/linux-x64-gnu", - "description": "Prebuilt binary package for `cpu-count` on `linux-x64-gnu`.", + "name": "@cipherstash/jseql-ffi-linux-x64-gnu", + "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `linux-x64-gnu`.", "version": "0.1.0", "os": [ "linux" diff --git a/platforms/win32-x64-msvc/README.md b/platforms/win32-x64-msvc/README.md index d713a7d..3361198 100644 --- a/platforms/win32-x64-msvc/README.md +++ b/platforms/win32-x64-msvc/README.md @@ -1,3 +1,3 @@ -# `@cpu-count/win32-x64-msvc` +# `@cipherstash/jseql-ffi-win32-x64-msvc` -Prebuilt binary package for `cpu-count` on `win32-x64-msvc`. +Prebuilt binary package for `@cipherstash/jseql-ffi` on `win32-x64-msvc`. diff --git a/platforms/win32-x64-msvc/package.json b/platforms/win32-x64-msvc/package.json index 2004074..42496e8 100644 --- a/platforms/win32-x64-msvc/package.json +++ b/platforms/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { - "name": "@cpu-count/win32-x64-msvc", - "description": "Prebuilt binary package for `cpu-count` on `win32-x64-msvc`.", + "name": "@cipherstash/jseql-ffi-win32-x64-msvc", + "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `win32-x64-msvc`.", "version": "0.1.0", "os": [ "win32" diff --git a/src/load.cts b/src/load.cts index e567ac8..be79585 100644 --- a/src/load.cts +++ b/src/load.cts @@ -7,11 +7,11 @@ module.exports = require('@neon-rs/load').proxy({ platforms: { - 'win32-x64-msvc': () => require('@cpu-count/win32-x64-msvc'), - 'darwin-x64': () => require('@cpu-count/darwin-x64'), - 'darwin-arm64': () => require('@cpu-count/darwin-arm64'), - 'linux-x64-gnu': () => require('@cpu-count/linux-x64-gnu'), - 'linux-arm64-gnu': () => require('@cpu-count/linux-arm64-gnu') + 'win32-x64-msvc': () => require('@cipherstash/jseql-ffi-win32-x64-msvc'), + 'darwin-x64': () => require('@cipherstash/jseql-ffi-darwin-x64'), + 'darwin-arm64': () => require('@cipherstash/jseql-ffi-darwin-arm64'), + 'linux-x64-gnu': () => require('@cipherstash/jseql-ffi-linux-x64-gnu'), + 'linux-arm64-gnu': () => require('@cipherstash/jseql-ffi-linux-arm64-gnu') }, debug: () => require('../index.node') }); From af8263160288391466bb9f58ae8980343b837eda Mon Sep 17 00:00:00 2001 From: Drew Thomas Date: Tue, 17 Dec 2024 18:31:57 +1100 Subject: [PATCH 03/19] Sketch out initial interface --- scratch.ts | 150 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 scratch.ts diff --git a/scratch.ts b/scratch.ts new file mode 100644 index 0000000..ce9b580 --- /dev/null +++ b/scratch.ts @@ -0,0 +1,150 @@ +// +// Stubbed out funcs that will be implemented in Rust and live in ./lib +// + +function cipherNew() { + return "cipher" as const; +} + +function encrypt( + plaintextPayload: PlaintextEqlPayload +): Promise { + return new Promise((resolve) => { + resolve({ c: `${plaintextPayload.plaintext}-encrypted` }); + }); +} + +function decrypt( + field: EqlField, + encryptedPayload: EncryptedEqlPayload +): Promise { + return new Promise((resolve) => { + const plaintext = encryptedPayload.c.replace("-encrypted", ""); + resolve(newPlaintextPayload(field, plaintext)); + }); +} + +// +// This part will live in wrapper TS code (e.g. jseql). +// + +type Eql = { + cipher: "cipher"; // TODO: actual Cipher + field: (opts: FieldOpts) => EqlField; +}; + +type FieldOpts = { + table: string; + column: string; +}; + +type EqlField = { + cipher: any; + table: string; + column: string; + plaintextPayload: (plaintext: string) => PlaintextEqlPayload; + decrypt: ( + encryptedPayload: EncryptedEqlPayload + ) => Promise; +}; + +type EncryptedEqlPayload = { + c: string; +}; + +type PlaintextEqlPayload = { + plaintext: string; + field: EqlField; + encrypt: () => Promise; +}; + +function eql(): Eql { + return { + cipher: cipherNew(), + field(opts: FieldOpts): EqlField { + return { + cipher: this.cipher, + table: opts.table, + column: opts.column, + plaintextPayload(plaintext: string): PlaintextEqlPayload { + return newPlaintextPayload(this, plaintext); + }, + decrypt( + encryptedPayload: EncryptedEqlPayload + ): Promise { + return decrypt(this, encryptedPayload); + }, + }; + }, + }; +} + +function newPlaintextPayload( + field: EqlField, + plaintext: string +): PlaintextEqlPayload { + return { + plaintext, + field, + encrypt(): Promise { + return encrypt(this); + }, + }; +} + +// +// Example code using the new interface +// + +const eqlClient = eql(); + +export const emailField = eqlClient.field({ + table: "users", + column: "email", +}); + +(async () => { + const encryptedEmail = await emailField.plaintextPayload("abc").encrypt(); + + console.log(encryptedEmail); // { c: "abc-encrypted" } + + const decrypted = await emailField.decrypt(encryptedEmail); + + console.log(decrypted.plaintext); // "abc" +})(); + +// +// Misc. scribbling for the interface +// + +/* +EqlField +{ + cipher: Cipher, + table: string, + column: string, + encrypt: (PlaintextEqlPayload) => Promise, + encryptMany: (PlaintextEqlPayload[]) => Promise, + decrypt: (EncryptedEqlPayload) => Promise, + decryptMany: (EncryptedEqlPayload[]) => Promise, + eqlPayload: (string) => PlaintextEqlPayload, +} + +PlaintextEqlPayload +{ + plaintext: string // string works to start, but can accept multiple types later + field: EqlField, + withIdentity: () => PlaintextEqlPayload, + lockTo: () => PlaintextEqlPayload, + encrypt: () => Promise +} + +*/ + +// Encrypt single +// const encryptedEmail = await emailField.eqlPayload("abc").encrypt(); // => Promise + +// const encryptedEmails = await emailField.encryptMany([ +// emailField.eqlPayload("abc"), +// emailField.eqlPayload("def"), +// ]); From 68e1cc370690e1795d3501608804bb2bbea0d663 Mon Sep 17 00:00:00 2001 From: Drew Thomas Date: Wed, 18 Dec 2024 09:27:26 +1100 Subject: [PATCH 04/19] Scaffold Rust code with Tokio and JS promises --- Cargo.lock | 210 ++++++++++++++++++++++++++++++++- crates/jseql-ffi/Cargo.toml | 2 + crates/jseql-ffi/src/lib.rs | 73 ++++++++---- package-lock.json | 228 ++++++++++++++++++++++++++++++++++++ scratch.ts | 47 +++++--- 5 files changed, 517 insertions(+), 43 deletions(-) create mode 100644 package-lock.json diff --git a/Cargo.lock b/Cargo.lock index 7d62433..9892955 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,54 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets", +] + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "bytes" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "cfg-if" @@ -19,11 +67,19 @@ dependencies = [ "wasi", ] +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + [[package]] name = "jseql-ffi" version = "0.1.0" dependencies = [ "neon", + "once_cell", + "tokio", ] [[package]] @@ -42,6 +98,42 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "miniz_oxide" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +dependencies = [ + "libc", + "wasi", + "windows-sys", +] + [[package]] name = "neon" version = "1.0.0" @@ -68,12 +160,50 @@ dependencies = [ "syn-mid", ] +[[package]] +name = "object" +version = "0.36.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" + [[package]] name = "proc-macro2" version = "1.0.92" @@ -92,6 +222,27 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "redox_syscall" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +dependencies = [ + "bitflags", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + [[package]] name = "semver" version = "1.0.23" @@ -104,12 +255,31 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +[[package]] +name = "socket2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +dependencies = [ + "libc", + "windows-sys", +] + [[package]] name = "syn" version = "2.0.90" @@ -132,6 +302,35 @@ dependencies = [ "syn", ] +[[package]] +name = "tokio" +version = "1.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-macros" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "unicode-ident" version = "1.0.14" @@ -144,6 +343,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-targets" version = "0.52.6" diff --git a/crates/jseql-ffi/Cargo.toml b/crates/jseql-ffi/Cargo.toml index b61f44b..dbbec09 100644 --- a/crates/jseql-ffi/Cargo.toml +++ b/crates/jseql-ffi/Cargo.toml @@ -12,3 +12,5 @@ crate-type = ["cdylib"] [dependencies] neon = "1" +once_cell = "1.20.2" +tokio = { version = "1", features = ["full"] } diff --git a/crates/jseql-ffi/src/lib.rs b/crates/jseql-ffi/src/lib.rs index d3c5762..7e7ac31 100644 --- a/crates/jseql-ffi/src/lib.rs +++ b/crates/jseql-ffi/src/lib.rs @@ -1,44 +1,71 @@ use neon::prelude::*; +use once_cell::sync::OnceCell; +use tokio::runtime::Runtime; -fn create_eql_payload(mut cx: FunctionContext) -> JsResult { +// Return a global tokio runtime or create one if it doesn't exist. +// Throws a JavaScript exception if the `Runtime` fails to create. +fn runtime<'a, C: Context<'a>>(cx: &mut C) -> NeonResult<&'static Runtime> { + static RUNTIME: OnceCell = OnceCell::new(); + + RUNTIME.get_or_try_init(|| Runtime::new().or_else(|err| cx.throw_error(err.to_string()))) +} + +fn encrypt(mut cx: FunctionContext) -> JsResult { let value = cx.argument::(0)?.value(&mut cx); - let table: Handle = cx.argument(1)?; - let column: Handle = cx.argument(2)?; - let callback = cx.argument::(3)?.root(&mut cx); + let rt = runtime(&mut cx)?; let channel = cx.channel(); - println!("value: {:?}", value); - println!("table: {:?}", table); - println!("column: {:?}", column); + // Create a JavaScript promise and a `deferred` handle for resolving it. + // It is important to be careful not to perform failable actions after + // creating the promise to avoid an unhandled rejection. + let (deferred, promise) = cx.promise(); - std::thread::spawn(move || { - // Do the heavy lifting inside the background thread. - do_encrypt(value, callback, channel); + // Spawn an `async` task on the tokio runtime. Only Rust types that are + // `Send` may be moved into this block. `Context` may not be passed and all + // JavaScript values must first be converted to Rust types. + // + // This task will _not_ block the JavaScript main thread. + rt.spawn(async move { + // Inside this block, it is possible to `await` Rust `Future` + let encrypted = format!("{value}-encrypted"); + + // Settle the promise from the result of a closure. JavaScript exceptions + // will be converted to a Promise rejection. + // + // This closure will execute on the JavaScript main thread. It should be + // limited to converting Rust types to JavaScript values. Expensive operations + // should be performed outside of it. + deferred.settle_with(&channel, move |mut cx| Ok(cx.string(encrypted))); }); - Ok(cx.undefined()) + Ok(promise) } -fn do_encrypt<'a>(value: String, callback: Root, channel: Channel) { - // TODO: Do the actual encryption and creation of the Eql Encrypted payload here - // uppercase is not a very strong cipher :) - let result = value.to_uppercase(); +fn decrypt(mut cx: FunctionContext) -> JsResult { + let value = cx.argument::(0)?.value(&mut cx); - // Send the result back to the main thread. - channel.send(move |mut cx| { - let this = cx.undefined(); + let rt = runtime(&mut cx)?; + let channel = cx.channel(); + + let (deferred, promise) = cx.promise(); - let callback = callback.into_inner(&mut cx); - let result = cx.string(result); - callback.call(&mut cx, this, vec![result.upcast::()])?; + rt.spawn(async move { + let decrypted = value + .strip_suffix("-encrypted") + .map(String::from) + .unwrap_or(value); - Ok(()) + deferred.settle_with(&channel, move |mut cx| Ok(cx.string(decrypted))); }); + + Ok(promise) } #[neon::main] fn main(mut cx: ModuleContext) -> NeonResult<()> { - cx.export_function("createEqlPayload", create_eql_payload)?; + cx.export_function("encrypt", encrypt)?; + cx.export_function("decrypt", decrypt)?; + Ok(()) } diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..670ccde --- /dev/null +++ b/package-lock.json @@ -0,0 +1,228 @@ +{ + "name": "jseql-ffi", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "jseql-ffi", + "version": "0.1.0", + "license": "ISC", + "dependencies": { + "@neon-rs/load": "^0.1.82" + }, + "devDependencies": { + "@neon-rs/cli": "^0.1.82", + "@tsconfig/node20": "^20.1.4", + "@types/node": "^20.11.16", + "typescript": "^5.3.3" + } + }, + "node_modules/@cargo-messages/android-arm-eabi": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/android-arm-eabi/-/android-arm-eabi-0.1.81.tgz", + "integrity": "sha512-cpRbgb56e9LmAj96Tixtz9/bTlaJAeplWNNv4obu+eqQyZd3ZjX04TJd9fM1bjHDGVyR9GTVlgBsbQEntIGkwg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@cargo-messages/darwin-arm64": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/darwin-arm64/-/darwin-arm64-0.1.81.tgz", + "integrity": "sha512-OwGqsw+tbJx37a/vH4T8R9qkrrFYoTIOnckbA9+MhQodE2FSWyk3HvLh+z8jjl+QZa1RSOU9Ax6gt/46h0BiTg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@cargo-messages/darwin-x64": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/darwin-x64/-/darwin-x64-0.1.81.tgz", + "integrity": "sha512-Iu761bPk25Ce6yUdDCjjeVuT8/xbBmczyaNB7oYBmAZEE5rshvCJ42TqSShYYP+S7pKkN42nBhkFooaZrqaz9g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@cargo-messages/linux-arm-gnueabihf": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm-gnueabihf/-/linux-arm-gnueabihf-0.1.81.tgz", + "integrity": "sha512-iIuy7KTJAEhbiqlIlcxQOdW6opI6M9LXlgd/jdsHbP2FjmTyhTLnd3JCJ6JeAeidwknCDs+CFlaVmPxTKSytsg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cargo-messages/linux-arm64-gnu": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm64-gnu/-/linux-arm64-gnu-0.1.81.tgz", + "integrity": "sha512-QPQRsHj9m/9ga8wRBlLh8t2AXyr40+/H55FIKVj7zIjV++waY/TbSTPofDZQhMycd5VSGLKztfhahiCO7c/RAQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cargo-messages/linux-arm64-musl": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm64-musl/-/linux-arm64-musl-0.1.81.tgz", + "integrity": "sha512-9O0ATesIOjDTz2L01OtlGHYwP86I31/mzXMC+ryQkzbbIKj7KUiSqmEc29I14I517UYO8/sMeow6q6MVBpehlA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cargo-messages/linux-x64-gnu": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/linux-x64-gnu/-/linux-x64-gnu-0.1.81.tgz", + "integrity": "sha512-wEFYxCdtHNiEvp5KEg17CfRCUdfRTtkL+1GASROyvYEUV6DQf6TXxfHuuWg2xlVxh5fqiTGFSRfiqFrCDL/xrw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cargo-messages/linux-x64-musl": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/linux-x64-musl/-/linux-x64-musl-0.1.81.tgz", + "integrity": "sha512-zi5pKIh60oPwOCDQapAZ3Mya4y56MI2BoGvY8JtztYaXTorGmAoyf6jjb50Wt+HfoYYjM3OlPt03XMlCFZJnIQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cargo-messages/win32-arm64-msvc": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/win32-arm64-msvc/-/win32-arm64-msvc-0.1.81.tgz", + "integrity": "sha512-oyiT8AYLoguF7cFOMYDsPv3eirzBcFafOOfRsFyd3+wmaPTl/DdbCq446oThRmSAsEGJpzhzj7TafcnXMBkHbg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@cargo-messages/win32-x64-msvc": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@cargo-messages/win32-x64-msvc/-/win32-x64-msvc-0.1.81.tgz", + "integrity": "sha512-B5Ukf4AohtIv27uCP/AgM+7vYwQ4RacI6m8ZBr2XKeSrjZXcXguzlZd+wD7bD5+wa0capvXKUskZDnpG/DcYiA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@neon-rs/cli": { + "version": "0.1.82", + "resolved": "https://registry.npmjs.org/@neon-rs/cli/-/cli-0.1.82.tgz", + "integrity": "sha512-QrlGPQp9KOGuMvjjua79lEV2QTcE16m8JatG5ITdQpBAwRQpDw5xab57W9130y2iUEfMzYtp7v6pcN1fUB0Exg==", + "dev": true, + "license": "MIT", + "bin": { + "neon": "index.js" + }, + "optionalDependencies": { + "@cargo-messages/android-arm-eabi": "0.1.81", + "@cargo-messages/darwin-arm64": "0.1.81", + "@cargo-messages/darwin-x64": "0.1.81", + "@cargo-messages/linux-arm-gnueabihf": "0.1.81", + "@cargo-messages/linux-arm64-gnu": "0.1.81", + "@cargo-messages/linux-arm64-musl": "0.1.81", + "@cargo-messages/linux-x64-gnu": "0.1.81", + "@cargo-messages/linux-x64-musl": "0.1.81", + "@cargo-messages/win32-arm64-msvc": "0.1.81", + "@cargo-messages/win32-x64-msvc": "0.1.81" + } + }, + "node_modules/@neon-rs/load": { + "version": "0.1.82", + "resolved": "https://registry.npmjs.org/@neon-rs/load/-/load-0.1.82.tgz", + "integrity": "sha512-H4Gu2o5kPp+JOEhRrOQCnJnf7X6sv9FBLttM/wSbb4efsgFWeHzfU/ItZ01E5qqEk+U6QGdeVO7lxXIAtYHr5A==", + "license": "MIT" + }, + "node_modules/@tsconfig/node20": { + "version": "20.1.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.4.tgz", + "integrity": "sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "20.17.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.10.tgz", + "integrity": "sha512-/jrvh5h6NXhEauFFexRin69nA0uHJ5gwk4iDivp/DeoEua3uwCUto6PC86IpRITBOs4+6i2I56K5x5b6WYGXHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/typescript": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/scratch.ts b/scratch.ts index ce9b580..7f454c7 100644 --- a/scratch.ts +++ b/scratch.ts @@ -1,3 +1,4 @@ +const { encrypt, decrypt } = require("./index.node"); // // Stubbed out funcs that will be implemented in Rust and live in ./lib // @@ -6,23 +7,23 @@ function cipherNew() { return "cipher" as const; } -function encrypt( - plaintextPayload: PlaintextEqlPayload -): Promise { - return new Promise((resolve) => { - resolve({ c: `${plaintextPayload.plaintext}-encrypted` }); - }); -} - -function decrypt( - field: EqlField, - encryptedPayload: EncryptedEqlPayload -): Promise { - return new Promise((resolve) => { - const plaintext = encryptedPayload.c.replace("-encrypted", ""); - resolve(newPlaintextPayload(field, plaintext)); - }); -} +// function encrypt( +// plaintextPayload: PlaintextEqlPayload +// ): Promise { +// return new Promise((resolve) => { +// resolve({ c: `${plaintextPayload.plaintext}-encrypted` }); +// }); +// } + +// function decrypt( +// field: EqlField, +// encryptedPayload: EncryptedEqlPayload +// ): Promise { +// return new Promise((resolve) => { +// const plaintext = encryptedPayload.c.replace("-encrypted", ""); +// resolve(newPlaintextPayload(field, plaintext)); +// }); +// } // // This part will live in wrapper TS code (e.g. jseql). @@ -72,7 +73,11 @@ function eql(): Eql { decrypt( encryptedPayload: EncryptedEqlPayload ): Promise { - return decrypt(this, encryptedPayload); + // return decrypt(this, encryptedPayload); + + return decrypt(encryptedPayload.c).then((val: string) => + newPlaintextPayload(this, val) + ); }, }; }, @@ -87,7 +92,11 @@ function newPlaintextPayload( plaintext, field, encrypt(): Promise { - return encrypt(this); + // return encrypt(this); + + return encrypt(this.plaintext).then((val: string) => { + return { c: val }; + }); }, }; } From 26667a5ee2193260af12ab5f8cc7a0392b7a26be Mon Sep 17 00:00:00 2001 From: Drew Thomas Date: Wed, 18 Dec 2024 09:59:41 +1100 Subject: [PATCH 05/19] Scaffold new_client function --- crates/jseql-ffi/src/lib.rs | 20 ++++++++++++++++++++ scratch.ts | 36 +++++++++++++++++++++--------------- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/crates/jseql-ffi/src/lib.rs b/crates/jseql-ffi/src/lib.rs index 7e7ac31..0365ec9 100644 --- a/crates/jseql-ffi/src/lib.rs +++ b/crates/jseql-ffi/src/lib.rs @@ -10,6 +10,25 @@ fn runtime<'a, C: Context<'a>>(cx: &mut C) -> NeonResult<&'static Runtime> { RUNTIME.get_or_try_init(|| Runtime::new().or_else(|err| cx.throw_error(err.to_string()))) } +struct Client {} + +impl Finalize for Client {} + +fn new_client(mut cx: FunctionContext) -> JsResult { + let rt = runtime(&mut cx)?; + let channel = cx.channel(); + + let (deferred, promise) = cx.promise(); + + rt.spawn(async move { + let client = Client {}; + + deferred.settle_with(&channel, move |mut cx| Ok(cx.boxed(client))); + }); + + Ok(promise) +} + fn encrypt(mut cx: FunctionContext) -> JsResult { let value = cx.argument::(0)?.value(&mut cx); @@ -64,6 +83,7 @@ fn decrypt(mut cx: FunctionContext) -> JsResult { #[neon::main] fn main(mut cx: ModuleContext) -> NeonResult<()> { + cx.export_function("newClient", new_client)?; cx.export_function("encrypt", encrypt)?; cx.export_function("decrypt", decrypt)?; diff --git a/scratch.ts b/scratch.ts index 7f454c7..4ced3f3 100644 --- a/scratch.ts +++ b/scratch.ts @@ -1,11 +1,11 @@ -const { encrypt, decrypt } = require("./index.node"); +const { encrypt, decrypt, newClient } = require("./index.node"); // // Stubbed out funcs that will be implemented in Rust and live in ./lib // -function cipherNew() { - return "cipher" as const; -} +// function cipherNew() { +// return "cipher" as const; +// } // function encrypt( // plaintextPayload: PlaintextEqlPayload @@ -30,17 +30,19 @@ function cipherNew() { // type Eql = { - cipher: "cipher"; // TODO: actual Cipher + client: Client; field: (opts: FieldOpts) => EqlField; }; +type Client = {}; + type FieldOpts = { table: string; column: string; }; type EqlField = { - cipher: any; + client: Client; table: string; column: string; plaintextPayload: (plaintext: string) => PlaintextEqlPayload; @@ -59,12 +61,16 @@ type PlaintextEqlPayload = { encrypt: () => Promise; }; -function eql(): Eql { +function eql(): Promise { + return newClient().then((client: Client) => newEql(client)); +} + +function newEql(client: Client): Eql { return { - cipher: cipherNew(), + client, field(opts: FieldOpts): EqlField { return { - cipher: this.cipher, + client: this.client, table: opts.table, column: opts.column, plaintextPayload(plaintext: string): PlaintextEqlPayload { @@ -105,14 +111,14 @@ function newPlaintextPayload( // Example code using the new interface // -const eqlClient = eql(); +(async () => { + const eqlClient = await eql(); -export const emailField = eqlClient.field({ - table: "users", - column: "email", -}); + const emailField = eqlClient.field({ + table: "users", + column: "email", + }); -(async () => { const encryptedEmail = await emailField.plaintextPayload("abc").encrypt(); console.log(encryptedEmail); // { c: "abc-encrypted" } From 28b0ca67dc6be9c80d45607f76911f9e45c52ffc Mon Sep 17 00:00:00 2001 From: Drew Thomas Date: Wed, 18 Dec 2024 11:46:48 +1100 Subject: [PATCH 06/19] Implement round trip encryption/decryption --- .gitignore | 1 + Cargo.lock | 3261 +++++++++++++++++++++++++++++++++-- crates/jseql-ffi/Cargo.toml | 1 + crates/jseql-ffi/src/lib.rs | 83 +- scratch.ts | 45 +- 5 files changed, 3152 insertions(+), 239 deletions(-) diff --git a/.gitignore b/.gitignore index 8ec40c7..632d537 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ npm-debug.log* lib cargo.log cross.log +mise.local.toml diff --git a/Cargo.lock b/Cargo.lock index 9892955..4a4f869 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,368 +18,3066 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] -name = "autocfg" -version = "1.4.0" +name = "aead" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] [[package]] -name = "backtrace" -version = "0.3.74" +name = "aes" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ - "addr2line", "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets", + "cipher 0.4.4", + "cpufeatures", + "zeroize", ] [[package]] -name = "bitflags" -version = "2.6.0" +name = "aes-gcm-siv" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "ae0784134ba9375416d469ec31e7c5f9fa94405049cf08c5ce5b4698be673e0d" +dependencies = [ + "aead", + "aes", + "cipher 0.4.4", + "ctr", + "polyval", + "subtle", + "zeroize", +] [[package]] -name = "bytes" -version = "1.9.0" +name = "ahash" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] [[package]] -name = "cfg-if" -version = "1.0.0" +name = "aho-corasick" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] [[package]] -name = "getrandom" -version = "0.2.15" +name = "android-tzdata" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ - "cfg-if", "libc", - "wasi", ] [[package]] -name = "gimli" -version = "0.31.1" +name = "anyhow" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" [[package]] -name = "jseql-ffi" -version = "0.1.0" -dependencies = [ - "neon", - "once_cell", - "tokio", -] +name = "array-init" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" [[package]] -name = "libc" -version = "0.2.168" +name = "arrayref" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] -name = "libloading" -version = "0.8.6" +name = "arrayvec" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" dependencies = [ - "cfg-if", - "windows-targets", + "zeroize", ] [[package]] -name = "lock_api" -version = "0.4.12" +name = "async-mutex" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" dependencies = [ - "autocfg", - "scopeguard", + "event-listener", ] [[package]] -name = "memchr" -version = "2.7.4" +name = "async-trait" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] [[package]] -name = "miniz_oxide" -version = "0.8.2" +name = "atomic" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +checksum = "8d818003e740b63afc82337e3160717f4f63078720a810b7b903e70a5d1d2994" dependencies = [ - "adler2", + "bytemuck", ] [[package]] -name = "mio" -version = "1.0.3" +name = "autocfg" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ + "addr2line", + "cfg-if", "libc", - "wasi", - "windows-sys", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets", ] [[package]] -name = "neon" -version = "1.0.0" +name = "backtrace-ext" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d75440242411c87dc39847b0e33e961ec1f10326a9d8ecf9c1ea64a3b3c13dc" +checksum = "537beee3be4a18fb023b570f80e3ae28003db9167a751266b259926e25539d50" dependencies = [ - "getrandom", - "libloading", - "neon-macros", - "once_cell", - "semver", - "send_wrapper", - "smallvec", + "backtrace", ] [[package]] -name = "neon-macros" -version = "1.0.0" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6813fde79b646e47e7ad75f480aa80ef76a5d9599e2717407961531169ee38b" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base85" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36915bbaca237c626689b5bd14d02f2ba7a5a359d30a2a08be697392e3718079" dependencies = [ - "quote", - "syn", - "syn-mid", + "thiserror", ] [[package]] -name = "object" -version = "0.36.5" +name = "bit-vec" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "memchr", + "funty", + "radium", + "tap", + "wyz", ] [[package]] -name = "once_cell" -version = "1.20.2" +name = "blake3" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "zeroize", +] [[package]] -name = "parking_lot" -version = "0.12.3" +name = "block-buffer" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "lock_api", - "parking_lot_core", + "generic-array", ] [[package]] -name = "parking_lot_core" -version = "0.9.10" +name = "block-modes" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "2cb03d1bed155d89dce0f845b7899b18a9a163e148fd004e1c28421a783e2d8e" dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", + "block-padding", + "cipher 0.3.0", ] [[package]] -name = "pin-project-lite" -version = "0.2.15" +name = "block-padding" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] -name = "proc-macro2" -version = "1.0.92" +name = "borsh" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" dependencies = [ - "unicode-ident", + "borsh-derive", + "cfg_aliases", ] [[package]] -name = "quote" -version = "1.0.37" +name = "borsh-derive" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" dependencies = [ + "once_cell", + "proc-macro-crate", "proc-macro2", + "quote", + "syn 2.0.90", ] [[package]] -name = "redox_syscall" -version = "0.5.8" +name = "bumpalo" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bytecheck" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" dependencies = [ - "bitflags", + "bytecheck_derive", + "ptr_meta", + "simdutf8", ] [[package]] -name = "rustc-demangle" -version = "0.1.24" +name = "bytecheck_derive" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] -name = "scopeguard" -version = "1.2.0" +name = "bytemuck" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" [[package]] -name = "semver" -version = "1.0.23" +name = "byteorder" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] -name = "send_wrapper" -version = "0.6.0" +name = "bytes" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] -name = "signal-hook-registry" -version = "1.4.2" +name = "cc" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf" dependencies = [ - "libc", + "shlex", ] [[package]] -name = "smallvec" -version = "1.13.2" +name = "cfg-if" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "socket2" -version = "0.5.8" +name = "cfg_aliases" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chrono" +version = "0.4.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ - "libc", - "windows-sys", + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-targets", ] [[package]] -name = "syn" -version = "2.0.90" +name = "cipher" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "generic-array", ] [[package]] -name = "syn-mid" -version = "0.6.0" +name = "cipher" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5dc35bb08dd1ca3dfb09dce91fd2d13294d6711c88897d9a9d60acf39bce049" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "proc-macro2", - "quote", - "syn", + "crypto-common", + "inout", ] [[package]] -name = "tokio" -version = "1.42.0" +name = "cipherstash-client" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +checksum = "d364f613279c464d4854b06c49a6e57cc58802cd7a5ff4c0f6f8c7aae447cd18" dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys", + "aes-gcm-siv", + "anyhow", + "async-mutex", + "async-trait", + "base64", + "base85", + "blake3", + "cfg-if", + "chrono", + "cipherstash-config", + "cipherstash-core", + "cipherstash-stats", + "cllw-ore", + "derive_more", + "dirs", + "futures", + "hex", + "hmac", + "itertools", + "lazy_static", + "log", + "miette", + "opaque-debug", + "open", + "ore-rs", + "percent-encoding", + "rand", + "rand_chacha", + "recipher", + "reqwest", + "reqwest-middleware", + "reqwest-retry", + "rmp-serde", + "rust-stemmers", + "rust_decimal", + "serde", + "serde_bytes", + "serde_cbor", + "serde_json", + "sha2", + "static_assertions", + "thiserror", + "tracing", + "url", + "uuid", + "winnow", + "zeroize", + "zerokms-protocol", ] [[package]] -name = "tokio-macros" -version = "2.4.0" +name = "cipherstash-config" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "30104045751da6e528e83804f4b22d0cddcb27aacce0e1c79604872ddb076bbf" dependencies = [ - "proc-macro2", - "quote", - "syn", + "serde", + "thiserror", ] [[package]] -name = "unicode-ident" -version = "1.0.14" +name = "cipherstash-core" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +checksum = "dd56dfac0a35146968ef6696fb822b22f70a664a8739874385876d5452844b7a" +dependencies = [ + "hmac", + "lazy_static", + "num-bigint", + "rand", + "regex", + "sha2", + "thiserror", +] [[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +name = "cipherstash-stats" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "e10da9699454e308aeb16b30800282bbb175c28c073d4f7114d1c731c20a5c00" +dependencies = [ + "lazy_static", + "prometheus", +] [[package]] -name = "windows-sys" -version = "0.52.0" +name = "cllw-ore" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "d1b01c26e11101044f85802e31d842483ef983a890c03472d9489f6969cf865a" dependencies = [ - "windows-targets", + "bit-vec", + "bitvec", + "blake3", + "postgres-derive", + "postgres-types", + "regex", + "subtle", + "thiserror", + "unicode-normalization", + "vitaminc", ] [[package]] -name = "windows-targets" -version = "0.52.6" +name = "cmac" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +checksum = "8543454e3c3f5126effff9cd44d562af4e31fb8ce1cc0d3dcd8f084515dbc1aa" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "cipher 0.4.4", + "dbl", + "digest", ] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" +name = "constant_time_eq" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] -name = "windows_aarch64_msvc" +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core", + "typenum", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher 0.4.4", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "dbl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd2735a791158376708f9347fe8faba9667589d82427ef3aed6794a8981de3d9" +dependencies = [ + "generic-array", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "unicode-xid", +] + +[[package]] +name = "deunicode" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "dummy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac124e13ae9aa56acc4241f8c8207501d93afdd8d8e62f0c1f2e12f6508c65" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "fake" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d391ba4af7f1d93f01fcf7b2f29e2bc9348e109dfdbf4dcbdc51dfa38dab0b6" +dependencies = [ + "deunicode", + "dummy", + "rand", + "uuid", +] + +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "http" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" + +[[package]] +name = "hyper" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +dependencies = [ + "equivalent", + "hashbrown 0.15.2", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "ipnet" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + +[[package]] +name = "is-terminal" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "is_ci" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "js-sys" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "jseql-ffi" +version = "0.1.0" +dependencies = [ + "cipherstash-client", + "neon", + "once_cell", + "tokio", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.168" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" + +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "miette" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" +dependencies = [ + "backtrace", + "backtrace-ext", + "is-terminal", + "miette-derive", + "once_cell", + "owo-colors", + "supports-color", + "supports-hyperlinks", + "supports-unicode", + "terminal_size", + "textwrap", + "thiserror", + "unicode-width", +] + +[[package]] +name = "miette-derive" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.52.0", +] + +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "neon" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d75440242411c87dc39847b0e33e961ec1f10326a9d8ecf9c1ea64a3b3c13dc" +dependencies = [ + "getrandom", + "libloading", + "neon-macros", + "once_cell", + "semver", + "send_wrapper", + "smallvec", +] + +[[package]] +name = "neon-macros" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6813fde79b646e47e7ad75f480aa80ef76a5d9599e2717407961531169ee38b" +dependencies = [ + "quote", + "syn 2.0.90", + "syn-mid", +] + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "object" +version = "0.36.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "open" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2078c0039e6a54a0c42c28faa984e115fb4c2d5bf2208f77d1961002df8576f8" +dependencies = [ + "pathdiff", + "windows-sys 0.42.0", +] + +[[package]] +name = "openssl" +version = "0.10.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-src" +version = "300.4.1+3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" +dependencies = [ + "cc", +] + +[[package]] +name = "openssl-sys" +version = "0.9.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +dependencies = [ + "cc", + "libc", + "openssl-src", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "ore-rs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17ced859adc3f4a6a80568b0b33519a496b00609b0be3b94d9dff136b5f3ec8" +dependencies = [ + "aes", + "block-modes", + "byteorder", + "hex", + "hex-literal", + "lazy_static", + "num", + "rand", + "rand_chacha", + "subtle-ng", + "thiserror", + "zeroize", +] + +[[package]] +name = "owo-colors" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.10", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.8", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project-lite" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "postgres-derive" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69700ea4603c5ef32d447708e6a19cd3e8ac197a000842e97f527daea5e4175f" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "postgres-protocol" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acda0ebdebc28befa84bee35e651e4c5f09073d668c7aed4cf7e23c3cda84b23" +dependencies = [ + "base64", + "byteorder", + "bytes", + "fallible-iterator", + "hmac", + "md-5", + "memchr", + "rand", + "sha2", + "stringprep", +] + +[[package]] +name = "postgres-types" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f66ea23a2d0e5734297357705193335e0a957696f34bed2f2faefacb2fec336f" +dependencies = [ + "array-init", + "bytes", + "fallible-iterator", + "postgres-derive", + "postgres-protocol", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prometheus" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot 0.12.3", + "protobuf", + "thiserror", +] + +[[package]] +name = "protobuf" +version = "2.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" + +[[package]] +name = "ptr_meta" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" +dependencies = [ + "ptr_meta_derive", +] + +[[package]] +name = "ptr_meta_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "quote" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "recipher" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72aa0940c8f5b753bfd3ed212d60896760579324c59194b7e51fcec35e5c1b0f" +dependencies = [ + "aes", + "async-trait", + "cmac", + "hex", + "hex-literal", + "opaque-debug", + "rand", + "rand_chacha", + "serde", + "serde_cbor", + "sha2", + "thiserror", + "zeroize", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rend" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" +dependencies = [ + "bytecheck", +] + +[[package]] +name = "reqwest" +version = "0.12.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +dependencies = [ + "base64", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-registry", +] + +[[package]] +name = "reqwest-middleware" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562ceb5a604d3f7c885a792d42c199fd8af239d0a51b2fa6a78aafa092452b04" +dependencies = [ + "anyhow", + "async-trait", + "http", + "reqwest", + "serde", + "thiserror", + "tower-service", +] + +[[package]] +name = "reqwest-retry" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40f342894422862af74c50e1e9601cf0931accc9c6981e5eb413c46603b616b5" +dependencies = [ + "anyhow", + "async-trait", + "chrono", + "futures", + "getrandom", + "http", + "hyper", + "parking_lot 0.11.2", + "reqwest", + "reqwest-middleware", + "retry-policies", + "tokio", + "tracing", + "wasm-timer", +] + +[[package]] +name = "retry-policies" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "493b4243e32d6eedd29f9a398896e35c6943a123b55eec97dcaee98310d25810" +dependencies = [ + "anyhow", + "chrono", + "rand", +] + +[[package]] +name = "rkyv" +version = "0.7.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" +dependencies = [ + "bitvec", + "bytecheck", + "bytes", + "hashbrown 0.12.3", + "ptr_meta", + "rend", + "rkyv_derive", + "seahash", + "tinyvec", + "uuid", +] + +[[package]] +name = "rkyv_derive" +version = "0.7.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rmp" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "rust-stemmers" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e46a2036019fdb888131db7a4c847a1063a7493f971ed94ea82c67eada63ca54" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "rust_decimal" +version = "1.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" +dependencies = [ + "arrayvec", + "borsh", + "bytes", + "num-traits", + "rand", + "rkyv", + "serde", + "serde_json", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustix" +version = "0.38.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "seahash" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + +[[package]] +name = "serde" +version = "1.0.216" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.216" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "serde_json" +version = "1.0.133" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1_smol" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "smawk" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" + +[[package]] +name = "socket2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "stringprep" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" +dependencies = [ + "unicode-bidi", + "unicode-normalization", + "unicode-properties", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + +[[package]] +name = "supports-color" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6398cde53adc3c4557306a96ce67b302968513830a77a95b2b17305d9719a89" +dependencies = [ + "is-terminal", + "is_ci", +] + +[[package]] +name = "supports-hyperlinks" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84231692eb0d4d41e4cdd0cabfdd2e6cd9e255e65f80c9aa7c98dd502b4233d" +dependencies = [ + "is-terminal", +] + +[[package]] +name = "supports-unicode" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f850c19edd184a205e883199a261ed44471c81e39bd95b1357f5febbef00e77a" +dependencies = [ + "is-terminal", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-mid" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5dc35bb08dd1ca3dfb09dce91fd2d13294d6711c88897d9a9d60acf39bce049" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "terminal_size" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "textwrap" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d" +dependencies = [ + "smawk", + "unicode-linebreak", + "unicode-width", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "parking_lot 0.12.3", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "tracing-core" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + +[[package]] +name = "unicode-ident" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" + +[[package]] +name = "unicode-linebreak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" + +[[package]] +name = "unicode-normalization" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-properties" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +dependencies = [ + "atomic", + "getrandom", + "md-5", + "serde", + "sha1_smol", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vitaminc" +version = "0.1.0-pre2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3e4c7e4e19bd3795b3bc4b99aa31d43d1b06a9c6fd9297ce8237467869d268c" +dependencies = [ + "vitaminc-protected", + "vitaminc-random", +] + +[[package]] +name = "vitaminc-protected" +version = "0.1.0-pre2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f032763fc27651980ec2c811917d9cccc566ec126250be75d82d3f8d1e37cc26" +dependencies = [ + "bitvec", + "digest", + "opaque-debug", + "serde", + "serde_bytes", + "subtle", + "zeroize", +] + +[[package]] +name = "vitaminc-random" +version = "0.1.0-pre2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a544c02ef2c1724db33d7bcb8df2c1f8c2ddab27965e57cc5373c55b8da567b6" +dependencies = [ + "rand", + "rand_chacha", + "thiserror", + "vitaminc-protected", + "zeroize", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" +dependencies = [ + "cfg-if", + "once_cell", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn 2.0.90", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" + +[[package]] +name = "wasm-timer" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" +dependencies = [ + "futures", + "js-sys", + "parking_lot 0.11.2", + "pin-utils", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[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-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "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_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -392,26 +3090,207 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "zerokms-protocol" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a5c53645a7b5b40fc50ac1d550881be69857fc7419a3e8add55ac8500a35f5" +dependencies = [ + "async-trait", + "base64", + "cipherstash-config", + "fake", + "opaque-debug", + "rand", + "serde", + "static_assertions", + "thiserror", + "uuid", + "zeroize", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] diff --git a/crates/jseql-ffi/Cargo.toml b/crates/jseql-ffi/Cargo.toml index dbbec09..8660189 100644 --- a/crates/jseql-ffi/Cargo.toml +++ b/crates/jseql-ffi/Cargo.toml @@ -11,6 +11,7 @@ crate-type = ["cdylib"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +cipherstash-client = "0.14.0" neon = "1" once_cell = "1.20.2" tokio = { version = "1", features = ["full"] } diff --git a/crates/jseql-ffi/src/lib.rs b/crates/jseql-ffi/src/lib.rs index 0365ec9..441be73 100644 --- a/crates/jseql-ffi/src/lib.rs +++ b/crates/jseql-ffi/src/lib.rs @@ -1,5 +1,15 @@ +use cipherstash_client::{ + config::{ + console_config::ConsoleConfig, cts_config::CtsConfig, zero_kms_config::ZeroKMSConfig, + }, + credentials::service_credentials::ServiceCredentials, + encryption::{Encrypted, Plaintext, PlaintextTarget, ReferencedPendingPipeline, ScopedCipher}, + schema::ColumnConfig, + zerokms::EncryptedRecord, +}; use neon::prelude::*; use once_cell::sync::OnceCell; +use std::sync::Arc; use tokio::runtime::Runtime; // Return a global tokio runtime or create one if it doesn't exist. @@ -10,10 +20,15 @@ fn runtime<'a, C: Context<'a>>(cx: &mut C) -> NeonResult<&'static Runtime> { RUNTIME.get_or_try_init(|| Runtime::new().or_else(|err| cx.throw_error(err.to_string()))) } -struct Client {} +#[derive(Clone)] +struct Client { + cipher: Arc, +} impl Finalize for Client {} +type ScopedZeroKMSNoRefresh = ScopedCipher; + fn new_client(mut cx: FunctionContext) -> JsResult { let rt = runtime(&mut cx)?; let channel = cx.channel(); @@ -21,7 +36,30 @@ fn new_client(mut cx: FunctionContext) -> JsResult { let (deferred, promise) = cx.promise(); rt.spawn(async move { - let client = Client {}; + // TODO: don't unwrap + let console_config = ConsoleConfig::builder().with_env().build().unwrap(); + + // TODO: don't unwrap + let cts_config = CtsConfig::builder().with_env().build().unwrap(); + + let zerokms_config = ZeroKMSConfig::builder() + .console_config(&console_config) + .cts_config(&cts_config) + .with_env() + .build_with_client_key() + // TODO: don't unwrap + .unwrap(); + + let zerokms = zerokms_config.create_client(); + + let cipher = ScopedZeroKMSNoRefresh::init(Arc::new(zerokms), None) + .await + // TODO: don't unwrap + .unwrap(); + + let client = Client { + cipher: Arc::new(cipher), + }; deferred.settle_with(&channel, move |mut cx| Ok(cx.boxed(client))); }); @@ -30,7 +68,9 @@ fn new_client(mut cx: FunctionContext) -> JsResult { } fn encrypt(mut cx: FunctionContext) -> JsResult { - let value = cx.argument::(0)?.value(&mut cx); + let plaintext = cx.argument::(0)?.value(&mut cx); + let column_name = cx.argument::(1)?.value(&mut cx); + let client = (&**cx.argument::>(2)?).clone(); let rt = runtime(&mut cx)?; let channel = cx.channel(); @@ -46,8 +86,22 @@ fn encrypt(mut cx: FunctionContext) -> JsResult { // // This task will _not_ block the JavaScript main thread. rt.spawn(async move { - // Inside this block, it is possible to `await` Rust `Future` - let encrypted = format!("{value}-encrypted"); + let column_config = ColumnConfig::build(column_name); + let mut pipeline = ReferencedPendingPipeline::new(client.cipher); + let encryptable = PlaintextTarget::new(plaintext, column_config.clone(), None); + + pipeline + .add_with_ref::(encryptable, 0) + .unwrap(); + + let mut source_encrypted = pipeline.encrypt().await.unwrap(); + + let encrypted = source_encrypted.remove(0).unwrap(); + + let ciphertext = match encrypted { + Encrypted::Record(ciphertext, _terms) => ciphertext.to_mp_base85().unwrap(), + _ => todo!(), + }; // Settle the promise from the result of a closure. JavaScript exceptions // will be converted to a Promise rejection. @@ -55,14 +109,15 @@ fn encrypt(mut cx: FunctionContext) -> JsResult { // This closure will execute on the JavaScript main thread. It should be // limited to converting Rust types to JavaScript values. Expensive operations // should be performed outside of it. - deferred.settle_with(&channel, move |mut cx| Ok(cx.string(encrypted))); + deferred.settle_with(&channel, move |mut cx| Ok(cx.string(ciphertext))); }); Ok(promise) } fn decrypt(mut cx: FunctionContext) -> JsResult { - let value = cx.argument::(0)?.value(&mut cx); + let ciphertext = cx.argument::(0)?.value(&mut cx); + let client = (&**cx.argument::>(1)?).clone(); let rt = runtime(&mut cx)?; let channel = cx.channel(); @@ -70,12 +125,16 @@ fn decrypt(mut cx: FunctionContext) -> JsResult { let (deferred, promise) = cx.promise(); rt.spawn(async move { - let decrypted = value - .strip_suffix("-encrypted") - .map(String::from) - .unwrap_or(value); + let encrypted_record = EncryptedRecord::from_mp_base85(&ciphertext).unwrap(); + let decrypted = client.cipher.decrypt([encrypted_record]).await.unwrap(); + let plaintext = Plaintext::from_slice(&decrypted[0][..]).unwrap(); + + let plaintext = match plaintext { + Plaintext::Utf8Str(Some(ref inner)) => inner.clone(), + _ => todo!(), + }; - deferred.settle_with(&channel, move |mut cx| Ok(cx.string(decrypted))); + deferred.settle_with(&channel, move |mut cx| Ok(cx.string(plaintext))); }); Ok(promise) diff --git a/scratch.ts b/scratch.ts index 4ced3f3..536cdd8 100644 --- a/scratch.ts +++ b/scratch.ts @@ -1,29 +1,4 @@ const { encrypt, decrypt, newClient } = require("./index.node"); -// -// Stubbed out funcs that will be implemented in Rust and live in ./lib -// - -// function cipherNew() { -// return "cipher" as const; -// } - -// function encrypt( -// plaintextPayload: PlaintextEqlPayload -// ): Promise { -// return new Promise((resolve) => { -// resolve({ c: `${plaintextPayload.plaintext}-encrypted` }); -// }); -// } - -// function decrypt( -// field: EqlField, -// encryptedPayload: EncryptedEqlPayload -// ): Promise { -// return new Promise((resolve) => { -// const plaintext = encryptedPayload.c.replace("-encrypted", ""); -// resolve(newPlaintextPayload(field, plaintext)); -// }); -// } // // This part will live in wrapper TS code (e.g. jseql). @@ -79,9 +54,7 @@ function newEql(client: Client): Eql { decrypt( encryptedPayload: EncryptedEqlPayload ): Promise { - // return decrypt(this, encryptedPayload); - - return decrypt(encryptedPayload.c).then((val: string) => + return decrypt(encryptedPayload.c, this.client).then((val: string) => newPlaintextPayload(this, val) ); }, @@ -98,11 +71,11 @@ function newPlaintextPayload( plaintext, field, encrypt(): Promise { - // return encrypt(this); - - return encrypt(this.plaintext).then((val: string) => { - return { c: val }; - }); + return encrypt(this.plaintext, this.field.column, this.field.client).then( + (val: string) => { + return { c: val }; + } + ); }, }; } @@ -119,13 +92,13 @@ function newPlaintextPayload( column: "email", }); - const encryptedEmail = await emailField.plaintextPayload("abc").encrypt(); + const encryptedEmail = await emailField.plaintextPayload("abcdef").encrypt(); - console.log(encryptedEmail); // { c: "abc-encrypted" } + console.log(encryptedEmail); const decrypted = await emailField.decrypt(encryptedEmail); - console.log(decrypted.plaintext); // "abc" + console.log(decrypted.plaintext); })(); // From 08cf7301209754f6b0389da1c457a2cf7ff94b15 Mon Sep 17 00:00:00 2001 From: Drew Thomas Date: Wed, 18 Dec 2024 15:39:59 +1100 Subject: [PATCH 07/19] Improve Rust error handling --- Cargo.lock | 55 +++++++++---- crates/jseql-ffi/Cargo.toml | 1 + crates/jseql-ffi/src/lib.rs | 156 ++++++++++++++++++++++++------------ 3 files changed, 145 insertions(+), 67 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4a4f869..0fcc868 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -187,7 +187,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36915bbaca237c626689b5bd14d02f2ba7a5a359d30a2a08be697392e3718079" dependencies = [ - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -428,7 +428,7 @@ dependencies = [ "serde_json", "sha2", "static_assertions", - "thiserror", + "thiserror 1.0.69", "tracing", "url", "uuid", @@ -444,7 +444,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30104045751da6e528e83804f4b22d0cddcb27aacce0e1c79604872ddb076bbf" dependencies = [ "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -459,7 +459,7 @@ dependencies = [ "rand", "regex", "sha2", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -485,7 +485,7 @@ dependencies = [ "postgres-types", "regex", "subtle", - "thiserror", + "thiserror 1.0.69", "unicode-normalization", "vitaminc", ] @@ -695,7 +695,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1287,6 +1287,7 @@ dependencies = [ "cipherstash-client", "neon", "once_cell", + "thiserror 2.0.8", "tokio", ] @@ -1383,7 +1384,7 @@ dependencies = [ "supports-unicode", "terminal_size", "textwrap", - "thiserror", + "thiserror 1.0.69", "unicode-width", ] @@ -1641,7 +1642,7 @@ dependencies = [ "rand", "rand_chacha", "subtle-ng", - "thiserror", + "thiserror 1.0.69", "zeroize", ] @@ -1829,7 +1830,7 @@ dependencies = [ "memchr", "parking_lot 0.12.3", "protobuf", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1920,7 +1921,7 @@ dependencies = [ "serde", "serde_cbor", "sha2", - "thiserror", + "thiserror 1.0.69", "zeroize", ] @@ -1950,7 +1951,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2041,7 +2042,7 @@ dependencies = [ "http", "reqwest", "serde", - "thiserror", + "thiserror 1.0.69", "tower-service", ] @@ -2171,7 +2172,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2515,7 +2516,7 @@ dependencies = [ "fastrand", "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2545,7 +2546,16 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f5383f3e0071702bf93ab5ee99b52d26936be9dedd9413067cbdcddcb6141a" +dependencies = [ + "thiserror-impl 2.0.8", ] [[package]] @@ -2559,6 +2569,17 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "thiserror-impl" +version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f357fcec90b3caef6623a099691be676d033b40a058ac95d2a6ade6fa0c943" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "tinystr" version = "0.7.6" @@ -2826,7 +2847,7 @@ checksum = "a544c02ef2c1724db33d7bcb8df2c1f8c2ddab27965e57cc5373c55b8da567b6" dependencies = [ "rand", "rand_chacha", - "thiserror", + "thiserror 1.0.69", "vitaminc-protected", "zeroize", ] @@ -3268,7 +3289,7 @@ dependencies = [ "rand", "serde", "static_assertions", - "thiserror", + "thiserror 1.0.69", "uuid", "zeroize", ] diff --git a/crates/jseql-ffi/Cargo.toml b/crates/jseql-ffi/Cargo.toml index 8660189..0e483d3 100644 --- a/crates/jseql-ffi/Cargo.toml +++ b/crates/jseql-ffi/Cargo.toml @@ -14,4 +14,5 @@ crate-type = ["cdylib"] cipherstash-client = "0.14.0" neon = "1" once_cell = "1.20.2" +thiserror = "2.0.8" tokio = { version = "1", features = ["full"] } diff --git a/crates/jseql-ffi/src/lib.rs b/crates/jseql-ffi/src/lib.rs index 441be73..b272a03 100644 --- a/crates/jseql-ffi/src/lib.rs +++ b/crates/jseql-ffi/src/lib.rs @@ -1,11 +1,15 @@ use cipherstash_client::{ config::{ - console_config::ConsoleConfig, cts_config::CtsConfig, zero_kms_config::ZeroKMSConfig, + console_config::ConsoleConfig, cts_config::CtsConfig, errors::ConfigError, + zero_kms_config::ZeroKMSConfig, }, credentials::service_credentials::ServiceCredentials, - encryption::{Encrypted, Plaintext, PlaintextTarget, ReferencedPendingPipeline, ScopedCipher}, + encryption::{ + Encrypted, EncryptionError, Plaintext, PlaintextTarget, ReferencedPendingPipeline, + ScopedCipher, TypeParseError, + }, schema::ColumnConfig, - zerokms::EncryptedRecord, + zerokms::{self, EncryptedRecord}, }; use neon::prelude::*; use once_cell::sync::OnceCell; @@ -27,6 +31,24 @@ struct Client { impl Finalize for Client {} +#[derive(thiserror::Error, Debug)] +pub enum Error { + #[error(transparent)] + Config(#[from] ConfigError), + #[error(transparent)] + ZeroKMS(#[from] zerokms::Error), + #[error(transparent)] + TypeParse(#[from] TypeParseError), + #[error(transparent)] + Encryption(#[from] EncryptionError), + #[error("jseql-ffi invariant violation: {0}")] + InvariantViolation(String), + #[error("{0}")] + Base85(String), + #[error("unimplemented: {0} not supported yet by jseql-ffi")] + Unimplemented(String), +} + type ScopedZeroKMSNoRefresh = ScopedCipher; fn new_client(mut cx: FunctionContext) -> JsResult { @@ -36,35 +58,34 @@ fn new_client(mut cx: FunctionContext) -> JsResult { let (deferred, promise) = cx.promise(); rt.spawn(async move { - // TODO: don't unwrap - let console_config = ConsoleConfig::builder().with_env().build().unwrap(); + let client_result = new_client_inner().await; - // TODO: don't unwrap - let cts_config = CtsConfig::builder().with_env().build().unwrap(); + deferred.settle_with(&channel, move |mut cx| { + let client = client_result.or_else(|err| cx.throw_error(err.to_string()))?; - let zerokms_config = ZeroKMSConfig::builder() - .console_config(&console_config) - .cts_config(&cts_config) - .with_env() - .build_with_client_key() - // TODO: don't unwrap - .unwrap(); + Ok(cx.boxed(client)) + }) + }); - let zerokms = zerokms_config.create_client(); + Ok(promise) +} - let cipher = ScopedZeroKMSNoRefresh::init(Arc::new(zerokms), None) - .await - // TODO: don't unwrap - .unwrap(); +async fn new_client_inner() -> Result { + let console_config = ConsoleConfig::builder().with_env().build()?; + let cts_config = CtsConfig::builder().with_env().build()?; + let zerokms_config = ZeroKMSConfig::builder() + .console_config(&console_config) + .cts_config(&cts_config) + .with_env() + .build_with_client_key()?; - let client = Client { - cipher: Arc::new(cipher), - }; + let zerokms = zerokms_config.create_client(); - deferred.settle_with(&channel, move |mut cx| Ok(cx.boxed(client))); - }); + let cipher = ScopedZeroKMSNoRefresh::init(Arc::new(zerokms), None).await?; - Ok(promise) + Ok(Client { + cipher: Arc::new(cipher), + }) } fn encrypt(mut cx: FunctionContext) -> JsResult { @@ -86,22 +107,7 @@ fn encrypt(mut cx: FunctionContext) -> JsResult { // // This task will _not_ block the JavaScript main thread. rt.spawn(async move { - let column_config = ColumnConfig::build(column_name); - let mut pipeline = ReferencedPendingPipeline::new(client.cipher); - let encryptable = PlaintextTarget::new(plaintext, column_config.clone(), None); - - pipeline - .add_with_ref::(encryptable, 0) - .unwrap(); - - let mut source_encrypted = pipeline.encrypt().await.unwrap(); - - let encrypted = source_encrypted.remove(0).unwrap(); - - let ciphertext = match encrypted { - Encrypted::Record(ciphertext, _terms) => ciphertext.to_mp_base85().unwrap(), - _ => todo!(), - }; + let ciphertext_result = encrypt_inner(plaintext, column_name, client).await; // Settle the promise from the result of a closure. JavaScript exceptions // will be converted to a Promise rejection. @@ -109,12 +115,48 @@ fn encrypt(mut cx: FunctionContext) -> JsResult { // This closure will execute on the JavaScript main thread. It should be // limited to converting Rust types to JavaScript values. Expensive operations // should be performed outside of it. - deferred.settle_with(&channel, move |mut cx| Ok(cx.string(ciphertext))); + deferred.settle_with(&channel, move |mut cx| { + let ciphertext = ciphertext_result.or_else(|err| cx.throw_error(err.to_string()))?; + + Ok(cx.string(ciphertext)) + }); }); Ok(promise) } +async fn encrypt_inner( + plaintext: String, + column_name: String, + client: Client, +) -> Result { + let column_config = ColumnConfig::build(column_name); + let mut pipeline = ReferencedPendingPipeline::new(client.cipher); + let encryptable = PlaintextTarget::new(plaintext, column_config.clone(), None); + + pipeline.add_with_ref::(encryptable, 0)?; + + let mut source_encrypted = pipeline.encrypt().await?; + + let encrypted = source_encrypted.remove(0).ok_or_else(|| { + Error::InvariantViolation( + "`encrypt` expected a single result in the pipeline, but there were none".to_string(), + ) + })?; + + match encrypted { + Encrypted::Record(ciphertext, _terms) => ciphertext + .to_mp_base85() + // The error type from `to_mp_base85` isn't public, so we don't derive an error for this one. + // Instead, we use `map_err`. + .map_err(|err| Error::Base85(err.to_string())), + + Encrypted::SteVec(_) => Err(Error::Unimplemented( + "`SteVec`s and encrypted JSONB columns".to_string(), + )), + } +} + fn decrypt(mut cx: FunctionContext) -> JsResult { let ciphertext = cx.argument::(0)?.value(&mut cx); let client = (&**cx.argument::>(1)?).clone(); @@ -125,21 +167,35 @@ fn decrypt(mut cx: FunctionContext) -> JsResult { let (deferred, promise) = cx.promise(); rt.spawn(async move { - let encrypted_record = EncryptedRecord::from_mp_base85(&ciphertext).unwrap(); - let decrypted = client.cipher.decrypt([encrypted_record]).await.unwrap(); - let plaintext = Plaintext::from_slice(&decrypted[0][..]).unwrap(); + let decrypt_result = decrypt_inner(ciphertext, client).await; - let plaintext = match plaintext { - Plaintext::Utf8Str(Some(ref inner)) => inner.clone(), - _ => todo!(), - }; + deferred.settle_with(&channel, move |mut cx| { + let plaintext = decrypt_result.or_else(|err| cx.throw_error(err.to_string()))?; - deferred.settle_with(&channel, move |mut cx| Ok(cx.string(plaintext))); + Ok(cx.string(plaintext)) + }); }); Ok(promise) } +async fn decrypt_inner(ciphertext: String, client: Client) -> Result { + let encrypted_record = EncryptedRecord::from_mp_base85(&ciphertext) + // The error type from `to_mp_base85` isn't public, so we don't derive an error for this one. + // Instead, we use `map_err`. + .map_err(|err| Error::Base85(err.to_string()))?; + + let decrypted = client.cipher.decrypt([encrypted_record]).await?; + let plaintext = Plaintext::from_slice(&decrypted[0][..])?; + + match plaintext { + Plaintext::Utf8Str(Some(ref inner)) => Ok(inner.clone()), + _ => Err(Error::Unimplemented( + "data types other than `Utf8Str`".to_string(), + )), + } +} + #[neon::main] fn main(mut cx: ModuleContext) -> NeonResult<()> { cx.export_function("newClient", new_client)?; From c41ef1fd760370ac1fc26ef0cb9357d1a908de88 Mon Sep 17 00:00:00 2001 From: Drew Thomas Date: Thu, 19 Dec 2024 09:52:38 +1100 Subject: [PATCH 08/19] Update index.cts to `export *` --- src/index.cts | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/index.cts b/src/index.cts index 1e0f7f0..bc3f6db 100644 --- a/src/index.cts +++ b/src/index.cts @@ -1,25 +1,4 @@ // This module is the CJS entry point for the library. // The Rust addon. -import * as addon from './load.cjs'; - -// Use this declaration to assign types to the addon's exports, -// which otherwise by default are `any`. -declare module "./load.cjs" { - function createEqlPayload(value: string, table: string, column: string, callback: callback): string; -} - -type callback = (result: string) => void; - - -export interface EqlPayload { // TODO: Make generic - value: string, - table: string, - column: string -} - -export function createEqlPayload({ value, table, column}: EqlPayload): Promise { - return new Promise((resolve, reject) => { - addon.createEqlPayload(value, table, column, (result: string) => resolve(result)); - }) -} +export * from "./load.cjs"; From bc31c38e719729337934371930f9dc6d178591f1 Mon Sep 17 00:00:00 2001 From: Drew Thomas Date: Thu, 19 Dec 2024 09:52:52 +1100 Subject: [PATCH 09/19] Remove scratch.ts --- scratch.ts | 138 ----------------------------------------------------- 1 file changed, 138 deletions(-) delete mode 100644 scratch.ts diff --git a/scratch.ts b/scratch.ts deleted file mode 100644 index 536cdd8..0000000 --- a/scratch.ts +++ /dev/null @@ -1,138 +0,0 @@ -const { encrypt, decrypt, newClient } = require("./index.node"); - -// -// This part will live in wrapper TS code (e.g. jseql). -// - -type Eql = { - client: Client; - field: (opts: FieldOpts) => EqlField; -}; - -type Client = {}; - -type FieldOpts = { - table: string; - column: string; -}; - -type EqlField = { - client: Client; - table: string; - column: string; - plaintextPayload: (plaintext: string) => PlaintextEqlPayload; - decrypt: ( - encryptedPayload: EncryptedEqlPayload - ) => Promise; -}; - -type EncryptedEqlPayload = { - c: string; -}; - -type PlaintextEqlPayload = { - plaintext: string; - field: EqlField; - encrypt: () => Promise; -}; - -function eql(): Promise { - return newClient().then((client: Client) => newEql(client)); -} - -function newEql(client: Client): Eql { - return { - client, - field(opts: FieldOpts): EqlField { - return { - client: this.client, - table: opts.table, - column: opts.column, - plaintextPayload(plaintext: string): PlaintextEqlPayload { - return newPlaintextPayload(this, plaintext); - }, - decrypt( - encryptedPayload: EncryptedEqlPayload - ): Promise { - return decrypt(encryptedPayload.c, this.client).then((val: string) => - newPlaintextPayload(this, val) - ); - }, - }; - }, - }; -} - -function newPlaintextPayload( - field: EqlField, - plaintext: string -): PlaintextEqlPayload { - return { - plaintext, - field, - encrypt(): Promise { - return encrypt(this.plaintext, this.field.column, this.field.client).then( - (val: string) => { - return { c: val }; - } - ); - }, - }; -} - -// -// Example code using the new interface -// - -(async () => { - const eqlClient = await eql(); - - const emailField = eqlClient.field({ - table: "users", - column: "email", - }); - - const encryptedEmail = await emailField.plaintextPayload("abcdef").encrypt(); - - console.log(encryptedEmail); - - const decrypted = await emailField.decrypt(encryptedEmail); - - console.log(decrypted.plaintext); -})(); - -// -// Misc. scribbling for the interface -// - -/* -EqlField -{ - cipher: Cipher, - table: string, - column: string, - encrypt: (PlaintextEqlPayload) => Promise, - encryptMany: (PlaintextEqlPayload[]) => Promise, - decrypt: (EncryptedEqlPayload) => Promise, - decryptMany: (EncryptedEqlPayload[]) => Promise, - eqlPayload: (string) => PlaintextEqlPayload, -} - -PlaintextEqlPayload -{ - plaintext: string // string works to start, but can accept multiple types later - field: EqlField, - withIdentity: () => PlaintextEqlPayload, - lockTo: () => PlaintextEqlPayload, - encrypt: () => Promise -} - -*/ - -// Encrypt single -// const encryptedEmail = await emailField.eqlPayload("abc").encrypt(); // => Promise - -// const encryptedEmails = await emailField.encryptMany([ -// emailField.eqlPayload("abc"), -// emailField.eqlPayload("def"), -// ]); From 009ca60233c2f4f06ebac4a0f5ba4ae46e2d5213 Mon Sep 17 00:00:00 2001 From: Drew Thomas Date: Thu, 19 Dec 2024 09:53:54 +1100 Subject: [PATCH 10/19] Update Node REPL example in README.md --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d80425c..0dcd4fb 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,18 @@ This command uses the [@neon-rs/cli](https://www.npmjs.com/package/@neon-rs/cli) ## Exploring -After building `jseql-ffi`, you can explore its exports at the Node console: +After building `jseql-ffi`, you can explore its exports at the Node console. +`CS_CLIENT_ID` and `CS_CLIENT_KEY` must be set in your environment for the call to `newClient()` to succeed. ```sh $ npm i $ npm run build $ node -> const { createEqlPayload } = require('.') -> let y = await createEqlPayload({value: "foo", table: "bar", column: "wee"}) +> const addon = require("."); +> const client = await addon.newClient(); +> const ciphertext = await addon.encrypt("plaintext", "column_name", client); +> const plaintext = await addon.decrypt(ciphertext, client); +> console.log({ciphertext, plaintext}); ``` ## Available Scripts From 32198de4978d41307058170a7a60be4beb56a9db Mon Sep 17 00:00:00 2001 From: Drew Thomas Date: Thu, 19 Dec 2024 10:19:06 +1100 Subject: [PATCH 11/19] Improve error message for invariant violation --- crates/jseql-ffi/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/jseql-ffi/src/lib.rs b/crates/jseql-ffi/src/lib.rs index b272a03..e92b43b 100644 --- a/crates/jseql-ffi/src/lib.rs +++ b/crates/jseql-ffi/src/lib.rs @@ -41,7 +41,7 @@ pub enum Error { TypeParse(#[from] TypeParseError), #[error(transparent)] Encryption(#[from] EncryptionError), - #[error("jseql-ffi invariant violation: {0}")] + #[error("jseql-ffi invariant violation: {0}. This is a bug in jseql-ffi. Please file an issue at https://github.com/cipherstash/jseql-ffi/issues.")] InvariantViolation(String), #[error("{0}")] Base85(String), From 4237e84a46221b2bf427d9fedc05a8c8dc2116bf Mon Sep 17 00:00:00 2001 From: CJ Brewer Date: Wed, 18 Dec 2024 19:58:11 -0600 Subject: [PATCH 12/19] feat: init jseql-ffi --- packages/jseql-ffi/Cargo.lock | 3317 +++++++++++++++++ packages/jseql-ffi/Cargo.toml | 3 + packages/jseql-ffi/README.md | 108 + .../jseql-ffi/crates/jseql-ffi/Cargo.toml | 18 + .../jseql-ffi/crates/jseql-ffi/src/lib.rs | 206 + packages/jseql-ffi/package.json | 53 + .../platforms/darwin-arm64/README.md | 3 + .../platforms/darwin-arm64/package.json | 25 + .../jseql-ffi/platforms/darwin-x64/README.md | 3 + .../platforms/darwin-x64/package.json | 25 + .../platforms/linux-arm64-gnu/README.md | 3 + .../platforms/linux-arm64-gnu/package.json | 25 + .../platforms/linux-x64-gnu/README.md | 3 + .../platforms/linux-x64-gnu/package.json | 25 + .../platforms/win32-x64-msvc/README.md | 3 + .../platforms/win32-x64-msvc/package.json | 25 + packages/jseql-ffi/src/index.cts | 4 + packages/jseql-ffi/src/index.mts | 3 + packages/jseql-ffi/src/load.cts | 17 + packages/jseql-ffi/tsconfig.json | 9 + 20 files changed, 3878 insertions(+) create mode 100644 packages/jseql-ffi/Cargo.lock create mode 100644 packages/jseql-ffi/Cargo.toml create mode 100644 packages/jseql-ffi/README.md create mode 100644 packages/jseql-ffi/crates/jseql-ffi/Cargo.toml create mode 100644 packages/jseql-ffi/crates/jseql-ffi/src/lib.rs create mode 100644 packages/jseql-ffi/package.json create mode 100644 packages/jseql-ffi/platforms/darwin-arm64/README.md create mode 100644 packages/jseql-ffi/platforms/darwin-arm64/package.json create mode 100644 packages/jseql-ffi/platforms/darwin-x64/README.md create mode 100644 packages/jseql-ffi/platforms/darwin-x64/package.json create mode 100644 packages/jseql-ffi/platforms/linux-arm64-gnu/README.md create mode 100644 packages/jseql-ffi/platforms/linux-arm64-gnu/package.json create mode 100644 packages/jseql-ffi/platforms/linux-x64-gnu/README.md create mode 100644 packages/jseql-ffi/platforms/linux-x64-gnu/package.json create mode 100644 packages/jseql-ffi/platforms/win32-x64-msvc/README.md create mode 100644 packages/jseql-ffi/platforms/win32-x64-msvc/package.json create mode 100644 packages/jseql-ffi/src/index.cts create mode 100644 packages/jseql-ffi/src/index.mts create mode 100644 packages/jseql-ffi/src/load.cts create mode 100644 packages/jseql-ffi/tsconfig.json diff --git a/packages/jseql-ffi/Cargo.lock b/packages/jseql-ffi/Cargo.lock new file mode 100644 index 0000000..0fcc868 --- /dev/null +++ b/packages/jseql-ffi/Cargo.lock @@ -0,0 +1,3317 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher 0.4.4", + "cpufeatures", + "zeroize", +] + +[[package]] +name = "aes-gcm-siv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae0784134ba9375416d469ec31e7c5f9fa94405049cf08c5ce5b4698be673e0d" +dependencies = [ + "aead", + "aes", + "cipher 0.4.4", + "ctr", + "polyval", + "subtle", + "zeroize", +] + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" + +[[package]] +name = "array-init" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +dependencies = [ + "zeroize", +] + +[[package]] +name = "async-mutex" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-trait" +version = "0.1.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "atomic" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d818003e740b63afc82337e3160717f4f63078720a810b7b903e70a5d1d2994" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets", +] + +[[package]] +name = "backtrace-ext" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537beee3be4a18fb023b570f80e3ae28003db9167a751266b259926e25539d50" +dependencies = [ + "backtrace", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base85" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36915bbaca237c626689b5bd14d02f2ba7a5a359d30a2a08be697392e3718079" +dependencies = [ + "thiserror 1.0.69", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake3" +version = "1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "zeroize", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-modes" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cb03d1bed155d89dce0f845b7899b18a9a163e148fd004e1c28421a783e2d8e" +dependencies = [ + "block-padding", + "cipher 0.3.0", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "borsh" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" +dependencies = [ + "borsh-derive", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" +dependencies = [ + "once_cell", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bytecheck" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" +dependencies = [ + "bytecheck_derive", + "ptr_meta", + "simdutf8", +] + +[[package]] +name = "bytecheck_derive" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bytemuck" +version = "1.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" + +[[package]] +name = "cc" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chrono" +version = "0.4.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-targets", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "cipherstash-client" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d364f613279c464d4854b06c49a6e57cc58802cd7a5ff4c0f6f8c7aae447cd18" +dependencies = [ + "aes-gcm-siv", + "anyhow", + "async-mutex", + "async-trait", + "base64", + "base85", + "blake3", + "cfg-if", + "chrono", + "cipherstash-config", + "cipherstash-core", + "cipherstash-stats", + "cllw-ore", + "derive_more", + "dirs", + "futures", + "hex", + "hmac", + "itertools", + "lazy_static", + "log", + "miette", + "opaque-debug", + "open", + "ore-rs", + "percent-encoding", + "rand", + "rand_chacha", + "recipher", + "reqwest", + "reqwest-middleware", + "reqwest-retry", + "rmp-serde", + "rust-stemmers", + "rust_decimal", + "serde", + "serde_bytes", + "serde_cbor", + "serde_json", + "sha2", + "static_assertions", + "thiserror 1.0.69", + "tracing", + "url", + "uuid", + "winnow", + "zeroize", + "zerokms-protocol", +] + +[[package]] +name = "cipherstash-config" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30104045751da6e528e83804f4b22d0cddcb27aacce0e1c79604872ddb076bbf" +dependencies = [ + "serde", + "thiserror 1.0.69", +] + +[[package]] +name = "cipherstash-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd56dfac0a35146968ef6696fb822b22f70a664a8739874385876d5452844b7a" +dependencies = [ + "hmac", + "lazy_static", + "num-bigint", + "rand", + "regex", + "sha2", + "thiserror 1.0.69", +] + +[[package]] +name = "cipherstash-stats" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10da9699454e308aeb16b30800282bbb175c28c073d4f7114d1c731c20a5c00" +dependencies = [ + "lazy_static", + "prometheus", +] + +[[package]] +name = "cllw-ore" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1b01c26e11101044f85802e31d842483ef983a890c03472d9489f6969cf865a" +dependencies = [ + "bit-vec", + "bitvec", + "blake3", + "postgres-derive", + "postgres-types", + "regex", + "subtle", + "thiserror 1.0.69", + "unicode-normalization", + "vitaminc", +] + +[[package]] +name = "cmac" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8543454e3c3f5126effff9cd44d562af4e31fb8ce1cc0d3dcd8f084515dbc1aa" +dependencies = [ + "cipher 0.4.4", + "dbl", + "digest", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core", + "typenum", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher 0.4.4", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "dbl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd2735a791158376708f9347fe8faba9667589d82427ef3aed6794a8981de3d9" +dependencies = [ + "generic-array", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "unicode-xid", +] + +[[package]] +name = "deunicode" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "dummy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac124e13ae9aa56acc4241f8c8207501d93afdd8d8e62f0c1f2e12f6508c65" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "fake" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d391ba4af7f1d93f01fcf7b2f29e2bc9348e109dfdbf4dcbdc51dfa38dab0b6" +dependencies = [ + "deunicode", + "dummy", + "rand", + "uuid", +] + +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "http" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" + +[[package]] +name = "hyper" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +dependencies = [ + "equivalent", + "hashbrown 0.15.2", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "ipnet" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + +[[package]] +name = "is-terminal" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "is_ci" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "js-sys" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "jseql-ffi" +version = "0.1.0" +dependencies = [ + "cipherstash-client", + "neon", + "once_cell", + "thiserror 2.0.8", + "tokio", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.168" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" + +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "miette" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" +dependencies = [ + "backtrace", + "backtrace-ext", + "is-terminal", + "miette-derive", + "once_cell", + "owo-colors", + "supports-color", + "supports-hyperlinks", + "supports-unicode", + "terminal_size", + "textwrap", + "thiserror 1.0.69", + "unicode-width", +] + +[[package]] +name = "miette-derive" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.52.0", +] + +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "neon" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d75440242411c87dc39847b0e33e961ec1f10326a9d8ecf9c1ea64a3b3c13dc" +dependencies = [ + "getrandom", + "libloading", + "neon-macros", + "once_cell", + "semver", + "send_wrapper", + "smallvec", +] + +[[package]] +name = "neon-macros" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6813fde79b646e47e7ad75f480aa80ef76a5d9599e2717407961531169ee38b" +dependencies = [ + "quote", + "syn 2.0.90", + "syn-mid", +] + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "object" +version = "0.36.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "open" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2078c0039e6a54a0c42c28faa984e115fb4c2d5bf2208f77d1961002df8576f8" +dependencies = [ + "pathdiff", + "windows-sys 0.42.0", +] + +[[package]] +name = "openssl" +version = "0.10.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-src" +version = "300.4.1+3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" +dependencies = [ + "cc", +] + +[[package]] +name = "openssl-sys" +version = "0.9.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +dependencies = [ + "cc", + "libc", + "openssl-src", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "ore-rs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17ced859adc3f4a6a80568b0b33519a496b00609b0be3b94d9dff136b5f3ec8" +dependencies = [ + "aes", + "block-modes", + "byteorder", + "hex", + "hex-literal", + "lazy_static", + "num", + "rand", + "rand_chacha", + "subtle-ng", + "thiserror 1.0.69", + "zeroize", +] + +[[package]] +name = "owo-colors" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.10", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.8", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project-lite" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "postgres-derive" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69700ea4603c5ef32d447708e6a19cd3e8ac197a000842e97f527daea5e4175f" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "postgres-protocol" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acda0ebdebc28befa84bee35e651e4c5f09073d668c7aed4cf7e23c3cda84b23" +dependencies = [ + "base64", + "byteorder", + "bytes", + "fallible-iterator", + "hmac", + "md-5", + "memchr", + "rand", + "sha2", + "stringprep", +] + +[[package]] +name = "postgres-types" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f66ea23a2d0e5734297357705193335e0a957696f34bed2f2faefacb2fec336f" +dependencies = [ + "array-init", + "bytes", + "fallible-iterator", + "postgres-derive", + "postgres-protocol", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prometheus" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot 0.12.3", + "protobuf", + "thiserror 1.0.69", +] + +[[package]] +name = "protobuf" +version = "2.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" + +[[package]] +name = "ptr_meta" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" +dependencies = [ + "ptr_meta_derive", +] + +[[package]] +name = "ptr_meta_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "quote" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "recipher" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72aa0940c8f5b753bfd3ed212d60896760579324c59194b7e51fcec35e5c1b0f" +dependencies = [ + "aes", + "async-trait", + "cmac", + "hex", + "hex-literal", + "opaque-debug", + "rand", + "rand_chacha", + "serde", + "serde_cbor", + "sha2", + "thiserror 1.0.69", + "zeroize", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rend" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" +dependencies = [ + "bytecheck", +] + +[[package]] +name = "reqwest" +version = "0.12.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +dependencies = [ + "base64", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-registry", +] + +[[package]] +name = "reqwest-middleware" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562ceb5a604d3f7c885a792d42c199fd8af239d0a51b2fa6a78aafa092452b04" +dependencies = [ + "anyhow", + "async-trait", + "http", + "reqwest", + "serde", + "thiserror 1.0.69", + "tower-service", +] + +[[package]] +name = "reqwest-retry" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40f342894422862af74c50e1e9601cf0931accc9c6981e5eb413c46603b616b5" +dependencies = [ + "anyhow", + "async-trait", + "chrono", + "futures", + "getrandom", + "http", + "hyper", + "parking_lot 0.11.2", + "reqwest", + "reqwest-middleware", + "retry-policies", + "tokio", + "tracing", + "wasm-timer", +] + +[[package]] +name = "retry-policies" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "493b4243e32d6eedd29f9a398896e35c6943a123b55eec97dcaee98310d25810" +dependencies = [ + "anyhow", + "chrono", + "rand", +] + +[[package]] +name = "rkyv" +version = "0.7.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" +dependencies = [ + "bitvec", + "bytecheck", + "bytes", + "hashbrown 0.12.3", + "ptr_meta", + "rend", + "rkyv_derive", + "seahash", + "tinyvec", + "uuid", +] + +[[package]] +name = "rkyv_derive" +version = "0.7.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rmp" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "rust-stemmers" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e46a2036019fdb888131db7a4c847a1063a7493f971ed94ea82c67eada63ca54" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "rust_decimal" +version = "1.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" +dependencies = [ + "arrayvec", + "borsh", + "bytes", + "num-traits", + "rand", + "rkyv", + "serde", + "serde_json", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustix" +version = "0.38.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "seahash" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + +[[package]] +name = "serde" +version = "1.0.216" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.216" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "serde_json" +version = "1.0.133" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1_smol" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "smawk" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" + +[[package]] +name = "socket2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "stringprep" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" +dependencies = [ + "unicode-bidi", + "unicode-normalization", + "unicode-properties", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + +[[package]] +name = "supports-color" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6398cde53adc3c4557306a96ce67b302968513830a77a95b2b17305d9719a89" +dependencies = [ + "is-terminal", + "is_ci", +] + +[[package]] +name = "supports-hyperlinks" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84231692eb0d4d41e4cdd0cabfdd2e6cd9e255e65f80c9aa7c98dd502b4233d" +dependencies = [ + "is-terminal", +] + +[[package]] +name = "supports-unicode" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f850c19edd184a205e883199a261ed44471c81e39bd95b1357f5febbef00e77a" +dependencies = [ + "is-terminal", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-mid" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5dc35bb08dd1ca3dfb09dce91fd2d13294d6711c88897d9a9d60acf39bce049" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "terminal_size" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "textwrap" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d" +dependencies = [ + "smawk", + "unicode-linebreak", + "unicode-width", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f5383f3e0071702bf93ab5ee99b52d26936be9dedd9413067cbdcddcb6141a" +dependencies = [ + "thiserror-impl 2.0.8", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f357fcec90b3caef6623a099691be676d033b40a058ac95d2a6ade6fa0c943" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "parking_lot 0.12.3", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "tracing-core" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + +[[package]] +name = "unicode-ident" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" + +[[package]] +name = "unicode-linebreak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" + +[[package]] +name = "unicode-normalization" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-properties" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +dependencies = [ + "atomic", + "getrandom", + "md-5", + "serde", + "sha1_smol", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vitaminc" +version = "0.1.0-pre2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3e4c7e4e19bd3795b3bc4b99aa31d43d1b06a9c6fd9297ce8237467869d268c" +dependencies = [ + "vitaminc-protected", + "vitaminc-random", +] + +[[package]] +name = "vitaminc-protected" +version = "0.1.0-pre2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f032763fc27651980ec2c811917d9cccc566ec126250be75d82d3f8d1e37cc26" +dependencies = [ + "bitvec", + "digest", + "opaque-debug", + "serde", + "serde_bytes", + "subtle", + "zeroize", +] + +[[package]] +name = "vitaminc-random" +version = "0.1.0-pre2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a544c02ef2c1724db33d7bcb8df2c1f8c2ddab27965e57cc5373c55b8da567b6" +dependencies = [ + "rand", + "rand_chacha", + "thiserror 1.0.69", + "vitaminc-protected", + "zeroize", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" +dependencies = [ + "cfg-if", + "once_cell", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn 2.0.90", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" + +[[package]] +name = "wasm-timer" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" +dependencies = [ + "futures", + "js-sys", + "parking_lot 0.11.2", + "pin-utils", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[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-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "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_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[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_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "zerokms-protocol" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a5c53645a7b5b40fc50ac1d550881be69857fc7419a3e8add55ac8500a35f5" +dependencies = [ + "async-trait", + "base64", + "cipherstash-config", + "fake", + "opaque-debug", + "rand", + "serde", + "static_assertions", + "thiserror 1.0.69", + "uuid", + "zeroize", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] diff --git a/packages/jseql-ffi/Cargo.toml b/packages/jseql-ffi/Cargo.toml new file mode 100644 index 0000000..e020532 --- /dev/null +++ b/packages/jseql-ffi/Cargo.toml @@ -0,0 +1,3 @@ +[workspace] +members = ["crates/jseql-ffi"] +resolver = "2" diff --git a/packages/jseql-ffi/README.md b/packages/jseql-ffi/README.md new file mode 100644 index 0000000..0dcd4fb --- /dev/null +++ b/packages/jseql-ffi/README.md @@ -0,0 +1,108 @@ +# jseql-ffi + +This project was bootstrapped by [create-neon](https://www.npmjs.com/package/create-neon). + +## Building + +Building requires a [supported version of Node and Rust](https://github.com/neon-bindings/neon#platform-support). + +To run the build, run: + +```sh +$ npm run build +``` + +This command uses the [@neon-rs/cli](https://www.npmjs.com/package/@neon-rs/cli) utility to assemble the binary Node addon from the output of `cargo`. + +## Exploring + +After building `jseql-ffi`, you can explore its exports at the Node console. +`CS_CLIENT_ID` and `CS_CLIENT_KEY` must be set in your environment for the call to `newClient()` to succeed. + +```sh +$ npm i +$ npm run build +$ node +> const addon = require("."); +> const client = await addon.newClient(); +> const ciphertext = await addon.encrypt("plaintext", "column_name", client); +> const plaintext = await addon.decrypt(ciphertext, client); +> console.log({ciphertext, plaintext}); +``` + +## Available Scripts + +In the project directory, you can run: + +#### `npm run build` + +Builds the Node addon (`index.node`) from source, generating a release build with `cargo --release`. + +Additional [`cargo build`](https://doc.rust-lang.org/cargo/commands/cargo-build.html) arguments may be passed to `npm run build` and similar commands. For example, to enable a [cargo feature](https://doc.rust-lang.org/cargo/reference/features.html): + +``` +npm run build -- --feature=beetle +``` + +#### `npm run debug` + +Similar to `npm run build` but generates a debug build with `cargo`. + +#### `npm run cross` + +Similar to `npm run build` but uses [cross-rs](https://github.com/cross-rs/cross) to cross-compile for another platform. Use the [`CARGO_BUILD_TARGET`](https://doc.rust-lang.org/cargo/reference/config.html#buildtarget) environment variable to select the build target. + +#### `npm run release` + +Initiate a full build and publication of a new patch release of this library via GitHub Actions. + +#### `npm run dryrun` + +Initiate a dry run of a patch release of this library via GitHub Actions. This performs a full build but does not publish the final result. + +#### `npm test` + +Runs the unit tests by calling `cargo test`. You can learn more about [adding tests to your Rust code](https://doc.rust-lang.org/book/ch11-01-writing-tests.html) from the [Rust book](https://doc.rust-lang.org/book/). + +## Project Layout + +The directory structure of this project is: + +``` +jseql-ffi/ +├── Cargo.toml +├── README.md +├── lib/ +├── src/ +| ├── index.mts +| └── index.cts +├── crates/ +| └── jseql-ffi/ +| └── src/ +| └── lib.rs +├── platforms/ +├── package.json +└── target/ +``` + +| Entry | Purpose | +|----------------|------------------------------------------------------------------------------------------------------------------------------------------| +| `Cargo.toml` | The Cargo [manifest file](https://doc.rust-lang.org/cargo/reference/manifest.html), which informs the `cargo` command. | +| `README.md` | This file. | +| `lib/` | The directory containing the generated output from [tsc](https://typescriptlang.org). | +| `src/` | The directory containing the TypeScript source files. | +| `index.mts` | Entry point for when this library is loaded via [ESM `import`](https://nodejs.org/api/esm.html#modules-ecmascript-modules) syntax. | +| `index.cts` | Entry point for when this library is loaded via [CJS `require`](https://nodejs.org/api/modules.html#requireid). | +| `crates/` | The directory tree containing the Rust source code for the project. | +| `lib.rs` | Entry point for the Rust source code. | +| `platforms/` | The directory containing distributions of the binary addon backend for each platform supported by this library. | +| `package.json` | The npm [manifest file](https://docs.npmjs.com/cli/v7/configuring-npm/package-json), which informs the `npm` command. | +| `target/` | Binary artifacts generated by the Rust build. | + +## Learn More + +Learn more about: + +- [Neon](https://neon-bindings.com). +- [Rust](https://www.rust-lang.org). +- [Node](https://nodejs.org). diff --git a/packages/jseql-ffi/crates/jseql-ffi/Cargo.toml b/packages/jseql-ffi/crates/jseql-ffi/Cargo.toml new file mode 100644 index 0000000..0e483d3 --- /dev/null +++ b/packages/jseql-ffi/crates/jseql-ffi/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "jseql-ffi" +version = "0.1.0" +license = "ISC" +edition = "2021" +exclude = ["index.node"] + +[lib] +crate-type = ["cdylib"] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +cipherstash-client = "0.14.0" +neon = "1" +once_cell = "1.20.2" +thiserror = "2.0.8" +tokio = { version = "1", features = ["full"] } diff --git a/packages/jseql-ffi/crates/jseql-ffi/src/lib.rs b/packages/jseql-ffi/crates/jseql-ffi/src/lib.rs new file mode 100644 index 0000000..e92b43b --- /dev/null +++ b/packages/jseql-ffi/crates/jseql-ffi/src/lib.rs @@ -0,0 +1,206 @@ +use cipherstash_client::{ + config::{ + console_config::ConsoleConfig, cts_config::CtsConfig, errors::ConfigError, + zero_kms_config::ZeroKMSConfig, + }, + credentials::service_credentials::ServiceCredentials, + encryption::{ + Encrypted, EncryptionError, Plaintext, PlaintextTarget, ReferencedPendingPipeline, + ScopedCipher, TypeParseError, + }, + schema::ColumnConfig, + zerokms::{self, EncryptedRecord}, +}; +use neon::prelude::*; +use once_cell::sync::OnceCell; +use std::sync::Arc; +use tokio::runtime::Runtime; + +// Return a global tokio runtime or create one if it doesn't exist. +// Throws a JavaScript exception if the `Runtime` fails to create. +fn runtime<'a, C: Context<'a>>(cx: &mut C) -> NeonResult<&'static Runtime> { + static RUNTIME: OnceCell = OnceCell::new(); + + RUNTIME.get_or_try_init(|| Runtime::new().or_else(|err| cx.throw_error(err.to_string()))) +} + +#[derive(Clone)] +struct Client { + cipher: Arc, +} + +impl Finalize for Client {} + +#[derive(thiserror::Error, Debug)] +pub enum Error { + #[error(transparent)] + Config(#[from] ConfigError), + #[error(transparent)] + ZeroKMS(#[from] zerokms::Error), + #[error(transparent)] + TypeParse(#[from] TypeParseError), + #[error(transparent)] + Encryption(#[from] EncryptionError), + #[error("jseql-ffi invariant violation: {0}. This is a bug in jseql-ffi. Please file an issue at https://github.com/cipherstash/jseql-ffi/issues.")] + InvariantViolation(String), + #[error("{0}")] + Base85(String), + #[error("unimplemented: {0} not supported yet by jseql-ffi")] + Unimplemented(String), +} + +type ScopedZeroKMSNoRefresh = ScopedCipher; + +fn new_client(mut cx: FunctionContext) -> JsResult { + let rt = runtime(&mut cx)?; + let channel = cx.channel(); + + let (deferred, promise) = cx.promise(); + + rt.spawn(async move { + let client_result = new_client_inner().await; + + deferred.settle_with(&channel, move |mut cx| { + let client = client_result.or_else(|err| cx.throw_error(err.to_string()))?; + + Ok(cx.boxed(client)) + }) + }); + + Ok(promise) +} + +async fn new_client_inner() -> Result { + let console_config = ConsoleConfig::builder().with_env().build()?; + let cts_config = CtsConfig::builder().with_env().build()?; + let zerokms_config = ZeroKMSConfig::builder() + .console_config(&console_config) + .cts_config(&cts_config) + .with_env() + .build_with_client_key()?; + + let zerokms = zerokms_config.create_client(); + + let cipher = ScopedZeroKMSNoRefresh::init(Arc::new(zerokms), None).await?; + + Ok(Client { + cipher: Arc::new(cipher), + }) +} + +fn encrypt(mut cx: FunctionContext) -> JsResult { + let plaintext = cx.argument::(0)?.value(&mut cx); + let column_name = cx.argument::(1)?.value(&mut cx); + let client = (&**cx.argument::>(2)?).clone(); + + let rt = runtime(&mut cx)?; + let channel = cx.channel(); + + // Create a JavaScript promise and a `deferred` handle for resolving it. + // It is important to be careful not to perform failable actions after + // creating the promise to avoid an unhandled rejection. + let (deferred, promise) = cx.promise(); + + // Spawn an `async` task on the tokio runtime. Only Rust types that are + // `Send` may be moved into this block. `Context` may not be passed and all + // JavaScript values must first be converted to Rust types. + // + // This task will _not_ block the JavaScript main thread. + rt.spawn(async move { + let ciphertext_result = encrypt_inner(plaintext, column_name, client).await; + + // Settle the promise from the result of a closure. JavaScript exceptions + // will be converted to a Promise rejection. + // + // This closure will execute on the JavaScript main thread. It should be + // limited to converting Rust types to JavaScript values. Expensive operations + // should be performed outside of it. + deferred.settle_with(&channel, move |mut cx| { + let ciphertext = ciphertext_result.or_else(|err| cx.throw_error(err.to_string()))?; + + Ok(cx.string(ciphertext)) + }); + }); + + Ok(promise) +} + +async fn encrypt_inner( + plaintext: String, + column_name: String, + client: Client, +) -> Result { + let column_config = ColumnConfig::build(column_name); + let mut pipeline = ReferencedPendingPipeline::new(client.cipher); + let encryptable = PlaintextTarget::new(plaintext, column_config.clone(), None); + + pipeline.add_with_ref::(encryptable, 0)?; + + let mut source_encrypted = pipeline.encrypt().await?; + + let encrypted = source_encrypted.remove(0).ok_or_else(|| { + Error::InvariantViolation( + "`encrypt` expected a single result in the pipeline, but there were none".to_string(), + ) + })?; + + match encrypted { + Encrypted::Record(ciphertext, _terms) => ciphertext + .to_mp_base85() + // The error type from `to_mp_base85` isn't public, so we don't derive an error for this one. + // Instead, we use `map_err`. + .map_err(|err| Error::Base85(err.to_string())), + + Encrypted::SteVec(_) => Err(Error::Unimplemented( + "`SteVec`s and encrypted JSONB columns".to_string(), + )), + } +} + +fn decrypt(mut cx: FunctionContext) -> JsResult { + let ciphertext = cx.argument::(0)?.value(&mut cx); + let client = (&**cx.argument::>(1)?).clone(); + + let rt = runtime(&mut cx)?; + let channel = cx.channel(); + + let (deferred, promise) = cx.promise(); + + rt.spawn(async move { + let decrypt_result = decrypt_inner(ciphertext, client).await; + + deferred.settle_with(&channel, move |mut cx| { + let plaintext = decrypt_result.or_else(|err| cx.throw_error(err.to_string()))?; + + Ok(cx.string(plaintext)) + }); + }); + + Ok(promise) +} + +async fn decrypt_inner(ciphertext: String, client: Client) -> Result { + let encrypted_record = EncryptedRecord::from_mp_base85(&ciphertext) + // The error type from `to_mp_base85` isn't public, so we don't derive an error for this one. + // Instead, we use `map_err`. + .map_err(|err| Error::Base85(err.to_string()))?; + + let decrypted = client.cipher.decrypt([encrypted_record]).await?; + let plaintext = Plaintext::from_slice(&decrypted[0][..])?; + + match plaintext { + Plaintext::Utf8Str(Some(ref inner)) => Ok(inner.clone()), + _ => Err(Error::Unimplemented( + "data types other than `Utf8Str`".to_string(), + )), + } +} + +#[neon::main] +fn main(mut cx: ModuleContext) -> NeonResult<()> { + cx.export_function("newClient", new_client)?; + cx.export_function("encrypt", encrypt)?; + cx.export_function("decrypt", decrypt)?; + + Ok(()) +} diff --git a/packages/jseql-ffi/package.json b/packages/jseql-ffi/package.json new file mode 100644 index 0000000..c5691b9 --- /dev/null +++ b/packages/jseql-ffi/package.json @@ -0,0 +1,53 @@ +{ + "name": "@cipherstash/jseql-ffi", + "version": "0.0.0", + "description": "", + "main": "./lib/index.cjs", + "scripts": { + "test": "tsc &&cargo test", + "cargo-build": "tsc &&cargo build --message-format=json-render-diagnostics > cargo.log", + "cross-build": "tsc &&cross build --message-format=json-render-diagnostics > cross.log", + "postcargo-build": "neon dist < cargo.log", + "postcross-build": "neon dist -m /target < cross.log", + "debug": "npm run cargo-build --", + "build": "npm run cargo-build -- --release", + "cross": "npm run cross-build -- --release", + "prepack": "tsc &&neon update", + "version": "neon bump --binaries platforms && git add .", + "release": "gh workflow run release.yml -f dryrun=false -f version=patch", + "dryrun": "gh workflow run publish.yml -f dryrun=true" + }, + "author": "", + "license": "ISC", + "exports": { + ".": { + "import": { + "types": "./lib/index.d.mts", + "default": "./lib/index.mjs" + }, + "require": { + "types": "./lib/index.d.cts", + "default": "./lib/index.cjs" + } + } + }, + "types": "./lib/index.d.cts", + "files": [ + "lib/**/*.?({c,m}){t,j}s" + ], + "neon": { + "type": "library", + "org": "@cipherstash", + "platforms": "common", + "load": "./src/load.cts" + }, + "devDependencies": { + "@neon-rs/cli": "^0.1.82", + "@tsconfig/node20": "^20.1.4", + "@types/node": "^20.11.16", + "typescript": "^5.3.3" + }, + "dependencies": { + "@neon-rs/load": "^0.1.82" + } +} diff --git a/packages/jseql-ffi/platforms/darwin-arm64/README.md b/packages/jseql-ffi/platforms/darwin-arm64/README.md new file mode 100644 index 0000000..808fba9 --- /dev/null +++ b/packages/jseql-ffi/platforms/darwin-arm64/README.md @@ -0,0 +1,3 @@ +# `@cipherstash/jseql-ffi-darwin-arm64` + +Prebuilt binary package for `@cipherstash/jseql-ffi` on `darwin-arm64`. diff --git a/packages/jseql-ffi/platforms/darwin-arm64/package.json b/packages/jseql-ffi/platforms/darwin-arm64/package.json new file mode 100644 index 0000000..94e66c5 --- /dev/null +++ b/packages/jseql-ffi/platforms/darwin-arm64/package.json @@ -0,0 +1,25 @@ +{ + "name": "@cipherstash/jseql-ffi-darwin-arm64", + "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `darwin-arm64`.", + "version": "0.1.0", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "index.node", + "files": [ + "index.node" + ], + "neon": { + "type": "binary", + "rust": "aarch64-apple-darwin", + "node": "darwin-arm64", + "os": "darwin", + "arch": "arm64", + "abi": null + }, + "author": "", + "license": "ISC" +} diff --git a/packages/jseql-ffi/platforms/darwin-x64/README.md b/packages/jseql-ffi/platforms/darwin-x64/README.md new file mode 100644 index 0000000..861e7e2 --- /dev/null +++ b/packages/jseql-ffi/platforms/darwin-x64/README.md @@ -0,0 +1,3 @@ +# `@cipherstash/jseql-ffi-darwin-x64` + +Prebuilt binary package for `@cipherstash/jseql-ffi` on `darwin-x64`. diff --git a/packages/jseql-ffi/platforms/darwin-x64/package.json b/packages/jseql-ffi/platforms/darwin-x64/package.json new file mode 100644 index 0000000..d49c8b1 --- /dev/null +++ b/packages/jseql-ffi/platforms/darwin-x64/package.json @@ -0,0 +1,25 @@ +{ + "name": "@cipherstash/jseql-ffi-darwin-x64", + "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `darwin-x64`.", + "version": "0.1.0", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "index.node", + "files": [ + "index.node" + ], + "neon": { + "type": "binary", + "rust": "x86_64-apple-darwin", + "node": "darwin-x64", + "os": "darwin", + "arch": "x64", + "abi": null + }, + "author": "", + "license": "ISC" +} diff --git a/packages/jseql-ffi/platforms/linux-arm64-gnu/README.md b/packages/jseql-ffi/platforms/linux-arm64-gnu/README.md new file mode 100644 index 0000000..19ad930 --- /dev/null +++ b/packages/jseql-ffi/platforms/linux-arm64-gnu/README.md @@ -0,0 +1,3 @@ +# `@cipherstash/jseql-ffi-linux-arm64-gnu` + +Prebuilt binary package for `@cipherstash/jseql-ffi` on `linux-arm64-gnu`. diff --git a/packages/jseql-ffi/platforms/linux-arm64-gnu/package.json b/packages/jseql-ffi/platforms/linux-arm64-gnu/package.json new file mode 100644 index 0000000..70e6409 --- /dev/null +++ b/packages/jseql-ffi/platforms/linux-arm64-gnu/package.json @@ -0,0 +1,25 @@ +{ + "name": "@cipherstash/jseql-ffi-linux-arm64-gnu", + "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `linux-arm64-gnu`.", + "version": "0.1.0", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "index.node", + "files": [ + "index.node" + ], + "neon": { + "type": "binary", + "rust": "aarch64-unknown-linux-gnu", + "node": "linux-arm64-gnu", + "os": "linux", + "arch": "arm64", + "abi": "gnu" + }, + "author": "", + "license": "ISC" +} diff --git a/packages/jseql-ffi/platforms/linux-x64-gnu/README.md b/packages/jseql-ffi/platforms/linux-x64-gnu/README.md new file mode 100644 index 0000000..57a448a --- /dev/null +++ b/packages/jseql-ffi/platforms/linux-x64-gnu/README.md @@ -0,0 +1,3 @@ +# `@cipherstash/jseql-ffi-linux-x64-gnu` + +Prebuilt binary package for `@cipherstash/jseql-ffi` on `linux-x64-gnu`. diff --git a/packages/jseql-ffi/platforms/linux-x64-gnu/package.json b/packages/jseql-ffi/platforms/linux-x64-gnu/package.json new file mode 100644 index 0000000..8fa89c8 --- /dev/null +++ b/packages/jseql-ffi/platforms/linux-x64-gnu/package.json @@ -0,0 +1,25 @@ +{ + "name": "@cipherstash/jseql-ffi-linux-x64-gnu", + "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `linux-x64-gnu`.", + "version": "0.1.0", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "index.node", + "files": [ + "index.node" + ], + "neon": { + "type": "binary", + "rust": "x86_64-unknown-linux-gnu", + "node": "linux-x64-gnu", + "os": "linux", + "arch": "x64", + "abi": "gnu" + }, + "author": "", + "license": "ISC" +} diff --git a/packages/jseql-ffi/platforms/win32-x64-msvc/README.md b/packages/jseql-ffi/platforms/win32-x64-msvc/README.md new file mode 100644 index 0000000..3361198 --- /dev/null +++ b/packages/jseql-ffi/platforms/win32-x64-msvc/README.md @@ -0,0 +1,3 @@ +# `@cipherstash/jseql-ffi-win32-x64-msvc` + +Prebuilt binary package for `@cipherstash/jseql-ffi` on `win32-x64-msvc`. diff --git a/packages/jseql-ffi/platforms/win32-x64-msvc/package.json b/packages/jseql-ffi/platforms/win32-x64-msvc/package.json new file mode 100644 index 0000000..42496e8 --- /dev/null +++ b/packages/jseql-ffi/platforms/win32-x64-msvc/package.json @@ -0,0 +1,25 @@ +{ + "name": "@cipherstash/jseql-ffi-win32-x64-msvc", + "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `win32-x64-msvc`.", + "version": "0.1.0", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "index.node", + "files": [ + "index.node" + ], + "neon": { + "type": "binary", + "rust": "x86_64-pc-windows-msvc", + "node": "win32-x64-msvc", + "os": "win32", + "arch": "x64", + "abi": "msvc" + }, + "author": "", + "license": "ISC" +} diff --git a/packages/jseql-ffi/src/index.cts b/packages/jseql-ffi/src/index.cts new file mode 100644 index 0000000..bc3f6db --- /dev/null +++ b/packages/jseql-ffi/src/index.cts @@ -0,0 +1,4 @@ +// This module is the CJS entry point for the library. + +// The Rust addon. +export * from "./load.cjs"; diff --git a/packages/jseql-ffi/src/index.mts b/packages/jseql-ffi/src/index.mts new file mode 100644 index 0000000..5e1ab26 --- /dev/null +++ b/packages/jseql-ffi/src/index.mts @@ -0,0 +1,3 @@ +// This module is the ESM entry point for the library. + +export * from './index.cjs'; diff --git a/packages/jseql-ffi/src/load.cts b/packages/jseql-ffi/src/load.cts new file mode 100644 index 0000000..be79585 --- /dev/null +++ b/packages/jseql-ffi/src/load.cts @@ -0,0 +1,17 @@ +// This module loads the platform-specific build of the addon on +// the current system. The supported platforms are registered in +// the `platforms` object below, whose entries can be managed by +// by the Neon CLI: +// +// https://www.npmjs.com/package/@neon-rs/cli + +module.exports = require('@neon-rs/load').proxy({ + platforms: { + 'win32-x64-msvc': () => require('@cipherstash/jseql-ffi-win32-x64-msvc'), + 'darwin-x64': () => require('@cipherstash/jseql-ffi-darwin-x64'), + 'darwin-arm64': () => require('@cipherstash/jseql-ffi-darwin-arm64'), + 'linux-x64-gnu': () => require('@cipherstash/jseql-ffi-linux-x64-gnu'), + 'linux-arm64-gnu': () => require('@cipherstash/jseql-ffi-linux-arm64-gnu') + }, + debug: () => require('../index.node') +}); diff --git a/packages/jseql-ffi/tsconfig.json b/packages/jseql-ffi/tsconfig.json new file mode 100644 index 0000000..f88079b --- /dev/null +++ b/packages/jseql-ffi/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@tsconfig/node20/tsconfig.json", + "compilerOptions": { + "module": "node16", + "declaration": true, + "outDir": "lib" + }, + "exclude": ["lib"] +} From 55304e38e3047be9b2bf8b5588625b6e0d27dfea Mon Sep 17 00:00:00 2001 From: CJ Brewer Date: Wed, 18 Dec 2024 19:59:19 -0600 Subject: [PATCH 13/19] feat: init jseql-ffi --- {jseql-ffi-tmp/.github => .github}/.env | 0 .../actions/setup/action.yml | 0 .../workflows/build-ffi.yaml | 2 +- .../workflows/release-ffi.yaml | 4 +- .../{release.yaml => release-jseql.yaml} | 2 +- .../workflows/test-ffi.yaml | 2 +- .../workflows/{tests.yaml => test-jseql.yaml} | 2 +- .gitignore | 11 + bun.lockb | Bin 129560 -> 135120 bytes jseql-ffi-tmp/.gitignore | 9 - jseql-ffi-tmp/Cargo.lock | 3317 ----------------- jseql-ffi-tmp/Cargo.toml | 3 - jseql-ffi-tmp/README.md | 108 - jseql-ffi-tmp/crates/jseql-ffi/Cargo.toml | 18 - jseql-ffi-tmp/crates/jseql-ffi/src/lib.rs | 206 - jseql-ffi-tmp/mise.toml | 3 - jseql-ffi-tmp/package-lock.json | 228 -- jseql-ffi-tmp/package.json | 53 - .../platforms/darwin-arm64/README.md | 3 - .../platforms/darwin-arm64/package.json | 25 - jseql-ffi-tmp/platforms/darwin-x64/README.md | 3 - .../platforms/darwin-x64/package.json | 25 - .../platforms/linux-arm64-gnu/README.md | 3 - .../platforms/linux-arm64-gnu/package.json | 25 - .../platforms/linux-x64-gnu/README.md | 3 - .../platforms/linux-x64-gnu/package.json | 25 - .../platforms/win32-x64-msvc/README.md | 3 - .../platforms/win32-x64-msvc/package.json | 25 - jseql-ffi-tmp/src/index.cts | 4 - jseql-ffi-tmp/src/index.mts | 3 - jseql-ffi-tmp/src/load.cts | 17 - jseql-ffi-tmp/tsconfig.json | 9 - 32 files changed, 17 insertions(+), 4124 deletions(-) rename {jseql-ffi-tmp/.github => .github}/.env (100%) rename {jseql-ffi-tmp/.github => .github}/actions/setup/action.yml (100%) rename jseql-ffi-tmp/.github/workflows/build.yml => .github/workflows/build-ffi.yaml (99%) rename jseql-ffi-tmp/.github/workflows/release.yml => .github/workflows/release-ffi.yaml (98%) rename .github/workflows/{release.yaml => release-jseql.yaml} (97%) rename jseql-ffi-tmp/.github/workflows/test.yml => .github/workflows/test-ffi.yaml (99%) rename .github/workflows/{tests.yaml => test-jseql.yaml} (96%) delete mode 100644 jseql-ffi-tmp/.gitignore delete mode 100644 jseql-ffi-tmp/Cargo.lock delete mode 100644 jseql-ffi-tmp/Cargo.toml delete mode 100644 jseql-ffi-tmp/README.md delete mode 100644 jseql-ffi-tmp/crates/jseql-ffi/Cargo.toml delete mode 100644 jseql-ffi-tmp/crates/jseql-ffi/src/lib.rs delete mode 100644 jseql-ffi-tmp/mise.toml delete mode 100644 jseql-ffi-tmp/package-lock.json delete mode 100644 jseql-ffi-tmp/package.json delete mode 100644 jseql-ffi-tmp/platforms/darwin-arm64/README.md delete mode 100644 jseql-ffi-tmp/platforms/darwin-arm64/package.json delete mode 100644 jseql-ffi-tmp/platforms/darwin-x64/README.md delete mode 100644 jseql-ffi-tmp/platforms/darwin-x64/package.json delete mode 100644 jseql-ffi-tmp/platforms/linux-arm64-gnu/README.md delete mode 100644 jseql-ffi-tmp/platforms/linux-arm64-gnu/package.json delete mode 100644 jseql-ffi-tmp/platforms/linux-x64-gnu/README.md delete mode 100644 jseql-ffi-tmp/platforms/linux-x64-gnu/package.json delete mode 100644 jseql-ffi-tmp/platforms/win32-x64-msvc/README.md delete mode 100644 jseql-ffi-tmp/platforms/win32-x64-msvc/package.json delete mode 100644 jseql-ffi-tmp/src/index.cts delete mode 100644 jseql-ffi-tmp/src/index.mts delete mode 100644 jseql-ffi-tmp/src/load.cts delete mode 100644 jseql-ffi-tmp/tsconfig.json diff --git a/jseql-ffi-tmp/.github/.env b/.github/.env similarity index 100% rename from jseql-ffi-tmp/.github/.env rename to .github/.env diff --git a/jseql-ffi-tmp/.github/actions/setup/action.yml b/.github/actions/setup/action.yml similarity index 100% rename from jseql-ffi-tmp/.github/actions/setup/action.yml rename to .github/actions/setup/action.yml diff --git a/jseql-ffi-tmp/.github/workflows/build.yml b/.github/workflows/build-ffi.yaml similarity index 99% rename from jseql-ffi-tmp/.github/workflows/build.yml rename to .github/workflows/build-ffi.yaml index a74d770..d32ac67 100644 --- a/jseql-ffi-tmp/.github/workflows/build.yml +++ b/.github/workflows/build-ffi.yaml @@ -1,4 +1,4 @@ -name: Build +name: Build jseql-ffi on: workflow_call: diff --git a/jseql-ffi-tmp/.github/workflows/release.yml b/.github/workflows/release-ffi.yaml similarity index 98% rename from jseql-ffi-tmp/.github/workflows/release.yml rename to .github/workflows/release-ffi.yaml index 1a86f9e..1301c1b 100644 --- a/jseql-ffi-tmp/.github/workflows/release.yml +++ b/.github/workflows/release-ffi.yaml @@ -1,4 +1,4 @@ -name: Release +name: Release jseql-ffi run-name: | ${{ (inputs.dryrun && 'Dry run') @@ -95,7 +95,7 @@ jobs: needs: [setup] permissions: contents: write - uses: ./.github/workflows/build.yml + uses: ./.github/workflows/build-ffi.yaml with: ref: ${{ needs.setup.outputs.ref }} tag: ${{ needs.setup.outputs.tag }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release-jseql.yaml similarity index 97% rename from .github/workflows/release.yaml rename to .github/workflows/release-jseql.yaml index 980a805..f08938d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release-jseql.yaml @@ -1,4 +1,4 @@ -name: Release +name: Release jseql on: push: diff --git a/jseql-ffi-tmp/.github/workflows/test.yml b/.github/workflows/test-ffi.yaml similarity index 99% rename from jseql-ffi-tmp/.github/workflows/test.yml rename to .github/workflows/test-ffi.yaml index 8814e4a..de699ad 100644 --- a/jseql-ffi-tmp/.github/workflows/test.yml +++ b/.github/workflows/test-ffi.yaml @@ -1,4 +1,4 @@ -name: Test +name: Test jseql-ffi run-name: | ${{ (github.event_name == 'pull_request' && format('Test (PR #{0}): {1}', github.event.number, github.event.pull_request.title)) diff --git a/.github/workflows/tests.yaml b/.github/workflows/test-jseql.yaml similarity index 96% rename from .github/workflows/tests.yaml rename to .github/workflows/test-jseql.yaml index f228f27..c0afa28 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/test-jseql.yaml @@ -1,4 +1,4 @@ -name: Package Tests +name: Tests jseql on: pull_request: diff --git a/.gitignore b/.gitignore index ab0378b..4e119f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,14 @@ node_modules .turbo dist + +target +index.node +**/.DS_Store +npm-debug.log* +lib +cargo.log +cross.log +mise.local.toml + +.env.local diff --git a/bun.lockb b/bun.lockb index 8e1ab01301bc7489a9da161b468c5d17298330fe..04298422b617463d710351745325bd6ac2f9dba9 100755 GIT binary patch delta 22559 zcmeHvcU)9Q*Z-ZB6&5Qts)7}eB7H%W#V!~XY^Vr|fQZrr?9p9oM1yUTOcJ|^Mq`UH ziH{n45`(c3V-kC8u^X`@8r%Clw=8Hh@9%kk@AG;8$^GoPr_7l%GiPSb%)Pri@7}XL zvczt#zxR7J=T&no^?$bZ*ROj@=O6aCUn{Ea4CDP1Q45yWy82$^oah=liLT^%3GU`0 z{h7=twEQun9|dMi65MwlA2y1NvBkKqdH0*3V|s- zJ3T)mJxG%3Af4=F7Wk2AX&`D&c5EQ0o*I%;P&h)8Vx|1_kp-DU#!45VfHcdBdWv_- zfXR#ZP!YGg6`?0Fy`)$Ri15LuQe z>1NAb5FQYu12+Vo4vexaoq!tv=Z-8)OV25k45%Gd>@kGs5X%YRM!@q?IqK6U$Xp-T z0E{|V%3#z9_#`kqW7z{tcGm#IBNi^FyGoV`s=^FOsd-**L19LIdckcTZ{ukGqKQ)P z51K03l7P{3mR7)2jTn_b)>tWaH!!uoupldQFf7jURI2fvD*w<+@z73~u&9S~pb@DRvF=7j(>~W+kN#1^n`NE;; zIW$-tRNf63C0inpk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s^?6)>JjyEebtY}S*qGlDp9NI7vMi| zA0m2RC^}SMwW(;o9%kt`<_}3%`?RSwbgNfL64_8lZYYzeZR^*obDQ0feZm87)K@JP z+ffyJU*@wcps_MYC7pz@?c!JJRln!&71XPC!;We1*H=9yI#xlUp|qj)Y7%)>EM0D$ zqb{VOq6YeEIu8)%s+h6CbRM4?7oUK1ejmyWrgK%H!8uT>?iT}}`3LD-t=ixmC{>Zp zpLymVq;s`yggB1I8%*b_LW7f_G(K81e-{2~D4nZSl}XUjd4Q;V77l7CovX@+#YVK& zU^-V78k`r!5R const addon = require("."); -> const client = await addon.newClient(); -> const ciphertext = await addon.encrypt("plaintext", "column_name", client); -> const plaintext = await addon.decrypt(ciphertext, client); -> console.log({ciphertext, plaintext}); -``` - -## Available Scripts - -In the project directory, you can run: - -#### `npm run build` - -Builds the Node addon (`index.node`) from source, generating a release build with `cargo --release`. - -Additional [`cargo build`](https://doc.rust-lang.org/cargo/commands/cargo-build.html) arguments may be passed to `npm run build` and similar commands. For example, to enable a [cargo feature](https://doc.rust-lang.org/cargo/reference/features.html): - -``` -npm run build -- --feature=beetle -``` - -#### `npm run debug` - -Similar to `npm run build` but generates a debug build with `cargo`. - -#### `npm run cross` - -Similar to `npm run build` but uses [cross-rs](https://github.com/cross-rs/cross) to cross-compile for another platform. Use the [`CARGO_BUILD_TARGET`](https://doc.rust-lang.org/cargo/reference/config.html#buildtarget) environment variable to select the build target. - -#### `npm run release` - -Initiate a full build and publication of a new patch release of this library via GitHub Actions. - -#### `npm run dryrun` - -Initiate a dry run of a patch release of this library via GitHub Actions. This performs a full build but does not publish the final result. - -#### `npm test` - -Runs the unit tests by calling `cargo test`. You can learn more about [adding tests to your Rust code](https://doc.rust-lang.org/book/ch11-01-writing-tests.html) from the [Rust book](https://doc.rust-lang.org/book/). - -## Project Layout - -The directory structure of this project is: - -``` -jseql-ffi/ -├── Cargo.toml -├── README.md -├── lib/ -├── src/ -| ├── index.mts -| └── index.cts -├── crates/ -| └── jseql-ffi/ -| └── src/ -| └── lib.rs -├── platforms/ -├── package.json -└── target/ -``` - -| Entry | Purpose | -|----------------|------------------------------------------------------------------------------------------------------------------------------------------| -| `Cargo.toml` | The Cargo [manifest file](https://doc.rust-lang.org/cargo/reference/manifest.html), which informs the `cargo` command. | -| `README.md` | This file. | -| `lib/` | The directory containing the generated output from [tsc](https://typescriptlang.org). | -| `src/` | The directory containing the TypeScript source files. | -| `index.mts` | Entry point for when this library is loaded via [ESM `import`](https://nodejs.org/api/esm.html#modules-ecmascript-modules) syntax. | -| `index.cts` | Entry point for when this library is loaded via [CJS `require`](https://nodejs.org/api/modules.html#requireid). | -| `crates/` | The directory tree containing the Rust source code for the project. | -| `lib.rs` | Entry point for the Rust source code. | -| `platforms/` | The directory containing distributions of the binary addon backend for each platform supported by this library. | -| `package.json` | The npm [manifest file](https://docs.npmjs.com/cli/v7/configuring-npm/package-json), which informs the `npm` command. | -| `target/` | Binary artifacts generated by the Rust build. | - -## Learn More - -Learn more about: - -- [Neon](https://neon-bindings.com). -- [Rust](https://www.rust-lang.org). -- [Node](https://nodejs.org). diff --git a/jseql-ffi-tmp/crates/jseql-ffi/Cargo.toml b/jseql-ffi-tmp/crates/jseql-ffi/Cargo.toml deleted file mode 100644 index 0e483d3..0000000 --- a/jseql-ffi-tmp/crates/jseql-ffi/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "jseql-ffi" -version = "0.1.0" -license = "ISC" -edition = "2021" -exclude = ["index.node"] - -[lib] -crate-type = ["cdylib"] - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -cipherstash-client = "0.14.0" -neon = "1" -once_cell = "1.20.2" -thiserror = "2.0.8" -tokio = { version = "1", features = ["full"] } diff --git a/jseql-ffi-tmp/crates/jseql-ffi/src/lib.rs b/jseql-ffi-tmp/crates/jseql-ffi/src/lib.rs deleted file mode 100644 index e92b43b..0000000 --- a/jseql-ffi-tmp/crates/jseql-ffi/src/lib.rs +++ /dev/null @@ -1,206 +0,0 @@ -use cipherstash_client::{ - config::{ - console_config::ConsoleConfig, cts_config::CtsConfig, errors::ConfigError, - zero_kms_config::ZeroKMSConfig, - }, - credentials::service_credentials::ServiceCredentials, - encryption::{ - Encrypted, EncryptionError, Plaintext, PlaintextTarget, ReferencedPendingPipeline, - ScopedCipher, TypeParseError, - }, - schema::ColumnConfig, - zerokms::{self, EncryptedRecord}, -}; -use neon::prelude::*; -use once_cell::sync::OnceCell; -use std::sync::Arc; -use tokio::runtime::Runtime; - -// Return a global tokio runtime or create one if it doesn't exist. -// Throws a JavaScript exception if the `Runtime` fails to create. -fn runtime<'a, C: Context<'a>>(cx: &mut C) -> NeonResult<&'static Runtime> { - static RUNTIME: OnceCell = OnceCell::new(); - - RUNTIME.get_or_try_init(|| Runtime::new().or_else(|err| cx.throw_error(err.to_string()))) -} - -#[derive(Clone)] -struct Client { - cipher: Arc, -} - -impl Finalize for Client {} - -#[derive(thiserror::Error, Debug)] -pub enum Error { - #[error(transparent)] - Config(#[from] ConfigError), - #[error(transparent)] - ZeroKMS(#[from] zerokms::Error), - #[error(transparent)] - TypeParse(#[from] TypeParseError), - #[error(transparent)] - Encryption(#[from] EncryptionError), - #[error("jseql-ffi invariant violation: {0}. This is a bug in jseql-ffi. Please file an issue at https://github.com/cipherstash/jseql-ffi/issues.")] - InvariantViolation(String), - #[error("{0}")] - Base85(String), - #[error("unimplemented: {0} not supported yet by jseql-ffi")] - Unimplemented(String), -} - -type ScopedZeroKMSNoRefresh = ScopedCipher; - -fn new_client(mut cx: FunctionContext) -> JsResult { - let rt = runtime(&mut cx)?; - let channel = cx.channel(); - - let (deferred, promise) = cx.promise(); - - rt.spawn(async move { - let client_result = new_client_inner().await; - - deferred.settle_with(&channel, move |mut cx| { - let client = client_result.or_else(|err| cx.throw_error(err.to_string()))?; - - Ok(cx.boxed(client)) - }) - }); - - Ok(promise) -} - -async fn new_client_inner() -> Result { - let console_config = ConsoleConfig::builder().with_env().build()?; - let cts_config = CtsConfig::builder().with_env().build()?; - let zerokms_config = ZeroKMSConfig::builder() - .console_config(&console_config) - .cts_config(&cts_config) - .with_env() - .build_with_client_key()?; - - let zerokms = zerokms_config.create_client(); - - let cipher = ScopedZeroKMSNoRefresh::init(Arc::new(zerokms), None).await?; - - Ok(Client { - cipher: Arc::new(cipher), - }) -} - -fn encrypt(mut cx: FunctionContext) -> JsResult { - let plaintext = cx.argument::(0)?.value(&mut cx); - let column_name = cx.argument::(1)?.value(&mut cx); - let client = (&**cx.argument::>(2)?).clone(); - - let rt = runtime(&mut cx)?; - let channel = cx.channel(); - - // Create a JavaScript promise and a `deferred` handle for resolving it. - // It is important to be careful not to perform failable actions after - // creating the promise to avoid an unhandled rejection. - let (deferred, promise) = cx.promise(); - - // Spawn an `async` task on the tokio runtime. Only Rust types that are - // `Send` may be moved into this block. `Context` may not be passed and all - // JavaScript values must first be converted to Rust types. - // - // This task will _not_ block the JavaScript main thread. - rt.spawn(async move { - let ciphertext_result = encrypt_inner(plaintext, column_name, client).await; - - // Settle the promise from the result of a closure. JavaScript exceptions - // will be converted to a Promise rejection. - // - // This closure will execute on the JavaScript main thread. It should be - // limited to converting Rust types to JavaScript values. Expensive operations - // should be performed outside of it. - deferred.settle_with(&channel, move |mut cx| { - let ciphertext = ciphertext_result.or_else(|err| cx.throw_error(err.to_string()))?; - - Ok(cx.string(ciphertext)) - }); - }); - - Ok(promise) -} - -async fn encrypt_inner( - plaintext: String, - column_name: String, - client: Client, -) -> Result { - let column_config = ColumnConfig::build(column_name); - let mut pipeline = ReferencedPendingPipeline::new(client.cipher); - let encryptable = PlaintextTarget::new(plaintext, column_config.clone(), None); - - pipeline.add_with_ref::(encryptable, 0)?; - - let mut source_encrypted = pipeline.encrypt().await?; - - let encrypted = source_encrypted.remove(0).ok_or_else(|| { - Error::InvariantViolation( - "`encrypt` expected a single result in the pipeline, but there were none".to_string(), - ) - })?; - - match encrypted { - Encrypted::Record(ciphertext, _terms) => ciphertext - .to_mp_base85() - // The error type from `to_mp_base85` isn't public, so we don't derive an error for this one. - // Instead, we use `map_err`. - .map_err(|err| Error::Base85(err.to_string())), - - Encrypted::SteVec(_) => Err(Error::Unimplemented( - "`SteVec`s and encrypted JSONB columns".to_string(), - )), - } -} - -fn decrypt(mut cx: FunctionContext) -> JsResult { - let ciphertext = cx.argument::(0)?.value(&mut cx); - let client = (&**cx.argument::>(1)?).clone(); - - let rt = runtime(&mut cx)?; - let channel = cx.channel(); - - let (deferred, promise) = cx.promise(); - - rt.spawn(async move { - let decrypt_result = decrypt_inner(ciphertext, client).await; - - deferred.settle_with(&channel, move |mut cx| { - let plaintext = decrypt_result.or_else(|err| cx.throw_error(err.to_string()))?; - - Ok(cx.string(plaintext)) - }); - }); - - Ok(promise) -} - -async fn decrypt_inner(ciphertext: String, client: Client) -> Result { - let encrypted_record = EncryptedRecord::from_mp_base85(&ciphertext) - // The error type from `to_mp_base85` isn't public, so we don't derive an error for this one. - // Instead, we use `map_err`. - .map_err(|err| Error::Base85(err.to_string()))?; - - let decrypted = client.cipher.decrypt([encrypted_record]).await?; - let plaintext = Plaintext::from_slice(&decrypted[0][..])?; - - match plaintext { - Plaintext::Utf8Str(Some(ref inner)) => Ok(inner.clone()), - _ => Err(Error::Unimplemented( - "data types other than `Utf8Str`".to_string(), - )), - } -} - -#[neon::main] -fn main(mut cx: ModuleContext) -> NeonResult<()> { - cx.export_function("newClient", new_client)?; - cx.export_function("encrypt", encrypt)?; - cx.export_function("decrypt", decrypt)?; - - Ok(()) -} diff --git a/jseql-ffi-tmp/mise.toml b/jseql-ffi-tmp/mise.toml deleted file mode 100644 index 7b93134..0000000 --- a/jseql-ffi-tmp/mise.toml +++ /dev/null @@ -1,3 +0,0 @@ -[tools] -node = "latest" -rust = "latest" diff --git a/jseql-ffi-tmp/package-lock.json b/jseql-ffi-tmp/package-lock.json deleted file mode 100644 index 670ccde..0000000 --- a/jseql-ffi-tmp/package-lock.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "name": "jseql-ffi", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "jseql-ffi", - "version": "0.1.0", - "license": "ISC", - "dependencies": { - "@neon-rs/load": "^0.1.82" - }, - "devDependencies": { - "@neon-rs/cli": "^0.1.82", - "@tsconfig/node20": "^20.1.4", - "@types/node": "^20.11.16", - "typescript": "^5.3.3" - } - }, - "node_modules/@cargo-messages/android-arm-eabi": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/android-arm-eabi/-/android-arm-eabi-0.1.81.tgz", - "integrity": "sha512-cpRbgb56e9LmAj96Tixtz9/bTlaJAeplWNNv4obu+eqQyZd3ZjX04TJd9fM1bjHDGVyR9GTVlgBsbQEntIGkwg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@cargo-messages/darwin-arm64": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/darwin-arm64/-/darwin-arm64-0.1.81.tgz", - "integrity": "sha512-OwGqsw+tbJx37a/vH4T8R9qkrrFYoTIOnckbA9+MhQodE2FSWyk3HvLh+z8jjl+QZa1RSOU9Ax6gt/46h0BiTg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@cargo-messages/darwin-x64": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/darwin-x64/-/darwin-x64-0.1.81.tgz", - "integrity": "sha512-Iu761bPk25Ce6yUdDCjjeVuT8/xbBmczyaNB7oYBmAZEE5rshvCJ42TqSShYYP+S7pKkN42nBhkFooaZrqaz9g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@cargo-messages/linux-arm-gnueabihf": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm-gnueabihf/-/linux-arm-gnueabihf-0.1.81.tgz", - "integrity": "sha512-iIuy7KTJAEhbiqlIlcxQOdW6opI6M9LXlgd/jdsHbP2FjmTyhTLnd3JCJ6JeAeidwknCDs+CFlaVmPxTKSytsg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@cargo-messages/linux-arm64-gnu": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm64-gnu/-/linux-arm64-gnu-0.1.81.tgz", - "integrity": "sha512-QPQRsHj9m/9ga8wRBlLh8t2AXyr40+/H55FIKVj7zIjV++waY/TbSTPofDZQhMycd5VSGLKztfhahiCO7c/RAQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@cargo-messages/linux-arm64-musl": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm64-musl/-/linux-arm64-musl-0.1.81.tgz", - "integrity": "sha512-9O0ATesIOjDTz2L01OtlGHYwP86I31/mzXMC+ryQkzbbIKj7KUiSqmEc29I14I517UYO8/sMeow6q6MVBpehlA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@cargo-messages/linux-x64-gnu": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/linux-x64-gnu/-/linux-x64-gnu-0.1.81.tgz", - "integrity": "sha512-wEFYxCdtHNiEvp5KEg17CfRCUdfRTtkL+1GASROyvYEUV6DQf6TXxfHuuWg2xlVxh5fqiTGFSRfiqFrCDL/xrw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@cargo-messages/linux-x64-musl": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/linux-x64-musl/-/linux-x64-musl-0.1.81.tgz", - "integrity": "sha512-zi5pKIh60oPwOCDQapAZ3Mya4y56MI2BoGvY8JtztYaXTorGmAoyf6jjb50Wt+HfoYYjM3OlPt03XMlCFZJnIQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@cargo-messages/win32-arm64-msvc": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/win32-arm64-msvc/-/win32-arm64-msvc-0.1.81.tgz", - "integrity": "sha512-oyiT8AYLoguF7cFOMYDsPv3eirzBcFafOOfRsFyd3+wmaPTl/DdbCq446oThRmSAsEGJpzhzj7TafcnXMBkHbg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@cargo-messages/win32-x64-msvc": { - "version": "0.1.81", - "resolved": "https://registry.npmjs.org/@cargo-messages/win32-x64-msvc/-/win32-x64-msvc-0.1.81.tgz", - "integrity": "sha512-B5Ukf4AohtIv27uCP/AgM+7vYwQ4RacI6m8ZBr2XKeSrjZXcXguzlZd+wD7bD5+wa0capvXKUskZDnpG/DcYiA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@neon-rs/cli": { - "version": "0.1.82", - "resolved": "https://registry.npmjs.org/@neon-rs/cli/-/cli-0.1.82.tgz", - "integrity": "sha512-QrlGPQp9KOGuMvjjua79lEV2QTcE16m8JatG5ITdQpBAwRQpDw5xab57W9130y2iUEfMzYtp7v6pcN1fUB0Exg==", - "dev": true, - "license": "MIT", - "bin": { - "neon": "index.js" - }, - "optionalDependencies": { - "@cargo-messages/android-arm-eabi": "0.1.81", - "@cargo-messages/darwin-arm64": "0.1.81", - "@cargo-messages/darwin-x64": "0.1.81", - "@cargo-messages/linux-arm-gnueabihf": "0.1.81", - "@cargo-messages/linux-arm64-gnu": "0.1.81", - "@cargo-messages/linux-arm64-musl": "0.1.81", - "@cargo-messages/linux-x64-gnu": "0.1.81", - "@cargo-messages/linux-x64-musl": "0.1.81", - "@cargo-messages/win32-arm64-msvc": "0.1.81", - "@cargo-messages/win32-x64-msvc": "0.1.81" - } - }, - "node_modules/@neon-rs/load": { - "version": "0.1.82", - "resolved": "https://registry.npmjs.org/@neon-rs/load/-/load-0.1.82.tgz", - "integrity": "sha512-H4Gu2o5kPp+JOEhRrOQCnJnf7X6sv9FBLttM/wSbb4efsgFWeHzfU/ItZ01E5qqEk+U6QGdeVO7lxXIAtYHr5A==", - "license": "MIT" - }, - "node_modules/@tsconfig/node20": { - "version": "20.1.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.4.tgz", - "integrity": "sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "20.17.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.10.tgz", - "integrity": "sha512-/jrvh5h6NXhEauFFexRin69nA0uHJ5gwk4iDivp/DeoEua3uwCUto6PC86IpRITBOs4+6i2I56K5x5b6WYGXHA==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.19.2" - } - }, - "node_modules/typescript": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", - "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", - "dev": true, - "license": "MIT" - } - } -} diff --git a/jseql-ffi-tmp/package.json b/jseql-ffi-tmp/package.json deleted file mode 100644 index 6ff865e..0000000 --- a/jseql-ffi-tmp/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "jseql-ffi", - "version": "0.1.0", - "description": "", - "main": "./lib/index.cjs", - "scripts": { - "test": "tsc &&cargo test", - "cargo-build": "tsc &&cargo build --message-format=json-render-diagnostics > cargo.log", - "cross-build": "tsc &&cross build --message-format=json-render-diagnostics > cross.log", - "postcargo-build": "neon dist < cargo.log", - "postcross-build": "neon dist -m /target < cross.log", - "debug": "npm run cargo-build --", - "build": "npm run cargo-build -- --release", - "cross": "npm run cross-build -- --release", - "prepack": "tsc &&neon update", - "version": "neon bump --binaries platforms && git add .", - "release": "gh workflow run release.yml -f dryrun=false -f version=patch", - "dryrun": "gh workflow run publish.yml -f dryrun=true" - }, - "author": "", - "license": "ISC", - "exports": { - ".": { - "import": { - "types": "./lib/index.d.mts", - "default": "./lib/index.mjs" - }, - "require": { - "types": "./lib/index.d.cts", - "default": "./lib/index.cjs" - } - } - }, - "types": "./lib/index.d.cts", - "files": [ - "lib/**/*.?({c,m}){t,j}s" - ], - "neon": { - "type": "library", - "org": "@cipherstash", - "platforms": "common", - "load": "./src/load.cts" - }, - "devDependencies": { - "@neon-rs/cli": "^0.1.82", - "@tsconfig/node20": "^20.1.4", - "@types/node": "^20.11.16", - "typescript": "^5.3.3" - }, - "dependencies": { - "@neon-rs/load": "^0.1.82" - } -} diff --git a/jseql-ffi-tmp/platforms/darwin-arm64/README.md b/jseql-ffi-tmp/platforms/darwin-arm64/README.md deleted file mode 100644 index 808fba9..0000000 --- a/jseql-ffi-tmp/platforms/darwin-arm64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@cipherstash/jseql-ffi-darwin-arm64` - -Prebuilt binary package for `@cipherstash/jseql-ffi` on `darwin-arm64`. diff --git a/jseql-ffi-tmp/platforms/darwin-arm64/package.json b/jseql-ffi-tmp/platforms/darwin-arm64/package.json deleted file mode 100644 index 94e66c5..0000000 --- a/jseql-ffi-tmp/platforms/darwin-arm64/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@cipherstash/jseql-ffi-darwin-arm64", - "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `darwin-arm64`.", - "version": "0.1.0", - "os": [ - "darwin" - ], - "cpu": [ - "arm64" - ], - "main": "index.node", - "files": [ - "index.node" - ], - "neon": { - "type": "binary", - "rust": "aarch64-apple-darwin", - "node": "darwin-arm64", - "os": "darwin", - "arch": "arm64", - "abi": null - }, - "author": "", - "license": "ISC" -} diff --git a/jseql-ffi-tmp/platforms/darwin-x64/README.md b/jseql-ffi-tmp/platforms/darwin-x64/README.md deleted file mode 100644 index 861e7e2..0000000 --- a/jseql-ffi-tmp/platforms/darwin-x64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@cipherstash/jseql-ffi-darwin-x64` - -Prebuilt binary package for `@cipherstash/jseql-ffi` on `darwin-x64`. diff --git a/jseql-ffi-tmp/platforms/darwin-x64/package.json b/jseql-ffi-tmp/platforms/darwin-x64/package.json deleted file mode 100644 index d49c8b1..0000000 --- a/jseql-ffi-tmp/platforms/darwin-x64/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@cipherstash/jseql-ffi-darwin-x64", - "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `darwin-x64`.", - "version": "0.1.0", - "os": [ - "darwin" - ], - "cpu": [ - "x64" - ], - "main": "index.node", - "files": [ - "index.node" - ], - "neon": { - "type": "binary", - "rust": "x86_64-apple-darwin", - "node": "darwin-x64", - "os": "darwin", - "arch": "x64", - "abi": null - }, - "author": "", - "license": "ISC" -} diff --git a/jseql-ffi-tmp/platforms/linux-arm64-gnu/README.md b/jseql-ffi-tmp/platforms/linux-arm64-gnu/README.md deleted file mode 100644 index 19ad930..0000000 --- a/jseql-ffi-tmp/platforms/linux-arm64-gnu/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@cipherstash/jseql-ffi-linux-arm64-gnu` - -Prebuilt binary package for `@cipherstash/jseql-ffi` on `linux-arm64-gnu`. diff --git a/jseql-ffi-tmp/platforms/linux-arm64-gnu/package.json b/jseql-ffi-tmp/platforms/linux-arm64-gnu/package.json deleted file mode 100644 index 70e6409..0000000 --- a/jseql-ffi-tmp/platforms/linux-arm64-gnu/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@cipherstash/jseql-ffi-linux-arm64-gnu", - "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `linux-arm64-gnu`.", - "version": "0.1.0", - "os": [ - "linux" - ], - "cpu": [ - "arm64" - ], - "main": "index.node", - "files": [ - "index.node" - ], - "neon": { - "type": "binary", - "rust": "aarch64-unknown-linux-gnu", - "node": "linux-arm64-gnu", - "os": "linux", - "arch": "arm64", - "abi": "gnu" - }, - "author": "", - "license": "ISC" -} diff --git a/jseql-ffi-tmp/platforms/linux-x64-gnu/README.md b/jseql-ffi-tmp/platforms/linux-x64-gnu/README.md deleted file mode 100644 index 57a448a..0000000 --- a/jseql-ffi-tmp/platforms/linux-x64-gnu/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@cipherstash/jseql-ffi-linux-x64-gnu` - -Prebuilt binary package for `@cipherstash/jseql-ffi` on `linux-x64-gnu`. diff --git a/jseql-ffi-tmp/platforms/linux-x64-gnu/package.json b/jseql-ffi-tmp/platforms/linux-x64-gnu/package.json deleted file mode 100644 index 8fa89c8..0000000 --- a/jseql-ffi-tmp/platforms/linux-x64-gnu/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@cipherstash/jseql-ffi-linux-x64-gnu", - "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `linux-x64-gnu`.", - "version": "0.1.0", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "index.node", - "files": [ - "index.node" - ], - "neon": { - "type": "binary", - "rust": "x86_64-unknown-linux-gnu", - "node": "linux-x64-gnu", - "os": "linux", - "arch": "x64", - "abi": "gnu" - }, - "author": "", - "license": "ISC" -} diff --git a/jseql-ffi-tmp/platforms/win32-x64-msvc/README.md b/jseql-ffi-tmp/platforms/win32-x64-msvc/README.md deleted file mode 100644 index 3361198..0000000 --- a/jseql-ffi-tmp/platforms/win32-x64-msvc/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@cipherstash/jseql-ffi-win32-x64-msvc` - -Prebuilt binary package for `@cipherstash/jseql-ffi` on `win32-x64-msvc`. diff --git a/jseql-ffi-tmp/platforms/win32-x64-msvc/package.json b/jseql-ffi-tmp/platforms/win32-x64-msvc/package.json deleted file mode 100644 index 42496e8..0000000 --- a/jseql-ffi-tmp/platforms/win32-x64-msvc/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@cipherstash/jseql-ffi-win32-x64-msvc", - "description": "Prebuilt binary package for `@cipherstash/jseql-ffi` on `win32-x64-msvc`.", - "version": "0.1.0", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ], - "main": "index.node", - "files": [ - "index.node" - ], - "neon": { - "type": "binary", - "rust": "x86_64-pc-windows-msvc", - "node": "win32-x64-msvc", - "os": "win32", - "arch": "x64", - "abi": "msvc" - }, - "author": "", - "license": "ISC" -} diff --git a/jseql-ffi-tmp/src/index.cts b/jseql-ffi-tmp/src/index.cts deleted file mode 100644 index bc3f6db..0000000 --- a/jseql-ffi-tmp/src/index.cts +++ /dev/null @@ -1,4 +0,0 @@ -// This module is the CJS entry point for the library. - -// The Rust addon. -export * from "./load.cjs"; diff --git a/jseql-ffi-tmp/src/index.mts b/jseql-ffi-tmp/src/index.mts deleted file mode 100644 index 5e1ab26..0000000 --- a/jseql-ffi-tmp/src/index.mts +++ /dev/null @@ -1,3 +0,0 @@ -// This module is the ESM entry point for the library. - -export * from './index.cjs'; diff --git a/jseql-ffi-tmp/src/load.cts b/jseql-ffi-tmp/src/load.cts deleted file mode 100644 index be79585..0000000 --- a/jseql-ffi-tmp/src/load.cts +++ /dev/null @@ -1,17 +0,0 @@ -// This module loads the platform-specific build of the addon on -// the current system. The supported platforms are registered in -// the `platforms` object below, whose entries can be managed by -// by the Neon CLI: -// -// https://www.npmjs.com/package/@neon-rs/cli - -module.exports = require('@neon-rs/load').proxy({ - platforms: { - 'win32-x64-msvc': () => require('@cipherstash/jseql-ffi-win32-x64-msvc'), - 'darwin-x64': () => require('@cipherstash/jseql-ffi-darwin-x64'), - 'darwin-arm64': () => require('@cipherstash/jseql-ffi-darwin-arm64'), - 'linux-x64-gnu': () => require('@cipherstash/jseql-ffi-linux-x64-gnu'), - 'linux-arm64-gnu': () => require('@cipherstash/jseql-ffi-linux-arm64-gnu') - }, - debug: () => require('../index.node') -}); diff --git a/jseql-ffi-tmp/tsconfig.json b/jseql-ffi-tmp/tsconfig.json deleted file mode 100644 index 2bb48f6..0000000 --- a/jseql-ffi-tmp/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@tsconfig/node20/tsconfig.json", - "compilerOptions": { - "module": "node16", - "declaration": true, - "outDir": "lib", - }, - "exclude": ["lib"] -} From 980579b60331e6d7323f96c421b6bef0dc0bc67d Mon Sep 17 00:00:00 2001 From: CJ Brewer Date: Wed, 18 Dec 2024 20:21:45 -0600 Subject: [PATCH 14/19] fix: link to workflow filename --- .github/workflows/test-ffi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-ffi.yaml b/.github/workflows/test-ffi.yaml index de699ad..2bde304 100644 --- a/.github/workflows/test-ffi.yaml +++ b/.github/workflows/test-ffi.yaml @@ -43,7 +43,7 @@ jobs: needs: [pr] permissions: contents: write - uses: ./.github/workflows/build.yml + uses: ./.github/workflows/build-ffi.yaml with: ref: ${{ needs.pr.outputs.branch }} update-version: true From 19a90d71e5d13b14cd889a929dfa8755301900a3 Mon Sep 17 00:00:00 2001 From: CJ Brewer Date: Wed, 18 Dec 2024 20:37:30 -0600 Subject: [PATCH 15/19] fix(ci): jseql tests dir location --- .github/.env | 2 +- .github/workflows/test-ffi.yaml | 8 ++++++-- packages/jseql-ffi/package.json | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/.env b/.github/.env index cbe24b0..a862b80 100644 --- a/.github/.env +++ b/.github/.env @@ -1,4 +1,4 @@ -NODE_VERSION=20.x +NODE_VERSION=23.x NPM_REGISTRY=https://registry.npmjs.org RUST_VERSION=stable ACTIONS_USER=github-actions diff --git a/.github/workflows/test-ffi.yaml b/.github/workflows/test-ffi.yaml index 2bde304..4c6999e 100644 --- a/.github/workflows/test-ffi.yaml +++ b/.github/workflows/test-ffi.yaml @@ -60,12 +60,16 @@ jobs: uses: ./.github/actions/setup with: platform: linux-x64-gnu + - name: Set up Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version-file: package.json - name: Build shell: bash env: CARGO_BUILD_TARGET: ${{ steps.neon.outputs.target }} NEON_BUILD_PLATFORM: linux-x64-gnu - run: npm run debug + run: cd packages/jseql-ffi && bun run debug - name: Test shell: bash - run: npm test + run: cd packages/jseql-ffi && bun test diff --git a/packages/jseql-ffi/package.json b/packages/jseql-ffi/package.json index c5691b9..b42250c 100644 --- a/packages/jseql-ffi/package.json +++ b/packages/jseql-ffi/package.json @@ -9,9 +9,9 @@ "cross-build": "tsc &&cross build --message-format=json-render-diagnostics > cross.log", "postcargo-build": "neon dist < cargo.log", "postcross-build": "neon dist -m /target < cross.log", - "debug": "npm run cargo-build --", - "build": "npm run cargo-build -- --release", - "cross": "npm run cross-build -- --release", + "debug": "bun run cargo-build --", + "build": "bun run cargo-build -- --release", + "cross": "bun run cross-build -- --release", "prepack": "tsc &&neon update", "version": "neon bump --binaries platforms && git add .", "release": "gh workflow run release.yml -f dryrun=false -f version=patch", From 2413db057ca5e86e62131538b1d6c6a7c39fdae2 Mon Sep 17 00:00:00 2001 From: CJ Brewer Date: Wed, 18 Dec 2024 20:38:26 -0600 Subject: [PATCH 16/19] chore: upgrade turbo to latest version --- bun.lockb | Bin 135120 -> 135136 bytes package.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/bun.lockb b/bun.lockb index 04298422b617463d710351745325bd6ac2f9dba9..f9e6256ce15b14d3e72f5ad05dd561ee18e05f1b 100755 GIT binary patch delta 15257 zcmeHucU;s*xA$*WR#_DgMB1W&N>z})C}kxmii&_nR=@@dvPg45V+Uf1vFk*~7C~c7 z@UbCLVu=w=o)~LPG_hP;)F^ghOzht8{0cmJ{k+ff-uvG7pL_W@bIP2VIdkUBnc3ar z59Q{U%gq=0xg9%pm3@3_zWE*1hC?x=S>nJY8K$6ZlWXzG~%OtD>t>txMG8hwrVSp~v; z&~4CfJJf|G29z!X!k3(gikqkzAXg--$TxFBu_-;vm_N#QT%nK&Z8$$whK0Vl1tZgo zGsj>+Zp!uYI2&ky%CqDtSX_Gvk<)#;9!|qe4TNC>dWs&``SQqq; z0OZpZ`eLt&GfjoQdFgzg%$y`+Xwi<9mbL`sv+1}c)qgy z1MtBr-6XY_l>Pw36$}%g8z2RA1bi2;9bmz@;!&CT#eyBQ z0G-r09pbbmHD1Q(u7WcTro|sBwr002fg$lXue%v z0`l?mWVk7W%a;hH&wy}yC>`Gn6UsnAI%(oJ2a1FxxPl&le4^?wX(Lwxa(^l4D)DE6 z#)&K4DBC}!8|EzmV-pa5B8pAHq1^O^>=bOn4KA@R=w!ih?20J-BY2aLpFD4hs|!!$rXK!i-Y0y=|M z1M(B`I9yU_E>^&gY9dW)X73%)Q=&Qoa&;X5x#3&NPzA{C`-CoT=28+9Ct1T6ke@1h z84?-Z?k(|8%Wyv+x7sE^TfpTqoFT(P84i(QZy5&5&{c*OfY7;H>C;}4x;JEaN`?mj z`7Uge;Tjpvli?(4H21XrBT;gK-()z4t~GbDo(h9-pFA``GQlo-(!5K_&VdrO9*~b* z2FUGyWRT>^*n80XCINCE(g8XFY61BX zeTMP)Sr6*vb@xG=VGpmK`n7s;i>2n(rM8!e`HIiKy)yA}|C!XmHk;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l{w3+<;#bWsqkEp4!0J{LBU#5>D~OMu8**X`v>v&K&$YEBcLG842>4yU zbVKk4ZA>If<6?V5rHpxQ(De6An|-xkfaYJ3&2}Hu?3r8ag>P6{1-@@jWmOeqI18&J z5xRn`Q4_Mp<`lIbUz9T`H+;+(vlU^(D#@5e`252TRgw=_*>2K?ZLcJ1_Vya${}=Mg z8q)SJWW-wH_ZM=?T6{-k>-))C;>~r|{IHfd4y?K6pej(;TzNq3nj@o0|EBgUOfBl4 z)p>yv|EUAcW0Raz?b^m3|D?Ltz8||PUrH-qG+&d&UTLOclZIi}!^uk+e!K|NY-}cJ x_?ne9QyFzi4@HBAv(%j8EcblcOcmmviXpkvlrO1q1c^t9@^v Date: Wed, 18 Dec 2024 20:45:22 -0600 Subject: [PATCH 17/19] fix(ci): use bun to install dependencies --- .github/actions/setup/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index f3255c1..a458686 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -42,9 +42,13 @@ runs: node-version: ${{ env.NODE_VERSION }} registry-url: ${{ env.NPM_REGISTRY }} cache: npm + - name: Set up Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version-file: package.json - name: Install Dependencies shell: bash - run: npm ci + run: bun install --frozen-lockfile - name: Compute Rust Target if: ${{ inputs['use-rust'] == 'true' }} id: target From 2cdbe7b7ea34a45bb1fc8891d62c9e709de7dfd2 Mon Sep 17 00:00:00 2001 From: CJ Brewer Date: Wed, 18 Dec 2024 20:48:01 -0600 Subject: [PATCH 18/19] fix(ci): yaml formatting --- .github/actions/setup/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index a458686..52e70cb 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -43,9 +43,9 @@ runs: registry-url: ${{ env.NPM_REGISTRY }} cache: npm - name: Set up Bun - uses: oven-sh/setup-bun@v2 - with: - bun-version-file: package.json + uses: oven-sh/setup-bun@v2 + with: + bun-version-file: package.json - name: Install Dependencies shell: bash run: bun install --frozen-lockfile From 3d6d2233fb86829a6e01f4675cbc7184d9975b9c Mon Sep 17 00:00:00 2001 From: CJ Brewer Date: Wed, 18 Dec 2024 20:52:57 -0600 Subject: [PATCH 19/19] fix(ci): npm cache --- .github/actions/setup/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 52e70cb..27c7943 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -41,7 +41,6 @@ runs: with: node-version: ${{ env.NODE_VERSION }} registry-url: ${{ env.NPM_REGISTRY }} - cache: npm - name: Set up Bun uses: oven-sh/setup-bun@v2 with: