STRUCTURE → EXECUTION
StructOp
Handbook
Declarative by design. Executable by nature.
Describe your application. Understand its behaviour. Control its evolution.
StructOp is a declarative application development platform that transforms structured, human-readable definitions into natively compiled applications. Define application logic, data, dependencies and behaviour using a unified, extensible language, with integrated capabilities for validation, change planning, execution visualisation and build state management.
Build software that is easier for humans and AI to understand, develop and maintain.
Define. Plan. Visualise. Build.
What StructOp does#
How it fits together#
StructOp operates as a declarative layer above C and Rust. You write declarations; StructOp checks them, plans the change, generates source through providers and hands it to the C compiler or Cargo.
- Define the application in
.stfiles. - Plan with
structop planto see what will be added, changed or removed. - Visualise run order and dependencies with
structop graph. - Build with
structop apply, which records state and runs the program.
Tested examples#
What these figures mean: StructOp’s own catalogue check builds every documented project in a fresh folder as C and as Rust. A run passes when init and validate succeed, plan prints exactly the recorded plan, apply builds the program and its output with the recorded input equals the recorded output, and any project tests pass. With StructOp 0.1.0 on macOS (Apple silicon), on 1 December 2026, 195 projects passed on both targets and the other 14 passed on the one target whose features they use. The same 209 projects pass on Linux, on ARM64 and natively on x86-64. These are StructOp’s own test results for its example catalogue; structop test gives your application the same kind of check. Which examples are target-specific
Beyond the catalogue, a worked application shows an inventory manager with a window, a command line and a database file, built for C and for Rust: its declarations, its recorded output, its 13 tests on each target, what building it brought to StructOp and how it works within version 0.1.0. It is not counted in the figures above.
A first program#
ability "print" "Hello" {
message = "Hello world!"
}
See what changes before you build#
Change one line of the first program and ask for a plan. StructOp compares the declarations with the state recorded by the last apply and names the change in terms of the application, before anything is rebuilt.
ability "print" "Hello" {
message = "Hello world!"
}
ability "print" "Hello" {
message = "Hello, StructOp!"
}
$ structop plan # program.app will be replaced ~ program.app (.structop/build/app) ~ ability.print.Hello message: "Hello world!" -> "Hello, StructOp!" Plan: 0 to add, 1 to change, 0 to destroy.
Output of StructOp 0.1.0. The plan names the one ability whose message changed and says the program will be rebuilt. After structop apply, the same command reports No changes. Your application matches the configuration. A plan shows what will change; it does not show that the change is correct.
See where a change fits#
Add one ability to the guided tour’s guest list that prints how many guests there are. The plan names what changed; structop graph -changed draws, in the terminal, where the new ability sits in the run order and what it depends on and reads.
$ structop plan # program.app will be replaced ~ program.app (.structop/build/app) + ability.print.Count ~ ability.enum.Mood (run order): 8 -> 9 ~ ability.struct.Guest (run order): 9 -> 10 ~ ability.value.guests (run order): 10 -> 11 ~ ability.value.i (run order): 11 -> 12 Plan: 0 to add, 1 to change, 0 to destroy.
$ structop graph -changed
...
┌──────────────────────┐ ┆
│ │ ┆
│ for.Each (1 ability) ├◄─────┤
│ │ │
└───────────┬──────────┘ │
│ │
│ │
│ depends on
│ │
▼ │
┌──────────────────────┐ │
│ │ │
│ + print.Count ├◄─────┼─────reads────────────┐
│ │ │ │
└───────────┬──────────┘ reads │
│ │ │
│ │ │
│ │ │
│ │ │
▼ │ │
┌──────────────────────┐ │ │
│ │ │ │
│ > enum.Mood │◄┄┄┄┄┄┤ │
│ │ │ │
...
+ new > moved
print.Count is new (+): it runs after for.Each and depends on it, and reads data.value.guests, which the loop also reads. The four declarations after it moved one place (>). The drawing shows declared order and dependencies, not everything the program does when it runs.The change, the whole drawing and the apply
Contents#
New to StructOp? Read What is StructOp?, then build the first program and follow the guided tour. When writing an application, browse the language topics below or open the reference index to look up a block, command or ability.
What is StructOp?
What the platform is, why it exists, how it works and what you can build with it.
- Introduction to StructOp
- Why StructOp exists
- Design philosophy
- How StructOp works
- What makes StructOp different
- Declarative application development
- Native language interoperability
- Provider architecture
- Application development lifecycle
- Human and AI collaboration
- Use cases
- A worked application
- Scope and roadmap
First steps
Build a greeting, then follow a guest list from declarations to generated code.
Application language
Find the blocks, values and expressions you need to describe an application.
Build and test
Choose a target, preview changes, manage state and check program output.
Providers and libraries
Select provider families or expose a native library to your program.
Game development
Draw a terminal screen and model a game world with entities and systems.
Reference
Look up a declaration, command flag or provider ability.
Project catalog
Explore working programs with their declarations and output.