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 May 24, 2021
0.1.0 Feb 25, 2018

#3 in #procedural-macro

Download history 127/week @ 2024-09-17 35/week @ 2024-09-24 8/week @ 2024-10-01 1/week @ 2024-10-08

322 downloads per month
Used in pocket_prover-set

MIT license

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