Skip to content

Inline WASM binary into generated TypeScript module#9

Merged
cowboyd merged 1 commit into
mainfrom
inline-wasm
Apr 10, 2026
Merged

Inline WASM binary into generated TypeScript module#9
cowboyd merged 1 commit into
mainfrom
inline-wasm

Conversation

@cowboyd

@cowboyd cowboyd commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace runtime filesystem read of clayterm.wasm with a build step that base64-encodes the binary into wasm.ts
  • Eliminates node:fs/promises dependency and --allow-read permission requirement
  • Fixes imports from non-file:// URLs (esm.sh, deno compile binaries)

Test plan

  • make builds WASM and generates wasm.ts
  • All 136 tests pass without --allow-read for the WASM file
  • wasm.ts is gitignored as a build artifact

@pkg-pr-new

pkg-pr-new Bot commented Apr 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/clayterm@9

commit: f9338e0

@cowboyd cowboyd force-pushed the inline-wasm branch 3 times, most recently from 3d2d339 to 24febec Compare April 10, 2026 20:59
Replace runtime filesystem read of clayterm.wasm with a build step
that base64-encodes the binary into wasm.ts. This removes the
node:fs/promises dependency and --allow-read requirement for the
WASM file.
@cowboyd cowboyd merged commit 4971170 into main Apr 10, 2026
5 checks passed
@cowboyd cowboyd deleted the inline-wasm branch April 10, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant