dogelang-0.3.1 is not a library.
Doge is a dynamically typed scripting language with the ergonomics of a high-level scripting language and the performance of a compiled one. Scripts transpile to Rust and build ahead of time, so you write clear, low-ceremony code and ship a fast native binary:
- Native, cached builds — a
.dogescript becomes Rust source and compiles to a native executable. Builds are content-hashed and cached, so an unchanged script runs instantly. - No sharp edges — one string type with character-based indexing, automatic int/float promotion, and reference-counted values with no GC, no
unsafe, and no ownership rules to learn. - Robust by default — every runtime fault is recoverable with
pls/oh no, so a single bad value never takes down the program, and static checks catch mistakes before a build even starts. - Diagnostics that help — errors point at the exact line with a caret and a concrete fix hint. You debug Doge, not Rust.
Example
so nerd
such greet much name:
bark "much hello " + name
wow
for shibe in ["kabosu", "cheems", "walter"]:
pls
greet(shibe)
oh no err!
bark "very error: " + err
bark "sqrt of 16 is " + str(nerd.sqrt(16))
wow
Installation
Doge needs a Rust toolchain to install and to compile scripts.
The first run pays the Rust compile time; the binary is then cached in ~/.cache/doge/, so an unchanged script runs instantly.
Usage
| Command | Effect |
|---|---|
doge new <name> |
scaffold a new project (doge.toml + main.doge) |
doge bark script.doge |
compile (cached) and run |
doge build script.doge |
compile and copy the binary to ./<name> |
doge check script.doge |
parse and check only, no build |
doge repl (or bare doge) |
interactive interpreter, evaluate Doge with no build |
The examples/ folder tours the language; start with examples/tour.doge.
Documentation
| Document | Contents |
|---|---|
| SYNTAX.md | Keywords, literals, variables, control flow, functions, error handling, objects, imports |
| GRAMMAR.md | Grammar sketch (EBNF) and disambiguation rules |
| STDLIB.md | Builtins, list/dict methods, and modules |
| ERRORS.md | Diagnostic and runtime error message style |
| CLI.md | The doge binary and the build cache |
| PACKAGING.md | Projects, the doge.toml manifest, dependencies, install, and sharing |
| ARCHITECTURE.md | Compiler pipeline, crate layout, runtime model, codegen |
License
Apache 2.0, see LICENSE.