derive_adhoc/
lib.rs

1#![doc=include_str!("../README.md")]
2
3// This is the "library" crate.
4//
5// It is conventional for proc macro crates to be wrapped up
6// in a library crate, which reexport the proc macros, mostly because
7// a proc macro crate cannot contain anything else.
8//
9// Currently our plans do not appear to include any items other than
10// proc macros.  But we shouldn't foreclose that.  So for now
11// this library crate ought to declare a dependency on the macro crate
12// and reexport the macros.
13//
14// Also this crate is where the docs live, right here as crate-level
15// docs.
16
17pub use derive_adhoc_macros::derive_adhoc_expand;
18pub use derive_adhoc_macros::{define_derive_adhoc, derive_adhoc, Adhoc};
19
20// We (ab)use the module system as places to hang our documentation.
21
22#[doc=include_str!("../doc/introduction.md")]
23pub mod doc_introduction {}
24
25#[doc=include_str!("../doc/reference.md")]
26pub mod doc_reference {}
27
28#[doc=include_str!("../doc/implementation.md")]
29pub mod doc_implementation {}
30
31#[doc=include_str!("../CHANGELOG.md")]
32pub mod doc_changelog {}
33
34#[cfg(not(feature = "minimal-1"))]
35compile_error! { "You must enable at least one derive-adhoc crate feature!" }