sifredb_derive/lib.rs
1//! Derive macros for `SifreDB`.
2//!
3//! This crate provides procedural macros for automatic encryption/decryption
4//! of struct fields.
5
6#![warn(clippy::pedantic, clippy::nursery)]
7
8use proc_macro::TokenStream;
9
10/// Derive macro for automatic field encryption.
11///
12/// # Example
13///
14/// ```rust,ignore
15/// use sifredb_derive::Encryptable;
16///
17/// #[derive(Encryptable)]
18/// struct User {
19/// #[enc(mode = "aead")]
20/// name: String,
21/// #[enc(mode = "deterministic", indexed = true)]
22/// email: String,
23/// }
24/// ```
25#[proc_macro_derive(Encryptable, attributes(enc))]
26pub fn derive_encryptable(_input: TokenStream) -> TokenStream {
27 // Placeholder implementation
28 // Will be implemented in future tasks
29 TokenStream::new()
30}