| Crates.io | aither-derive |
| lib.rs | aither-derive |
| version | 0.1.0 |
| created_at | 2025-11-13 05:05:26.976389+00 |
| updated_at | 2025-11-13 05:05:26.976389+00 |
| description | Procedural macros for aither - convert functions into AI tools |
| homepage | |
| repository | https://github.com/lexoliu/aither |
| max_upload_size | |
| id | 1930406 |
| size | 17,789 |
📖 Documentation: For comprehensive documentation with examples, see the inline code documentation in
src/lib.rsand the example fileexamples/tool_macro.rs.
Procedural macros for converting Rust functions into AI tools that can be called by language models.
This crate provides the #[tool] attribute macro that automatically generates the necessary boilerplate code to make your async functions callable by AI models through the aither framework.
Transform any async function into an AI tool by adding the #[tool] attribute:
use aither::Result;
use aither_derive::tool;
#[tool(description = "Get the current UTC time")]
pub async fn get_time() -> Result<&'static str> {
Ok("2023-10-01T12:00:00Z")
}
That's it! Your function can now be called by AI models as a tool.
For detailed examples and comprehensive documentation, please refer to:
src/lib.rs contains extensive inline documentationexamples/tool_macro.rs shows various patterns