Expand description
Compiles checked Nifty programs to machine code with Cranelift, and links them against
the nifty-rt runtime library into executables.
Modules§
- compile 🔒
- Compiles a checked program: its functions, its states’ starting values, and every
dynamic part of its windows and views, then emits the
nifty_rt::ProgramDescthat describes them to the runtime. - emit 🔒
- Writing functions and data into a Cranelift module: an object file for
nf build, or memory for code loaded in-process. - error 🔒
- link 🔒
- Links a compiled app’s object file with the Nifty runtime library into an executable, with the system’s own linker.
- object 🔒
- Object files for
nf build: a compiled program and themainthat runs it.
Structs§
- Blob
- The bytes of one piece of data, and the pointers in it, which the linker fills in.
- Codegen
Error - Why an app couldn’t be compiled or linked.
- Emitter
- A module being written, with the contexts Cranelift reuses between functions.
Enums§
- Target
- What a pointer in data points at.
Constants§
- RUNTIME_
LIBRARY - The file name of the runtime library every compiled app links against, as
nifty-rtbuilds it;nfis installed next to it.
Functions§
- compile
- Compiles
programintoemitter, and returns itsnifty_rt::ProgramDesc.locatesays where each span is, for the errors the app may report. - compile_
app - Compiles
programto an object file whosemainruns it, withlocatesaying where each span is, for the errors the app may report. - finish
- The object file’s bytes.
- host_
isa - The instruction set of the system
nfruns on. Code loaded in-process must not be position-independent; executables on macOS and Windows must be, since they load at a random address. - link
- Links
objectwithruntime, the runtime library, into the executableexecutable, replacing it. - object_
emitter - An empty object file for the system
nfruns on, namednameinside.