BUILT BY HYPERBRIDGE DIGITAL · OPEN SOURCE JUNE 25, 2026

JavaScript,
fixed at the root.

ClearScript is a JavaScript-inspired programming language rebuilt without JavaScript's deficiencies — familiar syntax, 10 non-negotiable laws, a Rust compiler, and one unified toolchain.

clearscript.dev →GitHub ★ Star
$curl -sSf https://install.clearscript.dev | sh
500+
Language Features
24
Compiler Crates
3
Targets (JS · WASM · Native)
0
WTF bugs

The Problem

JavaScript has had
10 unfixed sins since 1995.

TypeScript patches some of them. ESLint patches others. But nobody fixed the language itself — until now.

JS BUG 01
Surprising coercion
"5" + 3 === "53"
No implicit coercion. Types are respected.
JS BUG 02
var hoisting
console.log(x); var x = 5; // undefined
let and const only. No var. No hoisting.
JS BUG 03
Loose equality
0 == false // true
=== is the only equality operator.
JS BUG 04
null AND undefined
typeof null === 'object' // bug since 1995
Single Nil model. One bottom value.
JS BUG 05
this confusion
setTimeout(obj.method) // wrong this
Explicit binding. Predictable context.
JS BUG 06
Prototype chain chaos
obj.__proto__.__proto__...
Clean class model. No prototype leakage.
JS BUG 07
Implicit globals
x = 5 // global leak in sloppy mode
Explicit imports only. No globals.
JS BUG 08
Weak type errors
null.property // runtime crash
Compile-time null safety. Nil checks enforced.
JS BUG 09
No native typing
TypeScript is a 3rd-party workaround
First-class types. No separate transpiler.
JS BUG 10
Fragmented toolchain
npm + webpack + babel + eslint + prettier
One unified official toolchain. clear CLI.

Core Language Laws

10 laws.
Non-negotiable.

Not guidelines. Not lint rules. These are baked into the compiler. No flag disables them.

LAW 01
No Coercion
Types never silently convert. 5 + "3" is a compile error, not "53".
LAW 02🚫
No var
let and const only. Hoisting is gone. Declarations are block-scoped.
LAW 03📍
No Hoisting
Code runs in the order it appears. No surprises from declaration lifting.
LAW 04⚖️
No Loose Equality
=== is the only equality operator. == does not exist in ClearScript.
LAW 05
Single Nil
One bottom value: nil. No null/undefined split. No billion-dollar mistake.
LAW 06🏛️
Clean Class Model
No prototype-chain confusion. Classes are classes. No __proto__ leakage.
LAW 07🎯
Predictable this
this is lexically scoped. Arrow-function semantics everywhere by default.
LAW 08📦
Explicit Imports
Every name must be imported. No global namespace pollution. No ambient globals.
LAW 09🔍
Strong Diagnostics
Errors are precise, actionable, and line-accurate. No cryptic stack traces.
LAW 10🛠️
One Toolchain
clear fmt, clear lint, clear test, clear run — all built in. No config hell.

Language Tour

Familiar syntax.
Zero surprises.

JavaScript
// JavaScript — runtime surprise
function add(a, b) {
  return a + b; // "53" when called with (5, "3")
}

add(5, "3");   // "53" — not an error!
ClearScript
// ClearScript — caught at compile time
fn add(a: Int, b: Int) -> Int {
  return a + b;
}

add(5, "3");   // ❌ Error: expected Int, found String
               //    at line 7, column 8

Compiler Architecture

24 Rust crates.
Spec → AST → IR → VM → Native.

The compiler is built modular-first. Each crate has a single responsibility. The pipeline is deterministic, auditable, and zero-dependency.

FrontendSemanticMiddleRuntimeLibraryToolingTargets
clear-lexerFrontend
Tokeniser — converts source text to token stream
clear-parserFrontend
Recursive-descent parser → Concrete Syntax Tree
clear-astFrontend
Abstract Syntax Tree node definitions and visitors
clear-spanFrontend
Source location tracking for precise error messages
clear-diagnosticsFrontend
Structured error/warning emission with source context
clear-resolverSemantic
Name resolution and scope analysis
clear-typesSemantic
Type definitions, inference engine, constraint solving
clear-semaSemantic
Semantic analyser — type check, nil safety, ownership
clear-irMiddle
Intermediate representation — typed SSA form
clear-interpreterRuntime
Tree-walking interpreter for fast dev iteration
clear-bytecodeRuntime
Bytecode instruction set and serialisation format
clear-vmRuntime
Register-based virtual machine, GC, call stack
clear-runtimeRuntime
Runtime system: memory model, event loop, async scheduler
clear-stdlibLibrary
Standard library — collections, I/O, crypto, HTTP, JSON
clear-moduleLibrary
Module system: import/export resolution, cycles
clear-packageLibrary
Package manager: registry, lockfile, version resolution
clear-fmtTooling
Opinionated formatter — no config needed
clear-lintTooling
Lint engine with built-in ruleset and custom rules
clear-testTooling
First-class test runner with coverage and snapshot support
clear-docTooling
Documentation generator from source annotations
clear-lspTooling
Language Server Protocol — IDE integration for all editors
clear-js-targetTargets
Transpiles ClearScript → JavaScript for browser/Node.js
clear-wasm-targetTargets
Compiles ClearScript → WebAssembly for edge/native speed
clear-native-targetTargets
Native machine code via LLVM — zero JVM/runtime overhead

Feature Architecture

500+ features.
10 structured domains.

Every feature is categorized by domain, tier (Foundational / Advanced / Enterprise / Future), and compiler impact. No random feature lists.

DOMAIN A
80 features
Core Language
Syntax, expressions, statements, pattern matching, destructuring, closures
DOMAIN B
70 features
Type System
Structural types, generics, inference, nil safety, union/intersection types
DOMAIN C
60 features
Runtime & Memory
GC, stack model, async scheduler, WASM host, native ABI
DOMAIN D
50 features
Modules & Packages
Import resolution, circular dep detection, registry, lockfile, workspaces
DOMAIN E
55 features
Async/Concurrency
async/await, channels, actors, structured concurrency, cancel tokens
DOMAIN F
65 features
Standard Library
Collections, I/O, crypto, HTTP, JSON, Date, RegEx, Math
DOMAIN G
50 features
Tooling
Formatter, linter, test runner, REPL, debugger, profiler, doc generator
DOMAIN H
40 features
Targets / Interop
JS interop, WASM bindgen, native FFI, Node.js compatibility layer
DOMAIN I
45 features
Developer Experience
LSP, error recovery, incremental compilation, watch mode, playground
DOMAIN J
35 features
Security & Governance
Supply chain audit, capability model, sandboxing, SBOM generation

Multi-Target Strategy

Write once.
Run anywhere.

📦
clear-js-target

JavaScript

Transpile ClearScript to clean, readable JavaScript. Runs in any browser or Node.js environment. No runtime required.

USE CASES
Web apps, browser scripts, Node.js servers, CDN delivery
clear-wasm-target

WebAssembly

Compile to WASM for near-native performance. Edge runtimes (Cloudflare Workers, Deno Deploy), computation-heavy modules.

USE CASES
Edge functions, game engines, media processing, cryptography
🔩
clear-native-target

Native Binary

LLVM backend for native machine code. Zero JVM, zero runtime overhead. CLI tools, system services, embedded targets.

USE CASES
CLI tools, system daemons, microcontrollers, serverless cold starts

One Official Toolchain

No config files.
No ecosystem soup.

The clear CLI is the only tool you need. No webpack, no babel, no prettier, no eslint config.

clear run
Execute any .cls file instantly via the interpreter or VM
clear fmt
Opinionated formatter — one style, no config, no debates
clear lint
Built-in linter with 200+ rules, zero configuration
clear test
First-class test runner with coverage and snapshot tests
clear build
Compile to JS, WASM, or native — target flag selects output
»clear repl
Interactive REPL with type inference display and history
clear doc
Generate HTML/Markdown docs from source annotations
clear add
Package manager — add, remove, upgrade dependencies

Why HyperBridge

We built this for
our own production use.

🏭

30+ Production Platforms

HyperBridge has shipped 30+ platforms. We've experienced every JavaScript failure mode in production, at scale, under deadline.

🔒

Zero-Dependency Philosophy

Both ClearScript and HBForge are built with zero external dependencies. We own every line — fully auditable, supply-chain secure.

Built Alongside HBForge

ClearScript and HBForge are complementary. HBForge replaces your npm packages. ClearScript replaces the language underneath them.

COMPANION PRODUCT
Also explore HBForge
19 modules · 81,954 lines · replaces React, Express, Prisma, and 61 more npm packages. Zero dependencies.
OPEN SOURCE · JUNE 25, 2026

The language JavaScript
should have been.

ClearScript goes open source on June 25, 2026. Star the repository to be notified on launch day.

★ Star on GitHubHyperBridge Digital →