| Crates.io | serdes-ai-macros |
| lib.rs | serdes-ai-macros |
| version | 0.1.2 |
| created_at | 2026-01-15 23:08:17.295013+00 |
| updated_at | 2026-01-23 16:43:17.603279+00 |
| description | Procedural macros for serdes-ai (tool definitions, output schemas) |
| homepage | |
| repository | https://github.com/janfeddersen-wq/serdesAI |
| max_upload_size | |
| id | 2047321 |
| size | 60,916 |
Procedural macros for serdes-ai (tool definitions, output schemas)
This crate provides procedural macros for SerdesAI:
#[derive(Output)] - Derive the Output trait with JSON schema generation#[derive(Tool)] - Derive tool implementations from functions[dependencies]
serdes-ai-macros = "0.1"
use serdes_ai_macros::Output;
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Output)]
struct ExtractedData {
/// The person's name
name: String,
/// Their age in years
age: u32,
/// Optional email address
email: Option<String>,
}
use serdes_ai_macros::tool;
#[tool(description = "Calculate the sum of two numbers")]
async fn add(a: i32, b: i32) -> i32 {
a + b
}
This crate is part of the SerdesAI workspace.
For most use cases, you should use the main serdes-ai crate which re-exports these macros.
MIT License - see LICENSE for details.