Kansei (感性) is a language based on Rust inspired by Ruby 1.8 with a functional flavour.
The language is desribed in LANGUAGE.md, which gets synced from time to time to kansei-language/LANGUAGE.md
A number of snippets can be found in files in the tests/ directory.
It supports currying:
fn add(x, y)
x + y
end
add10 = add(10)
puts "Add 10 to 5: " + add10(5)
Logging defaults to stderr via log(...) and can be redirected with -l/--log <path>.
Use std::log to change log target/format at runtime.
CLI helpers:
kansei fmt <path>formats.ksfiles in placekansei check <path>parses.ksfiles and exits non-zero on errorskansei test <path>runs.ksfiles and compares against.out/.errif presentkansei install [path]installs dependencies fromkansei.tomlor local module pathskansei wasm install <name>builds and installs a wasm module from the wasm-modules repokansei lspstarts a minimal Language Server over stdio (diagnostics only)
WASM install defaults:
- Repo:
../kansei-wasm-modulesif present, otherwisehttps://github.com/ahcm/kansei-wasm-modules - Target:
wasm32-wasip1(override with--wasm-target)
Custom repo/target:
kansei wasm install <name> --wasm-modules-repo <path-or-url> --wasm-target <target>
Have fun and may the force be with you!
-- Andreas Hauser, München, 8.1.2026