Skip to content

Novis-LangThe programming language for web applications (and the command line).Fast. Secure by default.

Pre-Alpha0.0.6

You can build a business app, a website, an API or any other web service with it. The tools that a modern web application needs are built in.

  • Free and open source
  • Windows, Linux and macOS
  • An extension for VS Code
  • Ready for Docker

HTML

<?nvs
// The request has `?name=<script>alert(1)</script>`.
// In a web response, `echo` escapes HTML.
// The browser shows the script as text. It does not run.
echo Core\Request::queryParameter('name');
nvs serve (HTTP Server Response)
&lt;script&gt;alert(1)&lt;/script&gt;

The script is escaped. Your code calls no escaping function.

SQL

<?nvs
// Text from a request is a `tainted string`. It cannot be
// part of the text of a database query, so this program
// does not compile. Send the value as a `?` parameter.
var $db = Core\Db::connect('main');
var $id = Core\Request::queryParameter('id');
$db->query("select * from users where id = $id", []);
Compiler error
error[E0401]: expected `string`, found `tainted string`
--> hero-sql-error.nvs:7:12
|
7 | $db->query("select * from users where id = $id", []);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is `tainted string`
= help: SQL text cannot be `tainted`. Write a `?` in the SQL and pass the value as a bound parameter. A table or column name goes through `Core\Db::quoteIdentifier`
error: aborting due to 1 error
To read what a code means and how to fix it, run `nvs agent show <code>`.

The compiler stops SQL injection before the program runs.

Secrets

<?nvs
// The password from a login form is `secret`.
// It is also `tainted`, because it comes from the request.
// `echo` cannot print a `secret` value.
// So this program does not compile.
secret tainted string $password = Core\Request::formField('password') ?? '';
echo $password;
Compiler error
error[E0790]: `echo` cannot print a `secret` value
--> hero-secret-error.nvs:7:6
|
7 | echo $password;
| ^^^^^^^^^ this value is `secret`
= help: Output is read by people and saved in logs. To print the value anyway, call `Core\Secret::reveal($value, "reason")` first. Joining it into a longer string does not help. The result is `secret` too.
error: aborting due to 1 error
To read what a code means and how to fix it, run `nvs agent show <code>`.

The compiler finds the password in the page before the program runs.

Three small Novis programs for a web server, with the response or the compiler error for each.
Compared

How Novis compares with the top languages for the web

The same small web programs run in Novis, PHP, Bun, Go, Node.js, .NET and Python. One command measures all seven servers on one machine: speed, memory, deploys and runaway requests.

New code without a restart

You change a source file on a running server. The next requests use the new code, and no request fails.

  • Novis: yes
  • PHP: yes
  • Bun: no
  • Go: no
  • Node.js: no
  • .NET: no
  • Python: no

A limit for each request

Each request has its own memory limit and CPU time limit. One bad request cannot stop the whole server.

  • Novis: yes
  • PHP: yes
  • Bun: no
  • Go: no
  • Node.js: no
  • .NET: no
  • Python: no

See the full comparison

Walkthroughs

See your code run, step by step

Each walkthrough is a short animation of one feature. Press play to start it.

Errors before the program runs

The compiler finds the mistake first

Some mistakes are common in web code. The Novis compiler finds them before any of your code runs.

Text from a request in a database query

A value from a request is a tainted string. It cannot become part of the text of a query. You send it as a parameter instead.

How tainted input works
<?nvs
// This program puts text from a request into the text of a database query, so it does not compile.
tainted string $name = Core\Request::queryParameter('name') ?? '';
var $db = Core\Db::connect('main');
var $users = $db->query("select id from users where name = '" . $name . "'", []);
Compiler error
error[E0401]: expected `string`, found `tainted string`
--> sql-error.nvs:6:25
|
6 | var $users = $db->query("select id from users where name = '" . $name . "'", []);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is `tainted string`
= help: SQL text cannot be `tainted`. Write a `?` in the SQL and pass the value as a bound parameter. A table or column name goes through `Core\Db::quoteIdentifier`
error: aborting due to 1 error
To read what a code means and how to fix it, run `nvs agent show <code>`.

A password in the output

A password or a key is a secret string. Code that prints it or writes it to a log does not compile.

How secret values work
<?nvs
// This program prints a secret string, so it does not compile.
secret string $key = 'sk-12345';
echo $key, "\n";
Compiler error
error[E0790]: `echo` cannot print a `secret` value
--> secret-values-error.nvs:4:6
|
4 | echo $key, "\n";
| ^^^^ this value is `secret`
= help: Output is read by people and saved in logs. To print the value anyway, call `Core\Secret::reveal($value, "reason")` first. Joining it into a longer string does not help. The result is `secret` too.
error: aborting due to 1 error
To read what a code means and how to fix it, run `nvs agent show <code>`.
The language

Small programs, clear rules

Novis checks the things that often go wrong in web code. The checks are part of the language, so there is nothing extra to install.

Every conversion is checked

as int throws an error when the text is not a whole number. as ?int gives null, and your code decides what happens next.

<?nvs
// This program converts text from a form to whole numbers.
string $age = '42';
string $typo = '4x2';
// `as ?int` gives `null` when the text is not a whole number.
echo ($age as ?int) ?? 'not a number', "\n";
echo ($typo as ?int) ?? 'not a number', "\n";
Output
42
not a number
Checked conversions

Text as people read it

Core\Str counts the characters a person sees. An accent or an emoji stays whole.

<?nvs
// This program counts and reverses text with an accent and an emoji.
string $word = 'café 👍🏽';
// `Core\Str::length` counts the characters a person sees. This prints `6`.
echo Core\Str::length($word), "\n";
echo Core\Str::reverse($word), "\n";
Output
6
👍🏽 éfac
Unicode strings

JSON in one line

Core\Json::encode writes a shape, a list, a string or any other value as JSON. A shape keeps its keys in the order you write them.

<?nvs
// `Core\Json::encode` writes any value as JSON on one line.
array<string> $lines = [
// A shape becomes a JSON object. Its keys stay in the order they are written.
Core\Json::encode({ status: 'ok', version: 3 }),
// A list becomes a JSON array.
Core\Json::encode(['red', 'green', 'blue']),
// A string gets quotes, and each quote inside it is escaped.
Core\Json::encode("Say \"hi\""),
];
// `Core\Response::sendText` sends the three lines exactly as they are.
Core\Response::sendText(Core\Str::join($lines, "\n"));
nvs serve (HTTP Server Response)
{"status":"ok","version":3}
["red","green","blue"]
"Say \"hi\""
Core\Json

Jobs that run at the same time

Core\Task::all runs several functions at the same time. Each result has its own name and its own type.

<?nvs
// This program runs three jobs at the same time and reads each result by name.
var $page = Core\Task::all({
rows: fn(): array<int> => [10, 20, 30],
label: fn(): string => 'orders',
total: fn(): int => 60,
});
// Each result has the type that its function returns.
echo $page->label, ': ', Core\Arr::count($page->rows), ' rows, ', $page->total, " in total\n";
Output
orders: 3 rows, 60 in total
Tasks

HTML that escapes itself

An html template escapes every value in it. A comment from a user is shown as text.

Typed JSON

Core\Json::decodeAs reads JSON into an object of your class and checks every property.

Null is checked

A User is never null. Only a ?User can be. The compiler checks every place that uses it before the program runs.

Errors with a default

catch after a call gives a default value when the call throws an error.
Every request on its own

One request cannot break another

A request can crash, run out of memory or loop forever. When that happens, only that request stops. The server keeps running, and every other request finishes normally.

  • Each request has its own memory and its own copy of every static property.
  • You set limits for memory and time in nvs.toml. They apply to every request.
  • A request that uses more than a limit stops immediately. Only that request stops.
Four requests run at the same time. One request goes over its memory limit and stops. The other three finish.timeGET /GET /searchPOST /reportmemory limitGET /cart
finished stopped, alone
The standard library

One library comes with it

It has classes for JSON, databases, HTTP, passwords, dates and much more. Most programs need no package from outside.

236classes
1372methods and functions

Every class has its own page in the reference. It lists each method and its parameters.

Open the reference
<?nvs
// This program uses `Core\Str`, `Core\Arr` and `Core\Response`. Each first argument is the input.
array<string> $colors = Core\Str::split('red,green,blue', ',');
array<string> $sorted = Core\Arr::sort($colors);
// `Core\Response::sendJson` sends the value as JSON.
Core\Response::sendJson({ count: Core\Arr::count($colors), sorted: $sorted });
nvs serve (HTTP Server Response)
{"count":3,"sorted":["blue","green","red"]}
Tools

One program runs, tests and serves your code

nvs is one program. It runs your code, serves web requests, runs your tests and formats your files.

nvs
The commands of the nvs program.

Tests live next to your code

A test is a method with #[Test]. nvs test runs each test on its own. You do not install a package for it.

<?nvs
// This program has a class and a test for it. `nvs test` runs the test.
use Core\Test;
class Cart
{
public static function total(int $price, int $count): int
{
return $price * $count;
}
}
final class CartTest
{
// `#[Test]` makes this method a test. You do not install a package for it.
#[Test]
public function multipliesPriceByCount(): void
{
Test::assertSame(Cart::total(250, 4), 1000);
}
}
// `nvs run` runs this line and not the test.
echo Cart::total(250, 2), "\n";
Output
500
Agentic programming

Let a coding agent write your Novis code

nvs contains the full documentation of the language and its library. A coding agent looks up what it needs. The compiler checks every file the agent writes before the file runs.

  • The documentation is in nvs

    nvs agent find and nvs agent show print the documentation of each class, method, setting and error code. It always matches the version you installed.

  • One command sets up your project

    nvs agent init writes an AGENTS.md file and the files your agent reads.

  • Errors after every edit

    In Claude Code and Cursor, nvs checks each .nvs file after the agent edits it. The agent sees the errors at once.

Works with
  • Claude Code
  • Cursor
  • Codex
  • GitHub Copilot
  • OpenCode
A coding agent at work
  1. The agent looks up a method

    nvs agent find lengthCore\Str::length(string $s): uintCore\Bytes::length(bytes $b): uint
  2. It checks the file it wrote

    nvs check app.nvserror[E0401]: expected `int`, found `uint` --> app.nvs:4:14
  3. It reads what the error means

    nvs agent show E0401code: E0401 A value has a type that this place does not accept.
  4. It fixes the code and checks again

    nvs check app.nvsno errors
In numbers

Measured and counted

Every number here comes from a recorded benchmark run or is counted in the repository.

One benchmark run

The test program reads an order as JSON, checks it, and returns the order with its totals as JSON.

It ran on one CPU core of an AMD Ryzen 7 7800X3D on 20 November 2026. Every request was sent over HTTPS through nginx.

  • 17,114requests per second

    The median of 5 runs, with 64 requests at the same time.

  • 6.2 msfor 99 of 100 requests

    In the fastest run, 99 of 100 requests got their response within this time.

  • 20.8 MiBof memory at most

    The most memory the whole server used during the test.

  • 0failed requests

    All 400,000 requests in 4 benchmark programs returned status 200.

Compare with other languages

Counted in the repository

Each count is rounded down. The real number is a little higher.

  • 1,900+attacks

    Programs that try to break Novis. Each one passes only if Novis does not crash or hang.

  • 4,300+language tests

    Novis programs. Each one checks its output or its error message against the expected text.

  • 10,000+Rust tests

    Tests of the compiler, the runtime and the library, written in Rust.

  • 16 of 23crates with no unsafe Rust

    Novis is made of 23 Rust crates (packages). In 16 of them, unsafe code does not compile.

How Novis is tested
Where to start

Learn Novis step by step

  1. InstallDownload nvs for Windows, Linux or macOS, or build it from source.
  2. Take the tourShort lessons, from your first method to HTML templates.
  3. GuidesExample programs, and how to use each feature in real code.
  4. SyntaxHow to write Novis: types, classes, errors and more.
  5. ReferenceEvery class and method of the standard library, and every command.
  6. ToolsThe editor extension, the test runner, the debugger and the other tools.
  7. In-DepthThe ideas behind the language, and the decisions that shaped it.

Build your next web application with Novis

Novis is free and open source. Install it, take the tour, and ask your questions on Discord. Every report and every idea helps.