Skip to content

Releases: DevKiDCosmo/Moo

0.1.23-alpha

07 Jul 19:16

Choose a tag to compare

0.1.23-alpha Pre-release
Pre-release

Moo Library Release Notes

Version 0.1.23-alpha (2025-07-07)

Overview

Moo (もう) is a universal source-of-truth mathematical library, providing high-performance, precise mathematical operations across multiple programming languages via a native DLL/SO interface. This release includes extensive API coverage, unified behavior across platforms, and multi-language support.


✨ New Features

  • Multi-language API Bindings:

  • Universal Mathematical API:

    • Arithmetic: absolute, min, max
    • Division: idiv, mod, flmod
    • Integer Math: gcd, lcm
    • Factorials & Binomials: fac, binom, factable, clearptr
    • Permutations & Combinations: permutation, combination, genPerm, freeptr
    • Rounding: dfloor, dceil, round, roundk
    • Advanced Math: pow, fpow, sqrt, ksqrt, exp, ln, log
    • All APIs are standardized and listed in docs/api.md and api/sot.api.json.
  • Memory Management

    • Functions returning pointer arrays (e.g., factable, genPerm) always provide a corresponding cleanup function (clearptr, freeptr), ensuring no memory leaks and safe cross-language use.

🛠️ Improvements / Changes

  • API Standardization
    All APIs now follow the universal sot.api.json definition, ensuring consistent signatures, error handling, and memory rules across languages.

  • Cross-platform Build System

    • Windows: CMake, MSVC, and Meson builds are tested and produce Moo.dll.
    • Linux & MacOS: CMake and Meson builds produce libMoo.so / libMoo.dylib.
    • Continuous Integration: Full matrix build for Windows, Linux (Debian, Ubuntu, Alpine, Fedora, etc.), and MacOS.
      See .github/workflows/compiling.yml.
  • Documentation Unified

    • All supported language APIs are documented in docs/api.md.
    • API reference source-of-truth is api/sot.api.json.
    • Basic operations, advanced mathematical function call mappings, and draft notes for future features are now available in the docs/ folder.

🐛 Bug Fixes

  • Memory Safety

    • Fixed: All pointer-returning functions (like factable and genPerm) must be cleaned up by the caller using the provided API (clearptr/freeptr). All bindings enforce this, preventing memory leaks.
    • Fixed: Edge-cases in factable and genPerm now properly return nullptr or raise an error if parameters are out-of-range or allocation fails.
  • Mathematical Correctness

    • Fixed: gcd, lcm, mod functions now handle zero and negative values correctly.
    • Fixed: pow/fpow functions handle integer and floating point exponents accurately, with fallback to exponential/logarithmic evaluation as needed.
    • Fixed: flmod and mod both now provide correct results for negative operands (see docs/basics.md).
  • Cross-Platform / API Edge Cases

    • Fixed: Floating point rounding functions (round, roundk) now behave consistently across platforms.
    • Fixed: All APIs now check argument ranges (e.g., genPerm limited to n <= 12 to prevent excessive memory allocation).
    • Fixed: DLL/SO function name conflicts (e.g., dceil/dfloor instead of ceil/floor) resolved to avoid collisions with standard libraries.
  • Build System

    • Fixed: CMake, Meson, and CI scripts now support all major platforms and compilers, including proper artifact upload for all variants.

📝 Known Issues & Limitations

  • API Coverage:

    • Trigonometric, hyperbolic, advanced number theory, and matrix operations are planned but not yet implemented.
    • Some mathematical operations (prime factorization, CRT, Bernoulli/binomial distribution, etc.) are still in draft or not implemented.
  • Permutations:

    • genPerm(n) is limited to n <= 12 to avoid excessive memory usage (due to factorial growth).
  • Documentation:

    • Some language bindings are still in draft or marked as TODO in the docs.
  • Error Handling:

    • Most APIs signal errors via nullptr/NULL pointers or return values; language bindings throw exceptions or return errors accordingly.

📦 Files and Structure

  • api/ — All language bindings
  • src/ — C++ core implementation and headers
  • docs/ — Documentation and drafts
  • .github/workflows/ — CI/CD scripts for build/test on all platforms

🚀 Getting Started

  1. Build or download the appropriate shared library (Moo.dll, libMoo.so, libMoo.dylib) for your platform.
  2. Copy the relevant API binding for your language from /api/.
  3. See docs/api.md for example usage and API reference.

📜 Full Changelog

Major Changes

  • First stable cross-platform release with multi-language support.
  • Unified API reference and behavior.
  • Extensive build/test matrix ensures reliability on Windows, Linux, and MacOS.

Minor Updates

  • Improved documentation for all APIs and math functions.
  • Added error checks and range limitations for all pointer-returning APIs.
  • Refactored all math routines for correctness and platform independence.

🌱 Upcoming / Planned

  • Trigonometric and hyperbolic functions
  • Advanced number theory (primality, CRT, modular inverses)
  • Matrix operations and systems of equations
  • High-precision arithmetic
  • Symbolic math and parser/grammar support
  • More language bindings (Delphi, Pascal, D, Nim, Julia, Haskell, Ruby, R, Perl, Swift, OCaml, V, Zig, etc.)

💖 Thanks

Thanks to all contributors and testers for helping shape Moo into a universal math library for all developers!


0.1.7-Alpha+229a

04 Jul 12:58

Choose a tag to compare

0.1.7-Alpha+229a Pre-release
Pre-release

Supported APIs for Lua, Python, Rust, C#, Plain Dll, Go and Java. All features can be seen in here. In future more APIs should be added to the supported list and more function will be added.