Documentation
¶
Overview ¶
Package build orchestrates the pinned Rust, Binaryen, and wasm2go toolchain.
Index ¶
- func ExportSet(m *manifest.Manifest) map[string]wasmbin.Type
- func Features() []string
- func FindModule(directory string) (string, error)
- func RustcWrapper(ctx context.Context, args []string, stdout, stderr io.Writer) error
- func Verify(m *manifest.Manifest, data []byte) (*wasmbin.Module, error)
- type ExecRunner
- type Lock
- type Runner
- type SourceHash
- type ToolVersions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Features ¶
func Features() []string
Features enables the supported synchronous Rust instruction subset.
func FindModule ¶
FindModule locates the Go module that declares the pinned translator tool.
func RustcWrapper ¶
RustcWrapper executes Cargo's compiler with location-independent crate IDs. Cargo hashes absolute paths for crates outside the workspace, even when rustc remaps source paths. Keep its output filenames, but normalize symbol metadata.
Types ¶
type ExecRunner ¶
type ExecRunner struct{ Environment []string }
ExecRunner executes trusted tool names with bounded output and no shell expansion.
type Lock ¶
type Lock struct {
Tools ToolVersions `json:"tools"`
Schema string `json:"schema_sha256"`
Manifest string `json:"manifest_sha256"`
Cargo string `json:"cargo_lock_sha256"`
Rust string `json:"shim_sha256"`
Wasm string `json:"wasm_sha256"`
Go string `json:"go_sha256"`
Facade string `json:"facade_sha256"`
Adapter string `json:"adapter_sha256"`
Contracts string `json:"contract_tests_sha256"`
Differential string `json:"differential_tests_sha256"`
Bulk string `json:"bulk_tests_sha256"`
Sources []SourceHash `json:"sources"`
}
Lock records deterministic tool, source, and artifact identities.
type Runner ¶
type Runner interface {
Run(ctx context.Context, directory, program string, args ...string) ([]byte, error)
}
Runner is injectable so toolchain checks can be tested without launching tools.
type SourceHash ¶
type SourceHash struct {
Name string `json:"name"`
Revision string `json:"revision,omitempty"`
SHA256 string `json:"sha256"`
}
SourceHash identifies a local source tree without leaking build-machine paths.
type ToolVersions ¶
type ToolVersions struct {
BinaryenDigests map[string]string `json:"binaryen_executable_sha256,omitempty"`
CompilerMetadata string `json:"compiler_metadata_sha256"`
Rust string `json:"rust"`
Binaryen string `json:"binaryen"`
Wasm2Go string `json:"wasm2go"`
}
ToolVersions records checked version identities without absolute paths or timestamps.