CyberMages LLC

Innovation Powered by Wizardry

sigils (0.1.0)

Published 2025-07-30 00:20:34 -04:00 by myrddin

Installation

[registry]
default = "gitea"

[registries.gitea]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add sigils@0.1.0

About this package

A mathematics library.

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:

[registries.cybermages]
index = "sparse+https://workshop.cybermages.tech/api/packages/CyberMages/cargo/"

Then add sigils to your dependencies:

[dependencies]
sigils = { version = "0.1", registry = "cybermages" }

Example Usage

TODO: Rotate a Vector with a Quaternion.

Documentation

Documentation can be generated locally with:

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 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

Dependencies

ID Version
binding ^0.1.0
pact ^0.1.0

Keywords

sigils math
Details
Cargo
2025-07-30 00:20:34 -04:00
3
Jason Travis Smith <Myrddin@CyberMages.tech>
Apache-2.0
28 KiB
Assets (1)
Versions (1) View all
0.1.0 2025-07-30