Skip to main content

Module build

Module build 

Source
Expand description

nf build: check the app, compile it to machine code, and package it as a native app for an operating system.

ModulesΒ§

macos πŸ”’
macOS apps are bundles: a folder ending in .app holding the executable and a description of the app.
windows πŸ”’
Windows apps are folders holding the executable, named after the app.

StructsΒ§

Request πŸ”’

EnumsΒ§

Target πŸ”’

ConstantsΒ§

OUTPUT_DIR πŸ”’
Built apps go in this folder, next to the project’s entry file.

FunctionsΒ§

app_name πŸ”’
A project folder’s name, or a single file’s name without .nf.
build πŸ”’
Compiles and links program in a scratch folder, then writes the app around the executable, so a failure leaves an earlier build as it was. Returns the app.
link_in πŸ”’
Compiles and links program into an executable in scratch, and returns its path.
output_dir πŸ”’
parse πŸ”’
run πŸ”’
runtime_library πŸ”’
The runtime library every app is linked against, installed next to nf. Package managers put a link to nf on the PATH, so the lookup starts from where that link points.