>| {Wake-Lang}
The live scripting language of the Wake JIT Engine
Wake Lang is a lightweight, C-based scripting language built to run instantly inside the Wake JIT Engine.
It allows live feedback, rapid prototyping, and direct interaction with modules & libraries
Wake Lang is branchless, deterministic, and linear —> a language designed to be followed, not guessed.
- Effortless to read — anyone can open a
.jcfile and instantly understand what it does. - Reduced development time — no conditional logic, no side effects, no debugging maze.
- Perfectly reproducible — deterministic execution ensures identical results every run.
- Embeddable — Wake Lang can be embedded directly inside other languages (like C, C++, or Python), making it ideal for live scripting, dynamic pipelines, and tool integration.
| Symbol | Purpose | Description |
|---|---|---|
> |
Sequence | Runs commands in order (waits for completion). |
| |
Parallel | Runs commands simultaneously. |
{} |
Variables | Dynamic placeholders using JSON-like nodes. |
build | build > run/*|------------------------------------------------------------>>
| wake hello_shader.jc
|------------------------------------------------------------>>
<:jit:w32|w64>
|{wk.module.hsys.r}wake-tools/shdc-v0.1w/sokol-shdc --input shader1.glsl --output shader1.glslh --slang hlsl4
|{wk.module.hsys.r}wake-tools/shdc-v0.1w/sokol-shdc --input shader2.glsl --output shader2.glslh --slang hlsl4
>
{wk.module.sys.r}wake-tools/tcc-v0.1w/tcc
-xc -shared {this.file}
-o hello.sm
>
#Jit.reload
<:/jit:>
|------------------------------------------------------------>>
*/
#include <stdio.h>
#icnlude "shader1.glslh"
#icnlude "shader2.glslh"
int main(void) {
printf("Hello, Wake!Shaders\n");
return 0;
}Run it instantly inside the Wake environment, no build step required.
Define how Wake builds and runs JIT code, through nested instructions.
| Tag | Purpose | Description |
|---|---|---|
<:jit:> |
JIT Block | Defines how the file is compiled and executed in Wake. |
<:/jit:> |
JIT End Block | Defines how the file is compiled and executed in Wake. |
w32 | w64 |
Target | Indicates 32-bit or 64-bit platform targets. |
Execution metadata, enabling nested instructions
These special tags control how and when a Wake Lang script is reloaded or re-executed by the runtime.
They are used inside the <:jit:> block to provide live reactivity and dependency awareness.
| Tag | Purpose | Description |
|---|---|---|
#Jit.reload |
Reload Directive | Reloads and executes the compiled code instantly, and automatically when the file is modified. |
#Jit.depends |
Dependency Directive | Registers one or more files as dependencies; triggers reload when any of them is modified. |
Feature auto-reload with dependency tracking.
Wake Lang exposes several core environment variables that provide context about the runtime, build system, and file paths.
They make scripts portable and self-adaptive, automatically resolving to the correct directories depending on the platform and mode.
| Variable | Description | Example Output (win64 debug mode) |
|---|---|---|
{wk.include} |
Absolute path to the include directory for Wake headers and packages. | wake/runtime/include/ |
{wk.libs} |
Absolute path to the Wake runtime libraries. | wake/runtime/libs/ |
{wk.module} |
Absolute path to the Wake system modules. | wake/runtime/module/ |
{wk.module.sys} |
Absolute path to the Wake system modules in current mode. | wake/runtime/module/w64-d/ (debug) |
{wk.module.sys.d} |
Absolute path to the Wake system modules in debug mode. | wake/runtime/module/w64-d/ |
{wk.module.sys.r} |
Absolute path to the Wake system modules in release mode. | wake/runtime/module/w64-r/ |
{build.sys} |
Build system identifier for current mode. | win64-d (debug) |
{build.sys.d} |
Build system identifier for debug mode. | win64-d |
{build.sys.r} |
Build system identifier for release mode. | win64-r |
{this.file} |
Reference to the current .jc file being executed. |
samples/hello.jc |
{jit.file} |
Reference to the JIT-compiled binary generated by Wake. | samples/hello.sm |
These variables are automatically provided by the Wake runtime and resolved before command execution. They ensure scripts remain consistent across environments, architectures, and build modes.
Wake Lang relies on a strict, deterministic, and secure package system —
ensuring that every dependency is perfectly resolved, cryptographically verified, and immutable once installed.
Whenever a path like {wk.module.sys.r}wake-tools/tcc-v0.1w/tcc is referenced, Wake will:
- Detect the package name (
wake-tools/tcc-v0.1w) - Check if it exists locally under
{wk.module.sys.r} - Fetch it automatically if missing (via Wake’s signed
.wpkgformat) - Verify its Ed25519 signature and ensure integrity before mounting
- Load and execute the referenced tool or library instantly — no setup, no rebuild
| Component | Description | Example |
|---|---|---|
.wpkg |
Wake Package — compressed and signed module archive. | tcc-v0.1w.wpkg |
{wk.module.sys.r} |
System package root (release mode). | wake/runtime/module/w64-r/ |
wake-tools/<package> |
Remote namespace or repository source. | wake-tools/tcc-v0.1w |
.sm |
Optional submodule containing runtime metadata or preload. | .sm/clear-sapp.sm |
All Wake packages are cryptographically signed and resolved deterministically.
It automatically fetches missing packages, verifies signatures, and loads them live.