Documentation
¶
Overview ¶
Package runtimepayload implements the self-contained runtime payload format.
Index ¶
- Constants
- Variables
- func BuildContainer(payloadRoot string, capacity int) ([]byte, error)
- func Embedded() []byte
- func InjectFile(executablePath, payloadRoot string) error
- func LibraryName(goos, goarch string) (string, error)
- func Materialize(container []byte, userCacheDir, targetOS, targetArch string) (string, error)
- func MaterializeAdjacent(container []byte, root, targetOS, targetArch string) (string, error)
- func MaterializeFile(executablePath, userCacheDir, targetOS, targetArch string) (string, error)
- func WriteContainer(path, payloadRoot string, capacity int) error
- type Descriptor
Constants ¶
const (
PayloadVersion = "20260908"
)
Variables ¶
var (
)
Functions ¶
func BuildContainer ¶
BuildContainer creates a deterministic, fixed-capacity payload container.
func Embedded ¶
func Embedded() []byte
Embedded returns the target-specific payload compiled into dws.
func InjectFile ¶
InjectFile replaces the compiled payload slot without changing binary size. It is used before the final platform code signature is applied.
func LibraryName ¶
LibraryName returns the library shipped for a target.
func Materialize ¶
Materialize verifies and extracts a container into a private, content-addressed cache, then returns the runtime library path.
func MaterializeAdjacent ¶
MaterializeAdjacent publishes only DWS-owned resources next to a resolved executable. A conflict or busy publisher is an error: the caller uses cache. No caller may load a library until this method has verified the whole bundle.
func MaterializeFile ¶
MaterializeFile locates and extracts a payload from a foreign target binary. Release validation uses this without executing the artifact.
func WriteContainer ¶
WriteContainer writes a generated payload container to path.
Types ¶
type Descriptor ¶
Descriptor identifies a fixed-capacity payload container inside a binary.
func Find ¶
func Find(binaryData []byte) (Descriptor, error)
Find locates the valid payload container compiled into a binary. Marker constants elsewhere in the executable are ignored because their headers and archive checksums cannot validate as a complete container.
func Inspect ¶
func Inspect(container []byte) (Descriptor, error)
Inspect validates a standalone container and returns its descriptor.