Skip to main content

Module bin_factory

Module bin_factory 

Source

ModulesΒ§

binary_package πŸ”’
exec πŸ”’

StructsΒ§

BinFactory
BinaryPackage
BinaryPackageCommand
BinaryPackageMount
A WebAssembly package that has been loaded into memory.
BinaryPackageMounts
MalformedShebang πŸ”’
A file that starts with #! is a script and nothing else: Linux commits to the script handler on those two bytes and never falls back to another format. A line this runtime cannot use is therefore ENOEXEC, not something to hand to the Wasm compiler.
Shebang

EnumsΒ§

Executable
ShebangLine πŸ”’

ConstantsΒ§

MAX_SHEBANG_DEPTH πŸ”’
Executables a single spawn may walk through: five nested scripts and the thing the last one names. Linux runs a chain of five and answers ELOOP at six, whatever the last one names.
MAX_SHEBANG_LINE πŸ”’
Linux reads the shebang out of a buffer of BINPRM_BUF_SIZE bytes and refuses to exec an interpreter path that the buffer truncated.

FunctionsΒ§

commit_script_args πŸ”’
Applies the argv a shebang rewrote, once the executable it named has been found. Nothing before this point may disturb the caller’s argv.
executable_search_path πŸ”’
import_package_mounts
load_executable_from_buffer πŸ”’
load_executable_from_filesystem πŸ”’
load_executable_from_wasi_fs πŸ”’
package_command_by_name
parse_shebang πŸ”’
run_exec
script_command πŸ”’
spawn_exec
spawn_exec_module
spawn_exec_wasm
spawn_load_module