-
-
Notifications
You must be signed in to change notification settings - Fork 0
codegen: add a native Bun/exportable ESM target and host profile #734
Copy link
Copy link
Open
Labels
architectureStructural/system-level shape and runtime behaviourStructural/system-level shape and runtime behaviourenhancementNew capability or improvement to existing behaviourNew capability or improvement to existing behaviourmigrationPorting between languages or toolchains (e.g. -> AffineScript)Porting between languages or toolchains (e.g. -> AffineScript)
Description
Metadata
Metadata
Assignees
Labels
architectureStructural/system-level shape and runtime behaviourStructural/system-level shape and runtime behaviourenhancementNew capability or improvement to existing behaviourNew capability or improvement to existing behaviourmigrationPorting between languages or toolchains (e.g. -> AffineScript)Porting between languages or toolchains (e.g. -> AffineScript)
Problem
The estate runtime is Bun, but AffineScript's only direct exportable ESM backend
is named and implemented as
--deno-esm. The generic.jsbackend does notexport public functions, while
--deno-esmemits exportable functions plus alarge Deno host shim.
Empty-linter can currently build a pure detector by generating an ignored ESM
intermediate with
--deno-esmand immediately runningbun build --target bun.Tree-shaking removes the unused Deno host shim, and the shipped
.bun.jsartefact contains no Deno references. This is a migration bridge, not a native
Bun backend.
Required capability
--bun-esmor a runtime-neutral--esmplus explicit host profile).backend.
stdin/stdout, error, URL, and WASM host lowerings where used.
Deno.*in Bun output.compile time rather than silently degrading.
--deno-esmand whether a runtime-neutral ESMcore can be separated from host bindings.
Acceptance probes
status; execute positive and failing paths under Bun.
rg -i 'deno'finds nothing in emitted Bun artefacts.unsupported binding.
Related estate migration: remove Deno workflows, lockfiles, runtime claims, and
examples rather than merely renaming generated files.