Remove wasm binding

With napi v3 we can compile our javascript binding to wasm, which can
reduce a lot of maintenance overhead and complexity
This commit is contained in:
Diego Reis
2025-07-28 11:41:00 -03:00
parent 016c84ed7d
commit 98bec9868b
54 changed files with 2826 additions and 7292 deletions

64
.github/labeler.yml vendored
View File

@@ -1,108 +1,106 @@
simulator:
- changed-files:
- any-glob-to-any-file: 'simulator/**/*'
- any-glob-to-any-file: "simulator/**/*"
docs:
- changed-files:
- any-glob-to-any-file: 'docs/**/*'
- any-glob-to-any-file: "docs/**/*"
extensionlib:
- changed-files:
- any-glob-to-any-file: ['extensions/core/**/*', 'macros/src/ext/*', 'core/ext/*']
- any-glob-to-any-file:
["extensions/core/**/*", "macros/src/ext/*", "core/ext/*"]
macros:
- changed-files:
- any-glob-to-any-file: ['macros/**/*']
- any-glob-to-any-file: ["macros/**/*"]
extensions-other:
- all:
- changed-files:
- any-glob-to-any-file: 'extensions/**/*'
- all-globs-to-all-files: '!extensions/core/**/*'
- all:
- changed-files:
- any-glob-to-any-file: "extensions/**/*"
- all-globs-to-all-files: "!extensions/core/**/*"
fuzzing:
- changed-files:
- any-glob-to-any-file: 'fuzz/**/*'
- any-glob-to-any-file: "fuzz/**/*"
perf/benchmarks:
- changed-files:
- any-glob-to-any-file: ['perf/**/*', 'core/benches/*']
- any-glob-to-any-file: ["perf/**/*", "core/benches/*"]
go-bindings:
- changed-files:
- any-glob-to-any-file: 'bindings/go/**/*'
wasm-bindings:
- changed-files:
- any-glob-to-any-file: 'bindings/wasm/**/*'
- any-glob-to-any-file: "bindings/go/**/*"
python-bindings:
- changed-files:
- any-glob-to-any-file: 'bindings/python/**/*'
- any-glob-to-any-file: "bindings/python/**/*"
js-bindings:
- changed-files:
- any-glob-to-any-file: 'bindings/javascript/**/*'
- any-glob-to-any-file: "bindings/javascript/**/*"
rust-bindings:
- changed-files:
- any-glob-to-any-file: 'bindings/rust/**/*'
- any-glob-to-any-file: "bindings/rust/**/*"
java-bindings:
- changed-files:
- any-glob-to-any-file: 'bindings/java/**/*'
- any-glob-to-any-file: "bindings/java/**/*"
parser:
- changed-files:
- any-glob-to-any-file: "vendored/sqlite3-parser/*"
- any-glob-to-any-file: "vendored/sqlite3-parser/*"
cli:
- changed-files:
- any-glob-to-any-file: "cli/**/*"
- any-glob-to-any-file: "cli/**/*"
sqlite3:
- changed-files:
- any-glob-to-any-file: "sqlite3/**/*"
- any-glob-to-any-file: "sqlite3/**/*"
core:
- changed-files:
- any-glob-to-any-file: 'core/**/*'
- any-glob-to-any-file: "core/**/*"
optimizer:
- changed-files:
- any-glob-to-any-file: 'core/translate/optimizer/*'
- any-glob-to-any-file: "core/translate/optimizer/*"
translation/planning:
- changed-files:
- any-glob-to-any-file: 'core/translate/*.rs'
- any-glob-to-any-file: "core/translate/*.rs"
io:
- changed-files:
- any-glob-to-any-file: 'core/io/*'
- any-glob-to-any-file: "core/io/*"
mvcc:
- changed-files:
- any-glob-to-any-file: 'core/mvcc/**/*'
- any-glob-to-any-file: "core/mvcc/**/*"
vdbe:
- changed-files:
- any-glob-to-any-file: 'core/vdbe/*'
- any-glob-to-any-file: "core/vdbe/*"
json:
- changed-files:
- any-glob-to-any-file: 'core/json/*'
- any-glob-to-any-file: "core/json/*"
storage:
- changed-files:
- any-glob-to-any-file: 'core/storage/*'
- any-glob-to-any-file: "core/storage/*"
vector:
- changed-files:
- any-glob-to-any-file: 'core/vector/*'
- any-glob-to-any-file: "core/vector/*"
antithesis:
- changed-files:
- any-glob-to-any-file: ['antithesis-tests/**/*', 'scripts/antithesis/*', 'stress/**/*']
- any-glob-to-any-file:
["antithesis-tests/**/*", "scripts/antithesis/*", "stress/**/*"]
ci-actions:
- changed-files:
- any-glob-to-any-file: '.github/workflows/*.yml'
- any-glob-to-any-file: ".github/workflows/*.yml"

View File

@@ -2,9 +2,9 @@ name: Rust
on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]
env:
CARGO_TERM_COLOR: always
@@ -13,12 +13,12 @@ jobs:
cargo-fmt-check:
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Check formatting
run: cargo fmt --check
- name: Check formatting (fuzz)
run: cd fuzz && cargo fmt --check
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Check formatting
run: cargo fmt --check
- name: Check formatting (fuzz)
run: cd fuzz && cargo fmt --check
build-native:
strategy:
@@ -28,21 +28,21 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: useblacksmith/rust-cache@v3
with:
prefix-key: "v1-rust" # can be updated if we need to reset caches due to non-trivial change in the dependencies (for example, custom env var were set for single workspace project)
- name: Set up Python 3.10
uses: useblacksmith/setup-python@v6
with:
python-version: "3.10"
- name: Build
run: cargo build --verbose
- name: Test
env:
RUST_LOG: ${{ runner.debug && 'turso_core::storage=trace' || '' }}
run: cargo test --verbose
timeout-minutes: 20
- uses: actions/checkout@v3
- uses: useblacksmith/rust-cache@v3
with:
prefix-key: "v1-rust" # can be updated if we need to reset caches due to non-trivial change in the dependencies (for example, custom env var were set for single workspace project)
- name: Set up Python 3.10
uses: useblacksmith/setup-python@v6
with:
python-version: "3.10"
- name: Build
run: cargo build --verbose
- name: Test
env:
RUST_LOG: ${{ runner.debug && 'turso_core::storage=trace' || '' }}
run: cargo test --verbose
timeout-minutes: 20
clippy:
runs-on: blacksmith-4vcpu-ubuntu-2404
@@ -50,21 +50,7 @@ jobs:
- uses: actions/checkout@v3
- name: Clippy
run: |
cargo clippy --workspace --all-features --all-targets --exclude limbo-wasm -- --deny=warnings
- name: Clippy `limbo-wasm` crate `nodejs` feature
run: |
cargo clippy --package limbo-wasm --features nodejs --all-targets --no-deps -- -A clippy::all -W clippy::correctness -W clippy::perf -W clippy::suspicious --deny=warnings
- name: Clippy `limbo-wasm` crate `web` feature
run: |
cargo clippy --package limbo-wasm --no-default-features --features web --all-targets --no-deps -- -A clippy::all -W clippy::correctness -W clippy::perf -W clippy::suspicious --deny=warnings
build-wasm:
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v3
- name: Install
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- run: wasm-pack build --target nodejs bindings/wasm
cargo clippy --workspace --all-features --all-targets -- --deny=warnings
simulator:
runs-on: blacksmith-4vcpu-ubuntu-2404
@@ -95,10 +81,10 @@ jobs:
- name: Test
run: make test
timeout-minutes: 20
# - uses: "./.github/shared/install_sqlite"
# - name: Test with index enabled
# run: SQLITE_EXEC="scripts/limbo-sqlite3-index-experimental" make test
# timeout-minutes: 20
# - uses: "./.github/shared/install_sqlite"
# - name: Test with index enabled
# run: SQLITE_EXEC="scripts/limbo-sqlite3-index-experimental" make test
# timeout-minutes: 20
test-sqlite:
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
@@ -106,4 +92,3 @@ jobs:
- uses: "./.github/shared/install_sqlite"
- name: Test
run: SQLITE_EXEC="sqlite3" make test-compat