Use cases
These use cases are organised by what the documented examples already demonstrate. Each links to working projects, with their declarations and output. Possible future uses are listed separately.
On this page
Demonstrated use cases#
| Use case | What can be built | Relevant capabilities | Providers and targets | Working examples |
|---|---|---|---|---|
| Command-line applications | Programs that prompt, compute and print | Values, types, functions, loops, parameters | StructOp/core: C or Rust | Hello world, guest list, sum and difference, command-line flags |
| File utilities | Programs that read, write and seek in files | File values, open, read, write, seek | StructOp/core: C or Rust | file save, read, seek |
| Terminal applications and games | Screens drawn in a terminal, keyboard input, game loops | Game loop, entities and systems, headless tests | StructOp/game: curses (C) or bracket-lib (Rust) | Flappy dragon, dungeon crawler; Terminal games |
| Desktop graphical applications | Windows, forms, lists, menus and dialogs | Widgets, handlers, layouts | StructOp/gui: GTK 3 (C) or gtk-rs (Rust); StructOp/gtk2 (C) | window, select, GTK 2 tree |
| Reusable application modules | Declarations used more than once, with different inputs | Modules, outputs, counted copies | Any | counted modules, module values, class in a module; Modules and outputs |
| Native library integrations | Programs that call existing C libraries or Rust crates | structop bind, handler lists | Generated C/ providers (C; some also Rust) or Crate/ providers (Rust) | SQLite, zlib, rusqlite; C libraries and Rust crates |
| Business applications | A stock list with a window, a command line and a database file | Rules as functions, modules, forms, a bound database library, project tests | StructOp/gtk3 and a generated C/sqlite3 provider (C); StructOp/gtk-rs and a generated Crate/rusqlite provider (Rust) | Inventory manager, a worked application outside the catalogue |
The catalogue examples run from the declarations shown on their pages. The project catalogue lists every example and which ones are target-specific. The inventory manager’s page shows excerpts of its declarations, its recorded output and how it works within version 0.1.0; its database and front-end declarations are written once for each target.
AI-assisted application development#
AI-assisted development is a way of working rather than a kind of application. Any of the use cases above can be developed with an AI agent editing the declarations and people reviewing plans and graphs. Human and AI collaboration describes what StructOp provides for it.
Potential use cases#
The following are not demonstrated by a catalogue example. They are possible directions, with what they would rely on.
| Use case | What it would rely on | Status |
|---|---|---|
| Developer tools | Command-line parameters, files and text processing | Building blocks demonstrated; no complete tool in the catalogue |
| Automation utilities | Files, parameters and native library bindings | Building blocks demonstrated; no complete utility in the catalogue |