Giter VIP home page Giter VIP logo

magnum-singles's Introduction

This repository contains single-header libraries from the Magnum engine.

Join the chat at https://gitter.im/mosra/magnum Build Status MIT License

LIBRARIES

There are the following single-header libraries at the moment. This list will grow with more Magnum features being exposed this way.

Library LoC PpLoC[1] Description
CorradeArrayView.h 848 2025 Containers::ArrayView and Containers::StaticArrayView, lightweight alternatives to std::span
CorradeStridedArrayView.h 1280[2] 2855 Containers::StridedArrayView, multi-dimensional strided array view. Depends on CorradeArrayView.h.
CorradeArray.h 895[2] 2671 Containers::Array and Containers::StaticArray, lightweight alternatives to std::vector and std::array. Depends on CorradeArrayView.h.
CorradeGrowableArray.h 1106[2] 4256 Growable APIs for Containers::Array. Depends on CorradeArray.h.
CorradeEnumSet.h 265 1705 Containers::EnumSet, a type-safe set of bits
CorradeOptional.h 456 1879 Containers::Optional, a lightweight alternative to std::optional
CorradePair.h 303 1723 Containers::Pair, a lightweight alternative to std::pair
CorradePointer.h 361 1773 Containers::Pointer, a lightweight alternative to std::unique_ptr
CorradeReference.h 119 1627 Containers::Reference, a lightweight alternative to std::reference_wrapper
CorradeScopeGuard.h 248 1704 Containers::ScopeGuard, a lightweight alternative to std::unique_ptr with a custom deleter
CorradeString.hpp 2258[2] 2183 Containers::String and Containers::StringView, lightweight and optimized string (view) classes. Depends on CorradeEnumSet.h, the implementation depends on CorradePair.h and CorradeCpu.hpp.
CorradeTriple.h 337 1740 Containers::Triple, a lightweight alternative to a three-component std::tuple
CorradeCpu.hpp 1717 1993 Cpu library, compile-time and runtime CPU feature detection and dispatch
CorradeStlForwardArray.h 88 2003[3] Corrade's forward declaration for std::array, a lightweight alternative to the full <array> (15k PpLOC[1]) where supported
CorradeStlForwardString.h 89 68 Corrade's forward declaration for std::string, a lightweight alternative to the full <string> (11k PpLOC[1]) where supported
CorradeStlForwardTuple.h 102 2228 Corrade's forward declaration for std::tuple, a lightweight alternative to the full <tuple> (13k PpLOC[1]) where supported
CorradeStlForwardVector.h 77 481[3] Corrade's forward declaration for std::vector, a lightweight alternative to the full <vector> (9k PpLOC[1]) where supported
CorradeStlMath.h 73 3222[4] Corrade's optimized <cmath>, without the heavy C++17 additions (which is otherwise 11k PpLOC[4])
MagnumMath.hpp 7950 10096 Math namespace, a full-featured graphics-oriented linear algebra library

[1] — lines of code after a preprocessor run, with system includes expanded. Gathered using GCC 13.2 and libstdc++, unless said otherwise.

[2] — not a total size due to inter-library dependencies

[3] — gathered using Clang 15.0 and libc++, since libstdc++ doesn't have a forward declaration for std::array / std::vector

[4] — gathered using GCC 13.2, libstdc++ and -std=c++17

Where is the documentation?

Single-header libraries provided here are generated from multi-file sources in the Magnum project. This is done for two reasons — first, documentation and test coverage is much easier to maintain in the setting of a bigger project, avoiding any redundancy or duplicated efforts. Second, because the resulting files are generated with non-essential parts stripped away, there's no need to worry about bloating them due to original implementations having extensive documentation or rarely used features.

With the goal being easy integration, the files are deliberately free of all comments and documentation blocks to keep their size small. Documentation for each library is provided in the official Magnum documentation, linked from the table above. Each library file contains the same documentation link, together with a concrete Git revision it was generated from and a changelog for a few versions back for easier overview when updating.

For more information read the single-header library docs. The libraries are generated using acme.py, which is a part of Corrade. See its documentation, if you are interested. Particular libraries are introduced on the Magnum blog:

What about test coverage?

Testing done in this repository is mainly to ensure the libraries are generated correctly. Extensive testing on variety of compilers and OSes with > 99% test coverage is done in the Magnum Project itself. See the Build Status page for more information.

Reporting bugs and contributing

As always, bug reports, feature requests and code contributions are very welcome. However again please note the files in this repository are generated from original sources in the corrade and magnum repositories, meaning that ideally all PRs should go there instead, as there's a better infrastructure for documentation and testing. We don't enforce this rule though — if you have an important bugfix, it's better if you submit it here than not at all 😉

SUPPORTED PLATFORMS

All libraries are tested on these platforms:

And on these compilers:

  • GCC 4.8.1 and newer (and equivalent MinGW-w64 version)
  • Clang 6.0 and newer (or AppleClang 10.0 and newer), both libstdc++ and libc++
  • MSVC 2015 and newer

CONTACT & SUPPORT

See also the Magnum Project Contact & Support page for further information.

Credits

Libraries presented here are a result of a dedicated work by many community members. List of all contributors to the Magnum Project can be found in the documentation.

License

Magnum is licensed under the MIT/Expat license, see the COPYING file for details.

magnum-singles's People

Contributors

mosra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magnum-singles's Issues

Missing v2020.06 release

Hello @mosra! Would it be possible to make a tag/release for the v2020.06 release? That would enable me to say..

git clone https://github.com/mosra/magnum-singles --branch v2020.06

..like most other Magnum repos, which would be fabulous!

Support for span subviews

Hi,

Would you consider adding subviews (first/last/subspan) to CorradeArrayView.h for STL compatibility?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.