A type owns data and methods. An enum makes alternatives explicit. A trait defines a contract. An entity holds components, and a system schedules their behavior. Start with ordinary values and functions, then use them to build an active world.
Chapters
Try a program
This function adds a list of numbers. The output is 7. Change 4 to 8
and press Run; the output becomes 11. The same Rust implementation
checks and runs the source in the browser and in native applications.
main.kj⌘ / Ctrl + Enter
Loading…Drag to orbit · select to inspect
0 entities
Scene controls
Results
Loading the language runtime…
Output 0
No output.
State
Compile source to inspect its values.
TraceNo execution yet
- Executed source spans appear here.
Continue with Language basics, or follow the first scene tutorial to build and control three rotating objects.
Reference
- Language reference: syntax, typing and execution rules.
- Standard library: built-in types, functions and component contracts, generated from Rust.
- Design notes: implementation choices and proposed extensions.
The earlier declarative compiler has its own scene format reference.