NIAO
← Blog

Introducing Niao: The C/Rust Hybrid Language Built for Speed

Why Niao?

Niao is a modern programming language and full development ecosystem—compiler, bytecode VM, package manager, standard libraries, web framework, and machine-learning stack—implemented in Rust. It was designed around a simple philosophy: write it once, run it fast, with a minimal memory footprint.

Key Architecture Features

  1. Fast by default: Programs compile down to lightweight bytecode and run on a custom stack VM. It features a mark-compact garbage collector (GC) and .niaobc bytecode caching to bypass compilation overhead on subsequent runs.
  2. Familiar Syntax: Clean C/Rust-style functions, static type annotations, classes, and traits—along with a block DSL for web servers.
  3. Gradual Static Typing: Annotate types when you want safety and structure, or skip them when you want rapid prototyping.
  4. Single Toolchain: The niao command manages running and building programs, while nm acts as the registry installer to install and manage libraries.

Hello, Niao!

Writing code in Niao feels intuitive if you have used TypeScript, Rust, or Python:

fn greet(name: string) -> string {
    return "Hello, " + name
}

fn main() {
    print(greet("Niao"))
}

You can run it instantly using the command-line tool:

niao run hello.niao

Stay tuned as we continue building Niao in public! Check out the Roadmap to see active development progress.

Introducing Niao: The C/Rust Hybrid Language Built for Speed | NIAO