Expand description
A standalone executable is the warp-runtime stub carrying a program’s machine code:
<executable><machine code, deflated><its length, u64 little-endian><TRAILER_MAGIC><zeros to a multiple of 16>, then, in a
Mach-O executable, its code signature: the machine code lies inside the __LINKEDIT segment, so the executable signs
and verifies cleanly (codesign --verify --strict, macho.rs). At start the executable looks for the trailer where
its program would end and runs what it carries.
Enums§
- Ran
- How a program’s run ended: main returned its results, or the program called
exit(code)
Constants§
- ENTRY_
POINTS - The exported functions a program starts at, in order of preference
Functions§
- embedded_
machine_ code - The machine code the executable at
pathcarries, reading only its load commands and end when it carries none - provided_
imports - The imports a standalone executable provides: (module, name); C functions beyond them it carries (c_signatures.rs)
- run
- Run machine code compiled with warp’s settings (
warp build): its host words, libm, libc, print and the C functions it carries are linked, its result is what it printed (build makes the program print its value) - run_
carried_ program - When this executable carries a program: run it and give the exit code; a page’s site it shows (card build-links)
- run_
module - Run
modulewith the stub’s host words, libm, libc, print andc_functionslinked: from main through the handlers it listens with - running_
engine - The standalone engine, ticking when a time limit ends the run
- standalone_
engine - The engine an executable’s machine code is compiled for (warp build) and run with (the stub): no address map, the table from machine code to wasm offsets (an eighth of the machine code); a trap names the functions without them. An executable counts no fuel; it stops only at a time limit WARP_TIME_LIMIT sets.
- stub_
calls_ export - Whether the stub looks up this export of a program: its entry point, memory, handlers and the constructors of their
event. warp build drops every other export, and the functions only those reached (tree shaking, card g_gFs8) - stub_
calls_ export_ with_ foreign_ calls - The exports the stub looks up of a program calling python or js: those of every program, and what the answers are built with (gc_values.rs)
- with_
machine_ code runtime(an executable, with or without a program) carryingmachine_codeinstead. A Mach-O executable comes back unsigned: sign it (codesign --sign -, whichwarp buildruns), else macOS refuses to start it.- with_
site runtimecarrying a page’s site: an app showing it in the system’s web view (card build-links); sign it as above- without_
machine_ code - The executable without its code signature and without the program it carries