Skip to content

Getting Started with Incan

Prerequisites

  • Rust (1.85+): install via rustup
  • git: to clone the repository
  • make: for the canonical make-first workflow

These instructions assume a Unix-like shell environment (macOS/Linux). If you’re on Windows, use WSL:

  • WSL install guide: https://learn.microsoft.com/windows/wsl/install

Install/build/run (canonical)

Follow: Install, build, and run.

Your First Program

Create a file hello.incn:

def main() -> None:
    println("Hello, Incan!")

Run it:

If you used make install:

incan run hello.incn

If you used the no-install fallback:

./target/release/incan run hello.incn

Project Structure

To scaffold a full project with an entry point, test file, and manifest:

mkdir my_project && cd my_project
incan init

This creates a ready-to-run layout:

my_project/
├── src/
│   └── main.incn          # Entry point ("Hello from my_project!")
├── tests/
│   └── test_main.incn     # Starter test
└── incan.toml             # Project manifest

You can run it immediately:

incan run src/main.incn
incan test tests/

For the full walkthrough — adding modules, Rust crate dependencies, and lock files — see: Your first project.

Next Steps