cotis-cli
cotis-cli is a plugin host for Cotis build/check/run routines. Routines are Rust dynamic libraries (.dll/.so/.dylib) that export a small C ABI, and are installed into a cache directory and then executed by the host.
Status: Early
0.1.0-alpharelease. APIs and the plugin ABI are still evolving.
Installation
Install from crates.io once published:
Or install from the repository:
Commands
-
Install a routine:
- Local Rust project (builds the
cdylib):cotis-cli install path:<path-to-cargo-project> - crates.io (downloads source, builds):
cotis-cli install crate:<name>@<version> - GitHub Releases (downloads a prebuilt library asset):
cotis-cli install gh:<owner>/<repo>@<tagOrLatest> - Add
-fo/--overwriteto overwrite an existing install. - Optional alias:
cotis-cli install path:<path> <alias>
- Local Rust project (builds the
-
Run a routine:
cotis-cli run <routine> -- <args>cotis-cli run <routine>@<version> -- <args>
-
List routines:
cotis-cli list
-
Show routine info / help:
cotis-cli info <routine[@version]>cotis-cli help-routine <routine[@version]>
-
Remove a routine:
cotis-cli remove <routine>
Install layout
Routines are stored under ProjectDirs::cache_dir():
cache/routines/<routine_name>/<version>/<target_triple>/plugin/<library>
Where <library> is one of:
- Windows:
<routine_name>.dll - Linux:
lib<routine_name>.so - macOS:
lib<routine_name>.dylib
Routine plugin ABI
A routine dynamic library must export:
cotis_plugin_api_version() -> u32(must be1)cotis_plugin_descriptor_json() -> *mut c_char(JSON like{\"name\":\"...\",\"version\":\"...\"})cotis_plugin_help() -> *mut c_charcotis_plugin_run(argc: i32, argv: *const *const c_char) -> i32(0success, non-zero failure)cotis_plugin_free_string(ptr: *mut c_char)(host calls this to free strings returned by the plugin)
Examples
Install from local project:
Install from crates.io:
Install from GitHub release assets:
Run a routine with passthrough args:
Ecosystem
Cotis is split across several repositories. This repo hosts installable build and run routines; sibling repos provide the core framework and routine implementations.
| Repository | Role |
|---|---|
| cotis | Core traits and CotisApp orchestration |
| cotis-cli (this repo) | Plugin host for installable build and run routines |
cotis-web |
Web build routine (cotis-web-builder) |
cotis-android |
Android build routine (cotis-android-builder) |
cotis-layout |
Flexbox-style layout engine |
cotis-pipes |
Layout output to render commands |
cotis-wgpu |
Desktop renderer (wgpu + winit + glyphon) |
cotis-raylib |
Desktop renderer (raylib) |
Documentation
- API reference:
cargo doc --open - Published docs: cotis-cli
- Contributing: CONTRIBUTING.md
- Security: SECURITY.md
- License: MIT