An effortless programming language for WebAssembly
Designed to be a practical functional language, Grain makes WebAssembly simple for the world's developers solving everyday problems.
Get startedGrain
Playground
module Main
let translateCoordinates = (x, y) => {
(x + 4, y + 4)
}
let (x, y) = translateCoordinates(1, 2)
print(x) // 5
print(y) // 6
Basic
Why use Grain?
A modern web staple for today's developer
Grain is an easy-to-use, high-level programming language specifically created for WebAssembly. Designed to be a practical functional language, Grain makes WebAssembly simple for the world's developers solving everyday problems.
Easy to use, easy to learn
Grain is a blend of recognizable and exceptional features. With its familiar syntax and straightforward semantics, picking up Grain is fast and intuitive.
Pragmatic
Grain has its roots in functional programming, but borrows some handy features from imperative languages—think loops and mutable variables.
Developer-first
Between Grain's standard library, code editor integrations, and other developer tools, Grain makes you more productive.
Reliable
No runtime type errors, ever. Every bit of Grain you write is thoroughly sifted for type errors. Type annotations optional.
We continuously strive to
Our bottom line: Help you reap the benefits of Grain and WebAssembly, with an effortless language, great developer experience, broad application potential, and an awesome community.
Sponsors and Contributors
We rely on volunteer contributors and sponsors to sustain the project. Development of the Grain programming language is financially supported by our GitHub Sponsors supporters, corporate sponsors, and Open Collective donors.
Our current contributors come from a wide variety of experiences and backgrounds, which adds significant value to how we approach developer experience.
Sponsor Us →Want to be a part of Grain's development?
Contributors come in many forms—code contributors, documentation writers, bug finders, community organizers, language evangelists, and more. Whether you want to dive into some code, write some docs, give us your ideas, or just come hang out, we've got a place for you.
Not sure where to start?
Connect with us on Discord! We'll walk through contributor opportunities with you, and we're even glad to do a pair programming session to get you up to speed. We'll go over how to get involved and teach you anything you need to know, even if you've never touched a compiler or worked on a programming language.