Commit 3ba1900
committed
feat(cpp.js): export.bundle flag to skip wasm bundle emit
New `export.bundle` boolean (default `true`) lets a package opt out of
the final emcc link step. When `false`, the WASM target still produces
its `.a` archives (consumed by other packages or by native iOS/Android
builds via xcframework / .so) but the `.wasm` + `.js` glue and the
Bridge-stage compile are skipped entirely.
Useful for:
- mobile-only apps that consume cpp.js via iOS/Android pipelines
- library packages whose WASM output exists only to be linked into a
downstream app's bundle
Guarded in three layers:
- `createWasmJs` (bin.js): short-circuits the whole WASM pipeline
before bridge discovery / Bridge compile / emcc / copy
- `buildWasm` (action): defence-in-depth for callers that bypass the
CLI (rollup/vite plugins)
- `loadConfig`: default `true`, `??` not `||` so explicit `false`
survives
Has no effect on iOS/Android pipelines, which never produce a bundle.
Bumps cpp.js to beta.18.1 parent 953c34e commit 3ba1900
4 files changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
16 | 23 | | |
17 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
328 | 331 | | |
329 | 332 | | |
330 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
0 commit comments