{"id":57800,"library":"synstructure","title":"synstructure","description":"Helper methods and macros for custom derives","status":"active","version":"0.13.2","language":"rust","source_language":null,"source_url":"https://github.com/mystor/synstructure","tags":["proc-macro","derive","syn","metaprogramming"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nsynstructure = \"0.13.2\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add synstructure","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"decl_derive","correct":"use synstructure::decl_derive;"}],"quickstart":{"code":"use synstructure::decl_derive;\n\ndecl_derive!([MyDerive] => my_derive);\n\nfn my_derive(s: synstructure::Structure) -> proc_macro2::TokenStream {\n    s.gen_impl(quote! {\n        fn my_method() {}\n    })\n}","lang":"rust","description":"Declare a custom derive macro using synstructure"},"warnings":[{"fix":"Set `crate-type = [\"proc-macro\"]` in Cargo.toml and add `syn`, `quote`, `proc-macro2` as dependencies","message":"Requires `proc-macro` crate type and dependencies on `syn`, `quote`, `proc-macro2`","severity":"gotcha","affected_versions":">=0.10"}],"env_vars":null,"search_vec":"'custom':7 'deriv':8,12 'helper':2 'macro':5,11 'metaprogram':14 'method':3 'proc':10 'proc-macro':9 'syn':13 'synstructur':1","created_at":"2026-06-16T15:58:34.684704+00:00","updated_at":"2026-06-16T15:58:34.684704+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/mystor/synstructure","github":"https://github.com/mystor/synstructure","docs":"https://docs.rs/synstructure/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["other"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}