Getting started
Install
comline is not on crates.io yet — build it from source with a recent Rust
toolchain:
That puts the comline binary in ~/.cargo/bin. Check it:
A cargo install comline from crates.io, and OS packages (Fedora, Arch,
Windows, macOS), are planned — packaging is tracked in
ComlineProject/distributions.
Create a project
You get:
my-api/
├── config.idp # package manifest
├── comline.toml # where generated code goes (all-commented by default)
├── src/
│ └── main.ids # a sample schema
└── .gitignore # ignores .comline/
src/main.ids:
/// The language a greeting is written in.
enum Language {
English
Spanish
Japanese
}
struct Greeting {
message: string
language: Language
}
Build
This compiles and validates the schemas, then freezes the result as version
0.0.1 in a content-addressable store under .comline/. Later builds
bump the version automatically by the largest change
since the last one.
Validate without freezing — safe for editors and pre-commit hooks:
Generate code
Targets come from code_generation.languages in config.idp (the scaffold
declares rust#1.70.0); output lands under generated/ by default. Change where
and how in comline.toml:
Today rust is the only generator.
Next
- Overview — the whole pipeline
- IDL guide — the schema language
- Generating code — the full
generatesurface - CLI reference — every command and flag