alga2-derive
#[derive(Alga)] — one line brings a struct into the whole
alga2 algebraic tower.
use Additive;
use Magma;
use Alga;
let a = Vec2 ;
let b = Vec2 ;
assert_eq!;
Generates the component-wise chain — additive Magma → Monoid → Group →
AbelianGroup, multiplicative Magma → Monoid, the two-operator
Semiring → Ring → CommutativeRing → Field chain, and
Module/VectorSpace — with the field types' bounds as the where clause.
Levels: "Monoid", "Group", "Ring" (default), "Field".
Structs only (named, tuple, or generic, including where-clause constraints). No tower imports are needed at the call site.
License
MIT OR Apache-2.0, same as alga2.