4 releases
Uses new Rust 2024
new 0.0.3 | May 13, 2025 |
---|---|
0.0.2 | May 12, 2025 |
0.0.1 | May 11, 2025 |
0.0.0 | May 9, 2025 |
#221 in Configuration
330 downloads per month
415KB
6K
SLoC
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
Crate | Version | Docs | Summary |
---|---|---|---|
known-types | Well-known types. | ||
known-types-anthropic | Well-known types for Anthropic APIs. | ||
known-types-google | Well-known types for Google APIs. | ||
known-types-graphql | Well-known types for GraphQL specifications. | ||
known-types-ietf | Well-known types for IETF specifications. | ||
known-types-nostr | Well-known types for the Nostr protocol. | ||
known-types-openai | Well-known types for OpenAI APIs. | ||
known-types-pypi | Well-known types for Python Package Index (PyPI) APIs. | ||
known-types-rubygems | Well-known types for RubyGems.org APIs. | ||
known-types-w3c | Well-known types for W3C specifications. | ||
known-types-x | Well-known types for X (formerly Twitter) APIs. | ||
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
Dependencies
~0–24MB
~328K SLoC