Skip to content

Compiled, never interpreted

Many languages for the web read your code line by line while it runs. That is an interpreter. Novis does not have one. It compiles each file to machine code, and the processor runs that code directly.

You do not run a compiler yourself. nvs run and nvs serve compile a file the first time it is needed. The server keeps the compiled code in memory, so the next request uses it at once.

When you change a file, the next request that needs it compiles the new version. You do not restart the server. Requests that already started finish with the old version.

The compiler checks the whole file before any of it runs. A wrong type, a call to a method that does not exist or a variable that was never declared stops the compile. Then none of the file runs. nvs check shows these errors on your machine, before you deploy.

Compiled code is written to memory and then made read-only before it runs. Memory that a program can both write and run is a common target for attacks, so Novis never has it.

Read how compiled code is reused and replaced.