Doo is a statically-typed, compiled programming language with a Rust-inspired syntax designed for simplicity and performance. It features automatic memory management through reference counting, a rich type system, and compiles to standalone native executables using clang and lld.
Want to contribute? See CONTRIBUTING.md
For testing and development, see TEST.md
- Static Type System: Compile-time type checking with type inference
- Automatic Memory Management: Reference counting for data types
- Rich Data Types: Integers, strings, booleans, arrays, maps, and tuples
- Module System: Organize code with a hierarchical import system
- Control Flow: Conditional statements, for loops, and range iteration
- Function System: First-class functions with parameter and return type annotations
- Native Compilation: Compiles to standalone executables using clang/lld
Download the latest doo binary from the Releases page as per your operating system.
Your downloaded file will usually be saved in your Downloads folder. Please rename file(you will get in format doo-[os-name]-x.x.x) to doo, in windows keep .exe at end
Then, follow the steps below for your operating system:
-
Move the downloaded doo.exe to a folder of your choice (e.g., D:\doo\).
-
Add that folder to your PATH so you can run doo from any terminal:
Open PowerShell and run:
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";D:\doo", [EnvironmentVariableTarget]::User)(Restart your terminal after running this to use the new PATH.)
-
Verify installation:
-
Install Clang (required for linking):
- Linux:
sudo apt update sudo apt install clang
- macOS:
- Linux:
-
Make the binary executable, move it to your user bin, and add to your PATH (if needed):
chmod +x ~/Downloads/doo mkdir -p ~/.local/bin mv ~/Downloads/doo ~/.local/bin/doo- Add to your PATH if not already:
- For Linux bash:
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc source ~/.bashrc
- For macOS bash:
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bash_profile source ~/.bash_profile
- For zsh (Linux or macOS):
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.zshrc source ~/.zshrc
- For Linux bash:
- Add to your PATH if not already:
-
Verify installation:
- Navigate to your project root (where main.doo is located):
- Compile and run your project:
Create your first Doo program:
Place your main.doo file in a project directory and run:
That's it! Your program compiles to a native executable and runs immediately.
Doo combines the expressiveness of high-level languages with the performance of compiled languages, focusing on readability with clean and simple syntax that's easy to learn.
Doo provides a rich set of built-in types:
| Int | 32-bit signed integer | 42, -10 |
| Str | UTF-8 string | "Hello, World!" |
| Bool | Boolean value | true, false |
| [T] | Array of type T | [1, 2, 3], ["a", "b", "c"] |
| {K: V} | Map with key type K and value type V | {"name": "Alice", "age": 30} |
| (T1, T2) | Tuple of multiple types | (42, "hello", true) |
Variables are declared with let and can be mutable with mut:
Functions use PascalCase for public functions and camelCase for private ones:
Doo uses a hierarchical module system with :: separators:
- See the examples folder for practical sample projects; explore the valid test programs for a wide range of language features and usage patterns; and also check out the multifile test project for examples of multi-file projects and advanced import/module usage.
This project is licensed under the MIT License
- LLVM Project: For the powerful backend infrastructure
- Rust Community: For inspiration and excellent tooling
- Programming Language Design Community: For theoretical foundations
Happy coding with Doo! 🚀
Want to contribute? See CONTRIBUTING.md
For testing and development, see TEST.md
.png)


