Known Types

Well-known types for Rust.
✨ Features
- Zero default dependencies, only optional integrations.
- Supports opting out of any feature using comprehensive feature flags.
- Adheres to the Rust API Guidelines in its naming conventions.
- 100% free and unencumbered public domain software.
🛠️ Prerequisites
- Rust 1.85+ (2024 edition)
⬇️ Installation
Installation via Cargo
cargo add known-types
Instructions for each crate
Installation via Cargo (all crates)
cargo add known-types
cargo add known-types-anthropic
cargo add known-types-google
cargo add known-types-graphql
cargo add known-types-ietf
cargo add known-types-nostr
cargo add known-types-openai
cargo add known-types-pypi
cargo add known-types-rubygems
cargo add known-types-w3c
cargo add known-types-x
Installation in Cargo.toml (with all features enabled)
[dependencies]
known-types = "0.1"
Instructions for each crate
Installation in Cargo.toml (with all features enabled, in all crates)
[dependencies]
known-types = "0.1"
known-types-anthropic = "0.1"
known-types-google = "0.1"
known-types-graphql = "0.1"
known-types-ietf = "0.1"
known-types-nostr = "0.1"
known-types-openai = "0.1"
known-types-pypi = "0.1"
known-types-rubygems = "0.1"
known-types-w3c = "0.1"
known-types-x = "0.1"
Installation in Cargo.toml (with only specific features enabled)
[dependencies]
known-types = { version = "0.1", default-features = false, features = ["serde"] }
Instructions for each crate
Installation in Cargo.toml (with only specific features enabled, in all crates)
[dependencies]
known-types = { version = "0.1", default-features = false, features = ["serde"] }
known-types-anthropic = { version = "0.1", default-features = false, features = ["serde"] }
known-types-google = { version = "0.1", default-features = false, features = ["serde"] }
known-types-graphql = { version = "0.1", default-features = false, features = ["serde"] }
known-types-ietf = { version = "0.1", default-features = false, features = ["serde"] }
known-types-nostr = { version = "0.1", default-features = false, features = ["serde"] }
known-types-openai = { version = "0.1", default-features = false, features = ["serde"] }
known-types-pypi = { version = "0.1", default-features = false, features = ["serde"] }
known-types-rubygems = { version = "0.1", default-features = false, features = ["serde"] }
known-types-w3c = { version = "0.1", default-features = false, features = ["serde"] }
known-types-x = { version = "0.1", default-features = false, features = ["serde"] }
👉 Examples
Importing the library
use known_types;
Instructions for each crate
Importing the library (all crates)
use known_types;
use known_types_anthropic;
use known_types_google;
use known_types_graphql;
use known_types_ietf;
use known_types_nostr;
use known_types_openai;
use known_types_pypi;
use known_types_rubygems;
use known_types_w3c;
use known_types_x;
📚 Reference
Crates
Integrations
| Crate (Feature) |
Version |
Usage |
Summary |
bincode ("bincode") |
2 |
 |
Derives bincode::{Encode, Decode} |
borsh ("borsh") |
1.5 |
 |
Derives borsh::{BorshSerialize, BorshDeserialize} |
musli ("musli") |
0.0.131 |
 |
Derives musli::{Encode, Decode} |
rasn ("rasn") |
0.26 |
 |
Derives rasn::AsnType with rasn(automatic_tags) |
serde ("serde") |
1 |
 |
Derives serde::{Serialize, Deserialize} |
![]() |
![]() |
![]() |
|
👨💻 Development
git clone https://github.com/known-facts/known-types.git
