#azalia #deserialize #azalia-serde

azalia-serde

🐻‍❄️🪚 Provides useful (de)serialization implementations for common types within external libraries

7 releases

new 0.1.6 Apr 30, 2025
0.1.5 Apr 10, 2025
0.1.1 Mar 30, 2025

#1048 in Encoding

Download history 368/week @ 2025-03-30 473/week @ 2025-04-06 92/week @ 2025-04-13 25/week @ 2025-04-20 212/week @ 2025-04-27

854 downloads per month
Used in azalia

MIT license

20KB
71 lines

🐻‍❄️🪚 azalia-serde

The azalia-serde crate provides blanket serde implementations for crates that don't expose any. This uses Cargo's crate features to explicitly enable which implementations you need, rather than adding them all at once.

We only provide implementations to Rust types that are most used by us, so we will probably reject most requests to add more types other than the ones listed.

Usage

tracing::Level (requires tracing feature)

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize)]
struct MyStruct {
    #[serde(with = "azalia_serde::tracing")]
    level: tracing::Level,
}

aws_types::types::Region (requires aws feature)

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize)]
struct MyStruct {
    #[serde(with = "azalia_serde::aws::region")]
    region: aws_types::region::Region
}

🐻‍❄️🪚 azalia-serde

The azalia-serde crate provides blanket serde implementations for crates that don't expose any. This uses Cargo's crate features to explicitly enable which implementations you need, rather than adding them all at once.

We only provide implementations to Rust types that are most used by us, so we will probably reject most requests to add more types other than the ones listed.

Usage

tracing::Level (requires tracing feature)

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize)]
struct MyStruct {
    #[serde(with = "azalia_serde::tracing")]
    level: tracing::Level,
}

aws_types::types::Region (requires aws feature)

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize)]
struct MyStruct {
    #[serde(with = "azalia_serde::aws::region")]
    region: aws_sdk_s3::types::Region
}

Dependencies

~0.1–10MB
~87K SLoC