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 ResolveDistSourcePath(distSourcePath string, elems ...string) string
- 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 workers, 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 ResolveDistSourcePath ¶
ResolveDistSourcePath resolves a dist source file in a Bldr root or in a Spacewave root that nests Bldr under bldr/. The nested path wins because a Spacewave root has its own entries, such as sdk/, that shadow Bldr names.
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
|
|
|
web/entrypoint
command
|
|
|
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. |
|
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/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/wazero-quickjs/gen
command
|
|
|
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
|
|
|
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. |
|
logfile
Package logfile provides file-based logging for bldr via logrus hooks.
|
Package logfile provides file-based logging for bldr via logrus hooks. |
|
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. |
