Skip to content
RandwarePublic

About

An awesome WebAssembly focused programming language ✨

Resources

Stars

8 stars

Watchers

0 watching

Forks

Repository files navigation

Work in Progress

Wasome



Typing SVG


Website Docs Tour Playground Examples Install


License: MIT License: Apache 2.0 Built with Rust


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.


✦ Syntax at a Glance

Note: Wasome uses <- 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)
}

✦ Features

⚡ 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.

✦ Explore Wasome

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.

✦ Examples

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.

✦ Installation

Install the Wasome toolchain with a single command:


Linux, macOS, & FreeBSD

Open your terminal and run:

curl --proto '=https' --tlsv1.2 -sSfL https://get.wasome.dev | sh

macOS (Homebrew)

brew install Randware/tap/wasome

Windows

Open PowerShell and run:

irm https://get.wasome.dev | iex

NixOS

NixOS users can install Wasome natively using the provided flake:

nix profile add github:Randware/Wasome

Advanced Installation Options

Headless 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 -- -y

Windows:

& ([ScriptBlock]::Create((irm https://get.wasome.dev))) -y
Custom 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 | sh

Windows:

$env:WASOME_HOME = "C:\my_custom_folder"
irm https://get.wasome.dev | iex

Then restart your terminal and verify everything is working:

waso --version

✦ License

This project is dual-licensed under your choice of:


MIT    Apache 2.0



Built with ❤️ and Rust  ·  wasome.dev



About

An awesome WebAssembly focused programming language ✨

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages