What it is
For tools, compilers, and canvas.
dev is compiled ahead of time: source becomes a native or Wasm
image with raw OS calls (or WASI). Fit for CLI and systems work, and for
browser Wasm where you own the pixels — canvas, graphics, games.
The language is small on purpose; its own compiler is being
written in dev.
Features
What v0.1 actually has.
The surface below is implemented, not a wishlist.
-
Indent blocks
Python-like layout. Spaces only; no braces, no colon after
if/while. - Type inference Locals need no annotations. Struct fields take types from required defaults.
-
Core types
int,str, named structs, fixed arrays[N]T, slices[]T. -
Functions
Top-level
name: (params) -> (results)with optional defaults. Not first-class. -
Tests in source
test/assertnext to the code.dev testruns a file in one process. - Freestanding No C toolchain, no libc. The compiler emits the binary itself.
-
Self-host
A compiler for
dev, written indev.
Example
Structs, defaults, slices, strings.
A short tour: move a point, take a slice, cut a string.
intro.dev# struct Point: x = 0 y = 0 # function move: (p, dx, dy = 0) -> (q) q = Point(p.x + dx, p.y + dy) # call origin = Point() p = move(origin, 3, 4) print "at ", p.x, ",", p.y step = move(p, 1) print "step ", step.x, ",", step.y # slice nums = [](10, 20, 30, 40) mid = nums[1:3] print "mid ", mid[0], " ", mid[1], " len=", mid.len # string name = "devlang" print name[0:3], " / ", name[3:]
outputat 3,4
step 4,4
mid 20 30 len=2
dev / lang
Targets
One frontend. Several targets.
Select with -t OS/ARCH. Default is the host. Listings via -S.
-
Platforms
darwin·linux·windows·wasip1·js -
Architectures
amd64·arm64·wasm - Formats Mach-O · ELF · PE32+ · Wasm (WASI or browser / bun / node)