Running Code

Tape has two execution paths from the same source code.

Interpret via VM

bash
tape run script.tape

Lowers the source to TAC IR and interprets it directly — there is no bytecode encoding step. Fast iteration, no build step.

Compile to native

bash
tape build app.tape -o app.exe

Compiles the same IR to a native executable — x86-64 or ARM64, depending on the target. No interpreter overhead.

Imports are found in the standard library that ships with tape (./stdlib, then stdlib/ next to the tape binary), from any directory. Add -I <path> for your own module directories.

Tape’s runtime (memory, I/O, arguments) is compiled into the native program, so a program that doesn’t use the GUI or image libraries is one file you can copy anywhere. GUI and image programs load uwm, gfx and image from next to themselves (on Linux also from /usr/lib/tape when tape is installed from the .deb), so ship those beside them. See --runtime to use the shared runtime library or your own runtime.

Which to use

CommandBest for
tape runDevelopment, scripts, quick iteration
tape buildRelease builds, deployment, performance

Both paths produce identical behavior — the same source, same semantics, same results. The VM exists for development speed; native exists for deployment performance.

Last modified: