Running Code
Tape has two execution paths from the same source code.
Interpret via VM
tape run script.tapeLowers the source to TAC IR and interprets it directly — there is no bytecode encoding step. Fast iteration, no build step.
Compile to native
tape build app.tape -o app.exeCompiles 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
| Command | Best for |
|---|---|
tape run | Development, scripts, quick iteration |
tape build | Release 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: