This repository contains all definitions for Code0. These definitions will be used to create a Flow. It also contains a CLI tool for managing definitions and a reader for reading all definitions.
(Stay inside the root directory when running the command)
Will download the latest Definitions from the Code0 Definition Repository.
If no feature is specified, all features will be downloaded. If a feature is specified, only that feature will be kept & can be loaded by one of the following languages: TypeScript, Rust.
./cargo run download
./cargo run download -f feature_1 feature_2 feature_3Will create a report of all errors in the definitions.
./cargo run report
./cargo run report -p /path/to/definitionsWill create a report of all errors in the definitions for a specific feature. Will also report on all specified functions, data types, and flow types.
./cargo run feature
./cargo run feature -p /path/to/definitions
./cargo run feature -f feature_name
./cargo run feature -f feature_name -p /path/to/definitionsWill run the report each time a definition file changes.
./cargo run watch
./cargo run watch -p /path/to/definitionsWill search for a specific definition.
./cargo run definition -n definition_name
./cargo run definition -n definition_name -p /path/to/definitionsnpm i @code0-tech/code0-definition-reader --save-devconst features = Definition("./path/to/definitions")
for (const feature in features) {
const name = feature.name; //name of the feature (e.g. rest)
const dataTypes = fearture.dataTypes; //dataTypes of this feature
const flowTypes = fearture.flowTypes; //flowTypes of this feature
const functions = fearture.runtimeFunctions; //runtimeFunctions of this feature
}cargo add code0-definition-readeruse code0_definition_reader::Definition;
let features = Definition::new("./path/to/definitions");
for feature in features {
let name = feature.name(); //name of the feature (e.g. rest)
let data_types = feature.data_types(); //dataTypes of this feature
let flow_types = feature.flow_types(); //flowTypes of this feature
let functions = feature.runtime_functions(); //runtimeFunctions of this feature
}