A functional, statically typed language that transpiles to JavaScript - inspired by Rust's syntax.
Whisper is a modern programming language that brings functional programming, type safety, and expressive syntax to the JavaScript ecosystem. It compiles directly to minified, unreadable JavaScript, making it perfect for frontend, backend, or fullstack development - all while enforcing purity, immutability, and correctness by design (most of the time).
// Effectful function (performs I/O)
fn{io} println(s: string) = {
namespace console {
// JavaScript interop
extern fn{io} log(args: string);
}
console.log(s);
}
@main fn{io} main() = println("Hello, world!");
- ✅ Functional First: Pure functions, flexible expressions.
- 🛡️ Statically Typed: Catch errors at compile time with type inference.
- 🧼 Pure by Default: Only effect functions can perform side effects.
- 🔧 Rust-like Syntax: Familiar to Rust developers - clean, expressive, and safe. No borrow checker.
- ⚡ Transpiles to JavaScript: Runs anywhere JS does - browsers, Node.js, Deno, etc.
- 📦 Zero Runtime: Generated code has no Whisper-specific runtime dependencies.
- Install the compiler
For now, build from source:
git clone https://github.com/WhyNeet/Whisper.git
cd Whisper
cargo build --release
./target/release/wrc
- Write your first program
// hello.wr
@main fn{io} main() = println("Hello from Whisper!");
- Compile to JavaScript
wrc hello.wr
node hello.js
# Output: Hello from Whisper!
MIT - see LICENSE for details.