StructOp Handbook
Contents Examples Commands
Handbook / What is StructOp?

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 caseWhat can be builtRelevant capabilitiesProviders and targetsWorking examples
Command-line applicationsPrograms that prompt, compute and printValues, types, functions, loops, parametersStructOp/core: C or RustHello world, guest list, sum and difference, command-line flags
File utilitiesPrograms that read, write and seek in filesFile values, open, read, write, seekStructOp/core: C or Rustfile save, read, seek
Terminal applications and gamesScreens drawn in a terminal, keyboard input, game loopsGame loop, entities and systems, headless testsStructOp/game: curses (C) or bracket-lib (Rust)Flappy dragon, dungeon crawler; Terminal games
Desktop graphical applicationsWindows, forms, lists, menus and dialogsWidgets, handlers, layoutsStructOp/gui: GTK 3 (C) or gtk-rs (Rust); StructOp/gtk2 (C)window, select, GTK 2 tree
Reusable application modulesDeclarations used more than once, with different inputsModules, outputs, counted copiesAnycounted modules, module values, class in a module; Modules and outputs
Native library integrationsPrograms that call existing C libraries or Rust cratesstructop bind, handler listsGenerated C/ providers (C; some also Rust) or Crate/ providers (Rust)SQLite, zlib, rusqlite; C libraries and Rust crates
Business applicationsA stock list with a window, a command line and a database fileRules as functions, modules, forms, a bound database library, project testsStructOp/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 caseWhat it would rely onStatus
Developer toolsCommand-line parameters, files and text processingBuilding blocks demonstrated; no complete tool in the catalogue
Automation utilitiesFiles, parameters and native library bindingsBuilding blocks demonstrated; no complete utility in the catalogue