# grain-lang/grain

The Grain compiler toolchain and CLI. Home of the modern web staple. 🌾

Repository: https://github.com/grain-lang/grain
Canonical: https://ross.abutalabs.com/products/grain
Homepage: https://grain-lang.org/
Language: Reason
License: LGPL-3.0
License Family: copyleft
Topics: wasm, grain, language, compiler, webassembly, functional-programming
Last push: 2026-08-21T18:22:03+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 69, longevity 100
- inputs: {"age_days": 3431, "days_push": 12, "days_rel": 206, "gap_med": 0.0, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3468, forks 124 (observed 2026-08-28T04:08:05.872498+00:00)

## What it is
Grain is a strongly-typed functional programming language that compiles to WebAssembly, together with its compiler toolchain and CLI. It aims to make academic functional language features accessible for web and general-purpose development.

## Use cases
- compile a functional language to webassembly
- write type-safe web code without runtime type errors
- learn a modern functional programming language
- build browser apps that run on wasm
- run the same language in browser, terminal, and server

## When to choose
- you want a strongly-typed functional language targeting WebAssembly
- you want to experiment with a new language and help shape its ecosystem
- you want type inference without annotations and no runtime type errors

## When to avoid
- you need a mature language with a large ecosystem and long-term stability
- you need non-WebAssembly compilation targets or deep native interop
- you dislike rapidly changing language features

## Facets
- artifact type: cli-tool
- maturity: active
- function: compiler, cli, wasm, programming-language, type-system
- domain: programming-languages, compilers, web-development
- platform: wasm, browser, cli, cross-platform
- tags: webassembly, functional-language, compiler-toolchain, strongly-typed, language-compiler, functional-programming, nodejs

## Member repositories
- grain-lang/grain (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:05.872498+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:36:40.108084+00:00, confidence not recorded.
  - readme: https://github.com/grain-lang/grain (fetched 2026-08-28T04:08:05.872498+00:00, sha 59b168ed412b)
  - homepage: https://grain-lang.org/ (fetched 2026-08-29T09:30:40.898533+00:00, sha 48a71b4a461a)
  - site_page: https://grain-lang.org/docs (fetched 2026-08-29T09:30:40.907834+00:00, sha 1c2c71e07fc9)
  - site_page: https://grain-lang.org/docs/intro (fetched 2026-08-29T09:30:40.909640+00:00, sha 3f958651c59f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
