Open source · June 2026 · Built in Rust

JavaScript. Rebuilt in Rust.

ClearScript eliminates coercion, hoisting, and prototype chaos. Type-safe by default. Blazing fast. One toolchain. Ten laws.

Scroll
10× faster compile Zero coercion Rust powered Type-safe by default One toolchain 10 Core Laws HBForge powered site Open Source June 2026 10× faster compile Zero coercion Rust powered Type-safe by default One toolchain 10 Core Laws HBForge powered site Open Source June 2026
10×
Faster compilation vs TypeScript
0
Type coercions in runtime
10
Core Laws — all enforced
1
Toolchain for all workflows

Built for the modern web

Every design decision deliberately eliminates a JavaScript footgun

🦀

Rust-Powered Core

Compiled and executed natively in Rust. The toolchain — parser, type-checker, compiler — ships as a single binary with zero deps.

🔒

No Coercion, Ever

Law #1 is absolute. 1 + "1" is a compile error. Every type relationship is explicit, predictable, and verifiable.

Blazing Fast Compile

10× faster than tsc on large codebases. Incremental builds, parallel type checking, and a zero-overhead emit pipeline.

🎯

Traits Not Prototypes

Law #6 replaces the prototype chain with composable traits. Polymorphism is explicit, readable, and refactorable.

📦

Explicit Imports Only

Law #8 bans implicit globals. Every name is imported. Every dependency is auditable. Dead code is detected at compile time.

🩺

Strong Diagnostics

Law #9 mandates human-readable errors with file, line, column, probable cause, and a suggested fix — always.

Ten Core Laws

Not guidelines. Not best practices. Enforced by the compiler.

I

No Coercion

Types never implicitly convert. Every value stays exactly what you declared.

II

No var

All bindings use let (immutable) or mut. Function scope is abolished.

III

No Hoisting

Names are not available before their declaration. Temporal dead zones are gone entirely.

IV

No Loose Equality

Only === exists. == is a parse error.

V

Single Nil

There is one null-like value: nil. null and undefined do not exist.

VI

Traits Not Prototypes

Inheritance uses composable traits. The prototype chain is permanently removed.

VII

Lexical self

self is always the enclosing object. No more .bind() or arrow-function hacks.

VIII

Explicit Imports

All globals are banned. Every name must be imported. Every dep is auditable.

IX

Strong Diagnostics

Every error includes file, line, column, root cause, and a concrete suggestion.

X

One Toolchain

parse → typecheck → compile → bundle → test — one binary, zero config files.

JS vs ClearScript

Same intent. Radically different guarantees.

JavaScript
// Silent type coercion — classic footgun
var score = 10 + "5";    // → "105" 🤦
console.log(score);     // "105" not 15

// undefined everywhere
function getUser(id) {
  var result = fetchUser(id);
  return result;          // could be undefined
}

// prototype confusion
class Animal {
  speak() {
    return this.name;    // what is 'this'?
  }
}

// hoisting surprise
console.log(x);         // undefined (not error)
var x = 42;

// null AND undefined
if (val == null) { }   // catches both!
ClearScript
// Law I: coercion is a compile error
let score = 10 + "5";  // ✗ type mismatch
let score = 10 + 5;   // → 15 ✓

// Law V: single nil, always explicit
fn getUser(id: Str) -> User | Nil {
  return fetchUser(id);  // typed return
}

// Law VI: traits not prototypes
trait Speakable {
  fn speak(self) -> Str;
}                          // lexical self (Law VII)

// Law III: no hoisting
print(x);              // ✗ name not in scope
let x = 42;

// Law V: one nil value
if (val === nil) { }  // explicit nil check ✓

Try ClearScript Now

Real ClearScript syntax running in your browser. Edit the code and press Run.

Output

20 Use Cases

Where ClearScript outperforms JavaScript and TypeScript

Architecture

A full compilation pipeline in one binary

📝 Source (.cs) ClearScript source files
🔬 Parser Rust-based recursive descent, zero alloc
🎯 Type Checker Hindley–Milner + trait resolution, 10 Laws enforced
⚙️ IR + Optimizer SSA form, dead code elimination, inlining
📦 Emitter WASM / native binary / optimized JS bundle
🚀 Runtime WASM runtime or V8 bridge, zero overhead

Roadmap

From private build to open source in 2026

DONE

Core Language Spec

Ten Laws codified, grammar BNF complete, reference interpreter in Rust passing 800+ tests.

DONE

Parser & Type Checker v1

Recursive descent parser, Hindley-Milner inference, trait constraint resolution.

IN PROGRESS

Compiler Backend + WASM Emit

SSA IR, LLVM integration, WASM target with source maps. Performance benchmarks.

Q2 2026

Standard Library v1

Core modules: io, http, fs, math, collections, concurrency primitives.

June 25 2026

🎉 Open Source Launch

Full public release on GitHub. MIT license. Community RFC process begins.

Q3 2026

LSP + VS Code Extension

Language Server Protocol, syntax highlighting, inline diagnostics, auto-complete.

Q4 2026

Ecosystem & Package Registry

Package manager, central registry, first-party adapters for Node and Deno ecosystems.

Common Questions

Ready to rebuild your stack?

ClearScript is launching June 25, 2026. Star the repo, follow the journey, and be first to ship.