-
Notifications
You must be signed in to change notification settings - Fork 414
Add MariaDB WASM support to the Playground CLI #3474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
adamziel
wants to merge
12
commits into
trunk
Choose a base branch
from
adamziel/mariadb-wasm-cli
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4efd2ab
Add MariaDB WASM support to the Playground CLI
adamziel 0025802
Add unit tests for the MariaDB WASM bridge and protocol server
adamziel 364e590
Wire up MariaDB WASM initialization for the embedded server
adamziel 2403132
Disable Aria temp tables in MariaDB WASM init args
adamziel b47044e
Fix unsigned integer handling in MariaDB WASM bridge and protocol server
adamziel 0fe042f
Set thread_stack and suppress privilege table warnings
adamziel c502c61
Bootstrap mysql system tables and set thread_stack
adamziel 20dbe00
Use WASM_BIGINT=1 with explicit BigInt-to-Number conversion
adamziel be0ab9e
Store MariaDB data files on the host filesystem via NODEFS
adamziel 60b064c
Add @php-wasm/mariadb-wasm-compile package with pre-built WASM module
adamziel 86aac84
Fix lint errors, update lockfile, address review feedback
adamziel 0298dde
Add package-for-self-hosting target to playground-mariadb
adamziel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "extends": ["../../../.eslintrc.json"], | ||
| "ignorePatterns": ["!**/*"], | ||
| "overrides": [ | ||
| { | ||
| "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
| "rules": {} | ||
| }, | ||
| { | ||
| "files": ["*.ts", "*.tsx"], | ||
| "rules": {} | ||
| }, | ||
| { | ||
| "files": ["*.js", "*.jsx"], | ||
| "rules": {} | ||
| }, | ||
| { | ||
| "files": ["*.json"], | ||
| "parser": "jsonc-eslint-parser", | ||
| "rules": { | ||
| "@nx/dependency-checks": [ | ||
| "error", | ||
| { | ||
| "ignoredFiles": [ | ||
| "{projectRoot}/vite.config.{js,ts,mjs,mts}" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "name": "@wp-playground/mariadb", | ||
| "version": "3.1.18", | ||
| "description": "MariaDB WASM integration for WordPress Playground", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/WordPress/wordpress-playground" | ||
| }, | ||
| "homepage": "https://developer.wordpress.org/playground", | ||
| "author": "The WordPress contributors", | ||
| "license": "GPL-2.0-or-later", | ||
| "type": "module", | ||
| "main": "./index.cjs", | ||
| "module": "./index.js", | ||
| "types": "index.d.ts", | ||
| "engines": { | ||
| "node": ">=20.10.0", | ||
| "npm": ">=10.2.3" | ||
| }, | ||
| "exports": { | ||
| ".": { | ||
| "import": "./index.js", | ||
| "require": "./index.cjs" | ||
| }, | ||
| "./package.json": "./package.json" | ||
| }, | ||
| "publishConfig": { | ||
| "access": "public", | ||
| "directory": "../../../dist/packages/playground/mariadb" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| { | ||
| "name": "playground-mariadb", | ||
| "$schema": "../../../node_modules/nx/schemas/project-schema.json", | ||
| "sourceRoot": "packages/playground/mariadb/src", | ||
| "projectType": "library", | ||
| "tags": [], | ||
| "targets": { | ||
| "build": { | ||
| "executor": "nx:noop", | ||
| "dependsOn": ["build:package-json"] | ||
| }, | ||
| "build:package-json": { | ||
| "executor": "@wp-playground/nx-extensions:package-json", | ||
| "options": { | ||
| "tsConfig": "packages/playground/mariadb/tsconfig.lib.json", | ||
| "outputPath": "dist/packages/playground/mariadb", | ||
| "buildTarget": "playground-mariadb:build:bundle:production" | ||
| } | ||
| }, | ||
| "build:bundle": { | ||
| "executor": "@nx/vite:build", | ||
| "outputs": ["{options.outputPath}"], | ||
| "defaultConfiguration": "production", | ||
| "options": { | ||
| "outputPath": "dist/packages/playground/mariadb" | ||
| }, | ||
| "configurations": { | ||
| "development": { | ||
| "mode": "development" | ||
| }, | ||
| "production": { | ||
| "mode": "production" | ||
| } | ||
| }, | ||
| "dependsOn": ["^build"] | ||
| }, | ||
| "test": { | ||
| "executor": "nx:noop", | ||
| "dependsOn": ["test:vite"] | ||
| }, | ||
| "test:vite": { | ||
| "executor": "@nx/vitest:test", | ||
| "outputs": ["{workspaceRoot}/coverage/packages/playground/mariadb"], | ||
| "options": { | ||
| "passWithNoTests": true, | ||
| "reportsDirectory": "../../../coverage/packages/playground/mariadb" | ||
| } | ||
| }, | ||
| "lint": { | ||
| "executor": "@nx/eslint:lint", | ||
| "outputs": ["{options.outputFile}"], | ||
| "options": { | ||
| "useFlatConfig": false, | ||
| "lintFilePatterns": ["packages/playground/mariadb/**/*.ts"], | ||
| "maxWarnings": 0 | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| export { | ||
| MariaDBBridge, | ||
| MariaDBQueryError, | ||
| loadMariaDBModule, | ||
| } from './lib/mariadb-wasm-bridge'; | ||
| export type { | ||
| MariaDBEmscriptenModule, | ||
| ColumnInfo, | ||
| QueryResult, | ||
| } from './lib/mariadb-wasm-bridge'; | ||
| export { | ||
| startMySQLProtocolServer, | ||
| } from './lib/mysql-protocol-server'; | ||
| export type { | ||
| MariaDBServer, | ||
| MariaDBServerOptions, | ||
| } from './lib/mysql-protocol-server'; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.