edgebundle

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package edgebundle assembles a deployable Cloudflare Worker bundle from a projected EdgeIR. The bundle is a single self-contained ES module: the generic JS runtime (the IR interpreter + cache tiers + geo + origin + entry, embedded via go:embed) with this site's IR baked in as a global.

There is NO JavaScript toolchain in the build path (design §2.3: no Node, no wrangler, no esbuild). The "bundler" is a deliberately tiny source transform: the runtime is written as small ES modules that import from each other; here we strip those intra-runtime `import`/`export` lines and concatenate the files in dependency order into one module scope, preserving only the entry's `export default { fetch }`. The IR is injected as `globalThis.__CADISH_IR__` with a version guard, so the worker refuses an IR it does not understand.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bundle

func Bundle(ir edgeir.EdgeIR) (string, error)

Bundle returns the worker source for one site's IR: the IR (baked as a global with a version guard) followed by the de-modularized runtime. The result is a single ES module whose only export is the entry's `export default { fetch }`.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL