# Sigils # **sigils** is a trait-driven Rust math library offering vector, quaternion, and numeric abstractions for simulation, graphics, and systems-level development. It focuses on performance, generic correctness, and ergonomic APIs without sacrificing type safety or precision. --- ## Features - Generic `Vector` and `Quaternion` trait abstractions - Implementation of common 2D and 3D types (`Vec2`, `Vec3`, `Quat`) - Traits for scalar math operations on floats and integers - Designed for zero-cost abstractions and compiler optimization - Suited for simulation, embedded graphics, and procedural tools --- ## Motivation Simulation, game, and physics systems often need mathematical primitives with predictable behavior, performance, and strong type guarantees. **sigils** exists to provide just that, core math abstractions without the complexity or bloat of large game engines or math suites. --- ## Getting Started First, add the CyberMages registry to your Cargo config: ```toml [registries.cybermages] index = "sparse+https://workshop.cybermages.tech/api/packages/CyberMages/cargo/" ``` Then add `sigils` to your dependencies: ```toml [dependencies] sigils = { version = "0.1", registry = "cybermages" } ``` --- ## Example Usage ```rust TODO: Rotate a Vector with a Quaternion. ``` --- ## Documentation Documentation can be generated locally with: ```bash cargo doc --open ``` --- ## Design Highlights - Uses traits to decouple math concepts from specific types - Scalar math via trait constraints allows use of `f32`, `f64`, or custom types - Encourages composability across simulation and rendering domains - Small and dependency-free core, easy to embed or extend ## Notes The code in this library uses macros pretty heavily. As such, please check the trait's documentation for a function since the macro definition will not really be documented. This was not done to make documentation difficult, but to make coding the library easier and to make it easier to maintain. --- ## Copyright & License Copyright 2015 CyberMages LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this library except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS