A programming language in development

Readable code.
Native programs.

Nagi puts readable code and efficient execution at the center of its design. You can try it with a small program or a Web API that reads and stores data.

Nagi is currently a 0.1 prototype. See its development status

double.nagiDouble a number
def double(number: i64) -> i64:
    return number * 2

def main():
    answer = double(21)
    print(answer)
Program output42

double is a function that doubles a number. Calling it from main with 21 prints 42.

The ideas behind Nagi

Easy to follow,
as you write and read.

Write directly.

Indentation groups your code. The compiler works out variable types wherever the values provide enough information.

Language basics

Check before running.

Nagi checks types and how you use data after passing it to another function. Operations that can fail return a result you can handle as success or failure.

Handling failures

Read what it generates.

Nagi translates your code into Low, then Rust, to build a native executable. When you need to, you can read the Low code and replace individual functions.

High and Low

What you can try today

Start small.
See what happens.

Start with one file

Begin by printing text and numbers, then move on to functions, lists, and structured data. Working examples help you learn one step at a time.

Setup and your first run

Web APIs and stored data

The examples receive JSON over HTTP, read it into typed data, store it in SQLite, and return a response.

Introduction to HTTP and HTML

In VS Code, you can inspect variable types, complete fields, and jump to definitions. Try the editor features

Where the name comes from

Nagi is Japanese for a calm sea.

Even when the inside is working intensely,
the surface stays as calm as a quiet sea.

The name comes from the Japanese word 凪 (nagi): a lull in the wind and a calm sea. It expresses an idea behind the language: even when much is happening underneath, the code you work with should feel calm and clear.

Development status

Taking shape, step by step.

Nagi is a 0.1 prototype. Its syntax and features are still being developed and may change. The Docs distinguish working features from those that have yet to be implemented.

Archives are available for Windows x64, Linux x86_64, macOS Apple Silicon, and macOS Intel. CI checks builds and execution on each platform. You need Rust/Cargo and a C build environment to try Nagi.