Repository navigation
Conversation
How to build one executable file from a TermDOM program with Bun's compiler and with Node's single executable applications: the commands, embedding files the page shows, keeping the image worker in a Bun build, signing on macOS, and what a Node executable goes without. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GVbRv5n8btiCtaRBtLrLig
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GVbRv5n8btiCtaRBtLrLig
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds
docs/guides/08-binaries.md, one guide covering both runtimes, and links it from Getting Started.What it covers
bun build --compile,--minify, cross-compiling with--target, embedding a file withtype: "file"and showing it through afile:URL, and keeping the image decode worker.node --build-sea(Node 25.5 and later), the--experimental-sea-configandpostjectsteps for earlier versions, signing on macOS, embedding assets and serving them to the page through a"fetch"listener.What was checked
Every command and code block was built and run as written against the published 0.2.7, on macOS arm64 with Bun 1.4.4 and Node 26.13:
postjectflow for older Node, run on Node 26errorin a Node executableNot run: the cross-compiled Linux binary (it was built, and
filereports an x86-64 ELF), anything on Linux or Windows, and theexecutablefield for building a Node executable for another platform, which is described from Node's documentation.One thing to look at
A compiled Bun program loses the image worker, because TermDOM looks for
image-decode.worker.jsbeside itself and the compiler does not embed it. The guide's fix is a one-line file of that name beside the entry that imports the package's worker by its path innode_modules. It works, but it makes a file name inside the package something users depend on. A public export for the worker would be the cleaner contract; the guide documents what works today.🤖 Generated with Claude Code
https://claude.ai/code/session_01GVbRv5n8btiCtaRBtLrLig