Expand description
Process entry: plg_rt_init + plg_rt_main, called from the thin
generated main. Owns argv parsing (hand-rolled — no clap inside compiled
binaries), output, and the exit-code contract:
0 = no solutions, 1 = solutions found, 2 = query parse / usage error, 3 = runtime error
Wire encodings are text (readable, default) and bson (binary), gated by
the codegen-baked capability table (io_format/1, default [text]). No
JSON — a host wanting JSON derives it from bson. See docs/design/IO.md.
Functions§
- plg_
rt_ ⚠init - Build the Machine from the tables codegen baked into the binary. Re-interning the emitted atom names in id order reproduces the compiler’s exact id space (the interner pre-seeds the same well-known atoms the compiler’s did).
- plg_
rt_ ⚠main - Run the query named in argv (or a bson request on stdin) against the compiled program. Returns the process exit code.