Rook
РусскийRUGet started

The road to 1.0

Rook is at 0.x: the language works, and this site is written in it, but the specification is a draft and may still change. The goal is 1.0, a language to use in production, with a stable core and the tools a team expects. This page says where Rook stands, what is missing and in what order it will come.

Rook does not try to be a wider TypeScript. Its place is real threads in the browser and in Node, checked by the compiler, and UI without a framework, in a language that compiles to readable JavaScript you can keep. Each phase below makes that place stronger.

New syntax comes from the list "The language for 1.0" below, each piece as the maintainer decides it; other ideas wait for 1.0.

Rook today

What is already there

ConcernHow it is
Goroutines are an emulation on the event loopgo f(x) runs f on another thread, a Web Worker or a Node worker thread (Goroutines). Inside a thread, channels and select work on its event loop, as async code does.
Data races, as in GoWhat goes to another thread is copied or moved with transfer(x), and the compiler checks that it can be. Memory is shared only through a SharedArrayBuffer made for it.
The runtime makes the bundle biggerA module imports only the functions of rooklang/runtime its code uses; a program without channels, goroutines or markup imports none. All of the runtime is about 19 KB gzipped, before minification.
There are no librariesRook imports any JS module and takes the types from TypeScript declarations (Modules): the libraries of Rook are those of npm.
A Rook component cannot go into a React or Vue app@html-tag makes a component a custom element that React, Vue, Svelte and plain HTML use as any other (Web components).
TypeScript code cannot use Rook modulesrook build writes a .d.ts next to each .js.
Debugging is blindSource maps: stack traces, in goroutines too, and debuggers show the lines of the .rk file.
Builds and testsThe Vite plugin rooklang/vite; Vitest runs Rook code, goroutines included (Tools).

What is not there yet

Not locked in

Rook compiles to readable JavaScript with the same names and structure. A project can build its .rk files once with rook build and go on in JS. What stays is the rooklang/runtime import of the code that uses channels, goroutines or markup: plain JS under the MIT license, which can be kept as a dependency or copied into the project. The guide shows how: Rook in an existing project.

The road to 1.0

Phase 0: say what is there (done)

Phase 1: stability (in progress)

The language for 1.0

1.0 is to be as complete as it can. Each item is decided by the maintainer first, then implemented.

Phase 2: tools

Phase 3: debugging goroutines

Phase 4: performance

1.0

Rook is 1.0 when:

The same plan is in the repository: docs/roadmap.md.