diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6ef6c158d..40473b49e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -414,8 +414,8 @@ jobs: ./packages/duckdb-wasm/src/bindings/duckdb.wasm retention-days: 1 - wasm_next: - name: WASM / Next + wasm_eh: + name: WASM / EH runs-on: ubuntu-latest needs: - native_debug @@ -436,10 +436,10 @@ jobs: path: | ./.emscripten_cache ./.ccache - key: ${{ runner.os }}-wasm6-next-${{ hashFiles('git_submodule_status.txt') }}-${{ hashFiles('lib/src/**') }}-${{ hashFiles('lib/include/**') }} + key: ${{ runner.os }}-wasm6-eh-${{ hashFiles('git_submodule_status.txt') }}-${{ hashFiles('lib/src/**') }}-${{ hashFiles('lib/include/**') }} restore-keys: | - ${{ runner.os }}-wasm6-next-${{ hashFiles('git_submodule_status.txt') }} - ${{ runner.os }}-wasm6-next- + ${{ runner.os }}-wasm6-eh-${{ hashFiles('git_submodule_status.txt') }} + ${{ runner.os }}-wasm6-eh- - name: Prepare repository uses: duckdb/duckdb-wasm-ci-env@v0.5 @@ -454,20 +454,20 @@ jobs: with: script: |- ccache -z - ./scripts/wasm_build_lib.sh release next + ./scripts/wasm_build_lib.sh release eh ccache -s - name: Upload artifact uses: actions/upload-artifact@v2 with: - name: wasm-next + name: wasm-eh path: | - ./packages/duckdb-wasm/src/bindings/duckdb-next.js - ./packages/duckdb-wasm/src/bindings/duckdb-next.wasm + ./packages/duckdb-wasm/src/bindings/duckdb-eh.js + ./packages/duckdb-wasm/src/bindings/duckdb-eh.wasm retention-days: 1 - wasm_next_coi: - name: WASM / Next COI + wasm_coi: + name: WASM / COI runs-on: ubuntu-latest needs: - native_debug @@ -488,10 +488,10 @@ jobs: path: | ./.emscripten_cache ./.ccache - key: ${{ runner.os }}-wasm6-next-coi-${{ hashFiles('git_submodule_status.txt') }}-${{ hashFiles('lib/src/**') }}-${{ hashFiles('lib/include/**') }} + key: ${{ runner.os }}-wasm6-coi-${{ hashFiles('git_submodule_status.txt') }}-${{ hashFiles('lib/src/**') }}-${{ hashFiles('lib/include/**') }} restore-keys: | - ${{ runner.os }}-wasm6-next-coi-${{ hashFiles('git_submodule_status.txt') }} - ${{ runner.os }}-wasm6-next-coi- + ${{ runner.os }}-wasm6-coi-${{ hashFiles('git_submodule_status.txt') }} + ${{ runner.os }}-wasm6-coi- - name: Prepare repository uses: duckdb/duckdb-wasm-ci-env@v0.5 @@ -506,17 +506,17 @@ jobs: with: script: |- ccache -z - ./scripts/wasm_build_lib.sh release next_coi + ./scripts/wasm_build_lib.sh release coi ccache -s - name: Upload artifact uses: actions/upload-artifact@v2 with: - name: wasm-next-coi + name: wasm-coi path: | - ./packages/duckdb-wasm/src/bindings/duckdb-next-coi.js - ./packages/duckdb-wasm/src/bindings/duckdb-next-coi.pthread.js - ./packages/duckdb-wasm/src/bindings/duckdb-next-coi.wasm + ./packages/duckdb-wasm/src/bindings/duckdb-coi.js + ./packages/duckdb-wasm/src/bindings/duckdb-coi.pthread.js + ./packages/duckdb-wasm/src/bindings/duckdb-coi.wasm retention-days: 1 js_libs: @@ -524,8 +524,8 @@ jobs: runs-on: ubuntu-latest needs: - wasm_default - - wasm_next - - wasm_next_coi + - wasm_eh + - wasm_coi - dataprep - tpchgen - duckdb_shell @@ -586,12 +586,12 @@ jobs: - uses: actions/download-artifact@v2 with: - name: wasm-next + name: wasm-eh path: ./packages/duckdb-wasm/src/bindings/ - uses: actions/download-artifact@v2 with: - name: wasm-next-coi + name: wasm-coi path: ./packages/duckdb-wasm/src/bindings/ - name: Prepare repository diff --git a/Makefile b/Makefile index 67059c57a..0437b74b7 100644 --- a/Makefile +++ b/Makefile @@ -200,33 +200,33 @@ wasm_caches: # Build the wasm module with debug info .PHONY: wasm -wasm_fast_next: wasm_caches +wasm_fast_eh: wasm_caches mkdir -p ${CACHE_DIRS} - ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh fast next + ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh fast eh # Build the wasm module with debug info .PHONY: wasm wasm: wasm_caches mkdir -p ${CACHE_DIRS} ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh fast default - ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh fast next - ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh fast next_coi + ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh fast eh + ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh fast coi # Build the wasm modules with all debug info .PHONY: wasm_debug wasm_debug: wasm_caches mkdir -p ${CACHE_DIRS} ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh debug default - ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh debug next - ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh debug next_coi + ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh debug eh + ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh debug coi # Build the wasm modules .PHONY: wasm_release wasm_release: wasm_caches mkdir -p ${CACHE_DIRS} ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh release default - ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh release next - ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh release next_coi + ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh release eh + ${EXEC_ENVIRONMENT} ${ROOT_DIR}/scripts/wasm_build_lib.sh release coi # Build the duckdb library in debug mode .PHONY: js_debug diff --git a/examples/bare-browser/bundle.mjs b/examples/bare-browser/bundle.mjs index 90794f6c5..7dd915812 100644 --- a/examples/bare-browser/bundle.mjs +++ b/examples/bare-browser/bundle.mjs @@ -11,6 +11,6 @@ function printErr(err) { fs.copyFile(path.resolve(DUCKDB_DIST, 'duckdb-browser.mjs'), './duckdb-browser.mjs', printErr); fs.copyFile(path.resolve(DUCKDB_DIST, 'duckdb.wasm'), './duckdb.wasm', printErr); -fs.copyFile(path.resolve(DUCKDB_DIST, 'duckdb-next.wasm'), './duckdb-next.wasm', printErr); +fs.copyFile(path.resolve(DUCKDB_DIST, 'duckdb-eh.wasm'), './duckdb-eh.wasm', printErr); fs.copyFile(path.resolve(DUCKDB_DIST, 'duckdb-browser.worker.js'), './duckdb-browser.worker.js', printErr); -fs.copyFile(path.resolve(DUCKDB_DIST, 'duckdb-browser-next.worker.js'), './duckdb-browser-next.worker.js', printErr); +fs.copyFile(path.resolve(DUCKDB_DIST, 'duckdb-browser-eh.worker.js'), './duckdb-browser-eh.worker.js', printErr); diff --git a/examples/bare-browser/index.html b/examples/bare-browser/index.html index f93d969df..374cb1af8 100644 --- a/examples/bare-browser/index.html +++ b/examples/bare-browser/index.html @@ -11,9 +11,9 @@ mainModule: './duckdb.wasm', mainWorker: './duckdb-browser.worker.js', }, - next: { - mainModule: './duckdb-next.wasm', - mainWorker: './duckdb-browser-next.worker.js', + eh: { + mainModule: './duckdb-eh.wasm', + mainWorker: './duckdb-browser-eh.worker.js', }, }); diff --git a/examples/bare-node/index.cjs b/examples/bare-node/index.cjs index c3d190a85..ef014fe64 100644 --- a/examples/bare-node/index.cjs +++ b/examples/bare-node/index.cjs @@ -10,9 +10,9 @@ const DUCKDB_DIST = path.dirname(require.resolve('@duckdb/duckdb-wasm')); mainModule: path.resolve(DUCKDB_DIST, './duckdb.wasm'), mainWorker: path.resolve(DUCKDB_DIST, './duckdb-node.worker.cjs'), }, - next: { - mainModule: path.resolve(DUCKDB_DIST, './duckdb-next.wasm'), - mainWorker: path.resolve(DUCKDB_DIST, './duckdb-node-next.worker.cjs'), + eh: { + mainModule: path.resolve(DUCKDB_DIST, './duckdb-eh.wasm'), + mainWorker: path.resolve(DUCKDB_DIST, './duckdb-node-eh.worker.cjs'), }, }); diff --git a/examples/esbuild-browser/bundle.mjs b/examples/esbuild-browser/bundle.mjs index b1a56d283..3e982a33f 100644 --- a/examples/esbuild-browser/bundle.mjs +++ b/examples/esbuild-browser/bundle.mjs @@ -11,9 +11,9 @@ function printErr(err) { } fs.copyFile(path.resolve(DUCKDB_DIST, 'duckdb.wasm'), './duckdb.wasm', printErr); -fs.copyFile(path.resolve(DUCKDB_DIST, 'duckdb-next.wasm'), './duckdb-next.wasm', printErr); +fs.copyFile(path.resolve(DUCKDB_DIST, 'duckdb-eh.wasm'), './duckdb-eh.wasm', printErr); fs.copyFile(path.resolve(DUCKDB_DIST, 'duckdb-browser.worker.js'), './duckdb-browser.worker.js', printErr); -fs.copyFile(path.resolve(DUCKDB_DIST, 'duckdb-browser-next.worker.js'), './duckdb-browser-next.worker.js', printErr); +fs.copyFile(path.resolve(DUCKDB_DIST, 'duckdb-browser-eh.worker.js'), './duckdb-browser-eh.worker.js', printErr); esbuild.build({ entryPoints: ['./index.ts'], diff --git a/examples/esbuild-browser/index.ts b/examples/esbuild-browser/index.ts index f8aa5207c..83b270b69 100644 --- a/examples/esbuild-browser/index.ts +++ b/examples/esbuild-browser/index.ts @@ -8,9 +8,9 @@ import * as arrow from 'apache-arrow'; mainModule: './duckdb.wasm', mainWorker: './duckdb-browser.worker.js', }, - next: { - mainModule: './duckdb-next.wasm', - mainWorker: './duckdb-browser-next.worker.js', + eh: { + mainModule: './duckdb-eh.wasm', + mainWorker: './duckdb-browser-eh.worker.js', }, }); diff --git a/examples/esbuild-node/index.ts b/examples/esbuild-node/index.ts index 3dcdcd4ab..f5fc26db0 100644 --- a/examples/esbuild-node/index.ts +++ b/examples/esbuild-node/index.ts @@ -14,9 +14,9 @@ const DUCKDB_DIST = path.dirname(require.resolve('@duckdb/duckdb-wasm')); mainModule: path.resolve(DUCKDB_DIST, './duckdb.wasm'), mainWorker: path.resolve(DUCKDB_DIST, './duckdb-node.worker.cjs'), }, - next: { - mainModule: path.resolve(DUCKDB_DIST, './duckdb-next.wasm'), - mainWorker: path.resolve(DUCKDB_DIST, './duckdb-node-next.worker.cjs'), + eh: { + mainModule: path.resolve(DUCKDB_DIST, './duckdb-eh.wasm'), + mainWorker: path.resolve(DUCKDB_DIST, './duckdb-node-eh.worker.cjs'), }, }); diff --git a/packages/benchmarks/src/setup.ts b/packages/benchmarks/src/setup.ts index 7a61d24a6..69bd25f85 100644 --- a/packages/benchmarks/src/setup.ts +++ b/packages/benchmarks/src/setup.ts @@ -12,9 +12,9 @@ const DUCKDB_BUNDLES = { mainModule: path.resolve(__dirname, '../../duckdb-wasm/dist/duckdb.wasm'), mainWorker: path.resolve(__dirname, '../../duckdb-wasm/dist/duckdb-node.worker.cjs'), }, - next: { - mainModule: path.resolve(__dirname, '../../duckdb-wasm/dist/duckdb-next.wasm'), - mainWorker: path.resolve(__dirname, '../../duckdb-wasm/dist/duckdb-node-next.worker.cjs'), + eh: { + mainModule: path.resolve(__dirname, '../../duckdb-wasm/dist/duckdb-eh.wasm'), + mainWorker: path.resolve(__dirname, '../../duckdb-wasm/dist/duckdb-node-eh.worker.cjs'), }, }; @@ -40,7 +40,7 @@ export async function setupSqljs(): Promise { return await initSQLJs(); } -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types +// eslint-disable-eh-line @typescript-eslint/explicit-module-boundary-types export async function writeReport(report: any, dst: string): Promise { const reports = path.resolve(__dirname, '../../../reports'); if (!fsSync.existsSync(reports)) { diff --git a/packages/duckdb-wasm-shell/src/app.tsx b/packages/duckdb-wasm-shell/src/app.tsx index 0253783a6..5f6ddd39e 100644 --- a/packages/duckdb-wasm-shell/src/app.tsx +++ b/packages/duckdb-wasm-shell/src/app.tsx @@ -15,23 +15,23 @@ import 'react-popper-tooltip/dist/styles.css'; import * as duckdb from '@duckdb/duckdb-wasm'; import duckdb_wasm from '@duckdb/duckdb-wasm/dist/duckdb.wasm'; -import duckdb_wasm_next from '@duckdb/duckdb-wasm/dist/duckdb-next.wasm'; -import duckdb_wasm_next_coi from '@duckdb/duckdb-wasm/dist/duckdb-next-coi.wasm'; +import duckdb_wasm_next from '@duckdb/duckdb-wasm/dist/duckdb-eh.wasm'; +import duckdb_wasm_next_coi from '@duckdb/duckdb-wasm/dist/duckdb-coi.wasm'; const DUCKDB_BUNDLES: duckdb.DuckDBBundles = { mvp: { mainModule: duckdb_wasm, mainWorker: new URL('@duckdb/duckdb-wasm/dist/duckdb-browser.worker.js', import.meta.url).toString(), }, - next: { + eh: { mainModule: duckdb_wasm_next, - mainWorker: new URL('@duckdb/duckdb-wasm/dist/duckdb-browser-next.worker.js', import.meta.url).toString(), + mainWorker: new URL('@duckdb/duckdb-wasm/dist/duckdb-browser-eh.worker.js', import.meta.url).toString(), }, - nextCOI: { + coi: { mainModule: duckdb_wasm_next_coi, - mainWorker: new URL('@duckdb/duckdb-wasm/dist/duckdb-browser-next-coi.worker.js', import.meta.url).toString(), + mainWorker: new URL('@duckdb/duckdb-wasm/dist/duckdb-browser-coi.worker.js', import.meta.url).toString(), pthreadWorker: new URL( - '@duckdb/duckdb-wasm/dist/duckdb-browser-next-coi.pthread.worker.js', + '@duckdb/duckdb-wasm/dist/duckdb-browser-coi.pthread.worker.js', import.meta.url, ).toString(), }, diff --git a/packages/duckdb-wasm/README.md b/packages/duckdb-wasm/README.md index f2f02afe6..f7b53da42 100644 --- a/packages/duckdb-wasm/README.md +++ b/packages/duckdb-wasm/README.md @@ -21,15 +21,15 @@ import * as duckdb from '@duckdb/duckdb-wasm'; // Either bundle them manually, for example as Webpack assets import duckdb_wasm from '@duckdb/duckdb-wasm/dist/duckdb.wasm'; -import duckdb_wasm_next from '@duckdb/duckdb-wasm/dist/duckdb-next.wasm'; +import duckdb_wasm_next from '@duckdb/duckdb-wasm/dist/duckdb-eh.wasm'; const MANUAL_BUNDLES: duckdb.DuckDBBundles = { mvp: { mainModule: duckdb_wasm, mainWorker: new URL('@duckdb/duckdb-wasm/dist/duckdb-browser.worker.js', import.meta.url).toString(), }, - next: { + eh: { mainModule: duckdb_wasm_next, - mainWorker: new URL('@duckdb/duckdb-wasm/dist/duckdb-browser-next.worker.js', import.meta.url).toString(), + mainWorker: new URL('@duckdb/duckdb-wasm/dist/duckdb-browser-eh.worker.js', import.meta.url).toString(), }, }; // ..., or load the bundles from jsdelivr diff --git a/packages/duckdb-wasm/bundle.mjs b/packages/duckdb-wasm/bundle.mjs index 20bdd53f4..61477f6bd 100644 --- a/packages/duckdb-wasm/bundle.mjs +++ b/packages/duckdb-wasm/bundle.mjs @@ -22,13 +22,13 @@ import { fileURLToPath } from 'url'; // duckdb-browser.mjs - ESM Default Browser Bundle // duckdb-browser-blocking.mjs - ESM Blocking Browser Bundle (synchronous API, unstable) // duckdb-browser.worker.js - IIFE Web Worker for Wasm MVP -// duckdb-browser-next.worker.js - IIFE Web Worker with Wasm EH -// duckdb-browser-next-coi.worker.js - IIFE Web Worker with Wasm EH + COI -// duckdb-browser-next-coi.pthread.worker.js - IIFE PThread Worker with Wasm EH + COI +// duckdb-browser-eh.worker.js - IIFE Web Worker with Wasm EH +// duckdb-browser-coi.worker.js - IIFE Web Worker with Wasm EH + COI +// duckdb-browser-coi.pthread.worker.js - IIFE PThread Worker with Wasm EH + COI // duckdb-node.cjs - CommonJS Default Node Bundle // duckdb-node-blocking.cjs - CommonJS Blocking Node Bundle (synchronous API, unstable) // duckdb-node.worker.cjs - CommonJS Worker for Wasm MVP -// duckdb-node-next.worker.cjs - CommonJS Worker with Wasm EH +// duckdb-node-eh.worker.cjs - CommonJS Worker with Wasm EH // tests-browser.js - IIFE Jasmine Karma tests // tests-node.cjs - CommonJS Jasmine Node tests // @@ -93,12 +93,8 @@ rimraf.sync(`${dist}/*.cjs.map`); const src = path.resolve(__dirname, 'src'); fs.copyFile(path.resolve(src, 'bindings', 'duckdb.wasm'), path.resolve(dist, 'duckdb.wasm'), printErr); -fs.copyFile(path.resolve(src, 'bindings', 'duckdb-next.wasm'), path.resolve(dist, 'duckdb-next.wasm'), printErr); -fs.copyFile( - path.resolve(src, 'bindings', 'duckdb-next-coi.wasm'), - path.resolve(dist, 'duckdb-next-coi.wasm'), - printErr, -); +fs.copyFile(path.resolve(src, 'bindings', 'duckdb-eh.wasm'), path.resolve(dist, 'duckdb-eh.wasm'), printErr); +fs.copyFile(path.resolve(src, 'bindings', 'duckdb-coi.wasm'), path.resolve(dist, 'duckdb-coi.wasm'), printErr); // ------------------------------- // Browser bundles @@ -181,10 +177,10 @@ esbuild.build({ define: { 'process.release.name': '"browser"' }, }); -console.log('[ ESBUILD ] duckdb-browser-next.worker.js'); +console.log('[ ESBUILD ] duckdb-browser-eh.worker.js'); esbuild.build({ - entryPoints: ['./src/targets/duckdb-browser-next.worker.ts'], - outfile: 'dist/duckdb-browser-next.worker.js', + entryPoints: ['./src/targets/duckdb-browser-eh.worker.ts'], + outfile: 'dist/duckdb-browser-eh.worker.js', platform: 'browser', format: 'iife', globalName: 'duckdb', @@ -196,10 +192,10 @@ esbuild.build({ define: { 'process.release.name': '"browser"' }, }); -console.log('[ ESBUILD ] duckdb-browser-next-coi.worker.js'); +console.log('[ ESBUILD ] duckdb-browser-coi.worker.js'); esbuild.build({ - entryPoints: ['./src/targets/duckdb-browser-next-coi.worker.ts'], - outfile: 'dist/duckdb-browser-next-coi.worker.js', + entryPoints: ['./src/targets/duckdb-browser-coi.worker.ts'], + outfile: 'dist/duckdb-browser-coi.worker.js', platform: 'browser', format: 'iife', globalName: 'duckdb', @@ -211,10 +207,10 @@ esbuild.build({ define: { 'process.release.name': '"browser"' }, }); -console.log('[ ESBUILD ] duckdb-browser-next-coi.pthread.worker.js'); +console.log('[ ESBUILD ] duckdb-browser-coi.pthread.worker.js'); esbuild.build({ - entryPoints: ['./src/targets/duckdb-browser-next-coi.pthread.worker.ts'], - outfile: 'dist/duckdb-browser-next-coi.pthread.worker.js', + entryPoints: ['./src/targets/duckdb-browser-coi.pthread.worker.ts'], + outfile: 'dist/duckdb-browser-coi.pthread.worker.js', platform: 'browser', format: 'iife', target: TARGET_BROWSER, @@ -268,10 +264,10 @@ esbuild.build({ external: EXTERNALS_NODE, }); -console.log('[ ESBUILD ] duckdb-node-next.worker.cjs'); +console.log('[ ESBUILD ] duckdb-node-eh.worker.cjs'); esbuild.build({ - entryPoints: ['./src/targets/duckdb-node-next.worker.ts'], - outfile: 'dist/duckdb-node-next.worker.cjs', + entryPoints: ['./src/targets/duckdb-node-eh.worker.ts'], + outfile: 'dist/duckdb-node-eh.worker.cjs', platform: 'node', format: 'cjs', target: TARGET_NODE, @@ -315,8 +311,8 @@ esbuild.build({ // Browser declarations fs.writeFile(path.join(dist, 'duckdb-browser.d.ts'), "export * from './types/src/targets/duckdb';", printErr); -fs.writeFile(path.join(dist, 'duckdb-browser-next.d.ts'), "export * from './types/src/targets/duckdb';", printErr); -fs.writeFile(path.join(dist, 'duckdb-browser-next-coi.d.ts'), "export * from './types/src/targets/duckdb';", printErr); +fs.writeFile(path.join(dist, 'duckdb-browser-eh.d.ts'), "export * from './types/src/targets/duckdb';", printErr); +fs.writeFile(path.join(dist, 'duckdb-browser-coi.d.ts'), "export * from './types/src/targets/duckdb';", printErr); fs.writeFile( path.join(dist, 'duckdb-browser-blocking.d.ts'), "export * from './types/src/targets/duckdb-browser-blocking';", @@ -325,8 +321,8 @@ fs.writeFile( // Node declarations fs.writeFile(path.join(dist, 'duckdb-node.d.ts'), "export * from './types/src/targets/duckdb';", printErr); -fs.writeFile(path.join(dist, 'duckdb-node-next.d.ts'), "export * from './types/src/targets/duckdb';", printErr); -fs.writeFile(path.join(dist, 'duckdb-node-next-coi.d.ts'), "export * from './types/src/targets/duckdb';", printErr); +fs.writeFile(path.join(dist, 'duckdb-node-eh.d.ts'), "export * from './types/src/targets/duckdb';", printErr); +fs.writeFile(path.join(dist, 'duckdb-node-coi.d.ts'), "export * from './types/src/targets/duckdb';", printErr); fs.writeFile( path.join(dist, 'duckdb-node-blocking.d.ts'), "export * from './types/src/targets/duckdb-node-blocking';", diff --git a/packages/duckdb-wasm/package.json b/packages/duckdb-wasm/package.json index 055408164..0224c0417 100644 --- a/packages/duckdb-wasm/package.json +++ b/packages/duckdb-wasm/package.json @@ -96,23 +96,23 @@ }, "exports": { "./dist/duckdb.wasm": "./dist/duckdb.wasm", - "./dist/duckdb-next.wasm": "./dist/duckdb-next.wasm", - "./dist/duckdb-next-coi.wasm": "./dist/duckdb-next-coi.wasm", + "./dist/duckdb-eh.wasm": "./dist/duckdb-eh.wasm", + "./dist/duckdb-coi.wasm": "./dist/duckdb-coi.wasm", "./dist/duckdb-browser": "./dist/duckdb-browser.mjs", "./dist/duckdb-browser.cjs": "./dist/duckdb-browser.cjs", "./dist/duckdb-browser.mjs": "./dist/duckdb-browser.mjs", "./dist/duckdb-browser-blocking": "./dist/duckdb-browser-blocking.mjs", "./dist/duckdb-browser-blocking.mjs": "./dist/duckdb-browser-blocking.mjs", "./dist/duckdb-browser-blocking.cjs": "./dist/duckdb-browser-blocking.cjs", - "./dist/duckdb-browser-next-coi.pthread.worker.js": "./dist/duckdb-browser-next-coi.pthread.worker.js", - "./dist/duckdb-browser-next-coi.worker.js": "./dist/duckdb-browser-next-coi.worker.js", - "./dist/duckdb-browser-next.worker.js": "./dist/duckdb-browser-next.worker.js", + "./dist/duckdb-browser-coi.pthread.worker.js": "./dist/duckdb-browser-coi.pthread.worker.js", + "./dist/duckdb-browser-coi.worker.js": "./dist/duckdb-browser-coi.worker.js", + "./dist/duckdb-browser-eh.worker.js": "./dist/duckdb-browser-eh.worker.js", "./dist/duckdb-browser.worker.js": "./dist/duckdb-browser.worker.js", "./dist/duckdb-node": "./dist/duckdb-node.cjs", "./dist/duckdb-node.cjs": "./dist/duckdb-node.cjs", "./dist/duckdb-node-blocking": "./dist/duckdb-node-blocking.cjs", "./dist/duckdb-node-blocking.cjs": "./dist/duckdb-node-blocking.cjs", - "./dist/duckdb-node-next.worker.cjs": "./dist/duckdb-node-next.worker.cjs", + "./dist/duckdb-node-eh.worker.cjs": "./dist/duckdb-node-eh.worker.cjs", "./dist/duckdb-node.worker.cjs": "./dist/duckdb-node.worker.cjs", "./blocking": { "browser": { diff --git a/packages/duckdb-wasm/src/bindings/bindings_browser_next.ts b/packages/duckdb-wasm/src/bindings/bindings_browser_coi.ts similarity index 95% rename from packages/duckdb-wasm/src/bindings/bindings_browser_next.ts rename to packages/duckdb-wasm/src/bindings/bindings_browser_coi.ts index 6c380450b..1db4e5a0c 100644 --- a/packages/duckdb-wasm/src/bindings/bindings_browser_next.ts +++ b/packages/duckdb-wasm/src/bindings/bindings_browser_coi.ts @@ -1,4 +1,4 @@ -import DuckDBWasm from './duckdb-next.js'; +import DuckDBWasm from './duckdb-coi.js'; import { DuckDBBrowserBindings } from './bindings_browser_base'; import { DuckDBModule } from './duckdb_module'; import { DuckDBRuntime } from './runtime'; diff --git a/packages/duckdb-wasm/src/bindings/bindings_browser_next_coi.ts b/packages/duckdb-wasm/src/bindings/bindings_browser_eh.ts similarity index 94% rename from packages/duckdb-wasm/src/bindings/bindings_browser_next_coi.ts rename to packages/duckdb-wasm/src/bindings/bindings_browser_eh.ts index a820a0a81..d5893611e 100644 --- a/packages/duckdb-wasm/src/bindings/bindings_browser_next_coi.ts +++ b/packages/duckdb-wasm/src/bindings/bindings_browser_eh.ts @@ -1,4 +1,4 @@ -import DuckDBWasm from './duckdb-next-coi.js'; +import DuckDBWasm from './duckdb-eh.js'; import { DuckDBBrowserBindings } from './bindings_browser_base'; import { DuckDBModule } from './duckdb_module'; import { DuckDBRuntime } from './runtime'; diff --git a/packages/duckdb-wasm/src/bindings/bindings_node_next.ts b/packages/duckdb-wasm/src/bindings/bindings_node_eh.ts similarity index 95% rename from packages/duckdb-wasm/src/bindings/bindings_node_next.ts rename to packages/duckdb-wasm/src/bindings/bindings_node_eh.ts index 12f90883b..6c35092ef 100644 --- a/packages/duckdb-wasm/src/bindings/bindings_node_next.ts +++ b/packages/duckdb-wasm/src/bindings/bindings_node_eh.ts @@ -1,4 +1,4 @@ -import DuckDBWasm from './duckdb-next.js'; +import DuckDBWasm from './duckdb-eh.js'; import { DuckDBModule } from './duckdb_module'; import { DuckDBNodeBindings } from './bindings_node_base.js'; import { DuckDBRuntime } from './runtime'; diff --git a/packages/duckdb-wasm/src/bindings/duckdb-next-coi.d.ts b/packages/duckdb-wasm/src/bindings/duckdb-coi.d.ts similarity index 100% rename from packages/duckdb-wasm/src/bindings/duckdb-next-coi.d.ts rename to packages/duckdb-wasm/src/bindings/duckdb-coi.d.ts diff --git a/packages/duckdb-wasm/src/bindings/duckdb-next-coi.pthread.d.ts b/packages/duckdb-wasm/src/bindings/duckdb-coi.pthread.d.ts similarity index 100% rename from packages/duckdb-wasm/src/bindings/duckdb-next-coi.pthread.d.ts rename to packages/duckdb-wasm/src/bindings/duckdb-coi.pthread.d.ts diff --git a/packages/duckdb-wasm/src/bindings/duckdb-next.d.ts b/packages/duckdb-wasm/src/bindings/duckdb-eh.d.ts similarity index 100% rename from packages/duckdb-wasm/src/bindings/duckdb-next.d.ts rename to packages/duckdb-wasm/src/bindings/duckdb-eh.d.ts diff --git a/packages/duckdb-wasm/src/platform.ts b/packages/duckdb-wasm/src/platform.ts index d7920b80a..4041ae421 100644 --- a/packages/duckdb-wasm/src/platform.ts +++ b/packages/duckdb-wasm/src/platform.ts @@ -6,11 +6,11 @@ export interface DuckDBBundles { mainModule: string; mainWorker: string; }; - next?: { + eh?: { mainModule: string; mainWorker: string; }; - nextCOI?: { + coi?: { mainModule: string; mainWorker: string; pthreadWorker: string; @@ -24,11 +24,11 @@ export function getJsDelivrBundles(): DuckDBBundles { mainModule: `${jsdelivr_dist_url}duckdb.wasm`, mainWorker: `${jsdelivr_dist_url}duckdb-browser.worker.js`, }, - next: { - mainModule: `${jsdelivr_dist_url}duckdb-next.wasm`, - mainWorker: `${jsdelivr_dist_url}duckdb-browser-next.worker.js`, + eh: { + mainModule: `${jsdelivr_dist_url}duckdb-eh.wasm`, + mainWorker: `${jsdelivr_dist_url}duckdb-browser-eh.worker.js`, }, - // Next COI is still experimental, let the user opt in explicitly + // COI is still experimental, let the user opt in explicitly }; } @@ -53,7 +53,7 @@ let wasmThreads: boolean | null = null; let wasmSIMD: boolean | null = null; let wasmBulkMemory: boolean | null = null; -// eslint-disable-next-line @typescript-eslint/no-namespace +// eslint-disable-eh-line @typescript-eslint/no-namespace declare namespace globalThis { let crossOriginIsolated: boolean; } @@ -90,18 +90,18 @@ export async function getPlatformFeatures(): Promise { export async function selectBundle(bundles: DuckDBBundles): Promise { const platform = await getPlatformFeatures(); - if (platform.wasmExceptions && platform.wasmSIMD) { - if (platform.wasmThreads && platform.crossOriginIsolated && bundles.nextCOI) { + if (platform.wasmExceptions) { + if (platform.wasmSIMD && platform.wasmThreads && platform.crossOriginIsolated && bundles.coi) { return { - mainModule: bundles.nextCOI.mainModule, - mainWorker: bundles.nextCOI.mainWorker, - pthreadWorker: bundles.nextCOI.pthreadWorker, + mainModule: bundles.coi.mainModule, + mainWorker: bundles.coi.mainWorker, + pthreadWorker: bundles.coi.pthreadWorker, }; } - if (bundles.next) { + if (bundles.eh) { return { - mainModule: bundles.next.mainModule, - mainWorker: bundles.next.mainWorker, + mainModule: bundles.eh.mainModule, + mainWorker: bundles.eh.mainWorker, pthreadWorker: null, }; } diff --git a/packages/duckdb-wasm/src/targets/duckdb-browser-blocking.ts b/packages/duckdb-wasm/src/targets/duckdb-browser-blocking.ts index 0ee87cf34..a9270d2ae 100644 --- a/packages/duckdb-wasm/src/targets/duckdb-browser-blocking.ts +++ b/packages/duckdb-wasm/src/targets/duckdb-browser-blocking.ts @@ -9,7 +9,7 @@ import { Logger } from '../log'; import { DuckDBRuntime, DuckDBBindings } from '../bindings'; import { DuckDBBundles, getPlatformFeatures } from '../platform'; import { DuckDB as DuckDBMVP } from '../bindings/bindings_browser'; -import { DuckDB as DuckDBNext } from '../bindings/bindings_browser_next'; +import { DuckDB as DuckDBNext } from '../bindings/bindings_browser_eh'; export async function createDuckDB( bundles: DuckDBBundles, @@ -17,9 +17,9 @@ export async function createDuckDB( runtime: DuckDBRuntime, ): Promise { const platform = await getPlatformFeatures(); - if (platform.wasmExceptions && platform.wasmSIMD) { - if (bundles.next) { - return new DuckDBNext(logger, runtime, bundles.next!.mainModule); + if (platform.wasmExceptions) { + if (bundles.eh) { + return new DuckDBNext(logger, runtime, bundles.eh!.mainModule); } } return new DuckDBMVP(logger, runtime, bundles.mvp.mainModule); diff --git a/packages/duckdb-wasm/src/targets/duckdb-browser-next-coi.pthread.worker.ts b/packages/duckdb-wasm/src/targets/duckdb-browser-coi.pthread.worker.ts similarity index 92% rename from packages/duckdb-wasm/src/targets/duckdb-browser-next-coi.pthread.worker.ts rename to packages/duckdb-wasm/src/targets/duckdb-browser-coi.pthread.worker.ts index d27264367..3fb2260be 100644 --- a/packages/duckdb-wasm/src/targets/duckdb-browser-next-coi.pthread.worker.ts +++ b/packages/duckdb-wasm/src/targets/duckdb-browser-coi.pthread.worker.ts @@ -1,5 +1,5 @@ -import * as pthread_api from '../bindings/duckdb-next-coi.pthread'; -import DuckDB from '../bindings/duckdb-next-coi'; +import * as pthread_api from '../bindings/duckdb-coi.pthread'; +import DuckDB from '../bindings/duckdb-coi'; import { BROWSER_RUNTIME } from '../bindings/runtime_browser'; // Register the global DuckDB runtime diff --git a/packages/duckdb-wasm/src/targets/duckdb-browser-next.worker.ts b/packages/duckdb-wasm/src/targets/duckdb-browser-coi.worker.ts similarity index 94% rename from packages/duckdb-wasm/src/targets/duckdb-browser-next.worker.ts rename to packages/duckdb-wasm/src/targets/duckdb-browser-coi.worker.ts index 0a51b45cf..bc520f23c 100644 --- a/packages/duckdb-wasm/src/targets/duckdb-browser-next.worker.ts +++ b/packages/duckdb-wasm/src/targets/duckdb-browser-coi.worker.ts @@ -1,5 +1,5 @@ import { AsyncDuckDBDispatcher, WorkerResponseVariant, WorkerRequestVariant } from '../parallel'; -import { DuckDB } from '../bindings/bindings_browser_next'; +import { DuckDB } from '../bindings/bindings_browser_coi'; import { DuckDBBindings } from '../bindings'; import { BROWSER_RUNTIME } from '../bindings/runtime_browser'; diff --git a/packages/duckdb-wasm/src/targets/duckdb-browser-next-coi.worker.ts b/packages/duckdb-wasm/src/targets/duckdb-browser-eh.worker.ts similarity index 94% rename from packages/duckdb-wasm/src/targets/duckdb-browser-next-coi.worker.ts rename to packages/duckdb-wasm/src/targets/duckdb-browser-eh.worker.ts index 2f9763724..e387d2282 100644 --- a/packages/duckdb-wasm/src/targets/duckdb-browser-next-coi.worker.ts +++ b/packages/duckdb-wasm/src/targets/duckdb-browser-eh.worker.ts @@ -1,5 +1,5 @@ import { AsyncDuckDBDispatcher, WorkerResponseVariant, WorkerRequestVariant } from '../parallel'; -import { DuckDB } from '../bindings/bindings_browser_next_coi'; +import { DuckDB } from '../bindings/bindings_browser_eh'; import { DuckDBBindings } from '../bindings'; import { BROWSER_RUNTIME } from '../bindings/runtime_browser'; diff --git a/packages/duckdb-wasm/src/targets/duckdb-node-blocking.ts b/packages/duckdb-wasm/src/targets/duckdb-node-blocking.ts index d61ac9a96..fa566a060 100644 --- a/packages/duckdb-wasm/src/targets/duckdb-node-blocking.ts +++ b/packages/duckdb-wasm/src/targets/duckdb-node-blocking.ts @@ -1,7 +1,7 @@ export * from '../log'; export * from '../status'; export * from '../bindings'; -export * from '../bindings/bindings_node_next'; +export * from '../bindings/bindings_node_eh'; export { DEFAULT_RUNTIME } from '../bindings/runtime'; export { NODE_RUNTIME } from '../bindings/runtime_node'; @@ -10,7 +10,7 @@ import { DuckDBRuntime } from '../bindings'; import { DuckDBNodeBindings } from '../bindings/bindings_node_base'; import { DuckDBBundles, getPlatformFeatures } from '../platform'; import { DuckDB as DuckDBMVP } from '../bindings/bindings_node'; -import { DuckDB as DuckDBNext } from '../bindings/bindings_node_next'; +import { DuckDB as DuckDBNext } from '../bindings/bindings_node_eh'; export async function createDuckDB( bundles: DuckDBBundles, @@ -18,9 +18,9 @@ export async function createDuckDB( runtime: DuckDBRuntime, ): Promise { const platform = await getPlatformFeatures(); - if (platform.wasmExceptions && platform.wasmSIMD) { - if (bundles.next) { - return new DuckDBNext(logger, runtime, bundles.next!.mainModule); + if (platform.wasmExceptions) { + if (bundles.eh) { + return new DuckDBNext(logger, runtime, bundles.eh!.mainModule); } } return new DuckDBMVP(logger, runtime, bundles.mvp.mainModule); diff --git a/packages/duckdb-wasm/src/targets/duckdb-node-next.worker.ts b/packages/duckdb-wasm/src/targets/duckdb-node-eh.worker.ts similarity index 94% rename from packages/duckdb-wasm/src/targets/duckdb-node-next.worker.ts rename to packages/duckdb-wasm/src/targets/duckdb-node-eh.worker.ts index 523d8c774..940a4d6ba 100644 --- a/packages/duckdb-wasm/src/targets/duckdb-node-next.worker.ts +++ b/packages/duckdb-wasm/src/targets/duckdb-node-eh.worker.ts @@ -1,6 +1,6 @@ import { AsyncDuckDBDispatcher, WorkerResponseVariant, WorkerRequestVariant } from '../parallel/'; import { DuckDBBindings } from '../bindings'; -import { DuckDB } from '../bindings/bindings_node_next'; +import { DuckDB } from '../bindings/bindings_node_eh'; import { NODE_RUNTIME } from '../bindings/runtime_node'; /** The duckdb worker API for node.js workers */ diff --git a/packages/duckdb-wasm/test/index_browser.ts b/packages/duckdb-wasm/test/index_browser.ts index 3f229b82c..f6b05826f 100644 --- a/packages/duckdb-wasm/test/index_browser.ts +++ b/packages/duckdb-wasm/test/index_browser.ts @@ -8,14 +8,14 @@ const DUCKDB_BUNDLES: duckdb.DuckDBBundles = { mainModule: new URL('/static/duckdb.wasm', window.location.href).href, mainWorker: new URL('/static/duckdb-browser.worker.js', window.location.href).href, }, - next: { - mainModule: new URL('/static/duckdb-next.wasm', window.location.href).href, - mainWorker: new URL('/static/duckdb-browser-next.worker.js', window.location.href).href, + eh: { + mainModule: new URL('/static/duckdb-eh.wasm', window.location.href).href, + mainWorker: new URL('/static/duckdb-browser-eh.worker.js', window.location.href).href, }, - nextCOI: { - mainModule: new URL('/static/duckdb-next-coi.wasm', window.location.href).href, - mainWorker: new URL('/static/duckdb-browser-next-coi.worker.js', window.location.href).href, - pthreadWorker: new URL('/static/duckdb-browser-next-coi.pthread.worker.js', window.location.href).href, + coi: { + mainModule: new URL('/static/duckdb-coi.wasm', window.location.href).href, + mainWorker: new URL('/static/duckdb-browser-coi.worker.js', window.location.href).href, + pthreadWorker: new URL('/static/duckdb-browser-coi.pthread.worker.js', window.location.href).href, }, }; let DUCKDB_BUNDLE: duckdb.DuckDBBundle | null = null; @@ -27,13 +27,13 @@ describe('wasm check', () => { (await check.exceptions()) && (await check.threads()) ) { - expect(DUCKDB_BUNDLE!.mainModule).toEqual(DUCKDB_BUNDLES.nextCOI!.mainModule); - expect(DUCKDB_BUNDLE!.mainWorker).toEqual(DUCKDB_BUNDLES.nextCOI!.mainWorker); - expect(DUCKDB_BUNDLE!.pthreadWorker).toEqual(DUCKDB_BUNDLES.nextCOI!.pthreadWorker); + expect(DUCKDB_BUNDLE!.mainModule).toEqual(DUCKDB_BUNDLES.coi!.mainModule); + expect(DUCKDB_BUNDLE!.mainWorker).toEqual(DUCKDB_BUNDLES.coi!.mainWorker); + expect(DUCKDB_BUNDLE!.pthreadWorker).toEqual(DUCKDB_BUNDLES.coi!.pthreadWorker); } if ((await check.exceptions()) && !(await check.threads())) { - expect(DUCKDB_BUNDLE!.mainModule).toEqual(DUCKDB_BUNDLES.next!.mainModule); - expect(DUCKDB_BUNDLE!.mainWorker).toEqual(DUCKDB_BUNDLES.next!.mainWorker); + expect(DUCKDB_BUNDLE!.mainModule).toEqual(DUCKDB_BUNDLES.eh!.mainModule); + expect(DUCKDB_BUNDLE!.mainWorker).toEqual(DUCKDB_BUNDLES.eh!.mainWorker); expect(DUCKDB_BUNDLE!.pthreadWorker).toEqual(null); } if (!(await check.exceptions())) { diff --git a/packages/duckdb-wasm/test/index_node.ts b/packages/duckdb-wasm/test/index_node.ts index 2af9501c0..d1ed8d300 100644 --- a/packages/duckdb-wasm/test/index_node.ts +++ b/packages/duckdb-wasm/test/index_node.ts @@ -45,9 +45,9 @@ beforeAll(async () => { mainModule: path.resolve(__dirname, './duckdb.wasm'), mainWorker: path.resolve(__dirname, './duckdb-node.worker.cjs'), }, - next: { - mainModule: path.resolve(__dirname, './duckdb-next.wasm'), - mainWorker: path.resolve(__dirname, './duckdb-node-next.worker.cjs'), + eh: { + mainModule: path.resolve(__dirname, './duckdb-eh.wasm'), + mainWorker: path.resolve(__dirname, './duckdb-node-eh.worker.cjs'), }, }; const DUCKDB_CONFIG = await duckdb.selectBundle(DUCKDB_BUNDLES); diff --git a/scripts/wasm_build_lib.sh b/scripts/wasm_build_lib.sh index 35be62c3e..50fc69202 100755 --- a/scripts/wasm_build_lib.sh +++ b/scripts/wasm_build_lib.sh @@ -26,13 +26,13 @@ case $MODE in esac case $FEATURES in "default") ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS}" ;; - "next") + "eh") ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS} -DWITH_WASM_EXCEPTIONS=1" - SUFFIX="-next" + SUFFIX="-eh" ;; - "next_coi") + "coi") ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS} -DWITH_WASM_EXCEPTIONS=1 -DWITH_WASM_THREADS=1 -DWITH_WASM_SIMD=1 -DWITH_WASM_BULK_MEMORY=1" - SUFFIX="-next-coi" + SUFFIX="-coi" ;; *) ;; esac @@ -70,7 +70,7 @@ if [ -f ${BUILD_DIR}/duckdb_wasm.worker.js ]; then # Expose the module. # This will allow us to reuse the generated pthread handler and only overwrite the loading. - # More info: duckdb-browser-async-next-coi.pthread.worker.ts + # More info: duckdb-browser-async-coi.pthread.worker.ts printf "\nexport const onmessage = self.onmessage;\nexport function getModule() { return Module; }\nexport function setModule(m) { Module = m; }\n" \ >> ${DUCKDB_LIB_DIR}/duckdb${SUFFIX}.pthread.js fi