Documentation
¶
Index ¶
- Constants
- Variables
- func BuildDistSourcesFSCursor() *unixfs_iofs.FSCursor
- func BuildDistSourcesFSHandle(ctx context.Context, le *logrus.Entry) *unixfs.FSHandle
- func PrepareTypeScriptProject(ctx context.Context, le *logrus.Entry, sourceRoot, distRoot string, ...) error
- func SyncDistSources(ctx context.Context, le *logrus.Entry, conf DistSourceSyncConfig) error
- type DistSourceSyncConfig
Constants ¶
const DistGoMod = "github.com/s4wave/spacewave/bldr-dist"
DistGoMod is the Go module path used for the checked-out Bldr dist sources.
Variables ¶
var DistSources embed.FS
DistSources contains the sources for the web entrypoint(s) and sdk(s). Includes entrypoints, runtime workers, shared package import bindings, and SDK modules. These files must be checked out to .bldr/src so TypeScript + IDEs can see them.
TODO: go.mod go.sum bun.lock tsconfig.json ?
Functions ¶
func BuildDistSourcesFSCursor ¶
func BuildDistSourcesFSCursor() *unixfs_iofs.FSCursor
BuildDistSourcesFSCursor builds a *fs.Cursor for the DistSources.
func BuildDistSourcesFSHandle ¶
BuildDistSourcesFSHandle builds a unixfs FSHandle for the DistSources.
func PrepareTypeScriptProject ¶
func PrepareTypeScriptProject(ctx context.Context, le *logrus.Entry, sourceRoot, distRoot string, sources map[string]fs.FS) error
PrepareTypeScriptProject materializes the shipped compiler and SDK source closure. Bldr's dependency cache prepares both SDK and declared project dependencies before any compiler starts. The source and dist directories are owned checkouts.
func SyncDistSources ¶ added in v0.51.7
SyncDistSources syncs embedded Bldr dist sources into DistRoot and materializes the vendor tree used by non-local @go/* TypeScript imports.
Types ¶
type DistSourceSyncConfig ¶ added in v0.51.7
type DistSourceSyncConfig struct {
// RepoRoot is the project root containing the live go.mod and go.sum.
RepoRoot string
// DistRoot is the output directory used as BLDR_DIST_ROOT.
DistRoot string
// BldrVersion is the module version to require when BldrSrcPath is empty.
BldrVersion string
// BldrSum is the module checksum for BldrVersion.
BldrSum string
// BldrSrcPath is an optional replacement path for the source module.
BldrSrcPath string
}
DistSourceSyncConfig configures Bldr dist-source materialization.
Directories
¶
| Path | Synopsis |
|---|---|
|
cli
|
|
|
cmd
|
|
|
bldr
command
|
|
|
desktop
|
|
|
callpath
Package callpath finds static call paths between Go functions.
|
Package callpath finds static call paths between Go functions. |
|
trace/parser/raw
Package raw provides an interface to interpret and emit Go execution traces.
|
Package raw provides an interface to interpret and emit Go execution traces. |
|
trace/parser/tracev2
Package tracev2 contains definitions for the v2 execution trace wire format.
|
Package tracev2 contains definitions for the v2 execution trace wire format. |
|
web/entrypoint
command
|
|
|
Package distpath resolves Bldr dist source paths.
|
Package distpath resolves Bldr dist source paths. |
|
e2e
|
|
|
entrypoint
|
|
|
compose
Package compose carries the project-supplied part of a host process.
|
Package compose carries the project-supplied part of a host process. |
|
fatal
Package fatal carries process-fatal boot conditions from bus controllers to the entrypoint command that owns the process exit.
|
Package fatal carries process-fatal boot conditions from bus controllers to the entrypoint command that owns the process exit. |
|
state
Package state defines the durable state shared by native entrypoints.
|
Package state defines the durable state shared by native entrypoints. |
|
cli
Package example_cli provides example CLI commands for the bldr demo.
|
Package example_cli provides example CLI commands for the bldr demo. |
|
exp
|
|
|
autobun/main
command
|
|
|
compiler/esbuild
Package esbuild builds JavaScript plugins from a source filesystem and integrity-pinned npm tarballs, without a package manager or disk checkout.
|
Package esbuild builds JavaScript plugins from a source filesystem and integrity-pinned npm tarballs, without a package manager or disk checkout. |
|
compiler/go/dev-wrapper
command
|
|
|
host/logs
Package plugin_host_logs contains structured plugin log schema types.
|
Package plugin_host_logs contains structured plugin log schema types. |
|
host/mock
Package plugin_host_mock provides plugin host test doubles.
|
Package plugin_host_mock provides plugin host test doubles. |
|
host/static
Package plugin_host_static resolves LookupPluginHost with a fixed set of plugin hosts that another component runs.
|
Package plugin_host_static resolves LookupPluginHost with a fixed set of plugin hosts that another component runs. |
|
host/wazero-quickjs/gen
command
|
|
|
bunlock
Package bunlock reads integrity-pinned npm dependencies from bun.lock and stores verified tarballs in a caller's block-backed dependency tree.
|
Package bunlock reads integrity-pinned npm dependencies from bun.lock and stores verified tarballs in a caller's block-backed dependency tree. |
|
prototypes
|
|
|
build-web-pkg
command
|
|
|
detect-parent-exit
command
|
|
|
go-js-async-iterable
command
|
|
|
go-js-packet-stream
command
|
|
|
http-reader-at
command
|
|
|
js-wazero-quickjs
command
|
|
|
js-wazero-quickjs/concio
command
|
|
|
js-wazero-quickjs/nonblockio
command
|
|
|
js-wazero-quickjs/repl
command
|
|
|
sync-optimization
command
test-gomod-compare: Tests whether comparing the generated go.mod with the existing file on disk can be used to skip go mod tidy + vendor.
|
test-gomod-compare: Tests whether comparing the generated go.mod with the existing file on disk can be used to skip go mod tidy + vendor. |
|
wasi
command
|
|
|
wasi/run-wazero-go
command
|
|
|
proxy
Package resource_proxy serves a client's Resource SDK from a resource tree of its own, mapped onto an upstream tree whose connection can be replaced.
|
Package resource_proxy serves a client's Resource SDK from a resource tree of its own, mapped onto an upstream tree whose connection can be replaced. |
|
sdk
|
|
|
Package statepath owns cleanup policy for Bldr state roots.
|
Package statepath owns cleanup policy for Bldr state roots. |
|
node
Package storage_node binds Node SQLite connections to the existing volume factory.
|
Package storage_node binds Node SQLite connections to the existing volume factory. |
|
tui
|
|
|
util
|
|
|
buildbudget
Package bldr_buildbudget bounds concurrent memory-heavy Bldr build stages.
|
Package bldr_buildbudget bounds concurrent memory-heavy Bldr build stages. |
|
buildcache
Package bldr_util_buildcache stores the outputs of deterministic build steps, keyed by the step's request and validated by the content of every file the step read, so a rebuild that reads the same content replays the outputs instead of running the step.
|
Package bldr_util_buildcache stores the outputs of deterministic build steps, keyed by the step's request and validated by the content of every file the step read, so a rebuild that reads the same content replays the outputs instead of running the step. |
|
hostmem
Package hostmem reports the physical memory of the host.
|
Package hostmem reports the physical memory of the host. |
|
logfile
Package logfile provides file-based logging for bldr via logrus hooks.
|
Package logfile provides file-based logging for bldr via logrus hooks. |
|
logline
Package logline provides an io.Writer that logs each line a child process writes at the logrus level the line names.
|
Package logline provides an io.Writer that logs each line a child process writes at the logrus level the line names. |
|
qjsbytecode
Package bldr_util_qjsbytecode caches ES modules compiled to bytecode by the QuickJS-NG WASI reactor, so a later QuickJS instance links a module without parsing its source.
|
Package bldr_util_qjsbytecode caches ES modules compiled to bytecode by the QuickJS-NG WASI reactor, so a later QuickJS instance links a module without parsing its source. |
|
tailwriter
Package tailwriter provides an io.Writer that forwards all writes to an inner writer while keeping the last N complete lines in a ring buffer.
|
Package tailwriter provides an io.Writer that forwards all writes to an inner writer while keeping the last N complete lines in a ring buffer. |
|
wazerofs
Package wazerofs provides a simplified filesystem adapter that bridges UnixFS with the Wazero WebAssembly runtime's filesystem interface.
|
Package wazerofs provides a simplified filesystem adapter that bridges UnixFS with the Wazero WebAssembly runtime's filesystem interface. |
|
Package bldr_values contains value types that are injected to the target binary.
|
Package bldr_values contains value types that are injected to the target binary. |
|
entrypoint/startuptrace
Package startuptrace installs the opt-in browser runtime startup trace.
|
Package startuptrace installs the opt-in browser runtime startup trace. |
|
runtime/http
Package web_runtime_http serves the Bldr /b/ routes from a bus.
|
Package web_runtime_http serves the Bldr /b/ routes from a bus. |
