Wasome is a programming language built from scratch to compile to WebAssembly.
Whether you're targeting the browser, a server, or the edge,
Write Wasome, compile to Wasm, and it just works.
<- for assignment and -> for return.struct User {
s32 id
bool is_active
}
fn main() -> s32 {
User u <- new User { id <- 42, is_active <- true }
if (u.is_active) {
-> u.id * 2
}
-> 0
}Fibonacci Sequence
fn fibonacci(u8 n) -> u64 {
u64 curr <- 1 as u32 as u64
u64 prev <- 0 as u32 as u64
loop (n > 0) {
u64 temp <- curr
curr <- curr + prev
prev <- temp
n <- n - 1 as u32 as u16 as u8
}
-> curr
}Generics
struct Box[T] {
T value
}
enum Option[T] {
Some(T)
None
}
pub fn identity[T](T val) -> T {
-> val
}
fn main() {
Box[s32] b <- new Box[s32] { value <- 10 }
Option[f64] o <- Option[f64]::Some(5.5)
s32 id <- identity[s32](b.value)
}| ⚡ | WebAssembly Native | Compiles directly to Wasm with no runtime overhead. |
| 🛡️ | Type-Safe | Strong static typing catches errors before your code reaches runtime. |
| 🧱 | Structs & Enums | Custom data models with methods and expressive patterns. |
| 🔀 | Generics | Reusable abstractions across functions, structs, and enums. |
| 📦 | Modules & Imports | Organize code cleanly across files and projects. |
| ✨ | Built-in Formatter | Consistent style, automatically, with zero configuration. |
Everything you need to learn, experiment, and build with Wasome lives at wasome.dev.
| 📚 | Documentation | Guides, references, and the full language spec. From zero to your first project. |
| 🌟 | Language Tour | An interactive language walkthrough, guided by Bit, your star companion. |
| 🧪 | Playground | Write and run Wasome in your browser. No install needed; mini IDE included. |
The docs/examples/ directory has a growing collection of real programs, organized by complexity:
| 📄 | Single File | Standalone .waso programs for loops, structs, enums, generics, and operators. |
| 📁 | Single-Project | Multi-file projects with module imports; see how Wasome scales beyond one file. |
| 🗂️ | Multi-Project | Workspace-style projects with modules for real-world architecture. |
Install the Wasome toolchain with a single command:
Open your terminal and run:
curl --proto '=https' --tlsv1.2 -sSfL https://get.wasome.dev | shbrew install Randware/tap/wasomeOpen PowerShell and run:
irm https://get.wasome.dev | iexNixOS users can install Wasome natively using the provided flake:
nix profile add github:Randware/WasomeHeadless Installation
If you are installing Wasome in a CI/CD pipeline or automated script, you can pass the -y (or --yes) flag to bypass all interactive prompts (such as confirming the overwrite of an existing waso binary).
Unix:
curl --proto '=https' --tlsv1.2 -sSfL https://get.wasome.dev | sh -s -- -yWindows:
& ([ScriptBlock]::Create((irm https://get.wasome.dev))) -yCustom Install Directory (WASOME_HOME)
By default, Wasome installs to ~/.wasome (or %USERPROFILE%\.wasome on Windows). You can override this by setting the WASOME_HOME environment variable before running the installer. The installer will automatically write this path into your shell configuration file.
Unix:
export WASOME_HOME="/opt/my_custom_folder"
curl --proto '=https' --tlsv1.2 -sSfL https://get.wasome.dev | shWindows:
$env:WASOME_HOME = "C:\my_custom_folder"
irm https://get.wasome.dev | iexThen restart your terminal and verify everything is working:
waso --versionThis project is dual-licensed under your choice of:
Built with ❤️ and Rust · wasome.dev
