Move wasm package under packages

This commit is contained in:
2026-07-09 04:13:08 +09:00
parent e4b9247c45
commit 16006d000a
16 changed files with 115 additions and 90 deletions
+5 -2
View File
@@ -30,10 +30,13 @@ Important paths:
```text
crates/decodal-wasm/
site/decodal-site/src/wasm/
packages/decodal-wasm/
```
The generated files in `site/decodal-site/src/wasm/` are committed so the site can build without requiring every consumer to run `wasm-pack` first.
The npm package is `decodal-wasm`.
The JSR package is `@hare/decodal-wasm`.
The generated files in `packages/decodal-wasm/` are committed so the site can build without requiring every consumer to run `wasm-pack` first.
The WebAssembly package is for execution, not syntax highlighting.
## Web editor components
+5 -3
View File
@@ -25,7 +25,7 @@ cargo run -q -p decodal-cli --features regex -- examples/regex/main.dcdl
The primary crates.io package is `decodal`, which contains the embeddable library.
`decodal-derive` provides optional derive macros for Rust struct integration and is published only when the derive crate changes.
Workspace support crates such as `decodal-cli` and the Rust source crate `decodal-wasm` are not published to crates.io.
The generated WebAssembly package under `site/decodal-site/src/wasm/` is published to npm and JSR.
The generated WebAssembly package under `packages/decodal-wasm/` is published to npm and JSR.
The project is dual licensed as `MIT OR Apache-2.0`.
```sh
@@ -72,6 +72,8 @@ site/decodal-site/src/lib/docs.js
site/decodal-site/src/lib/highlight.js
packages/decodal-codemirror/src/decodal.js
packages/decodal-codemirror/src/decodal-parser.js
packages/decodal-wasm/decodal_wasm.js
packages/decodal-wasm/decodal_wasm_bg.wasm
crates/decodal-wasm/src/lib.rs
```
@@ -87,7 +89,7 @@ npm run build
`npm run build:wasm` writes generated files into:
```text
site/decodal-site/src/wasm/
packages/decodal-wasm/
```
These generated files are committed so the site can be built without requiring every consumer to regenerate the wasm package first.
@@ -95,7 +97,7 @@ These generated files are committed so the site can be built without requiring e
Publish the generated WebAssembly package from its package directory:
```sh
cd site/decodal-site/src/wasm
cd packages/decodal-wasm
npm publish
npx jsr publish
```