Expand description
rl package - bundle a .rl program into a self-contained binary.
Copies the rl binary itself, then appends the source text and a magic footer so the copy can detect and run the embedded program at startup without any arguments.
Β§Binary layout after packaging
[ original rl binary bytes ] [ rl source text (UTF-8) ] [ magic marker: \x00RL_PACKAGE_V1\x00 ] [ source length: u64 little-endian ]
The magic + length are appended after the source so detection only needs to read the last few bytes β no full scan required.
ConstantsΒ§
- FOOTER_
LEN π - MAGIC π
- MAGIC_
LEN π
FunctionsΒ§
- bundle π
- bundle_
inner π - find_
embedded - Searches the running binaryβs own bytes for an embedded rl program.
- package
- Packages source_path into a self-contained binary at output_path.
- try_
package π