(sigil build runtime)

Deterministic native runtime trees for a prebuilt portable launcher.

Exports

runtime-treeprocedure

Construct a runtime-tree struct.

runtime-tree?procedure

Test if a value is a runtime-tree struct.

Get the root field of a runtime-tree struct.

Get the application field of a runtime-tree struct.

Get the entries field of a runtime-tree struct.

Get the manifest field of a runtime-tree struct.

Get the cache-key field of a runtime-tree struct.

Get the total-bytes field of a runtime-tree struct.

Get the snapshot field of a runtime-tree struct.

Test whether a value is a canonical relative native-runtime path.

Reject absolute paths, empty/dot/parent components, alternate separators, ASCII controls and loader search separators. UTF-8 names are allowed.

Prepare immutable metadata for a quiescent, explicitly staged runtime.

ENTRY and LOADER name executable files; LIBRARY-DIRECTORIES is an ordered nonempty list of directories. Only regular files and directories are accepted. Modes normalize to 0600/0700; metadata and per-file digests are content-addressed. Keep the source tree unchanged until writing finishes. Format 1 targets Linux x86-64; this does not validate ELF compatibility.

Prepare a runtime whose entry executes directly through the host kernel.

Format/launcher ABI 2 uses the host ELF interpreter and system search policy. The application owns relative RUNPATHs, ABI checks and dependency diagnostics; a small preflight entry can run before its main application. No loader or helper trampoline is required in the staged tree.

Write a runtime SGLPAK around a prebuilt format-1 launcher.

OUTPUT must be outside the source tree. Directory rows live in the manifest; regular files are deferred tree/ entries. Existing Sigil bundle metadata is retained. This packages bytes, without validating the launcher ELF or implementing runtime extraction, cache leases, or app launch.