| Crates.io | knot0-types |
| lib.rs | knot0-types |
| version | 2.0.34 |
| created_at | 2025-08-10 12:53:57.845898+00 |
| updated_at | 2025-12-01 02:34:33.239231+00 |
| description | Rust types generated from Knot0 JSON Schemas |
| homepage | https://knot0.com |
| repository | https://github.com/knot0-com/knot0-main |
| max_upload_size | |
| id | 1788886 |
| size | 26,319 |
Rust types generated from Knot0 JSON Schemas.
Add this to your Cargo.toml:
[dependencies]
knot0-types = "2.0"
use knot0_types::{Component, Workflow, Application};
use serde_json;
// Deserialize a component from JSON
let component_json = r#"
{
"apiVersion": "knot0.com/v2",
"kind": "Component",
"metadata": {
"name": "my-component"
},
"spec": {
"runtime": "python",
"code": "print('Hello, World!')"
}
}
"#;
let component: Component = serde_json::from_str(component_json)?;
json (default): JSON serialization/deserialization supportyaml: YAML serialization/deserialization supportMIT