Docs / Language
Types
| Type | Notes |
|---|---|
int | i64, default integer |
bool | true / false |
string | owning; slices copy |
f64 | IEEE754 |
i32 / u32 / u8 / byte | distinct narrow ints; no implicit widen; wrap |
[]T | dynamic array |
[N]T | fixed; no push |
struct / enum | product and tagged union |
&T / &mut T | shared / exclusive borrow |
any / temp | dynamic box; is / as |
map[K]V | key int or string; value copy or string |
chan T | ownership moves through the channel |
Fields are package-visible by default; cross-module fields need pub or a pub: block. := infers locals; parameters and results are explicit.