2 releases

0.1.1 May 6, 2024
0.1.0 Jul 3, 2023

#1911 in Procedural macros

Download history 1/week @ 2024-02-19 17/week @ 2024-02-26 4/week @ 2024-03-11 15/week @ 2024-04-01 3/week @ 2024-04-08 9/week @ 2024-04-15 157/week @ 2024-05-06 7/week @ 2024-05-13

165 downloads per month
Used in 2 crates (via syact)

MIT license

9KB
109 lines

syact_macros

A helper crate for proc-macros used by the syact.

SyncCompGroup

Includes a derive proc-macro to implement SyncCompGroup for a struct consisting of only fields that include SyncComp.

use syact::prelude::*;

// Simple group of components that consists of multiple fields
#[derive(SyncCompGroup)]        // Automatically implements SyncCompGroup
#[derive(StepperCompGroup)]     // Automatically implements StepperCompGroup
struct TestGroup {
    pub base : Stepper,
    pub arm : Stepper
}

fn main() {
    let test = TestGroup {
        base: Stepper::new_gen(StepperConst::GEN),
        arm: Stepper::new_gen(StepperConst::GEN)
    };

    let test_ref : &dyn SyncCompGroup<2> = &test;

    // Usually requires multiple curve builders
    let path_builder : PathBuilder<2> = test.create_path_builder();
}

Dependencies

~330–790KB
~19K SLoC