8 releases (breaking)
Uses old Rust 2015
0.9.0 | Sep 20, 2024 |
---|---|
0.8.0 | Oct 7, 2022 |
0.7.0 | Mar 26, 2022 |
0.6.0 |
|
0.1.0 | Feb 25, 2018 |
#3 in #procedural-macro
322 downloads per month
Used in pocket_prover-set
8KB
92 lines
pocket_prover-derive
Derive procedural macros for pocket_prover
.
Example:
#[macro_use]
extern crate pocket_prover_derive;
extern crate pocket_prover;
use pocket_prover::Construct;
#[derive(Construct)]
pub struct Foo {
pub a: u64,
pub b: u64,
}
Since pocket_prover
uses only u64
,
it is the only valid concrete field type.
The macro supports generic arguments, assuming that
the inner type implements Construct
:
#[derive(Construct)]
pub struct Bar<T = ()> {
pub foo: T,
pub a: u64,
pub b: u64,
}
lib.rs
:
pocket_prover-derive
Derive procedural macros for pocket_prover
.
Example:
#[macro_use]
extern crate pocket_prover_derive;
extern crate pocket_prover;
use pocket_prover::Construct;
#[derive(Construct)]
pub struct Foo {
pub a: u64,
pub b: u64,
}
Since pocket_prover
uses only u64
,
it is the only valid concrete field type.
The macro supports generic arguments, assuming that
the inner type implements Construct
:
#[derive(Construct)]
pub struct Bar<T = ()> {
pub foo: T,
pub a: u64,
pub b: u64,
}
Dependencies
~2MB
~42K SLoC