knot0-types

Crates.ioknot0-types
lib.rsknot0-types
version2.0.34
created_at2025-08-10 12:53:57.845898+00
updated_at2025-12-01 02:34:33.239231+00
descriptionRust types generated from Knot0 JSON Schemas
homepagehttps://knot0.com
repositoryhttps://github.com/knot0-com/knot0-main
max_upload_size
id1788886
size26,319
Jian Mo (jian-mo)

documentation

https://docs.rs/knot0-types

README

knot0-types

Rust types generated from Knot0 JSON Schemas.

Installation

Add this to your Cargo.toml:

[dependencies]
knot0-types = "2.0"

Usage

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)?;

Features

  • json (default): JSON serialization/deserialization support
  • yaml: YAML serialization/deserialization support

License

MIT

Commit count: 0

cargo fmt