: 1
sha256sum: cbe03f572f17d01a83772968b357b227a34aa8f1e645faa3106bfb11bca4e110
:
name: chaiscript
version: 6.1.0
type: exe
language: c++
project: chaiscript
summary: ChaiScript Interpreter based on 'libchaiscript'
license: BSD-3-Clause
description:
\
<a href="https://www.patreon.com/bePatron?u=2977989&redirect_uri=https%3A%2F%\
2Fwww.patreon.com%2Flefticus">
    <img height="40" width="204" src="https://s3-us-west-1.amazonaws.com/widg\
et-images/become-patron-widget-medium%402x.png">
</a>


Master Status: [![Linux Build Status](https://travis-ci.org/ChaiScript/ChaiSc\
ript.png?branch=master)](https://travis-ci.org/ChaiScript/ChaiScript)\
 [![Windows Build status](https://ci.appveyor.com/api/projects/status/6u3r4s8\
1kkjqmsqw?svg=true)](https://ci.appveyor.com/project/lefticus/chaiscript)\
 [![codecov.io](http://codecov.io/github/ChaiScript/ChaiScript/coverage.svg?b\
ranch=master)](http://codecov.io/github/ChaiScript/ChaiScript?branch=master)

Develop Status: [![Linux Build Status](https://travis-ci.org/ChaiScript/ChaiS\
cript.png?branch=develop)](https://travis-ci.org/ChaiScript/ChaiScript)\
 [![Windows Build status](https://ci.appveyor.com/api/projects/status/6u3r4s8\
1kkjqmsqw/branch/develop?svg=true)](https://ci.appveyor.com/project/lefticus/\
chaiscript/branch/develop) [![codecov.io](http://codecov.io/github/ChaiScript\
/ChaiScript/coverage.svg?branch=develop)](http://codecov.io/github/ChaiScript\
/ChaiScript?branch=develop)

<a href="https://scan.coverity.com/projects/5297">
  <img alt="Coverity Scan Build Status"
       src="https://img.shields.io/coverity/scan/5297.svg"/>
</a>

ChaiScript

http://www.chaiscript.com

(c) 2009-2012 Jonathan Turner
(c) 2009-2017 Jason Turner

Release under the BSD license, see "license.txt" for details.


Introduction
============

[![Gitter](https://badges.gitter.im/JoinChat.svg)](https://gitter.im/ChaiScri\
pt/ChaiScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_con\
tent=badge)

ChaiScript is one of the only embedded scripting language designed from the 
ground up to directly target C++ and take advantage of modern C++ development 
techniques, working with the developer like he expects it to work.  Being a 
native C++ application, it has some advantages over existing embedded\
 scripting 
languages:

1. It uses a header-only approach, which makes it easy to integrate with 
   existing projects.
2. It maintains type safety between your C++ application and the user scripts.
3. It supports a variety of C++ techniques including callbacks, overloaded 
   functions, class methods, and stl containers.


Requirements
============

ChaiScript requires a C++14 compiler to build with support for variadic 
templates.  It has been tested with gcc 4.9 and clang 3.6 (with libcxx). 
For more information see the build 
[dashboard](http://chaiscript.com/ChaiScript-BuildResults/index.html).

Usage
=====

* Add the ChaiScript include directory to your project's header search path
* Add `#include <chaiscript/chaiscript.hpp>` to your source file
* Instantiate the ChaiScript engine in your application.  For example, create\
 a 
  new engine with the name `chai` like so: `chaiscript::ChaiScript chai`
* The default behavior is to load the ChaiScript standard library from a 
  loadable module. A second option is to compile the library into your code,
  see below for an example.

Once instantiated, the engine is ready to start running ChaiScript source. \
 You
have two main options for processing ChaiScript source: a line at a time\
 using 
`chai.eval(string)` and a file at a time using `chai.eval_file(fname)`

To make functions in your C++ code visible to scripts, they must be\
 registered 
with the scripting engine.  To do so, call add:

    chai.add(chaiscript::fun(&my_function), "my_function_name");

Once registered the function will be visible to scripts as "my_function_name"

Examples
========

ChaiScript is similar to ECMAScript (aka JavaScript(tm)), but with some 
modifications to make it easier to use.  For usage examples see the "samples" 
directory, and for more in-depth look at the language, the unit tests in the 
"unittests" directory cover the most ground.

For examples of how to register parts of your C++ application, see 
"example.cpp" in the "samples" directory. Example.cpp is verbose and shows\
 every 
possible way of working with the library. For further documentation generate 
the doxygen documentation in the build folder or see the website 
http://www.chaiscript.com.


The shortest complete example possible follows:

```C++
/// main.cpp

#include <chaiscript/chaiscript.hpp>

double function(int i, double j)
{
  return i * j;
}

int main()
{
  chaiscript::ChaiScript chai;
  chai.add(chaiscript::fun(&function), "function");

  double d = chai.eval<double>("function(3, 4.75);");
}
```

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Packages for ChaiScript Library and Interpreter

[ChaiScript](https://chaiscript.com/index.html) is a header-only C++ embedded\
 scripting language loosely based on ECMA script. It is designed for ease of\
 use and tight integration with C++.

[![Official](https://img.shields.io/website/https/chaiscript.com/index.html.s\
vg?down_message=offline&label=Official&style=for-the-badge&up_color=blue&up_m\
essage=online)](https://chaiscript.com/index.html)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/c\
haiscript.svg?down_message=offline&label=build2&style=for-the-badge&up_color=\
blue&up_message=online)](https://github.com/build2-packaging/chaiscript)
[![cppget.org](https://img.shields.io/website/https/cppget.org/chaiscript.svg\
?down_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_m\
essage=online)](https://cppget.org/chaiscript)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/ch\
aiscript.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=\
for-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/c\
haiscript)

## Usage
The [original ChaiScript repository](https://github.com/ChaiScript/ChaiScript\
) has been split into multiple build2 packages to allow for greater\
 flexibility.
The `libchaiscript` package is used to get access to the ChaiScript\
 header-only library.
The package `chaiscript` makes ChaiScript's own interpreter `chai` available\
 to be used.
`chaiscript-stdlib` exports the compiled and dynamically loadable standard\
 library module for the basic ChaiScript engine.
Typically, you will not need to use this one.

Make sure to add the or alpha or stable section of the `cppget.org`\
 repository to your project's `repositories.manifest` to be able to fetch the\
 packages.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the `cppget.org` repository is not an option then add this Git repository\
 itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/chaiscript.git

Add the respective dependencies in your project's `manifest` file to make the\
 packages available for import.
Hereby, all packages should use the same version constraint.

    depends: libchaiscript ^ 6.1.0
    # or
    depends: { libchaiscript chaiscript chaiscript-stdlib } ^ 6.1.0

The header-only C++ library to use ChaiScript as an embedded language can be\
 imported by the following declaration in a `buildfile`.

    import chaiscript = libchaiscript%lib{chaiscript}

Using the `chai` interpreter for ChaiScript scripts, as a REPL, or as\
 build-time dependency with immediate and standard importation is supported.
Because it is not able to change the code of `chai`, there is no way for now\
 to provide any metadata in the executable.

    import chai = chaiscript%exe{chai}
    # or
    import! chai = chaiscript%exe{chai}

To import the dynamically loadable module which provides the standard library\
 for a ChaiScript instance, we need to rely on metadata.
A dynamic module should not be linked to your executable but instead loaded\
 at runtime.
Hence, to use it properly for running ChaiScript scripts for tests or other\
 things, you would need the module as a prerequisite but only use its\
 directory as input.
This can be accomplished by immediate importation with metadata support.

    import! [metadata, rule_hint=cxx.link] \\
        stdlib_module = chaiscript-stdlib%libs{chaiscript_stdlib}
    stdlib_dir = [dir_path] $($stdlib_module: chaiscript_stdlib.dir)

## Configuration

<!-- ### Installation of the Standard Library Module
To be able to automatically find the standard library, its installation\
 directory should also follow the patterns given by the implementation of\
 ChaiScript itself where it seems to be basically hardcoded.
To not run into problems with the `pkg-config` files and other methods to\
 reimport the `chaiscript_stdlib` module, we leave this part up to\
 configuration.
The following option is the recommended way of configuring the install\
 command inside the `config.build` file that lies in the `build` directory of\
 your project's configuration.

    config.install.lib = exec_root/lib/chaiscript/
 -->
### Multithread Support
Multithread support is enabled by default and may be turned off by using the\
 following configuration variable.
On Unix-based targets, `pthread` will be linked when enabled.

    config [bool] config.libchaiscript.multithread_support_enabled ?= true

### Dynamic Module Loading
The support to dynamically load ChaiScript modules is enabled by default and\
 may be turned off by using the following configuration variable.

    config [bool] config.libchaiscript.dynload_enabled ?= true

### Use of GNU `readline`
For now, the use of the GNU `readline` library for the ChaiScript interpreter\
 `chai` is disabled by default to allow for out-of-the-box CI builds.
<!-- This is mainly the case to remove system dependencies for CI. -->
If `readline` is available on the system, we recommend to enable it.

    config [bool] config.chaiscript.use_readline ?= false


## Issues and Notes
- Supported Platforms:
    + Linux: GCC, Clang but not with`libc++`
    + Windows: MSVC, GCC, and Clang
    + MacOS: `chaiscript-stdlib` is not supported
<!-- - The installation path of `chaiscript_stdlib` is basically hardcoded.\
 Look into `libchaiscript/chaiscript_stdlib/buildfile` for some notes what\
 could be changed. -->
- ChaiScript is not made for C++20 and higher language standards. As the\
 library is header-only, we do not restrict the language standard of the\
 library package `libchaiscript` but instead keep it to be `cxx.std =\
 latest`. Especially when using Clang, this may result in compilation errors\
 in a project that uses ChaiScript, such as it has been with its own samples\
 and tests. For now, the workaround is to force the C++17 standard with\
 `cxx.std = 17`. If this is not an option, this package will probably not\
 work with your project.
- Using Clang on Windows with MSVC, the object copy count test given in the\
 `compiled_tests.cpp` file fails due to the wrong number of destructor and\
 move calls. This is most likely an implementation issue of ChaiScript and,\
 looking into the up-to-date `develop` branch, fixed in the prerelease of\
 version `7.0.0`.
- This package does not build or execute the `fuzzer` test.
- This package does not build or execute the performance tests because\
 `valgrind` would be needed.
- Not all unit tests based on ChaiScript scripts are sucessfull when using\
 Clang with `libc++`. This seems to be an implementation issue of the\
 ChaiScript library itself.
- To fix the strange inclusion scheme of the statically generated libraries\
 `parser` and `stdlib`, their content actually needed to be copied and\
 adjusted.
- If there would ever be a new version, check against new script files for\
 testing and adjust all the symbolic links.

## Contributing
Thanks in advance for your help and contribution to keep this package\
 up-to-date.
For now, please, file an issue on [GitHub](https://github.com/build2-packagin\
g/chaiscript/issues) for everything that is not described below.

### Recommend Updating Version
Please, file an issue on [GitHub](https://github.com/build2-packaging/chaiscr\
ipt/issues) with the new recommended version.

### Update Version by Pull Request
1. Fork the repository on [GitHub](https://github.com/build2-packaging/chaisc\
ript) and clone it to your local machine.
2. Run `git submodule init` and `git submodule update` to get the current\
 upstream directory.
3. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
4. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
5. Test if the packages compile and execute examples and tools.
6. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
7. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
8. Run `bdep ci` and test for errors.
9. If everything works fine, make a pull request on GitHub and write down the\
 `bdep ci` link to your CI tests.
10. After a successful pull request, we will run the appropriate commands to\
 publish a new package version.

### Update Version Directly if You Have Permissions
1. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
2. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
3. Test if the packages compile and execute examples and tools.
4. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
5. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
6. Run `bdep ci` and test for errors and warnings.
7. When successful, run `bdep release --tag --push` to push new tag version\
 to repository.
8. Run `bdep publish` to publish the package to [cppget.org](https://cppget.o\
rg).

\
package-description-type: text/markdown;variant=GFM
changes:
\
Notes:
=======
Current Version: 6.1.0

### Changes since 6.0.0

 * Add namespacing support #290 @stephenberry
 * Add utf parsing support
 * cheatsheet.md updates
 * `add_class` utility support for scoped enums #306 @StanEpp
 * Parser optimizations #300 @niXman
 * Various JSON fixes #377 #400 #409 #371 @totalgee @dinghram @arcoRocks
 * Various cleanups, bugfixes and warning fixes and minor performance\
 improvements
 * Support for C++17 compilers!
 * Support for UTF8 BOM #439 @AlekMosingiewicz @MarioLiebisch


### Changes since 5.8.6

*6.0.0 is a massive rework compared to 5.x. It now requires a C++14 enabled\
 compiler*

#### Compiler Requirements

* MSVC 2015 or greater
* g++ 4.9 or greater
* clang 3.6 or greater

#### Breaking Changes

* Instantiating a ChaiScript object now, by default, builds the stdlib in
  * This was done to address the most common support issues of loading stdlib\
 dynamically at runtime
  * If you want the old behavior, use include/chaiscript/chaiscript_basic.hpp
* Headers have been reorganized to fully separate stdlib/parser/engine from\
 each other (some faster builds)
* Bootstrap functions no longer return a reference to the module added to\
 (compile time savings)
* It's now no longer possible modify AST_Nodes (compile time, runtime\
 efficiency)
* Function annotations no longer exist (simplifies code, reduces compile\
 time, compile size)

#### New Features Added

* Modular optimization system; this can be accessed via the ChaiScript_Basic\
 interface
* Execution tracing capability; also accessed via ChaiScript_Basic interface
* range-based for loops `for( id : container ) { }` (much better performance\
 than other loop types)
* If-init expressions (ala C++17)
* Support for passing r-value references to functions
* Support for containing unique_ptr
* Add helpers for exposing enum classes to ChaiScript
* Allow typed ChaiScript defined functions to perform conversions on call #303

#### Improvements

* Compile time improvements
* Compile size improvements
* Significant runtime improvements (see "Modular optimization system")
* Significant parser improvements, both with parse-time and parser\
 initialization time (Thanks @niXman)
* Fix type conversion to bool in conditionals

#### Improvements Still Need To Be Made

* File location tracking has been rewritten; this currently means error\
 location reporting is not as good as it was
* Tracing capability needs to be tested and vetted

### Changes since 5.8.5
* Optimize away `return` statements in lambdas also
* Allow conversions to bool in conditionals
* Don't allow `class` statements inside of scopes
* Properly error when a dynamic object non-function member is called

### Changes since 5.8.4
* Fix order of operations for prefix operators
* Make sure atomics are initialized properly
* Remove parsing of unused prefix `&` operator

### Changes since 5.8.3
* Fix case with some numeric conversions mixed with numerics that do not need\
 conversion

### Changes since 5.8.2
* Add support for reference of pointer return types

### Changes since 5.8.1
* Allow casting to non-const & std::shared_ptr<T>


### Changes since 5.8.0
* Fix parsing of floats to be locale independent #250
* Various warning fixes on various platforms


### Changes since 5.7.1
* Make all parser iterator operations range checked
* Parse in-string eval statements once, not once for each execution
* Fix parsing of operators (ie 1<-1 now parses)
* Fix variable scoping for functors
* Exception reduction
* Various object lifetime fixes
* Add JSON support for load / save #207
* Numeric overload resolution fixes #209 
* Fix long long #208 
* Add octal escapes in strings #211
* Fixed sizing of binary literals #213
* Added support for != with bool values #217
* Various value assignment vector fixes 
* Fixed broken hex escape sequences from @ChristianKaeser
* Multiply defined symbols fixes #232 @RaptorFactor
* Add add_class<Enum> helper #233  @vrennert
* Cheatsheet fixes #235 @mlamby
* Fix parsing of strings inside of in-string eval statements
* Allow lower-case global keyword
* Enable thread-local on MSVC (should be significant performance boost)


### Changes since 5.7.0
* Build time reduction
* Build size reduction
* Performance increases
* Fixed ~20 crash-bugs found with fuzzy testing #194
  * Let unhandled exceptions propogate to user
  * Report eval_error when break statement is not in loop
  * Fix handling of 0 length scripts closes #193
  * Don't crash on arity mismatch - Specifically affects the case where no\
 overloads exist for a given function
  * Fix error printing for `bind` calls
  * Handle unexpected continue statement
  * Check arity during bind
  * Don't allow arith conversion on variadic function
  * Correct `bind` parameter match count
  * Add in expected Boxed_Value exception cases
  * Check access to AST, don't allow `;` in func def
  * Don't attempt arithmetic unary & call
  * Don't crash on 0 param call to `bind`
  * Catch errors during member function dispatch
  * Properly handle type of const bool &
* Automatic deduction of lambda type signatures
* Work with non-polymorphic parent/child conversions
* Move to codecov for coverage reporting
* Add `.at` method for Map objects
* Various corrections for support of move-only objects


### Changes since 5.6.0

* Significant code cleanups and reduction
* Smaller builds
* Faster compiles
* Less runtime memory usage
* ~2x faster runtimes
* biicode support
* method_missing feature added #164 @arBmind
* Generic objects with dynamic properties support
* Add ability to call functions contained in properties
* Add lambda captures
* Create [cheatsheet.md](cheatsheet.md) for all-in-one reference of features
* Fix support for libc++
* Eliminate clone of return value stored locally
* Eliminate 'return' statements when last line of function
* Reduce number of runtime exceptions occuring
* Reduce copies / moves of return values. 
* make `use` statement return value of last statement in file
* Add ability to access fixed array sizes
* Add support for scientific notation floating point literals #174  @totalgee


### Changes since 5.5.1
* Throw exception on integer divide by 0
* Add optional type specification to function declarations
   
  ```
  def func(int i, j, double k) {
    // i must be an int.
    // j can be anything
    // k must be a double
    // normal conversion rules still apply
  }
   ```
* Many minor fixes for compiler warnings
* Add support for `std::future` and `std::async`
  ```
  var f := async(someFunction);
  var f2 := async(someFunction2);

  // someFunction and someFunction2 are running in parallel now
  f.get();
  f2.get();
  ```
* Fully support r-value returns, supporting move-only objects and reducing\
 object copies


### Changes since 5.5.0
* 30% performance increase
* Fix handling of object stack, resulting in greatly reduced memory usage
* Code cleanups

### Changes since 5.4.0
* 2x performance increase
* Significant code cleanups
* Throw exception if user attempts to call function on null object
* Allow user defined type conversions
* Fix object lifetime for nested function calls made at the global scope
* Fix returning of boolean values from function calls


### Changes since 5.3.1
* Decreased compile time and build size
* Make "reflection" module built in (losing some of the time / build size\
 gains)
* Add new "class" syntax for ChaiScript defined methods and attributes see:\
 [unittests/class.chai](unittests/class.chai) for examples
* Minor performance enhancements
* major to_string performance enhancements
* Provide API for retrieving registered type name #124
* Added strong reference to container to range object #132


### Changes since 5.3.0
* Add automatic conversion of arithmetic return types, following the same
  rules as conversion of arithmetic types when passing parameters
* Add automatic casting up the inheritence hierarchy when possible.
* Enable travis.ci testing
* Allow users to add globals from within script
* Various static analysis fixes
* Code modernization to C++11
* Unofficial support for Haiku added
* Fix #121 - Inability to compile on cygwin
* Formatting fixes and spelling corrections
* Apply "include what you use" https://code.google.com/p/include-what-you-use/
* Apply clang-modernize
* Various threading fixes
* Performance improvements

### Changes since 5.2.0
* Official support for MSVC with C++11. All major platforms and compilers are\
 now support for C++11 release

### Changes since 4.2.0
* Enhanced unit tests
* Add `continue` statement, fix various use cases for `for`  loops
* Fix use of suffixed numbers in vector initialization
* Code cleanups
* Eliminate global data, which makes code more portable and thread safe
* Fix issue #79
* Merge pretty_print fixes from @mgee #82
* Compiler warning fixes for latest compiler releases
* Fix threading problems
* Fix linking error on MacOS Mavericks #88
* Allow non-const globals
* Make sure user cannot name a variable with `::` in it #91
* Fix various string / map / vector `size` and `count` calls for compilers\
 which have weird overloads for them. #90 #93 #95
* Make module search path relative to the currently running executable
* Build and work with wstring windows builds
* fix for some new line cases in the middle of a vector initialization from\
 jespada

### Changes since 5.1.0
* Add support for automatic conversion of arithmetic types when possible
  and when no ambiguous method dispatch exists.

### Changes since 5.0.0
* Fix sizing of numeric constants to match that of the C++ standard
* Add support for u,ll,l,f suffixes for numeric constants
* Siginificant improvement in error reporting

### Changes since 4.0.0
* Dropped boost in favor of C++11
* Separated out stdlib to make more options for compile time improvements

### Changes since 3.1.0
* svenstaro: Unused variables and CMake consistency fixes
* Added support for returning pointers from functions (#13)
* Compile with -pedantic (#9)
* Fix issues with multiple ChaiScript object types having the same attribute\
 name (#15)
* Prevent variable redeclaration in same scope (#22)
* mgee: Boxed_Number improvements (#27)
* Support switch statements (#34)
* Fix uint16 comparions (#26)
* Add ability to add const_var globals in Module objects (#14)
* Add support for ternary operators ?:
* Add headers to CMakeLists so they show up in IDEs
* Add ability to get vector of defined objects and vector of defined functions
* Fix memory leak in cyclical references
* Clean up static analysis issues discovered
* Fix vector construction to be consistent with map construction
* Increased unit tests to 161
* Performance enhancements

### Changes since 3.0.0
* Numeric operations performance increased approximately 10x
* Looping operations performance increased up to 2x
* Engine start up time decreased
* Several parsing bugs related to index operators fixed
* Added full support for all C algebraic types: double, long double, float,\
 int, long, char,
  uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, int32_t, int64_t
* Enhanced support for capturing of exceptions thrown from ChaiScript in C++

### Changes since 2.3.3
* Code simplifications
* Fully integrate documentation with source code in doxygen style comments
* Unit tests increased from 114 to 137
* Automatic conversion between boost::function objects and ChaiScript\
 functions 
* Many bug fixes
* Minor performance improvements
* Namespace reorganization to make end user code more accessible
* clang support
* VisualStudio 2010 Support
* Support for C++ base classes and automatic upcasting 
* Remove __ reserved identifiers
* Better code organization to reduce #ifdefs 
* clanmills: command line options for chai eval
* clanmills: parser cleanups and code reduction
* Function introspection and reflection 
* Correct function dispatch order to account for base classes and provide a\
 defined order of dispatch 
* Predictable object lifetime that emulates C++ stack lifetime
* emarcotte: pkgconfig support
* standardize on method/member naming and indentation
* 64bit Visual Studio support
* Better support for const objects
* Drastic reduction of runtime exceptions - making debug builds orders of\
 magnitude faster
* Support for platforms with no loadable module support
* Add helper macro for registering class 

\
changes-type: text/markdown;variant=GFM
url: https://chaiscript.com/index.html
doc-url: https://chaiscript.com/docs.html
src-url: https://github.com/ChaiScript/ChaiScript
package-url: https://github.com/build2-packaging/chaiscript/
package-email: packaging@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: libchaiscript == 6.1.0
requires: c++17
builds: default
builds: -( +windows &gcc &!optimized ); Unoptimized compilation with MinGW on\
 Windows takes an eternity to finish.
bootstrap-build:
\
project = chaiscript

using version
using config
using test
using install
using dist

\
root-build:
\
# Configuration
#
config [bool] config.chaiscript.use_readline ?= false

# ChaiScript does not officially support C++20 and higher.
# Test may fail to compile when setting C++ standard to 'latest'.
#
cxx.std = 17

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# ChaiScript is configurable from the outside by macros.
# Hence, we assume headers to be not importable.
#
hxx{*}: cxx.importable = false

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: chaiscript/chaiscript-6.1.0.tar.gz
sha256sum: 89b83bc8d378bab74e3faa4fd5a8c981591e76dd712d74ff7bf645041826a858
:
name: chaiscript-stdlib
version: 6.1.0
type: lib
language: c++
project: chaiscript
summary: Dynamically Loadable Standard Library for ChaiScript Interpreter\
 'chaiscript'
license: BSD-3-Clause
description:
\
<a href="https://www.patreon.com/bePatron?u=2977989&redirect_uri=https%3A%2F%\
2Fwww.patreon.com%2Flefticus">
    <img height="40" width="204" src="https://s3-us-west-1.amazonaws.com/widg\
et-images/become-patron-widget-medium%402x.png">
</a>


Master Status: [![Linux Build Status](https://travis-ci.org/ChaiScript/ChaiSc\
ript.png?branch=master)](https://travis-ci.org/ChaiScript/ChaiScript)\
 [![Windows Build status](https://ci.appveyor.com/api/projects/status/6u3r4s8\
1kkjqmsqw?svg=true)](https://ci.appveyor.com/project/lefticus/chaiscript)\
 [![codecov.io](http://codecov.io/github/ChaiScript/ChaiScript/coverage.svg?b\
ranch=master)](http://codecov.io/github/ChaiScript/ChaiScript?branch=master)

Develop Status: [![Linux Build Status](https://travis-ci.org/ChaiScript/ChaiS\
cript.png?branch=develop)](https://travis-ci.org/ChaiScript/ChaiScript)\
 [![Windows Build status](https://ci.appveyor.com/api/projects/status/6u3r4s8\
1kkjqmsqw/branch/develop?svg=true)](https://ci.appveyor.com/project/lefticus/\
chaiscript/branch/develop) [![codecov.io](http://codecov.io/github/ChaiScript\
/ChaiScript/coverage.svg?branch=develop)](http://codecov.io/github/ChaiScript\
/ChaiScript?branch=develop)

<a href="https://scan.coverity.com/projects/5297">
  <img alt="Coverity Scan Build Status"
       src="https://img.shields.io/coverity/scan/5297.svg"/>
</a>

ChaiScript

http://www.chaiscript.com

(c) 2009-2012 Jonathan Turner
(c) 2009-2017 Jason Turner

Release under the BSD license, see "license.txt" for details.


Introduction
============

[![Gitter](https://badges.gitter.im/JoinChat.svg)](https://gitter.im/ChaiScri\
pt/ChaiScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_con\
tent=badge)

ChaiScript is one of the only embedded scripting language designed from the 
ground up to directly target C++ and take advantage of modern C++ development 
techniques, working with the developer like he expects it to work.  Being a 
native C++ application, it has some advantages over existing embedded\
 scripting 
languages:

1. It uses a header-only approach, which makes it easy to integrate with 
   existing projects.
2. It maintains type safety between your C++ application and the user scripts.
3. It supports a variety of C++ techniques including callbacks, overloaded 
   functions, class methods, and stl containers.


Requirements
============

ChaiScript requires a C++14 compiler to build with support for variadic 
templates.  It has been tested with gcc 4.9 and clang 3.6 (with libcxx). 
For more information see the build 
[dashboard](http://chaiscript.com/ChaiScript-BuildResults/index.html).

Usage
=====

* Add the ChaiScript include directory to your project's header search path
* Add `#include <chaiscript/chaiscript.hpp>` to your source file
* Instantiate the ChaiScript engine in your application.  For example, create\
 a 
  new engine with the name `chai` like so: `chaiscript::ChaiScript chai`
* The default behavior is to load the ChaiScript standard library from a 
  loadable module. A second option is to compile the library into your code,
  see below for an example.

Once instantiated, the engine is ready to start running ChaiScript source. \
 You
have two main options for processing ChaiScript source: a line at a time\
 using 
`chai.eval(string)` and a file at a time using `chai.eval_file(fname)`

To make functions in your C++ code visible to scripts, they must be\
 registered 
with the scripting engine.  To do so, call add:

    chai.add(chaiscript::fun(&my_function), "my_function_name");

Once registered the function will be visible to scripts as "my_function_name"

Examples
========

ChaiScript is similar to ECMAScript (aka JavaScript(tm)), but with some 
modifications to make it easier to use.  For usage examples see the "samples" 
directory, and for more in-depth look at the language, the unit tests in the 
"unittests" directory cover the most ground.

For examples of how to register parts of your C++ application, see 
"example.cpp" in the "samples" directory. Example.cpp is verbose and shows\
 every 
possible way of working with the library. For further documentation generate 
the doxygen documentation in the build folder or see the website 
http://www.chaiscript.com.


The shortest complete example possible follows:

```C++
/// main.cpp

#include <chaiscript/chaiscript.hpp>

double function(int i, double j)
{
  return i * j;
}

int main()
{
  chaiscript::ChaiScript chai;
  chai.add(chaiscript::fun(&function), "function");

  double d = chai.eval<double>("function(3, 4.75);");
}
```

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Packages for ChaiScript Library and Interpreter

[ChaiScript](https://chaiscript.com/index.html) is a header-only C++ embedded\
 scripting language loosely based on ECMA script. It is designed for ease of\
 use and tight integration with C++.

[![Official](https://img.shields.io/website/https/chaiscript.com/index.html.s\
vg?down_message=offline&label=Official&style=for-the-badge&up_color=blue&up_m\
essage=online)](https://chaiscript.com/index.html)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/c\
haiscript.svg?down_message=offline&label=build2&style=for-the-badge&up_color=\
blue&up_message=online)](https://github.com/build2-packaging/chaiscript)
[![cppget.org](https://img.shields.io/website/https/cppget.org/chaiscript.svg\
?down_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_m\
essage=online)](https://cppget.org/chaiscript)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/ch\
aiscript.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=\
for-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/c\
haiscript)

## Usage
The [original ChaiScript repository](https://github.com/ChaiScript/ChaiScript\
) has been split into multiple build2 packages to allow for greater\
 flexibility.
The `libchaiscript` package is used to get access to the ChaiScript\
 header-only library.
The package `chaiscript` makes ChaiScript's own interpreter `chai` available\
 to be used.
`chaiscript-stdlib` exports the compiled and dynamically loadable standard\
 library module for the basic ChaiScript engine.
Typically, you will not need to use this one.

Make sure to add the or alpha or stable section of the `cppget.org`\
 repository to your project's `repositories.manifest` to be able to fetch the\
 packages.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the `cppget.org` repository is not an option then add this Git repository\
 itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/chaiscript.git

Add the respective dependencies in your project's `manifest` file to make the\
 packages available for import.
Hereby, all packages should use the same version constraint.

    depends: libchaiscript ^ 6.1.0
    # or
    depends: { libchaiscript chaiscript chaiscript-stdlib } ^ 6.1.0

The header-only C++ library to use ChaiScript as an embedded language can be\
 imported by the following declaration in a `buildfile`.

    import chaiscript = libchaiscript%lib{chaiscript}

Using the `chai` interpreter for ChaiScript scripts, as a REPL, or as\
 build-time dependency with immediate and standard importation is supported.
Because it is not able to change the code of `chai`, there is no way for now\
 to provide any metadata in the executable.

    import chai = chaiscript%exe{chai}
    # or
    import! chai = chaiscript%exe{chai}

To import the dynamically loadable module which provides the standard library\
 for a ChaiScript instance, we need to rely on metadata.
A dynamic module should not be linked to your executable but instead loaded\
 at runtime.
Hence, to use it properly for running ChaiScript scripts for tests or other\
 things, you would need the module as a prerequisite but only use its\
 directory as input.
This can be accomplished by immediate importation with metadata support.

    import! [metadata, rule_hint=cxx.link] \\
        stdlib_module = chaiscript-stdlib%libs{chaiscript_stdlib}
    stdlib_dir = [dir_path] $($stdlib_module: chaiscript_stdlib.dir)

## Configuration

<!-- ### Installation of the Standard Library Module
To be able to automatically find the standard library, its installation\
 directory should also follow the patterns given by the implementation of\
 ChaiScript itself where it seems to be basically hardcoded.
To not run into problems with the `pkg-config` files and other methods to\
 reimport the `chaiscript_stdlib` module, we leave this part up to\
 configuration.
The following option is the recommended way of configuring the install\
 command inside the `config.build` file that lies in the `build` directory of\
 your project's configuration.

    config.install.lib = exec_root/lib/chaiscript/
 -->
### Multithread Support
Multithread support is enabled by default and may be turned off by using the\
 following configuration variable.
On Unix-based targets, `pthread` will be linked when enabled.

    config [bool] config.libchaiscript.multithread_support_enabled ?= true

### Dynamic Module Loading
The support to dynamically load ChaiScript modules is enabled by default and\
 may be turned off by using the following configuration variable.

    config [bool] config.libchaiscript.dynload_enabled ?= true

### Use of GNU `readline`
For now, the use of the GNU `readline` library for the ChaiScript interpreter\
 `chai` is disabled by default to allow for out-of-the-box CI builds.
<!-- This is mainly the case to remove system dependencies for CI. -->
If `readline` is available on the system, we recommend to enable it.

    config [bool] config.chaiscript.use_readline ?= false


## Issues and Notes
- Supported Platforms:
    + Linux: GCC, Clang but not with`libc++`
    + Windows: MSVC, GCC, and Clang
    + MacOS: `chaiscript-stdlib` is not supported
<!-- - The installation path of `chaiscript_stdlib` is basically hardcoded.\
 Look into `libchaiscript/chaiscript_stdlib/buildfile` for some notes what\
 could be changed. -->
- ChaiScript is not made for C++20 and higher language standards. As the\
 library is header-only, we do not restrict the language standard of the\
 library package `libchaiscript` but instead keep it to be `cxx.std =\
 latest`. Especially when using Clang, this may result in compilation errors\
 in a project that uses ChaiScript, such as it has been with its own samples\
 and tests. For now, the workaround is to force the C++17 standard with\
 `cxx.std = 17`. If this is not an option, this package will probably not\
 work with your project.
- Using Clang on Windows with MSVC, the object copy count test given in the\
 `compiled_tests.cpp` file fails due to the wrong number of destructor and\
 move calls. This is most likely an implementation issue of ChaiScript and,\
 looking into the up-to-date `develop` branch, fixed in the prerelease of\
 version `7.0.0`.
- This package does not build or execute the `fuzzer` test.
- This package does not build or execute the performance tests because\
 `valgrind` would be needed.
- Not all unit tests based on ChaiScript scripts are sucessfull when using\
 Clang with `libc++`. This seems to be an implementation issue of the\
 ChaiScript library itself.
- To fix the strange inclusion scheme of the statically generated libraries\
 `parser` and `stdlib`, their content actually needed to be copied and\
 adjusted.
- If there would ever be a new version, check against new script files for\
 testing and adjust all the symbolic links.

## Contributing
Thanks in advance for your help and contribution to keep this package\
 up-to-date.
For now, please, file an issue on [GitHub](https://github.com/build2-packagin\
g/chaiscript/issues) for everything that is not described below.

### Recommend Updating Version
Please, file an issue on [GitHub](https://github.com/build2-packaging/chaiscr\
ipt/issues) with the new recommended version.

### Update Version by Pull Request
1. Fork the repository on [GitHub](https://github.com/build2-packaging/chaisc\
ript) and clone it to your local machine.
2. Run `git submodule init` and `git submodule update` to get the current\
 upstream directory.
3. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
4. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
5. Test if the packages compile and execute examples and tools.
6. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
7. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
8. Run `bdep ci` and test for errors.
9. If everything works fine, make a pull request on GitHub and write down the\
 `bdep ci` link to your CI tests.
10. After a successful pull request, we will run the appropriate commands to\
 publish a new package version.

### Update Version Directly if You Have Permissions
1. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
2. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
3. Test if the packages compile and execute examples and tools.
4. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
5. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
6. Run `bdep ci` and test for errors and warnings.
7. When successful, run `bdep release --tag --push` to push new tag version\
 to repository.
8. Run `bdep publish` to publish the package to [cppget.org](https://cppget.o\
rg).

\
package-description-type: text/markdown;variant=GFM
changes:
\
Notes:
=======
Current Version: 6.1.0

### Changes since 6.0.0

 * Add namespacing support #290 @stephenberry
 * Add utf parsing support
 * cheatsheet.md updates
 * `add_class` utility support for scoped enums #306 @StanEpp
 * Parser optimizations #300 @niXman
 * Various JSON fixes #377 #400 #409 #371 @totalgee @dinghram @arcoRocks
 * Various cleanups, bugfixes and warning fixes and minor performance\
 improvements
 * Support for C++17 compilers!
 * Support for UTF8 BOM #439 @AlekMosingiewicz @MarioLiebisch


### Changes since 5.8.6

*6.0.0 is a massive rework compared to 5.x. It now requires a C++14 enabled\
 compiler*

#### Compiler Requirements

* MSVC 2015 or greater
* g++ 4.9 or greater
* clang 3.6 or greater

#### Breaking Changes

* Instantiating a ChaiScript object now, by default, builds the stdlib in
  * This was done to address the most common support issues of loading stdlib\
 dynamically at runtime
  * If you want the old behavior, use include/chaiscript/chaiscript_basic.hpp
* Headers have been reorganized to fully separate stdlib/parser/engine from\
 each other (some faster builds)
* Bootstrap functions no longer return a reference to the module added to\
 (compile time savings)
* It's now no longer possible modify AST_Nodes (compile time, runtime\
 efficiency)
* Function annotations no longer exist (simplifies code, reduces compile\
 time, compile size)

#### New Features Added

* Modular optimization system; this can be accessed via the ChaiScript_Basic\
 interface
* Execution tracing capability; also accessed via ChaiScript_Basic interface
* range-based for loops `for( id : container ) { }` (much better performance\
 than other loop types)
* If-init expressions (ala C++17)
* Support for passing r-value references to functions
* Support for containing unique_ptr
* Add helpers for exposing enum classes to ChaiScript
* Allow typed ChaiScript defined functions to perform conversions on call #303

#### Improvements

* Compile time improvements
* Compile size improvements
* Significant runtime improvements (see "Modular optimization system")
* Significant parser improvements, both with parse-time and parser\
 initialization time (Thanks @niXman)
* Fix type conversion to bool in conditionals

#### Improvements Still Need To Be Made

* File location tracking has been rewritten; this currently means error\
 location reporting is not as good as it was
* Tracing capability needs to be tested and vetted

### Changes since 5.8.5
* Optimize away `return` statements in lambdas also
* Allow conversions to bool in conditionals
* Don't allow `class` statements inside of scopes
* Properly error when a dynamic object non-function member is called

### Changes since 5.8.4
* Fix order of operations for prefix operators
* Make sure atomics are initialized properly
* Remove parsing of unused prefix `&` operator

### Changes since 5.8.3
* Fix case with some numeric conversions mixed with numerics that do not need\
 conversion

### Changes since 5.8.2
* Add support for reference of pointer return types

### Changes since 5.8.1
* Allow casting to non-const & std::shared_ptr<T>


### Changes since 5.8.0
* Fix parsing of floats to be locale independent #250
* Various warning fixes on various platforms


### Changes since 5.7.1
* Make all parser iterator operations range checked
* Parse in-string eval statements once, not once for each execution
* Fix parsing of operators (ie 1<-1 now parses)
* Fix variable scoping for functors
* Exception reduction
* Various object lifetime fixes
* Add JSON support for load / save #207
* Numeric overload resolution fixes #209 
* Fix long long #208 
* Add octal escapes in strings #211
* Fixed sizing of binary literals #213
* Added support for != with bool values #217
* Various value assignment vector fixes 
* Fixed broken hex escape sequences from @ChristianKaeser
* Multiply defined symbols fixes #232 @RaptorFactor
* Add add_class<Enum> helper #233  @vrennert
* Cheatsheet fixes #235 @mlamby
* Fix parsing of strings inside of in-string eval statements
* Allow lower-case global keyword
* Enable thread-local on MSVC (should be significant performance boost)


### Changes since 5.7.0
* Build time reduction
* Build size reduction
* Performance increases
* Fixed ~20 crash-bugs found with fuzzy testing #194
  * Let unhandled exceptions propogate to user
  * Report eval_error when break statement is not in loop
  * Fix handling of 0 length scripts closes #193
  * Don't crash on arity mismatch - Specifically affects the case where no\
 overloads exist for a given function
  * Fix error printing for `bind` calls
  * Handle unexpected continue statement
  * Check arity during bind
  * Don't allow arith conversion on variadic function
  * Correct `bind` parameter match count
  * Add in expected Boxed_Value exception cases
  * Check access to AST, don't allow `;` in func def
  * Don't attempt arithmetic unary & call
  * Don't crash on 0 param call to `bind`
  * Catch errors during member function dispatch
  * Properly handle type of const bool &
* Automatic deduction of lambda type signatures
* Work with non-polymorphic parent/child conversions
* Move to codecov for coverage reporting
* Add `.at` method for Map objects
* Various corrections for support of move-only objects


### Changes since 5.6.0

* Significant code cleanups and reduction
* Smaller builds
* Faster compiles
* Less runtime memory usage
* ~2x faster runtimes
* biicode support
* method_missing feature added #164 @arBmind
* Generic objects with dynamic properties support
* Add ability to call functions contained in properties
* Add lambda captures
* Create [cheatsheet.md](cheatsheet.md) for all-in-one reference of features
* Fix support for libc++
* Eliminate clone of return value stored locally
* Eliminate 'return' statements when last line of function
* Reduce number of runtime exceptions occuring
* Reduce copies / moves of return values. 
* make `use` statement return value of last statement in file
* Add ability to access fixed array sizes
* Add support for scientific notation floating point literals #174  @totalgee


### Changes since 5.5.1
* Throw exception on integer divide by 0
* Add optional type specification to function declarations
   
  ```
  def func(int i, j, double k) {
    // i must be an int.
    // j can be anything
    // k must be a double
    // normal conversion rules still apply
  }
   ```
* Many minor fixes for compiler warnings
* Add support for `std::future` and `std::async`
  ```
  var f := async(someFunction);
  var f2 := async(someFunction2);

  // someFunction and someFunction2 are running in parallel now
  f.get();
  f2.get();
  ```
* Fully support r-value returns, supporting move-only objects and reducing\
 object copies


### Changes since 5.5.0
* 30% performance increase
* Fix handling of object stack, resulting in greatly reduced memory usage
* Code cleanups

### Changes since 5.4.0
* 2x performance increase
* Significant code cleanups
* Throw exception if user attempts to call function on null object
* Allow user defined type conversions
* Fix object lifetime for nested function calls made at the global scope
* Fix returning of boolean values from function calls


### Changes since 5.3.1
* Decreased compile time and build size
* Make "reflection" module built in (losing some of the time / build size\
 gains)
* Add new "class" syntax for ChaiScript defined methods and attributes see:\
 [unittests/class.chai](unittests/class.chai) for examples
* Minor performance enhancements
* major to_string performance enhancements
* Provide API for retrieving registered type name #124
* Added strong reference to container to range object #132


### Changes since 5.3.0
* Add automatic conversion of arithmetic return types, following the same
  rules as conversion of arithmetic types when passing parameters
* Add automatic casting up the inheritence hierarchy when possible.
* Enable travis.ci testing
* Allow users to add globals from within script
* Various static analysis fixes
* Code modernization to C++11
* Unofficial support for Haiku added
* Fix #121 - Inability to compile on cygwin
* Formatting fixes and spelling corrections
* Apply "include what you use" https://code.google.com/p/include-what-you-use/
* Apply clang-modernize
* Various threading fixes
* Performance improvements

### Changes since 5.2.0
* Official support for MSVC with C++11. All major platforms and compilers are\
 now support for C++11 release

### Changes since 4.2.0
* Enhanced unit tests
* Add `continue` statement, fix various use cases for `for`  loops
* Fix use of suffixed numbers in vector initialization
* Code cleanups
* Eliminate global data, which makes code more portable and thread safe
* Fix issue #79
* Merge pretty_print fixes from @mgee #82
* Compiler warning fixes for latest compiler releases
* Fix threading problems
* Fix linking error on MacOS Mavericks #88
* Allow non-const globals
* Make sure user cannot name a variable with `::` in it #91
* Fix various string / map / vector `size` and `count` calls for compilers\
 which have weird overloads for them. #90 #93 #95
* Make module search path relative to the currently running executable
* Build and work with wstring windows builds
* fix for some new line cases in the middle of a vector initialization from\
 jespada

### Changes since 5.1.0
* Add support for automatic conversion of arithmetic types when possible
  and when no ambiguous method dispatch exists.

### Changes since 5.0.0
* Fix sizing of numeric constants to match that of the C++ standard
* Add support for u,ll,l,f suffixes for numeric constants
* Siginificant improvement in error reporting

### Changes since 4.0.0
* Dropped boost in favor of C++11
* Separated out stdlib to make more options for compile time improvements

### Changes since 3.1.0
* svenstaro: Unused variables and CMake consistency fixes
* Added support for returning pointers from functions (#13)
* Compile with -pedantic (#9)
* Fix issues with multiple ChaiScript object types having the same attribute\
 name (#15)
* Prevent variable redeclaration in same scope (#22)
* mgee: Boxed_Number improvements (#27)
* Support switch statements (#34)
* Fix uint16 comparions (#26)
* Add ability to add const_var globals in Module objects (#14)
* Add support for ternary operators ?:
* Add headers to CMakeLists so they show up in IDEs
* Add ability to get vector of defined objects and vector of defined functions
* Fix memory leak in cyclical references
* Clean up static analysis issues discovered
* Fix vector construction to be consistent with map construction
* Increased unit tests to 161
* Performance enhancements

### Changes since 3.0.0
* Numeric operations performance increased approximately 10x
* Looping operations performance increased up to 2x
* Engine start up time decreased
* Several parsing bugs related to index operators fixed
* Added full support for all C algebraic types: double, long double, float,\
 int, long, char,
  uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, int32_t, int64_t
* Enhanced support for capturing of exceptions thrown from ChaiScript in C++

### Changes since 2.3.3
* Code simplifications
* Fully integrate documentation with source code in doxygen style comments
* Unit tests increased from 114 to 137
* Automatic conversion between boost::function objects and ChaiScript\
 functions 
* Many bug fixes
* Minor performance improvements
* Namespace reorganization to make end user code more accessible
* clang support
* VisualStudio 2010 Support
* Support for C++ base classes and automatic upcasting 
* Remove __ reserved identifiers
* Better code organization to reduce #ifdefs 
* clanmills: command line options for chai eval
* clanmills: parser cleanups and code reduction
* Function introspection and reflection 
* Correct function dispatch order to account for base classes and provide a\
 defined order of dispatch 
* Predictable object lifetime that emulates C++ stack lifetime
* emarcotte: pkgconfig support
* standardize on method/member naming and indentation
* 64bit Visual Studio support
* Better support for const objects
* Drastic reduction of runtime exceptions - making debug builds orders of\
 magnitude faster
* Support for platforms with no loadable module support
* Add helper macro for registering class 

\
changes-type: text/markdown;variant=GFM
url: https://chaiscript.com/index.html
doc-url: https://chaiscript.com/docs.html
src-url: https://github.com/ChaiScript/ChaiScript
package-url: https://github.com/build2-packaging/chaiscript/
package-email: packaging@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: libchaiscript == 6.1.0
requires: c++17
builds: default
builds: -( +windows &gcc &!optimized ); Unoptimized compilation with MinGW on\
 Windows takes an eternity to finish.
bootstrap-build:
\
project = chaiscript-stdlib

using version
using config
using test
using install
using dist

\
root-build:
\
# ChaiScript does not officially support C++20 and higher.
# Test may fail to compile when setting C++ standard to 'latest'.
#
cxx.std = 17

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# ChaiScript is configurable from the outside by macros.
# Hence, we assume headers to be not importable.
#
hxx{*}: cxx.importable = false

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: chaiscript/chaiscript-stdlib-6.1.0.tar.gz
sha256sum: ba0c44d967f1d97bb59fd38f7262a36fb185f33629149a563dee7df3ddf0d22b
:
name: cuda-cccl
version: 12.8.0+5
upstream-version: 12.8.55
type: lib,binless
language: c++
project: nvidia-cuda-toolkit
summary: C++ Core Compute Libraries
license: other: CUDA Toolkit
description:
\
# cuda-cccl - A C++ library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

The goal of CCCL is to provide CUDA C++ developers with building blocks
that make it easier to write safe and efficient code. Bringing these
libraries together streamlines your development process and broadens
your ability to leverage the power of CUDA C++.


## Usage

To start using `cuda-cccl` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: cuda-cccl ^12.8.0
```

Then import the library in your `buildfile`:

```
import libs = cuda-cccl%lib{cccl}
```


## Importable targets

This package provides the following importable targets:

```
lib{cccl}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/cuda/redist/redistrib_12.8\
.0.json
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: cuda-nvcc ^12.0.0
depends: cuda-nvrtc ^12.0.0
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = cuda-cccl

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = c

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-cuda-toolkit/cuda-cccl-12.8.0+5.tar.gz
sha256sum: 6c88ad5ce6858bb9dff53eb24a656b2202199f759d1a43d4969b6ad873df49be
:
name: cuda-cccl
version: 13.0.2+2
upstream-version: 13.0.85
type: lib,binless
language: c++
project: nvidia-cuda-toolkit
summary: C++ Core Compute Libraries
license: other: CUDA Toolkit
description:
\
# cuda-cccl - A C++ library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

The goal of CCCL is to provide CUDA C++ developers with building blocks
that make it easier to write safe and efficient code. Bringing these
libraries together streamlines your development process and broadens
your ability to leverage the power of CUDA C++.


## Usage

To start using `cuda-cccl` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: cuda-cccl ^13.0.1
```

Then import the library in your `buildfile`:

```
import libs = cuda-cccl%lib{cccl}
```


## Importable targets

This package provides the following importable targets:

```
lib{cccl}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/cuda/redist/redistrib_13.0\
.2.json
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: cuda-nvcc ^13.0.0
depends: cuda-nvrtc ^13.0.0
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = cuda-cccl

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = c

legal{*}: backlink = false

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-cuda-toolkit/cuda-cccl-13.0.2+2.tar.gz
sha256sum: d659c7be769908dd1f9f27afe688dad05bc64e408305081dbb663285351ed505
:
name: cuda-crt
version: 13.0.2+2
upstream-version: 13.0.88
type: lib,binless
language: c
project: nvidia-cuda-toolkit
summary: CUDA Application Compiler
license: other: CUDA Toolkit
description:
\
# cuda-crt - CUDA C Runtime

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

The CUDA CRT (C Runtime) provides the device-side runtime support library for
CUDA applications. It underpins kernel launches, device memory management,
dynamic parallelism, and essential runtime features on the GPU. The CUDA CRT
is required for separate compilation and linking of device code.

## Usage

To start using `cuda-crt` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: cuda-crt ^13.0.1
```

Then import the library in your `buildfile`:

```
import libs = cuda-crt%lib{crt}
```


## Importable targets

This package provides the following importable targets:

```
lib{crt}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/cuda/redist/redistrib_13.0\
.2.json
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = cuda-crt

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

legal{*}: backlink = false

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-cuda-toolkit/cuda-crt-13.0.2+2.tar.gz
sha256sum: b827945f375f96a2fe65293aab24da3fed29b767e36f62795846f2148f7af4d2
:
name: cuda-cudart
version: 12.8.0+5
upstream-version: 12.8.57
type: lib,binless
language: c++
project: nvidia-cuda-toolkit
summary: CUDA Runtime Library
license: other: CUDA Toolkit
description:
\
# cuda-cudart - A C library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

The CUDA Runtime Library (cudart) provides a high-level API for CUDA
programming, simplifying memory management, kernel launches, and GPU
operations. It abstracts the complexities of the CUDA Driver API,
offering an easier interface for developers to write CUDA applications
in both C and C++. The cudart library is essential for leveraging
NVIDIA GPUs for general-purpose computing, enabling efficient
execution of parallel algorithms.

## Usage

To start using `cuda-cudart` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: cuda-cudart ^12.8.0
```

Then import the library in your `buildfile`:

```
import libs = cuda-cudart%libs{cudart}
```


## Importable targets

This package provides the following importable targets:

```
libs{cudart}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/cuda/redist/redistrib_12.8\
.0.json
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: cuda-cccl ^12.0.0
depends: cuda-nvcc ^12.0.0
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = cuda-cudart

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-cuda-toolkit/cuda-cudart-12.8.0+5.tar.gz
sha256sum: ae7ce12d57e22d649584178c8969d62e56bea7b0fc969f4e76076e19dac6031f
:
name: cuda-cudart
version: 13.0.2+2
upstream-version: 13.0.96
type: lib,binless
language: c
project: nvidia-cuda-toolkit
summary: CUDA Runtime Library
license: other: CUDA Toolkit
description:
\
# cuda-cudart - A C library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

The CUDA Runtime Library (cudart) provides a high-level API for CUDA
programming, simplifying memory management, kernel launches, and GPU
operations. It abstracts the complexities of the CUDA Driver API,
offering an easier interface for developers to write CUDA applications
in both C and C++. The cudart library is essential for leveraging
NVIDIA GPUs for general-purpose computing, enabling efficient
execution of parallel algorithms.

## Usage

To start using `cuda-cudart` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: cuda-cudart ^13.0.1
```

Then import the library in your `buildfile`:

```
import libs = cuda-cudart%libs{cudart}
```


## Importable targets

This package provides the following importable targets:

```
libs{cudart}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/cuda/redist/redistrib_13.0\
.2.json
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: cuda-cccl ^13.0.0
depends: cuda-nvcc ^13.0.0
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = cuda-cudart

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

legal{*}: backlink = false

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-cuda-toolkit/cuda-cudart-13.0.2+2.tar.gz
sha256sum: 6a9dd06233b125bea0bce06e11e03ce9c406d986394a8a7f9b6486ce1b6a6989
:
name: cuda-nvcc
version: 12.8.0+5
upstream-version: 12.8.61
type: lib,binless
language: c
project: nvidia-cuda-toolkit
summary: CUDA Compiler Driver
license: other: CUDA Toolkit
description:
\
# cuda-nvcc - A C library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

The compilation trajectory involves several splitting, compilation,
preprocessing, and merging steps for each CUDA source file. It is
the purpose of nvcc, the CUDA compiler driver, to hide the intricate
details of CUDA compilation from developers. It accepts a range of
conventional compiler options, such as for defining macros and
include/library paths, and for steering the compilation process. All
non-CUDA compilation steps are forwarded to a C++ host compiler that
is supported by nvcc, and nvcc translates its options to appropriate
host compiler command line options.

## Usage

To start using `cuda-nvcc` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: cuda-nvcc ^12.8.0
```

Then import the library in your `buildfile`:

```
import libs = cuda-nvcc%liba{nvcc}
```


## Importable targets

This package provides the following importable targets:

```
liba{nvcc}
exe{bin2c}
exe{cudafe++}
exe{fatbinary}
exe{nvcc}
exe{nvlink}
exe{ptxas}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/cuda/redist/redistrib_12.8\
.0.json
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = cuda-nvcc

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-cuda-toolkit/cuda-nvcc-12.8.0+5.tar.gz
sha256sum: e55855b9fdc1ea05c494de7229a35a877b0e8dbc2b801357270d34de2c126df9
:
name: cuda-nvcc
version: 13.0.2+2
upstream-version: 13.0.88
type: lib,binless
language: c
project: nvidia-cuda-toolkit
summary: CUDA Compiler Driver
license: other: CUDA Toolkit
description:
\
# cuda-nvcc - A C library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

The compilation trajectory involves several splitting, compilation,
preprocessing, and merging steps for each CUDA source file. It is
the purpose of nvcc, the CUDA compiler driver, to hide the intricate
details of CUDA compilation from developers. It accepts a range of
conventional compiler options, such as for defining macros and
include/library paths, and for steering the compilation process. All
non-CUDA compilation steps are forwarded to a C++ host compiler that
is supported by nvcc, and nvcc translates its options to appropriate
host compiler command line options.

## Usage

To start using `cuda-nvcc` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: cuda-nvcc ^13.0.1
```

Then import the library in your `buildfile`:

```
import libs = cuda-nvcc%lib{nvcc}
```


## Importable targets

This package provides the following importable targets:

```
lib{nvcc}
exe{bin2c}
exe{cudafe++}
exe{fatbinary}
exe{nvcc}
exe{nvlink}
exe{ptxas}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/cuda/redist/redistrib_13.0\
.2.json
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: cuda-crt ^13.0.0
depends: libnvvm ^13.0.0
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = cuda-nvcc

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

legal{*}: backlink = false

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-cuda-toolkit/cuda-nvcc-13.0.2+2.tar.gz
sha256sum: 37e9cee058d6724f0396f4722511bef897842288a3bd258cfb906e13f3a890dd
:
name: cuda-nvrtc
version: 12.8.0+5
upstream-version: 12.8.61
type: lib,binless
language: c++
project: nvidia-cuda-toolkit
summary: CUDA C++ Runtime Compilation Library
license: other: CUDA Toolkit
description:
\
# cuda-nvrtc - A C library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

NVRTC is a runtime compilation library for CUDA C++. It accepts CUDA C++
source code in character string form and creates handles that can be used
to obtain the PTX. The PTX string generated by NVRTC can be loaded by
cuModuleLoadData and cuModuleLoadDataEx, and linked with other modules by
using the nvJitLink library or using cuLinkAddData of the CUDA Driver API.
This facility can often provide optimizations and performance not possible
in a purely offline static compilation.

## Usage

To start using `cuda-nvrtc` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: cuda-nvrtc ^12.8.0
```

Then import the library in your `buildfile`:

```
import libs = cuda-nvrtc%libs{nvrtc}
```


## Importable targets

This package provides the following importable targets:

```
libs{nvrtc}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/cuda/redist/redistrib_12.8\
.0.json
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = cuda-nvrtc

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-cuda-toolkit/cuda-nvrtc-12.8.0+5.tar.gz
sha256sum: 3197497d3f138eee7fc19078226b82bcc982280d44fc74579f13c09ea1af26f9
:
name: cuda-nvrtc
version: 13.0.2+2
upstream-version: 13.0.88
type: lib,binless
language: c
project: nvidia-cuda-toolkit
summary: CUDA C++ Runtime Compilation Library
license: other: CUDA Toolkit
description:
\
# cuda-nvrtc - A C library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

NVRTC is a runtime compilation library for CUDA C++. It accepts CUDA C++
source code in character string form and creates handles that can be used
to obtain the PTX. The PTX string generated by NVRTC can be loaded by
cuModuleLoadData and cuModuleLoadDataEx, and linked with other modules by
using the nvJitLink library or using cuLinkAddData of the CUDA Driver API.
This facility can often provide optimizations and performance not possible
in a purely offline static compilation.

## Usage

To start using `cuda-nvrtc` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: cuda-nvrtc ^13.0.1
```

Then import the library in your `buildfile`:

```
import libs = cuda-nvrtc%libs{nvrtc}
```


## Importable targets

This package provides the following importable targets:

```
libs{nvrtc}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/cuda/redist/redistrib_13.0\
.2.json
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = cuda-nvrtc

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

legal{*}: backlink = false

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-cuda-toolkit/cuda-nvrtc-13.0.2+2.tar.gz
sha256sum: 4e99767b65e4349c63e788f720386f4048ff2fa34d5501c3fe8a8d9df24a222b
:
name: doctest
version: 2.4.12
type: lib
language: c++
summary: C++ testing framework for unit tests and TDD
license: MIT
description:
\
<p align="center"><img src="scripts/data/logo/logo_1.svg"></p>

<b>
<table>
    <tr>
        <td>
            master branch
        </td>
        <td>
            <a href="https://github.com/doctest/doctest/actions?query=branch%\
3Amaster"><img src="https://github.com/doctest/doctest/workflows/CI/badge.svg\
?branch=master"></a>
        </td>
        <td>
            <a href="https://app.codecov.io/gh/doctest/doctest/branch/master"\
><img src="https://codecov.io/gh/doctest/doctest/branch/master/graph/badge.sv\
g?token=fAdZl67WN7"/></a>
        </td>
    </tr>
    <tr>
        <td>
            dev branch
        </td>
        <td>
            <a href="https://github.com/doctest/doctest/actions?query=branch%\
3Adev"><img src="https://github.com/doctest/doctest/workflows/CI/badge.svg?br\
anch=dev"></a>
        </td>
        <td>
            <a href="https://app.codecov.io/gh/doctest/doctest/branch/dev"><i\
mg src="https://codecov.io/gh/doctest/doctest/branch/dev/graph/badge.svg?toke\
n=fAdZl67WN7"/></a>
        </td>
    </tr>
</table>
</b>

**doctest** is a new C++ testing framework but is by far the fastest both in\
 compile times (by [**orders of magnitude**](doc/markdown/benchmarks.md)) and\
 runtime compared to other feature-rich alternatives. It brings the ability\
 of compiled languages such as [**D**](https://dlang.org/spec/unittest.html)\
 / [**Rust**](https://doc.rust-lang.org/book/second-edition/ch11-00-testing.h\
tml) / [**Nim**](https://nim-lang.org/docs/unittest.html) to have tests\
 written directly in the production code thanks to a fast, transparent and\
 flexible test runner with a clean interface.

[![Standard](https://img.shields.io/badge/c%2B%2B-11/14/17/20/23-blue.svg)](h\
ttps://en.wikipedia.org/wiki/C%2B%2B#Standardization)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opens\
ource.org/licenses/MIT)
[![download](https://img.shields.io/badge/download%20%20-link-blue.svg)](http\
s://raw.githubusercontent.com/doctest/doctest/master/doctest/doctest.h)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/\
503/badge)](https://bestpractices.coreinfrastructure.org/projects/503)
[![Try it online](https://img.shields.io/badge/try%20it-online-orange.svg)](h\
ttps://godbolt.org/z/4s389Kbfs)

[<img src="https://c5.patreon.com/external/logo/become_a_patron_button.png"\
 align="right">](https://www.patreon.com/onqtam)

The framework is and will stay free but needs your support to sustain its\
 development. There are lots of <a href="https://github.com/doctest/doctest/i\
ssues/600"><b>new features</b></a> and maintenance to do. If you work for a\
 company using **doctest** or have the means to do so, please consider\
 financial support. Monthly donations via Patreon and one-offs via PayPal.

[<img src="https://raw.githubusercontent.com/aha999/DonateButtons/master/payp\
al-donate-icon-7.png" width=100 align="right">](https://www.paypal.me/onqtam/\
10)

A complete example with a self-registering test that compiles to an\
 executable looks like this:

![cover-example](scripts/data/using_doctest_888px_wide.gif)

There are many C++ testing frameworks - [Catch](https://github.com/catchorg/C\
atch2), [Boost.Test](http://www.boost.org/doc/libs/1_64_0/libs/test/doc/html/\
index.html), [UnitTest++](https://github.com/unittest-cpp/unittest-cpp),\
 [cpputest](https://github.com/cpputest/cpputest), [googletest](https://githu\
b.com/google/googletest) and [others](https://en.wikipedia.org/wiki/List_of_u\
nit_testing_frameworks#C.2B.2B).

The **key** differences between it and other testing frameworks are that it\
 is light and unintrusive:
- Ultra light on compile times both in terms of [**including the\
 header**](doc/markdown/benchmarks.md#cost-of-including-the-header) and\
 writing [**thousands of asserts**](doc/markdown/benchmarks.md#cost-of-an-ass\
ertion-macro)
- Doesn't produce any warnings even on the [**most aggressive**](scripts/cmak\
e/common.cmake#L84) warning levels for **MSVC**/**GCC**/**Clang**
- Can remove **everything** testing-related from the binary with the\
 [**```DOCTEST_CONFIG_DISABLE```**](doc/markdown/configuration.md#doctest_con\
fig_disable) identifier
- [**thread-safe**](doc/markdown/faq.md#is-doctest-thread-aware) - asserts\
 can be used from multiple threads spawned from a single test case -\
 [**example**](examples/all_features/concurrency.cpp)
- asserts can be used [**outside of a testing context**](doc/markdown/asserti\
ons.md#using-asserts-out-of-a-testing-context) - as a general purpose assert\
 library - [**example**](examples/all_features/asserts_used_outside_of_tests.\
cpp)
- No global namespace pollution (everything is in ```doctest::```) & doesn't\
 drag **any** headers with it
- [**Portable**](doc/markdown/features.md#extremely-portable) C++11 (use tag\
 [**1.2.9**](https://github.com/doctest/doctest/tree/1.2.9) for C++98) with\
 over 100 different CI builds (static analysis, sanitizers..)
- binaries (exe/dll) can use the test runner of another binary => tests in a\
 single registry - [**example**](examples/executable_dll_and_plugin/)

![cost-of-including-the-framework-header](scripts/data/benchmarks/header.png)

This allows the framework to be used in more ways than any other - tests can\
 be written directly in the production code!

*Tests can be a form of documentation and should be able to reside near the\
 production code which they test.*

- This makes the barrier for writing tests **much lower** - you don't have\
 to: **1)** make a separate source file **2)** include a bunch of stuff in it\
 **3)** add it to the build system and **4)** add it to source control - You\
 can just write the tests for a class or a piece of functionality at the\
 bottom of its source file - or even header file!
- Tests in the production code can be thought of as documentation/up-to-date\
 comments - showcasing the APIs
- Testing internals that are not exposed through the public API and headers\
 is no longer a mind-bending exercise
- [**Test-driven development**](https://en.wikipedia.org/wiki/Test-driven_dev\
elopment) in C++ has never been easier!

The framework can be used just like any other without mixing production code\
 and tests - check out the [**features**](doc/markdown/features.md).

**doctest** is modeled after [**Catch**](https://github.com/catchorg/Catch2)\
 and some parts of the code have been taken directly - check out [**the\
 differences**](doc/markdown/faq.md#how-is-doctest-different-from-catch).

[This table](https://github.com/martinmoene/catch-lest-other-comparison)\
 compares **doctest** / [**Catch**](https://github.com/catchorg/Catch2) /\
 [**lest**](https://github.com/martinmoene/lest) which are all very similar.

Checkout the [**CppCon 2017 talk**](https://cppcon2017.sched.com/event/BgsI/m\
ix-tests-and-production-code-with-doctest-implementing-and-using-the-fastest-\
modern-c-testing-framework) on [**YouTube**](https://www.youtube.com/watch?v=\
eH1CxEC29l8) to get a better understanding of how the framework works and\
 read about how to use it in [**the JetBrains article**](https://blog.jetbrai\
ns.com/rscpp/better-ways-testing-with-doctest/) - highlighting the unique\
 aspects of the framework! On a short description on how to use the framework\
 along production code you could refer to [**this GitHub issue**](https://git\
hub.com/doctest/doctest/issues/252). There is also an [**older\
 article**](https://accu.org/var/uploads/journals/Overload137.pdf) in the\
 february edition of ACCU Overload 2017.

[![CppCon 2017 talk about doctest on youtube](scripts/data/youtube-cppcon-tal\
k-thumbnail.png)](https://www.youtube.com/watch?v=eH1CxEC29l8)

Documentation
-------------

Project:

- [Features and design goals](doc/markdown/features.md) - the complete list\
 of features
- [Community driven roadmap](https://github.com/doctest/doctest/issues/600) -\
 upcoming features
- [Benchmarks](doc/markdown/benchmarks.md) - compile-time and runtime\
 supremacy
- [Contributing](CONTRIBUTING.md) - how to make a proper pull request
- [Changelog](CHANGELOG.md) - generated changelog based on closed issues/PRs

Usage:

- [Tutorial](doc/markdown/tutorial.md) - make sure you have read it before\
 the other parts of the documentation
- [Assertion macros](doc/markdown/assertions.md)
- [Test cases, subcases and test fixtures](doc/markdown/testcases.md)
- [Parameterized test cases](doc/markdown/parameterized-tests.md)
- [Command line](doc/markdown/commandline.md)
- [Logging macros](doc/markdown/logging.md)
- [```main()``` entry point](doc/markdown/main.md)
- [Configuration](doc/markdown/configuration.md)
- [String conversions](doc/markdown/stringification.md)
- [Reporters](doc/markdown/reporters.md)
- [Extensions](doc/markdown/extensions.md)
- [FAQ](doc/markdown/faq.md)
- [Build systems](doc/markdown/build-systems.md)
- [Examples](examples)

Bugs and feature proposals
------------
If you find a bug, report it!
If you have an idea on how to improve the project, be it anything from better\
 documentation to adding new features, consider preparing a **feature\
 proposal**.
We call it proposal because the word "request" has the wrong intention, no\
 one will auto-magically fix it for you, but the idea can be discussed and\
 accepted or rejected before **you** implement it.
Please make sure to read through the [**Contributing**](CONTRIBUTING.md) page\
 before submitting any issue, the triaging procedure is documented there.

Contributing
------------

[<img src="https://c5.patreon.com/external/logo/become_a_patron_button.png"\
 align="right">](https://www.patreon.com/onqtam)

Support the development of the project with donations! There is a list of\
 planned features which are all important and big - see the\
 [**roadmap**](https://github.com/doctest/doctest/issues/600).

[<img src="https://raw.githubusercontent.com/aha999/DonateButtons/master/payp\
al-donate-icon-7.png" width=100 align="right">](https://www.paypal.me/onqtam/\
10)

If you work for a company using **doctest** or have the means to do so,\
 please consider financial support.

Contributions in the form of issues and pull requests are welcome as well -\
 check out the [**Contributing**](CONTRIBUTING.md) page.

Stargazers over time
------------

[![Stargazers over time](https://starchart.cc/doctest/doctest.svg)](https://s\
tarchart.cc/doctest/doctest)

Logo
------------

The [logo](scripts/data/logo) is licensed under a Creative Commons\
 Attribution 4.0 International License. Copyright &copy; 2019\
 [area55git](https://github.com/area55git) &nbsp; [![License: CC BY\
 4.0](https://licensebuttons.net/l/by/4.0/80x15.png)](https://creativecommons\
.org/licenses/by/4.0/)

<p align="center"><img src="scripts/data/logo/icon_2.svg"></p>

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for doctest

This project is a [build2](https://build2.org) package repository that\
 provides access to [`doctest`](https://github.com/doctest/doctest), a C++\
 testing framework that brings the ability to have tests written directly in\
 the production code thanks to a fast, transparent and flexible test runner\
 with a clean interface.

[![Official](https://img.shields.io/website/https/github.com/doctest/doctest.\
svg?down_message=offline&label=Official&style=for-the-badge&up_color=blue&up_\
message=online)](https://github.com/doctest/doctest)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/d\
octest.svg?down_message=offline&label=build2&style=for-the-badge&up_color=blu\
e&up_message=online)](https://github.com/build2-packaging/doctest)
[![cppget.org](https://img.shields.io/website/https/cppget.org/doctest.svg?do\
wn_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_mess\
age=online)](https://cppget.org/doctest)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/do\
ctest.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=for\
-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/doct\
est)

## Usage
Make sure to add the stable or testing section of the [`cppget.org`](https://\
cppget.org/?about) repository to your project's `repositories.manifest` to be\
 able to fetch this package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable or testing section of `cppget.org` is not an option then add\
 this Git repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/doctest.git

Add the respective dependency in your project's `manifest` file to make the\
 package available for import.

    depends: doctest ^2.4.12

To import the library target that already implements the `main` function,\
 include the following declaration in a `buildfile`.

    import doctest = doctest%lib{doctest-main}

If you want to customize the testing process by providing your own `main`,\
 use the following header-only library target instead.

    import doctest = doctest%lib{doctest}


## Configuration
`doctest` itself already comes with various configuration options.
Some of these can be accessed by the package configuration.
For an explanation, refer to `doctest`'s configuration documentation.
The following variables need to be provided globally and will affect both\
 library targets, `lib{doctest}` and `lib{doctest-main}`.

    config [bool] config.doctest.disable                 ?= false
    config [bool] config.doctest.treat_char_as_string    ?= false
    config [bool] config.doctest.use_std_headers         ?= false
    config [bool] config.doctest.no_exceptions           ?= false
    config [bool] config.doctest.no_contradicting_inline ?= false

The following configuration variables only need to be set for the\
 implementation unit and will only affect the `lib{doctest-main}` library\
 target.
Define their respective pre-processor macros for doctest implementation unit\
 that implement their own `main` function and only link to `lib{doctest}`.

    config [string] config.doctest.options_prefix      ?= [null]
    config [bool] config.doctest.no_unprefixed_options ?= false
    config [bool] config.doctest.colors_none           ?= false
    config [bool] config.doctest.colors_windows        ?= false
    config [bool] config.doctest.colors_ansi           ?= false
    config [bool] config.doctest.windows_seh           ?= false
    config [bool] config.doctest.no_windows_seh        ?= false
    config [bool] config.doctest.posix_signals         ?= false
    config [bool] config.doctest.no_posix_signals      ?= false
    config [bool] config.doctest.no_multithreading     ?= false
    config [bool] config.doctest.no_multi_lane_atomics ?= false

- Some configuration options cannot be provided by the package. Use them only\
 in your `doctest` implementation file when linking against `lib{doctest}`\
 for providing your own `main` function.
    - `DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN`
    - `DOCTEST_CONFIG_IMPLEMENT`
    - `DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL`
- Some configuration options do not need to be defined globally. You may also\
 define them only for specific source files when they are actually needed. As\
 of such, no global package configuration variables are provided for these\
 options. Instead, define their respective pre-processor macros in the\
 required units to enable them.
    - `DOCTEST_CONFIG_NO_SHORT_MACRO_NAMES`
    - `DOCTEST_CONFIG_REQUIRE_STRINGIFICATION_FOR_ALL_USED_TYPES`
    - `DOCTEST_CONFIG_DOUBLE_STRINGIFY`
    - `DOCTEST_CONFIG_SUPER_FAST_ASSERTS`
    - `DOCTEST_CONFIG_VOID_CAST_EXPRESSIONS`
    - `DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION`
    - `DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS`
    - `DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS`
    - `DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE`
    - `DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS`
    - `DOCTEST_CONFIG_ASSERTS_RETURN_VALUES`
    - `DOCTEST_CONFIG_EVALUATE_ASSERTS_EVEN_WHEN_DISABLED`
    - `DOCTEST_CONFIG_NO_INCLUDE_IOSTREAM`
    - `DOCTEST_CONFIG_HANDLE_EXCEPTION`

## Issues and Notes
- The tests fail for MinGW on Windows as different line numbers for\
 assertions in the file `asserts_used_outside_of_tests.cpp` are generated and\
 compared to expected line numbers in `asserts_used_outside_of_tests.cpp.txt`\
. This issue is not caused by the build system and must be fixed upstream.\
 Fortunately, it is not a major problem and the package can be used without\
 concerns on all available platforms.
- According to the upstream build system, `lib{doctest-main}` does not need\
 to export `pthread` for multi-threading. Also, basic unit tests run\
 perfectly fine. As of that, `pthread` is neither exported by `lib{doctest}`\
 nor by `lib{doctest-main}`. However, in feature tests, `pthread` is used to\
 test concurrency. Consequently, be aware of linking `pthread` when needed.
- The `bitfield_packed_struct.cpp` file uses the `WIN32` macro to determine\
 whether the code is compiled with MSVC on Windows. However, the official\
 macro is `_WIN32`. Therefore the code has been adjusted and the original is\
 now stored as `bitfield_packed_struct.cpp.orig`.

## Contributing
Thank you in advance for your help and contribution to keep this package\
 up-to-date.
Please, file an issue on [GitHub](https://github.com/build2-packaging/doctest\
/issues) for questions, bug reports, or to recommend updating the package\
 version.
If you're making a pull request to fix bugs or update the package version\
 yourself, refer to the [`build2` Packaging Guidelines](https://build2.org/bu\
ild2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management).

\
package-description-type: text/markdown;variant=GFM
changes:
\
# Change Log

## [v2.4.12](https://github.com/doctest/doctest/tree/v2.4.12) (2025-04-28)

[Full Changelog](https://github.com/doctest/doctest/compare/v2.4.11...v2.4.12)

## [v2.4.11](https://github.com/doctest/doctest/tree/v2.4.11) (2023-03-15)

[Full Changelog](https://github.com/doctest/doctest/compare/v2.4.10...v2.4.11)

## [v2.4.10](https://github.com/doctest/doctest/tree/v2.4.10) (2023-02-27)

[Full Changelog](https://github.com/doctest/doctest/compare/v2.4.9...v2.4.10)

## [v2.4.9](https://github.com/doctest/doctest/tree/v2.4.9) (2022-06-18)
[Full Changelog](https://github.com/doctest/doctest/compare/v2.4.8...v2.4.9)

**Closed issues:**
- Visual Studio's Test Explorer and Resharper C\+\+'s Unit Test Explorer\
 don't see Doctest's tests \#661 ([KulaGGin](https://github.com/KulaGGin))
- How to get detailed information about testcases failing due to thrown\
 exceptions? \#660 ([NiklasKappel](https://github.com/NiklasKappel))
- Add clang\-tidy integration and fix all warnings \#659 ([Saalvage](https://\
github.com/Saalvage))
- Avoid static init problem in insufficient\_procs\(\) \(MPI\) \#657\
 ([starintheuniverse](https://github.com/starintheuniverse))
- Use MPI\_Isend in MpiConsoleReporter to avoid deadlock \#656\
 ([starintheuniverse](https://github.com/starintheuniverse))
- Deadlock in MpiConsoleReporter when root rank fails assert \#655\
 ([starintheuniverse](https://github.com/starintheuniverse))
- Cleanup of DOCTEST\_DO\_BINARY\_EXPRESSION\_COMPARISON\. Fixes \#651 \#652\
 ([iboB](https://github.com/iboB))
- Comparison with implicit cast from non\-const value can't be decomposed\
 \#651 ([iboB](https://github.com/iboB))
- Local structured bindings cannot be used in CHECK macros \(since 2\.4\.8\)\
 \#647 ([pragmaxwell](https://github.com/pragmaxwell))
- Add tests for DOCTEST\_CONFIG\_USE\_STD\_HEADERS \#643 ([Saalvage](https://\
github.com/Saalvage))
- Stringification amendments \#642 ([Saalvage](https://github.com/Saalvage))
- Clean up defines a bit; Implement \#439 \#641 ([Saalvage](https://github.co\
m/Saalvage))
- Fix \#508 \#640 ([Saalvage](https://github.com/Saalvage))
- Fix \#508 \#639 ([Saalvage](https://github.com/Saalvage))
- New doctest version gives me an error: reference to local binding '\.\.\.'\
 declared in enclosing function 'DOCTEST\_ANON\_FUNC\_16' \#638\
 ([a4z](https://github.com/a4z))
- The tutorial example does not work \(linker errors\) with clang 10 \#637\
 ([sixcy](https://github.com/sixcy))
- Implementing \`DOCTEST\_ASSERT\_IMPLEMENT\_1\` as lambda prevents testing\
 structured bindings \#636 ([ChrisThrasher](https://github.com/ChrisThrasher))
- re\-re\-remove overly restrictive minimum version of meson \#635\
 ([eli-schwartz](https://github.com/eli-schwartz))
- Fix move\-only types failing to decompose correctly \#634\
 ([Saalvage](https://github.com/Saalvage))
- Weird compilation error when using CHECK\_THROWS/CHECK\_THROWS\_AS on\
 Visual Studio 2019 with no exceptions \#633 ([yeputons](https://github.com/y\
eputons))
- Error triggered by comparing typeid with new doctest 2\.4\.8 \#632\
 ([JazzSuite](https://github.com/JazzSuite))
- Improve Mac PowerPC support \#631 ([ryandesign](https://github.com/ryandesi\
gn))
- issue introduced in 2\.4\.7 \#630 ([onqtam](https://github.com/onqtam))
- Decompose expressions containing the spaceship operator \#629\
 ([falbrechtskirchinger](https://github.com/falbrechtskirchinger))
- added nolint for cert\-err58 \#628 ([serguei-k](https://github.com/serguei-\
k))
- Fix properties not being passed in doctest\_discover\_tests \#626\
 ([quantumsteve](https://github.com/quantumsteve))
- Config no multithreading \#625 ([Saalvage](https://github.com/Saalvage))
- wasm\*\-support? \#624 ([FrozenSource](https://github.com/FrozenSource))
- Fix MPI extension to work with no parallel tests \#623 ([BerengerBerthoul](\
https://github.com/BerengerBerthoul))
- string comparison leads to gotting stuck \#622 ([laoshaw](https://github.co\
m/laoshaw))
- doctest\_discover\_tests no longer sets ENVIRONMENT variables for\
 discovered tests\.  \#621 ([quantumsteve](https://github.com/quantumsteve))
- Add contains option to checks\. \#620 ([MFraters](https://github.com/MFrate\
rs))
- Feature request: CHECK\_THROWS\_WITH with contains option \#619\
 ([MFraters](https://github.com/MFraters))
- Add alias target for doctest\_with\_main \#617 ([jessestricker](https://git\
hub.com/jessestricker))
- Allow escaping backslash with backslash in filters \(\#614\) \#616\
 ([yeputons](https://github.com/yeputons))
- Fix operator<< \#615 ([Saalvage](https://github.com/Saalvage))
- Correct minor typos \#613 ([utilForever](https://github.com/utilForever))
- Fix MPI extension to work if launched without mpirun/mpiexec \#612\
 ([BerengerBerthoul](https://github.com/BerengerBerthoul))
- Fix mpi subcase \#611 ([BerengerBerthoul](https://github.com/BerengerBertho\
ul))
- compilation error with custom operator== defined in namespace \#610\
 ([zvyagin1](https://github.com/zvyagin1))
- Regression: Clang\-Tidy warnings in 2\.4\.8 \#607 ([nlohmann](https://githu\
b.com/nlohmann))
- Internal compiler error with GCC 7\.5 \#606 ([foonathan](https://github.com\
/foonathan))
- tagging convension has changed? \#605 ([kloczek](https://github.com/kloczek\
))
- Update Doctest in vcpkg to 2\.4\.8 \#604 ([gc435](https://github.com/gc435))
- Add IsNaN operator\! \#603 ([Saalvage](https://github.com/Saalvage))
- Ignored generated files from CMake, OSX, Xcode, and VS \#602\
 ([LeonBrands](https://github.com/LeonBrands))
- Move roadmap and wipe it clean \#601 ([Saalvage](https://github.com/Saalvag\
e))
- removes a duplicate word 'most' in configuration\.md \#599\
 ([krishnakumarg1984](https://github.com/krishnakumarg1984))
- Fix subcase reentry \#598 ([Saalvage](https://github.com/Saalvage))
- Loop\-generated \`SUBCASE\`s are not run \#597 ([yeputons](https://github.c\
om/yeputons))
- Void \#596 ([Saalvage](https://github.com/Saalvage))
- Add flag that forces custom stringification methods to be provided \#595\
 ([Saalvage](https://github.com/Saalvage))
- Fix coverage \#594 ([Saalvage](https://github.com/Saalvage))
- TEST CODECOV PR BEHAVIOR \#593 ([Saalvage](https://github.com/Saalvage))
- Ignore CMake and MacOS generated files \#592 ([LeonBrands](https://github.c\
om/LeonBrands))
- Feature request: option to disable fallback "\{?\}" stringifier \#591\
 ([YarikTH](https://github.com/YarikTH))
- Add tests for default stringification result of doctest \#590\
 ([YarikTH](https://github.com/YarikTH))
- Feature config ret vals \#589 ([Saalvage](https://github.com/Saalvage))
- DOCTEST\_CONFIG\_ASSERT\_RETURN\_VALUES \#588 ([Saalvage](https://github.co\
m/Saalvage))
- Support pretty printing of container based on heuristics \#587\
 ([YarikTH](https://github.com/YarikTH))
- Refactor stringification \#585 ([Saalvage](https://github.com/Saalvage))
- Feature: Better NaN \#584 ([Saalvage](https://github.com/Saalvage))
- Nan check \#582 ([Saalvage](https://github.com/Saalvage))
- Update roadmap following maintainer change \#581 ([eyalroz](https://github.\
com/eyalroz))
- Regression between 2\.4\.6 and 2\.4\.7 \#571 ([YarikTH](https://github.com/\
YarikTH))
- build failure with gcc\-11\.2 when using user declared operator<<\(ostream,\
 vector\) \#551 ([nlitsme](https://github.com/nlitsme))
- variable maximum is assigned 6206517616395625 instead of the actual return\
 value which is 5\.0 \#530 ([kk723](https://github.com/kk723))
- toString can call existing user\-defined toString through ADL incorrectly\
 \#508 ([zeux](https://github.com/zeux))
- \[Coverity\] Concurrent data access violations \(MISSING\_LOCK\)\
 doctest\.h: 5838 in doctest::<unnamed>::ConsoleReporter::test\_case\_start\(\
const doctest::TestCaseData &\)\(\) \#486 ([jiridanek](https://github.com/jir\
idanek))
- Provide an error message if REQUIRE \(or other disabled assertion macros\)\
 are used when exceptions are disabled \#439 ([alexeyr](https://github.com/al\
exeyr))
- Conflict with templated toString function \#420 ([TillHeinzel](https://gith\
ub.com/TillHeinzel))
- \-tc does not work with comma in names \#398 ([martinus](https://github.com\
/martinus))
- Compile error on MSVC2019 with any macro which involves stringification of\
 std::string \(asserts, INFO, etc\.\) when <ostream> isn't included \#381\
 ([nyanpasu64](https://github.com/nyanpasu64))
- the dll example doesn't run correctly on Windows with MinGW \#375\
 ([GregKon](https://github.com/GregKon))
- add basic conan recipe \#354 ([trondhe](https://github.com/trondhe))
- CHECK\_MESSAGE\(\) should accept temporaries \#337 ([eyalroz](https://githu\
b.com/eyalroz))
- stringify of cstring literals doesn't work out of the box with separate\
 test\_driver\.cpp \#329 ([teichert](https://github.com/teichert))
- warning : function declared 'noreturn' should not return\
 \[\-Winvalid\-noreturn\] \#307 ([Vexthil](https://github.com/Vexthil))
- Test cases containing a comma cannot be run individually \#297\
 ([Tradias](https://github.com/Tradias))
- \[bug\] Can't compile the tests because of mutex, that is declared in the\
 doctest \#242 ([BrunaoW](https://github.com/BrunaoW))
- The \`CHECK\` macro conflicts with Boost\.Beast \(and surely others\) \#234\
 ([reddwarf69](https://github.com/reddwarf69))
- Feature request: check if a \`float\` or \`double\` is NaN \#105\
 ([iamthad](https://github.com/iamthad))

**Merged pull requests:**
- Add clang\-tidy integration and fix all warnings \#659 ([Saalvage](https://\
github.com/Saalvage))
- Avoid static init problem in insufficient\_procs\(\) \(MPI\) \#657\
 ([starintheuniverse](https://github.com/starintheuniverse))
- Use MPI\_Isend in MpiConsoleReporter to avoid deadlock \#656\
 ([starintheuniverse](https://github.com/starintheuniverse))
- Cleanup of DOCTEST\_DO\_BINARY\_EXPRESSION\_COMPARISON\. Fixes \#651 \#652\
 ([iboB](https://github.com/iboB))
- Add tests for DOCTEST\_CONFIG\_USE\_STD\_HEADERS \#643 ([Saalvage](https://\
github.com/Saalvage))
- Stringification amendments \#642 ([Saalvage](https://github.com/Saalvage))
- Clean up defines a bit; Implement \#439 \#641 ([Saalvage](https://github.co\
m/Saalvage))
- Fix \#508 \#640 ([Saalvage](https://github.com/Saalvage))
- re\-re\-remove overly restrictive minimum version of meson \#635\
 ([eli-schwartz](https://github.com/eli-schwartz))
- Fix move\-only types failing to decompose correctly \#634\
 ([Saalvage](https://github.com/Saalvage))
- Improve Mac PowerPC support \#631 ([ryandesign](https://github.com/ryandesi\
gn))
- added nolint for cert\-err58 \#628 ([serguei-k](https://github.com/serguei-\
k))
- Fix properties not being passed in doctest\_discover\_tests \#626\
 ([quantumsteve](https://github.com/quantumsteve))
- Config no multithreading \#625 ([Saalvage](https://github.com/Saalvage))
- Fix MPI extension to work with no parallel tests \#623 ([BerengerBerthoul](\
https://github.com/BerengerBerthoul))
- Add contains option to checks\. \#620 ([MFraters](https://github.com/MFrate\
rs))
- Add alias target for doctest\_with\_main \#617 ([jessestricker](https://git\
hub.com/jessestricker))
- Allow escaping backslash with backslash in filters \(\#614\) \#616\
 ([yeputons](https://github.com/yeputons))
- Fix operator<< \#615 ([Saalvage](https://github.com/Saalvage))
- Fix MPI extension to work if launched without mpirun/mpiexec \#612\
 ([BerengerBerthoul](https://github.com/BerengerBerthoul))
- Fix mpi subcase \#611 ([BerengerBerthoul](https://github.com/BerengerBertho\
ul))
- Add IsNaN operator\! \#603 ([Saalvage](https://github.com/Saalvage))
- Move roadmap and wipe it clean \#601 ([Saalvage](https://github.com/Saalvag\
e))
- removes a duplicate word 'most' in configuration\.md \#599\
 ([krishnakumarg1984](https://github.com/krishnakumarg1984))
- Fix subcase reentry \#598 ([Saalvage](https://github.com/Saalvage))
- Add flag that forces custom stringification methods to be provided \#595\
 ([Saalvage](https://github.com/Saalvage))
- Fix coverage \#594 ([Saalvage](https://github.com/Saalvage))
- Ignore CMake and MacOS generated files \#592 ([LeonBrands](https://github.c\
om/LeonBrands))
- Feature config ret vals \#589 ([Saalvage](https://github.com/Saalvage))
- Refactor stringification \#585 ([Saalvage](https://github.com/Saalvage))
- Feature: Better NaN \#584 ([Saalvage](https://github.com/Saalvage))
- Nan check \#582 ([Saalvage](https://github.com/Saalvage))

## [v2.4.8](https://github.com/doctest/doctest/tree/v2.4.8) (2022-01-10)
[Full Changelog](https://github.com/doctest/doctest/compare/2.4.7...v2.4.8)

**Closed issues:**

- \[meta\] Change git tagging pattern [\#579](https://github.com/doctest/doct\
est/issues/579)
- TEST\_CASE\_TEMPLATE causes "-Wunused-local-typedef" warning on Clang\
 [\#577](https://github.com/doctest/doctest/issues/577)
- Regression between 2.4.6 and 2.4.7 with Visual Studio 2015\
 [\#573](https://github.com/doctest/doctest/issues/573)
- Regression between 2.4.6 and 2.4.7 [\#571](https://github.com/doctest/docte\
st/issues/571)
- Compilation error on MSVS2019 with ClangCL [\#570](https://github.com/docte\
st/doctest/issues/570)
- Compilation errors on MSVC 2015 after doctest update to 2.4.7\
 [\#568](https://github.com/doctest/doctest/issues/568)
- `g\_oss` is causing incorrect stringification results [\#567](https://githu\
b.com/doctest/doctest/issues/567)
- MSVC warnings leak through when using the library as a single header with\
 /Wall [\#565](https://github.com/doctest/doctest/issues/565)
- \[PROJECT ANNOUNCEMENT\] Looking for maintainers for Doctest\
 [\#554](https://github.com/doctest/doctest/issues/554)
- Is this still maintained? [\#537](https://github.com/doctest/doctest/issues\
/537)
- \[Feature request\] CHECK could return the value of expression\
 [\#496](https://github.com/doctest/doctest/issues/496)
- Feature: check or return false [\#426](https://github.com/doctest/doctest/i\
ssues/426)
- Undefined reference of `operator\<\<\(ostream&, const string&\)` when\
 compiling with clang 10 and libc++ 10 on Ubuntu 16.04.6 LTS\
 [\#356](https://github.com/doctest/doctest/issues/356)
- Doctest is not able to compile on OSX [\#126](https://github.com/doctest/do\
ctest/issues/126)

**Merged pull requests:**

- Continuous Integration Refactor [\#580](https://github.com/doctest/doctest/\
pull/580) ([Saalvage](https://github.com/Saalvage))
- Fix semicolon enforcement [\#578](https://github.com/doctest/doctest/pull/5\
78) ([Saalvage](https://github.com/Saalvage))
- Fix unused variable 2 [\#576](https://github.com/doctest/doctest/pull/576)\
 ([Saalvage](https://github.com/Saalvage))
- Alternative approach to Windows color initialization [\#575](https://github\
.com/doctest/doctest/pull/575) ([Saalvage](https://github.com/Saalvage))
- Assertions returning booleans [\#574](https://github.com/doctest/doctest/pu\
ll/574) ([Saalvage](https://github.com/Saalvage))
- Fix the thread-local string-stream [\#569](https://github.com/doctest/docte\
st/pull/569) ([Saalvage](https://github.com/Saalvage))
- Clean up warning suppression a bit; Fixes \#565 [\#566](https://github.com/\
doctest/doctest/pull/566) ([Saalvage](https://github.com/Saalvage))
- Add Universal Windows Platform support [\#558](https://github.com/doctest/d\
octest/pull/558) ([isaevil](https://github.com/isaevil))

## [2.4.7](https://github.com/doctest/doctest/tree/2.4.7) (2021-12-10)
[Full Changelog](https://github.com/doctest/doctest/compare/2.4.6...2.4.7)

**Implemented enhancements:**

- Add a default Bazel BUILD file [\#433](https://github.com/doctest/doctest/i\
ssues/433)

**Fixed bugs:**

- Stack-buffer-overflow probably because char array is viewed as NULL\
 terminated string [\#476](https://github.com/doctest/doctest/issues/476)

**Closed issues:**

- "C4834: discarding return value" with REQUIRE\_THROWS [\#549](https://githu\
b.com/doctest/doctest/issues/549)
- Xcode 11.3 is gone from macOS-latest \(=macOS-11\) [\#547](https://github.c\
om/doctest/doctest/issues/547)
- is it possible to define dependency for CHECKs [\#545](https://github.com/d\
octest/doctest/issues/545)
- Output summary explanation [\#541](https://github.com/doctest/doctest/issue\
s/541)
- compiler errors in doctest.h using cmake in CLion [\#540](https://github.co\
m/doctest/doctest/issues/540)
- Fails to build in VS2013 because of constexpr [\#539](https://github.com/do\
ctest/doctest/issues/539)
- -Wreserved-identifier warnings with Clang 13.0.0 [\#536](https://github.com\
/doctest/doctest/issues/536)
- Build fails with latest MSVC 2019 \(v16.11\) due to /WX [\#535](https://git\
hub.com/doctest/doctest/issues/535)
- VS 16.11 warning about unreferenced function with internal linkage\
 [\#533](https://github.com/doctest/doctest/issues/533)
- Faq googletest mocking dead link [\#532](https://github.com/doctest/doctest\
/issues/532)
- FR: Documentation: FAQ: Add sectoin 'multiple files' [\#526](https://github\
.com/doctest/doctest/issues/526)
- CMAKE: doctest\_discover\_tests\(\) error when ADD\_LABELS is not specified\
 [\#524](https://github.com/doctest/doctest/issues/524)
- Register tests based on test data available [\#521](https://github.com/doct\
est/doctest/issues/521)
- naming override in different testcase files [\#517](https://github.com/doct\
est/doctest/issues/517)
- Segmentation fault during the compilation without the copy elision\
 optimization [\#515](https://github.com/doctest/doctest/issues/515)
- Compiler warnings on Xcode 12.5 [\#514](https://github.com/doctest/doctest/\
issues/514)
- Using filter `-sc` does not work properly? [\#513](https://github.com/docte\
st/doctest/issues/513)
- \[question\] Example of tests in production code & DLLs & shared libraries?\
 [\#511](https://github.com/doctest/doctest/issues/511)
- Dumping fixture state to disk on error [\#509](https://github.com/doctest/d\
octest/issues/509)
- Macros construct reserved identifiers [\#507](https://github.com/doctest/do\
ctest/issues/507)
- Running doctest on embedded ARM Cortex µCs [\#506](https://github.com/docte\
st/doctest/issues/506)
- Asserts Outside of Tests Example Does Not Link [\#504](https://github.com/d\
octest/doctest/issues/504)
- \[FEATURE REQUEST\] Quiet flag [\#503](https://github.com/doctest/doctest/i\
ssues/503)
- Compile error on Intel C++ Classic Compilers [\#502](https://github.com/doc\
test/doctest/issues/502)
- compiling doctest in 32-bit with \_\_stdcall calling convention fails\
 [\#500](https://github.com/doctest/doctest/issues/500)
- Duplicate 'const' compilation error from TEST\_CASE\_CLASS macro\
 [\#498](https://github.com/doctest/doctest/issues/498)
- Packed fields can't be accessed in 2.4.6 [\#495](https://github.com/doctest\
/doctest/issues/495)
- Dangling pointers with .str\(\).c\_str\(\) [\#494](https://github.com/docte\
st/doctest/issues/494)
- Automatic adding of TEST\_SUITE labels to discovered tests fails if\
 ADD\_LABELS not set [\#489](https://github.com/doctest/doctest/issues/489)
- Adding a bunch of REQUIRE/CHECK utilities [\#487](https://github.com/doctes\
t/doctest/issues/487)
- Warning C4114 in MSVC [\#485](https://github.com/doctest/doctest/issues/485)
- Own repository [\#410](https://github.com/doctest/doctest/issues/410)
- Linking problem with Clang 10 on Windows [\#362](https://github.com/doctest\
/doctest/issues/362)
- Add option not to print the intro text [\#342](https://github.com/doctest/d\
octest/issues/342)
- \[Feature\] Better integration with tools \(VS Code Test Adapter\
 Extension\) [\#320](https://github.com/doctest/doctest/issues/320)
- vscode test explorer [\#303](https://github.com/doctest/doctest/issues/303)
- Want an option not to print any intro [\#245](https://github.com/doctest/do\
ctest/issues/245)
- Add way to disable printing of intro [\#181](https://github.com/doctest/doc\
test/issues/181)

**Merged pull requests:**

- Make String::operator+ non-member [\#564](https://github.com/doctest/doctes\
t/pull/564) ([Saalvage](https://github.com/Saalvage))
- Add -minimal flag [\#562](https://github.com/doctest/doctest/pull/562)\
 ([Saalvage](https://github.com/Saalvage))
- Quiet flag [\#561](https://github.com/doctest/doctest/pull/561)\
 ([Saalvage](https://github.com/Saalvage))
- Fix redefinition error while using double time DOCTEST\_ANONYMOUS\(DOCTEST\_\
CAPTURE\_\) [\#557](https://github.com/doctest/doctest/pull/557)\
 ([isaevil](https://github.com/isaevil))
- Fix error: missing initializer for member doctest::detail::TestSuite\
 [\#556](https://github.com/doctest/doctest/pull/556) ([isaevil](https://gith\
ub.com/isaevil))
- Xcode 11.3 with macos 10.15 [\#548](https://github.com/doctest/doctest/pull\
/548) ([jsoref](https://github.com/jsoref))
- Spelling [\#546](https://github.com/doctest/doctest/pull/546)\
 ([jsoref](https://github.com/jsoref))
- Fix build with -Wunused-but-set-variable [\#543](https://github.com/doctest\
/doctest/pull/543) ([jktjkt](https://github.com/jktjkt))
- build\(meson\): use `override\_dependency` if supported [\#538](https://git\
hub.com/doctest/doctest/pull/538) ([Tachi107](https://github.com/Tachi107))
- Fix google death test URL [\#528](https://github.com/doctest/doctest/pull/5\
28) ([emrecil](https://github.com/emrecil))
- Fixing issue with doctestAddTests.cmake [\#527](https://github.com/doctest/\
doctest/pull/527) ([jharmer95](https://github.com/jharmer95))
- Replace gendered pronouns [\#525](https://github.com/doctest/doctest/pull/5\
25) ([mletterle](https://github.com/mletterle))
- Fixed intel compiler parser bug. Should fix \#502 [\#523](https://github.co\
m/doctest/doctest/pull/523) ([BerengerBerthoul](https://github.com/BerengerBe\
rthoul))
- specifying working directory for execute\_process in doctest\_discover\_tes\
ts [\#518](https://github.com/doctest/doctest/pull/518) ([philbucher](https:/\
/github.com/philbucher))
- Fix the logic that depends on optional copy elision optimization\
 [\#516](https://github.com/doctest/doctest/pull/516) ([ivankochin](https://g\
ithub.com/ivankochin))
- Fix reserved identifiers [\#510](https://github.com/doctest/doctest/pull/51\
0) ([ts826848](https://github.com/ts826848))
- Fix build with GCC 11 [\#505](https://github.com/doctest/doctest/pull/505)\
 ([jktjkt](https://github.com/jktjkt))
- minor fixes in MPI docs [\#499](https://github.com/doctest/doctest/pull/499\
) ([philbucher](https://github.com/philbucher))
- Add a minimal bazel config [\#497](https://github.com/doctest/doctest/pull/\
497) ([elliottt](https://github.com/elliottt))
- Handle escaped commas in parsed arguments [\#493](https://github.com/doctes\
t/doctest/pull/493) ([friendlyanon](https://github.com/friendlyanon))
- Fixes Issue 476 . When running executables with "-s" stringifyBinaryE…\
 [\#491](https://github.com/doctest/doctest/pull/491) ([navinp0304](https://g\
ithub.com/navinp0304))
- Set variable to 0 if not set [\#490](https://github.com/doctest/doctest/pul\
l/490) ([shivupa](https://github.com/shivupa))

## [2.4.6](https://github.com/doctest/doctest/tree/2.4.6) (2021-03-22)
[Full Changelog](https://github.com/doctest/doctest/compare/2.4.5...2.4.6)

**Fixed bugs:**

- REQUIRE does not compile when operator== in different namespace\
 [\#443](https://github.com/doctest/doctest/issues/443)
- Using templated operator== inside TEST\_CASE changes deduced types of\
 forwarding references [\#399](https://github.com/doctest/doctest/issues/399)

**Closed issues:**

- CMake doesn't link package [\#483](https://github.com/doctest/doctest/issue\
s/483)
- Assertions are slow when running on Windows with a debugger attached\
 [\#481](https://github.com/doctest/doctest/issues/481)
- Get list of registered test-case names [\#479](https://github.com/doctest/d\
octest/issues/479)
- Can't compile with glibc master \(future 2.34\): SIGSTKSZ is no longer a\
 constant [\#473](https://github.com/doctest/doctest/issues/473)
- How to use Doctest with Github Actions [\#472](https://github.com/doctest/d\
octest/issues/472)
- Link error \(multiple definition...\) in simple project [\#470](https://git\
hub.com/doctest/doctest/issues/470)
- INFO does not compile when used like a function call [\#469](https://github\
.com/doctest/doctest/issues/469)
- std::uncaught\_exceptions is only available if compiling for macOS 10.12 or\
 above [\#466](https://github.com/doctest/doctest/issues/466)
- Compile failure with WinRT on 2.4.5 [\#465](https://github.com/doctest/doct\
est/issues/465)

**Merged pull requests:**

- Improve speed with attached debugger \(Windows\) [\#482](https://github.com\
/doctest/doctest/pull/482) ([pgroke](https://github.com/pgroke))
- Convert to bool by casting, rather than double negation [\#480](https://git\
hub.com/doctest/doctest/pull/480) ([kitegi](https://github.com/kitegi))
- Fix compile error when targeting macOS version earlier and macOS 10.12\
 [\#478](https://github.com/doctest/doctest/pull/478) ([SamWindell](https://g\
ithub.com/SamWindell))
- Fix MSVC linter warning about uninitialized TestSuite variables\
 [\#471](https://github.com/doctest/doctest/pull/471) ([Reedbeta](https://git\
hub.com/Reedbeta))
- REQUIRE does not compile when operator== in different namespace \#443 .\
 [\#468](https://github.com/doctest/doctest/pull/468) ([navinp0304](https://g\
ithub.com/navinp0304))
- Automatically add TEST\_SUITE labels to discovered tests\
 [\#464](https://github.com/doctest/doctest/pull/464) ([shivupa](https://gith\
ub.com/shivupa))

## [2.4.5](https://github.com/doctest/doctest/tree/2.4.5) (2021-02-02)
[Full Changelog](https://github.com/doctest/doctest/compare/2.4.4...2.4.5)

**Closed issues:**

- Stack buffer overflow in `String` constructor [\#460](https://github.com/do\
ctest/doctest/issues/460)
- Suppress warnings from clang-tidy [\#459](https://github.com/doctest/doctes\
t/issues/459)
- compilation issue in MSVC when defining DOCTEST\_THREAD\_LOCAL to static\
 [\#458](https://github.com/doctest/doctest/issues/458)
- nvcc compiler warning; doctest.h\(4138\): warning : expression has no\
 effect [\#454](https://github.com/doctest/doctest/issues/454)
- Use of std::atomic can slow down multithreaded tests [\#452](https://github\
.com/doctest/doctest/issues/452)

**Merged pull requests:**

- Fix compilation on case-sensitive filesystems [\#463](https://github.com/do\
ctest/doctest/pull/463) ([jhasse](https://github.com/jhasse))
- Use function-like macros for prefixless macro names [\#462](https://github.\
com/doctest/doctest/pull/462) ([tbleher](https://github.com/tbleher))
- Implement a multi lane atomic for assertion counts [\#453](https://github.c\
om/doctest/doctest/pull/453) ([martinus](https://github.com/martinus))

## [2.4.4](https://github.com/doctest/doctest/tree/2.4.4) (2020-12-25)
[Full Changelog](https://github.com/doctest/doctest/compare/2.4.3...2.4.4)

**Closed issues:**

- 2.4.2: build fails [\#450](https://github.com/doctest/doctest/issues/450)
- combine the same tests for different build configurations from multiple\
 shared objects without having symbol clashes [\#436](https://github.com/doct\
est/doctest/issues/436)
- Issue with GitHub Security Scanning: gmtime [\#423](https://github.com/doct\
est/doctest/issues/423)

## [2.4.3](https://github.com/doctest/doctest/tree/2.4.3) (2020-12-16)
[Full Changelog](https://github.com/doctest/doctest/compare/2.4.2...2.4.3)

## [2.4.2](https://github.com/doctest/doctest/tree/2.4.2) (2020-12-15)
[Full Changelog](https://github.com/doctest/doctest/compare/2.4.1...2.4.2)

**Closed issues:**

- DOCTEST\_CHECK\_THROWS\_WITH\_AS fails to work with dependant exception\
 type [\#447](https://github.com/doctest/doctest/issues/447)
- MSVC warnings: narrowing conversion, signed/unsigned mismatch\
 [\#446](https://github.com/doctest/doctest/issues/446)
-  log contexts for failures in JUnit reporter [\#441](https://github.com/doc\
test/doctest/issues/441)
- MinGW "'mutex' in namespace 'std' does not name a type" error.\
 [\#438](https://github.com/doctest/doctest/issues/438)
- Test runner thread initialization [\#435](https://github.com/doctest/doctes\
t/issues/435)
- PLATFORM is misdetected on MacOSX Big Sur [\#415](https://github.com/doctes\
t/doctest/issues/415)
- CHECK\_EQ with enum values [\#276](https://github.com/doctest/doctest/issue\
s/276)

**Merged pull requests:**

- Squash MSVC warnings when including ntstatus.h [\#449](https://github.com/d\
octest/doctest/pull/449) ([nickhutchinson](https://github.com/nickhutchinson))
- Add MAIN\_PROJECT check for test option [\#445](https://github.com/doctest/\
doctest/pull/445) ([globberwops](https://github.com/globberwops))
- Suppress clang-analyzer-cplusplus.NewDeleteLeaks [\#444](https://github.com\
/doctest/doctest/pull/444) ([ncihnegn](https://github.com/ncihnegn))
- log contexts for failures in JUnit reporter [\#442](https://github.com/doct\
est/doctest/pull/442) ([runave](https://github.com/runave))
- Fix 32bit support on macOS [\#440](https://github.com/doctest/doctest/pull/\
440) ([AlexanderLanin](https://github.com/AlexanderLanin))

## [2.4.1](https://github.com/doctest/doctest/tree/2.4.1) (2020-11-04)
[Full Changelog](https://github.com/doctest/doctest/compare/2.4.0...2.4.1)

**Closed issues:**

- Avoid old C-style casts [\#424](https://github.com/doctest/doctest/issues/4\
24)
- Segfault in unwind [\#422](https://github.com/doctest/doctest/issues/422)
- Inspect exception with gdb [\#421](https://github.com/doctest/doctest/issue\
s/421)
- use-of-uninitialized-value [\#414](https://github.com/doctest/doctest/issue\
s/414)
- Support unit tests with MPI [\#413](https://github.com/doctest/doctest/issu\
es/413)
- Break into debugger support is missing for Linux [\#411](https://github.com\
/doctest/doctest/issues/411)
- What if built doctest as static library instead of header-only\
 [\#408](https://github.com/doctest/doctest/issues/408)
- \[Question\] How to get test case name [\#407](https://github.com/doctest/d\
octest/issues/407)
- create extensions header for optional features requiring more std includes\
 or newer C++ features [\#405](https://github.com/doctest/doctest/issues/405)
- tests/asserts summary lines are misaligned when counts exceed 999999\
 [\#402](https://github.com/doctest/doctest/issues/402)
- Call to 'ne' is ambiguous -- with solution [\#395](https://github.com/docte\
st/doctest/issues/395)
- Intermittent Segfaults [\#391](https://github.com/doctest/doctest/issues/39\
1)
- Junit classname [\#390](https://github.com/doctest/doctest/issues/390)
- Add default printers for enums [\#121](https://github.com/doctest/doctest/i\
ssues/121)

**Merged pull requests:**

- Enum support \(fix for Issue \#121\) [\#429](https://github.com/doctest/doc\
test/pull/429) ([jkriegshauser](https://github.com/jkriegshauser))
- Support Clang 3.4 [\#428](https://github.com/doctest/doctest/pull/428)\
 ([AlexanderLanin](https://github.com/AlexanderLanin))
- Silence remarks on old C-style casts [\#425](https://github.com/doctest/doc\
test/pull/425) ([UnePierre](https://github.com/UnePierre))
- Initial MPI unit tests implementation [\#418](https://github.com/doctest/do\
ctest/pull/418) ([BerengerBerthoul](https://github.com/BerengerBerthoul))
- Add JUNIT\_OUTPUT\_DIR option to doctest\_discover\_tests\
 [\#417](https://github.com/doctest/doctest/pull/417) ([Tradias](https://gith\
ub.com/Tradias))
- Add option to build with std headers. [\#416](https://github.com/doctest/do\
ctest/pull/416) ([avostrik](https://github.com/avostrik))
- Port Catch2 break into debugger for Linux. closes \#411 [\#412](https://git\
hub.com/doctest/doctest/pull/412) ([mikezackles](https://github.com/mikezackl\
es))
- summary: align even large values \#402 [\#403](https://github.com/doctest/d\
octest/pull/403) ([dankamongmen](https://github.com/dankamongmen))
- Add breakpoint inline assembly for the Apple Silicon macOS.\
 [\#400](https://github.com/doctest/doctest/pull/400) ([bruvzg](https://githu\
b.com/bruvzg))
- fix google's death test URI in roadmap [\#393](https://github.com/doctest/d\
octest/pull/393) ([ashutosh108](https://github.com/ashutosh108))

## [2.4.0](https://github.com/doctest/doctest/tree/2.4.0) (2020-06-27)
[Full Changelog](https://github.com/doctest/doctest/compare/2.3.8...2.4.0)

**Closed issues:**

- Count points based on the number of passed/failed cases?\
 [\#386](https://github.com/doctest/doctest/issues/386)
- How to understand "\#data\_array" in std::string? [\#383](https://github.co\
m/doctest/doctest/issues/383)
- crash: doctest with custom allocator [\#382](https://github.com/doctest/doc\
test/issues/382)
- Feature Request: format PRIVATE/PUBLIC/INTERFACE entries with constant\
 indentation [\#378](https://github.com/doctest/doctest/issues/378)
- JUnit Reporter for Doctest [\#376](https://github.com/doctest/doctest/issue\
s/376)
- Avoiding Feature Bloat [\#374](https://github.com/doctest/doctest/issues/37\
4)
- StringMaker\<wchar\_t\> fail to compile with C++20 enabled \(GCC\)\
 [\#357](https://github.com/doctest/doctest/issues/357)
- doctest\_discover\_tests and FetchContent\_Declare [\#351](https://github.c\
om/doctest/doctest/issues/351)
- Junit reporter [\#318](https://github.com/doctest/doctest/issues/318)

**Merged pull requests:**

- Add a note that doctest can be installed through Homebrew\
 [\#388](https://github.com/doctest/doctest/pull/388) ([cameronwhite](https:/\
/github.com/cameronwhite))
- provide alternative implementation of has\_insertion\_operator for C++20\
 [\#387](https://github.com/doctest/doctest/pull/387) ([lukaszgemborowski](ht\
tps://github.com/lukaszgemborowski))
- Fix issue template to mention doctest [\#380](https://github.com/doctest/do\
ctest/pull/380) ([nyanpasu64](https://github.com/nyanpasu64))

## [2.3.8](https://github.com/doctest/doctest/tree/2.3.8) (2020-05-17)
[Full Changelog](https://github.com/doctest/doctest/compare/2.3.7...2.3.8)

**Closed issues:**

- Scenario name can not be passed to -tc to execute single scenario\
 [\#373](https://github.com/doctest/doctest/issues/373)
- Compile Error with CHECK\_NOTHROW when using 2 Template Arguments\
 [\#372](https://github.com/doctest/doctest/issues/372)
- dll example won't compile [\#371](https://github.com/doctest/doctest/issues\
/371)
- Build error with MinGW \(Mingw-w64\) due to missing Windows.h \(with\
 capital W\) [\#370](https://github.com/doctest/doctest/issues/370)
- How to override file\_line\_to\_stream? [\#369](https://github.com/doctest/\
doctest/issues/369)
- Memory sanitizer fails. [\#365](https://github.com/doctest/doctest/issues/3\
65)
- Warning c6319 in Visual Studio [\#359](https://github.com/doctest/doctest/i\
ssues/359)
- Any option to show each test case's execute time? [\#358](https://github.co\
m/doctest/doctest/issues/358)
- doctest in embedded [\#355](https://github.com/doctest/doctest/issues/355)
- Reloading a plugin with test cases leads to a segmentation fault\
 [\#350](https://github.com/doctest/doctest/issues/350)
- Compiling with DOCTEST\_CONFIG\_COLORS\_ANSI fails on Windows\
 [\#348](https://github.com/doctest/doctest/issues/348)
- Can I inherit ConsoleReporter? [\#344](https://github.com/doctest/doctest/i\
ssues/344)
- Noreturn and noexcept defines for Visual Studio 2013 support\
 [\#327](https://github.com/doctest/doctest/issues/327)
- Data-driven testing -- print out the deepest DOCTEST\_SUBCASE\
 [\#215](https://github.com/doctest/doctest/issues/215)
- Print the SUBCASE path when an assert fails in the TEST\_CASE body\
 [\#125](https://github.com/doctest/doctest/issues/125)

**Merged pull requests:**

- fix: possible UB with nullptr increment [\#368](https://github.com/doctest/\
doctest/pull/368) ([oktonion](https://github.com/oktonion))
- Use CMake's CMP0077 policy if available [\#363](https://github.com/doctest/\
doctest/pull/363) ([thelink2012](https://github.com/thelink2012))
- Fix warning c6319 in Visual Studio 16.5 [\#361](https://github.com/doctest/\
doctest/pull/361) ([Cvelth](https://github.com/Cvelth))

## [2.3.7](https://github.com/doctest/doctest/tree/2.3.7) (2020-02-24)
[Full Changelog](https://github.com/doctest/doctest/compare/2.3.6...2.3.7)

**Closed issues:**

- Some of the GitHub CI builds are failing [\#334](https://github.com/doctest\
/doctest/issues/334)
- C++20 removed std::uncaught\_exception [\#333](https://github.com/doctest/d\
octest/issues/333)
- Doctest SEH handlers are called before \_\_except handlers\
 [\#324](https://github.com/doctest/doctest/issues/324)

**Merged pull requests:**

- using std namespace where necessary and timer ticks fix [\#341](https://git\
hub.com/doctest/doctest/pull/341) ([oktonion](https://github.com/oktonion))
- fix std::uncaught\_exceptions [\#340](https://github.com/doctest/doctest/pu\
ll/340) ([cyyever](https://github.com/cyyever))
- Fix GitHub CI and add GitHub build badges [\#336](https://github.com/doctes\
t/doctest/pull/336) ([claremacrae](https://github.com/claremacrae))
- http -\> https [\#331](https://github.com/doctest/doctest/pull/331)\
 ([Coeur](https://github.com/Coeur))
- Switch to catching unhandled exceptions on Windows Closes \#324\
 [\#325](https://github.com/doctest/doctest/pull/325) ([jkriegshauser](https:\
//github.com/jkriegshauser))

## [2.3.6](https://github.com/doctest/doctest/tree/2.3.6) (2019-12-16)
[Full Changelog](https://github.com/doctest/doctest/compare/2.3.5...2.3.6)

**Closed issues:**

- Link problem w/ BUILD=Release if MESSAGE\(\) with std::string/ostream-opera\
tor is used [\#316](https://github.com/doctest/doctest/issues/316)
- the FAQ about difference to Catch2 is missing tags [\#315](https://github.c\
om/doctest/doctest/issues/315)
- include Windows.h in small caps to silence clang warnings\
 [\#312](https://github.com/doctest/doctest/issues/312)
- Mistake in generator with lgtm error [\#311](https://github.com/doctest/doc\
test/issues/311)
- CMake: cannot install target doctest\_with\_main [\#310](https://github.com\
/doctest/doctest/issues/310)
- \[bug\] INFO\(\) and CAPTURE\(\) cannot compile using MSVC when used with\
 DOCTEST\_CONFIG\_IMPLEMENTATION\_IN\_DLL [\#306](https://github.com/doctest/\
doctest/issues/306)
- Skip subcase [\#304](https://github.com/doctest/doctest/issues/304)
- Does some equivalent features from google test exist here?\
 [\#300](https://github.com/doctest/doctest/issues/300)
- How to use doctest in dll only\(without main.cpp and .exe\)\
 [\#299](https://github.com/doctest/doctest/issues/299)
- Warning: C26812: The enum type 'doctest::assertType::Enum' is unscoped.\
 Prefer 'enum class' over 'enum' \(Enum.3\). [\#298](https://github.com/docte\
st/doctest/issues/298)
- test executable\_dll\_and\_plugin fails on Linux, GCC 8.1.0,\
 -fsanitize=address [\#201](https://github.com/doctest/doctest/issues/201)

**Merged pull requests:**

- Fixed missing ostream include for MacOS when defining DOCTEST\_CONFIG\_…\
 [\#314](https://github.com/doctest/doctest/pull/314) ([NKTomHaygarth](https:\
//github.com/NKTomHaygarth))
- include windows.h in cmall caps to silence clang nonportable warnings\
 [\#313](https://github.com/doctest/doctest/pull/313) ([suoniq](https://githu\
b.com/suoniq))
- Add .editorconfig file. [\#301](https://github.com/doctest/doctest/pull/301\
) ([DaanDeMeyer](https://github.com/DaanDeMeyer))
- Add Github Actions CI [\#285](https://github.com/doctest/doctest/pull/285)\
 ([DaanDeMeyer](https://github.com/DaanDeMeyer))

## [2.3.5](https://github.com/doctest/doctest/tree/2.3.5) (2019-09-22)
[Full Changelog](https://github.com/doctest/doctest/compare/2.3.4...2.3.5)

**Closed issues:**

- \[feature request\] Assertion macros for throwing exception of a specific\
 type with message - \<LEVEL\>\_THROWS\_WITH\_AS\(expr, string, ex\_type\)\
 [\#295](https://github.com/doctest/doctest/issues/295)
- CHECK\_THROWS\_AS of non-default constructor wants to call default\
 constructor [\#293](https://github.com/doctest/doctest/issues/293)
- Typos and spelling errors in source, documentation and scripts\
 [\#291](https://github.com/doctest/doctest/issues/291)
- Customize test names / variable substitution [\#284](https://github.com/doc\
test/doctest/issues/284)
- SUBCASE in function not behaving as expected [\#282](https://github.com/doc\
test/doctest/issues/282)
- SUPER\_FAST\_ASSERTS fails to compile CHECK\_MESSAGE [\#281](https://github\
.com/doctest/doctest/issues/281)
- CHECK\_MESSAGE no longer works with DOCTEST\_CONFIG\_SUPER\_FAST\_ASSERTS\
 [\#280](https://github.com/doctest/doctest/issues/280)
- CAPTURE of structured binding element no longer works [\#279](https://githu\
b.com/doctest/doctest/issues/279)
- Reporter: `test\_case\_end` no longer fired after test case restart\
 [\#278](https://github.com/doctest/doctest/issues/278)
- Add debug break override support [\#277](https://github.com/doctest/doctest\
/issues/277)
- Running tests from within Visual Studio in a static lib project\
 [\#275](https://github.com/doctest/doctest/issues/275)
- Compile-time error when using a raw string literal inside of REQUIRE \(MSVC\
 2017\) [\#274](https://github.com/doctest/doctest/issues/274)
- Give example for having tests in production code [\#252](https://github.com\
/doctest/doctest/issues/252)
- Memory leaks just by including doctest.h [\#205](https://github.com/doctest\
/doctest/issues/205)
- Feature request: print subcase when an exception is thrown inside one\
 [\#136](https://github.com/doctest/doctest/issues/136)

**Merged pull requests:**

- Fix typos and misspellings found by codespell. [\#292](https://github.com/d\
octest/doctest/pull/292) ([warmsocks](https://github.com/warmsocks))
- Document order by issue correctly [\#290](https://github.com/doctest/doctes\
t/pull/290) ([DaanDeMeyer](https://github.com/DaanDeMeyer))
- Document that -order-by=file is compiler-dependent [\#289](https://github.c\
om/doctest/doctest/pull/289) ([DaanDeMeyer](https://github.com/DaanDeMeyer))
- Add -order-by=name to filter\_2 test [\#288](https://github.com/doctest/doc\
test/pull/288) ([DaanDeMeyer](https://github.com/DaanDeMeyer))
- Add support for compiling with clang-cl [\#286](https://github.com/doctest/\
doctest/pull/286) ([DaanDeMeyer](https://github.com/DaanDeMeyer))
- No minimum version limitation of Meson [\#283](https://github.com/doctest/d\
octest/pull/283) ([ydm](https://github.com/ydm))

## [2.3.4](https://github.com/doctest/doctest/tree/2.3.4) (2019-08-12)
[Full Changelog](https://github.com/doctest/doctest/compare/2.3.3...2.3.4)

**Closed issues:**

- Remove INFO\(\) limitation for using only lvalues and no rvalues\
 [\#269](https://github.com/doctest/doctest/issues/269)
- Compile error on MAC OS with AppleClang 8.0.0.8000042  [\#266](https://gith\
ub.com/doctest/doctest/issues/266)
- Throwing exception in a mocked method [\#265](https://github.com/doctest/do\
ctest/issues/265)
- Illegal syntax for decorators compiles and runs without warning, but has no\
 effect [\#264](https://github.com/doctest/doctest/issues/264)
- Support conditional expressions in REQUIRE [\#262](https://github.com/docte\
st/doctest/issues/262)
- Register a listener\(reporter\) that always listens [\#257](https://github.\
com/doctest/doctest/issues/257)
- Memory sanitizer complaint [\#255](https://github.com/doctest/doctest/issue\
s/255)
- Windows Clang GNU command line warnings [\#253](https://github.com/doctest/\
doctest/issues/253)
- The build writes into the source directory [\#249](https://github.com/docte\
st/doctest/issues/249)
- How to enable tests inside another exe [\#246](https://github.com/doctest/d\
octest/issues/246)
- Testing multiple headers. [\#244](https://github.com/doctest/doctest/issues\
/244)
- CMakeLists.txt: Needs CMAKE\_CXX\_STANDARD=11 [\#243](https://github.com/do\
ctest/doctest/issues/243)
- \[bug\] Can't compile the tests because of mutex, that is declared in the\
 doctest [\#242](https://github.com/doctest/doctest/issues/242)

**Merged pull requests:**

- Improve Listener docs [\#273](https://github.com/doctest/doctest/pull/273)\
 ([claremacrae](https://github.com/claremacrae))
- Rework `INFO` lazy evaluation to use lambdas. [\#270](https://github.com/do\
ctest/doctest/pull/270) ([DaanDeMeyer](https://github.com/DaanDeMeyer))
- Prevent compile errors with AppleClang compiler [\#268](https://github.com/\
doctest/doctest/pull/268) ([ClausKlein](https://github.com/ClausKlein))
- Revert "fix : including windows.h header cause error" [\#263](https://githu\
b.com/doctest/doctest/pull/263) ([onqtam](https://github.com/onqtam))
- Fix static analyzer URLs [\#259](https://github.com/doctest/doctest/pull/25\
9) ([godbyk](https://github.com/godbyk))
- fix : including windows.h header cause error [\#258](https://github.com/doc\
test/doctest/pull/258) ([rinechran](https://github.com/rinechran))
- only look for C++ compiler with CMake [\#256](https://github.com/doctest/do\
ctest/pull/256) ([zhihaoy](https://github.com/zhihaoy))
- Fix \#253 [\#254](https://github.com/doctest/doctest/pull/254)\
 ([DaanDeMeyer](https://github.com/DaanDeMeyer))
- add alias target for doctest for use in build tree [\#247](https://github.c\
om/doctest/doctest/pull/247) ([trondhe](https://github.com/trondhe))

## [2.3.3](https://github.com/doctest/doctest/tree/2.3.3) (2019-06-02)
[Full Changelog](https://github.com/doctest/doctest/compare/2.3.2...2.3.3)

**Closed issues:**

- Build fails with gcc9 because of -Wstrict-overflow=5 which is too high\
 [\#241](https://github.com/doctest/doctest/issues/241)
- doctest given defined with short macro name [\#239](https://github.com/doct\
est/doctest/issues/239)
- Splitting templated test across different translation units\
 [\#238](https://github.com/doctest/doctest/issues/238)
- Compile errors with iosfwd.h and Visual Studio 2019 Preview\
 [\#183](https://github.com/doctest/doctest/issues/183)
- Add CMake test support as catch\_discover\_tests\(\) in Catch2\
 [\#171](https://github.com/doctest/doctest/issues/171)

**Merged pull requests:**

- fix \#239 - use long macro name [\#240](https://github.com/doctest/doctest/\
pull/240) ([m-bd](https://github.com/m-bd))
- Add doctest\_discover\_tests\(\) [\#236](https://github.com/doctest/doctest\
/pull/236) ([reddwarf69](https://github.com/reddwarf69))
- Ignore redundant-decls warning on MinGW [\#235](https://github.com/doctest/\
doctest/pull/235) ([AMS21](https://github.com/AMS21))
- Fixed meson build file dependency declaration [\#233](https://github.com/do\
ctest/doctest/pull/233) ([jormundgand](https://github.com/jormundgand))

## [2.3.2](https://github.com/doctest/doctest/tree/2.3.2) (2019-05-06)
[Full Changelog](https://github.com/doctest/doctest/compare/2.3.1...2.3.2)

**Closed issues:**

- scripts/bench/run\_all.py : module 'urllib' has no attribute 'urlretrieve'\
 [\#230](https://github.com/doctest/doctest/issues/230)
- wrong set of tests registered with TEST\_CASE\_TEMPLATE get executed\
 [\#228](https://github.com/doctest/doctest/issues/228)
- Logging not Working for me [\#227](https://github.com/doctest/doctest/issue\
s/227)
- Link test runner executable into dll? [\#226](https://github.com/doctest/do\
ctest/issues/226)
- Linking issue for executables after including doctest in library\
 [\#224](https://github.com/doctest/doctest/issues/224)
- Strange REQUIRE\_THROWS behaviour [\#223](https://github.com/doctest/doctes\
t/issues/223)
- Windows clang-cl -Wunused-variable warning [\#221](https://github.com/docte\
st/doctest/issues/221)
- Update doctest 2.3.1 in bincrafters [\#220](https://github.com/doctest/doct\
est/issues/220)
- make install, on 64 bit, installs cmake files into lib instead of lib64\
 folder  [\#218](https://github.com/doctest/doctest/issues/218)
- TSAN: data race related to hasLoggedCurrentTestStart [\#217](https://github\
.com/doctest/doctest/issues/217)
- REQUIRE\_THROWS\_AS does not support class constructors [\#216](https://git\
hub.com/doctest/doctest/issues/216)
- Build failure on clang 7.0.1 on Fedora 29 [\#214](https://github.com/doctes\
t/doctest/issues/214)
- add example compatible with -\> https://github.com/report-ci/\
 [\#212](https://github.com/doctest/doctest/issues/212)
- No DOCTEST\_WITH\_TESTS? [\#211](https://github.com/doctest/doctest/issues/\
211)

**Merged pull requests:**

- Added meson file, to declare a dependency. [\#232](https://github.com/docte\
st/doctest/pull/232) ([jormundgand](https://github.com/jormundgand))
- Explicitly specify the doctest\_with\_main C++ standard in CMake.\
 [\#231](https://github.com/doctest/doctest/pull/231) ([DaanDeMeyer](https://\
github.com/DaanDeMeyer))
- Remove architecture check from CMake package [\#225](https://github.com/doc\
test/doctest/pull/225) ([mmha](https://github.com/mmha))
- add default install prefix [\#219](https://github.com/doctest/doctest/pull/\
219) ([a4z](https://github.com/a4z))
- \[regression\] Workaround MSVC preprocessor issue triggered by\
 REQUIRE\_THROWS [\#213](https://github.com/doctest/doctest/pull/213)\
 ([zhihaoy](https://github.com/zhihaoy))

## [2.3.1](https://github.com/doctest/doctest/tree/2.3.1) (2019-03-24)
[Full Changelog](https://github.com/doctest/doctest/compare/2.3.0...2.3.1)

**Merged pull requests:**

- Add two very simple examples of using doctest with CMake\
 [\#209](https://github.com/doctest/doctest/pull/209) ([pr0g](https://github.\
com/pr0g))

## [2.3.0](https://github.com/doctest/doctest/tree/2.3.0) (2019-03-23)
[Full Changelog](https://github.com/doctest/doctest/compare/2.2.3...2.3.0)

**Closed issues:**

- Compilation with emscripten fails by default because of signal handling\
 [\#207](https://github.com/doctest/doctest/issues/207)
- Compilation fails with cl.exe /Zc:wchar\_t- [\#206](https://github.com/doct\
est/doctest/issues/206)
- Parallel invocation of doctest's own testsuite via CTest fails\
 [\#202](https://github.com/doctest/doctest/issues/202)
-  Get the number of passed/failed tests in the code [\#200](https://github.c\
om/doctest/doctest/issues/200)
- Tests alongside code with multiple executables [\#199](https://github.com/d\
octest/doctest/issues/199)
- Cppcheck 1.86 warnings [\#198](https://github.com/doctest/doctest/issues/19\
8)
- Compiling as Dll maybe is wrong [\#196](https://github.com/doctest/doctest/\
issues/196)
- Forward-declaring identifiers in std:: is UB - consider including some of\
 the cheaper C/C++ stdlib headers [\#194](https://github.com/doctest/doctest/\
issues/194)
- QtCreator + clang warning about operator \<\< precedence\
 [\#191](https://github.com/doctest/doctest/issues/191)
- run test fixture from cli [\#190](https://github.com/doctest/doctest/issues\
/190)
- Installing doctest using cmake and make fails on Ubuntu 16.04 \(C++11 is\
 not used\) [\#189](https://github.com/doctest/doctest/issues/189)
- c++17 requirement for testing private members [\#188](https://github.com/do\
ctest/doctest/issues/188)
- \[feature request\] implement a user-extendable reporter system\
 [\#138](https://github.com/doctest/doctest/issues/138)
- Same test runs multiple times when written in a header and included with\
 different unnormalized paths [\#45](https://github.com/doctest/doctest/issue\
s/45)

**Merged pull requests:**

- Fix unmatched bracket in DOCTEST\_TEST\_CASE\_CLASS [\#204](https://github.\
com/doctest/doctest/pull/204) ([patstew](https://github.com/patstew))
- Template apply [\#203](https://github.com/doctest/doctest/pull/203)\
 ([zhihaoy](https://github.com/zhihaoy))
- No undefined behavior per C++ standard in detecting endianness.\
 [\#195](https://github.com/doctest/doctest/pull/195) ([dimztimz](https://git\
hub.com/dimztimz))
- Fix propagating include directories of target doctest\_with\_main\
 [\#193](https://github.com/doctest/doctest/pull/193) ([dimztimz](https://git\
hub.com/dimztimz))
-  Move single header to a separate folder [\#187](https://github.com/doctest\
/doctest/pull/187) ([dimztimz](https://github.com/dimztimz))
- Fix Clang format to handle C++11 [\#186](https://github.com/doctest/doctest\
/pull/186) ([dimztimz](https://github.com/dimztimz))
- Rename doctest\_impl.h to doctest.cpp for less confusion.\
 [\#185](https://github.com/doctest/doctest/pull/185) ([dimztimz](https://git\
hub.com/dimztimz))

## [2.2.3](https://github.com/doctest/doctest/tree/2.2.3) (2019-02-10)
[Full Changelog](https://github.com/doctest/doctest/compare/2.2.2...2.2.3)

**Closed issues:**

- Calling convention needed on a few functions [\#182](https://github.com/doc\
test/doctest/issues/182)
- Terminal color is not reset when a test fails with some signal\
 [\#122](https://github.com/doctest/doctest/issues/122)

## [2.2.2](https://github.com/doctest/doctest/tree/2.2.2) (2019-01-28)
[Full Changelog](https://github.com/doctest/doctest/compare/2.2.1...2.2.2)

**Closed issues:**

- Add way to override getCurrentTicks\(\) implementation [\#178](https://gith\
ub.com/doctest/doctest/issues/178)
- Wrap \<csignal\> include with ifdef [\#177](https://github.com/doctest/doct\
est/issues/177)
- How to stop doctest hijack unhandled exceptions? [\#176](https://github.com\
/doctest/doctest/issues/176)
- Change the include path of the `doctest` CMake interface target so users\
 need to specify the folder as well [\#175](https://github.com/doctest/doctes\
t/issues/175)
- Reduce scope of DebugOutputWindowReporter instance [\#174](https://github.c\
om/doctest/doctest/issues/174)
- Can logging \(INFO\) be used in helper class outside of TEST\_CASE?\
 [\#169](https://github.com/doctest/doctest/issues/169)

**Merged pull requests:**

- Change the include path in examples as \#175 [\#180](https://github.com/doc\
test/doctest/pull/180) ([ncihnegn](https://github.com/ncihnegn))
- Fix CMake include path \#175 [\#179](https://github.com/doctest/doctest/pul\
l/179) ([ncihnegn](https://github.com/ncihnegn))

## [2.2.1](https://github.com/doctest/doctest/tree/2.2.1) (2019-01-15)
[Full Changelog](https://github.com/doctest/doctest/compare/2.2.0...2.2.1)

**Closed issues:**

- the `--no-throw` option shouldn't affect `\<LEVEL\>\_NOTHROW` asserts\
 [\#173](https://github.com/doctest/doctest/issues/173)
- Make doctest work with XCode 6 and 7 \(no support for C++11 thread\_local\)\
 [\#172](https://github.com/doctest/doctest/issues/172)
- Print vector content. [\#170](https://github.com/doctest/doctest/issues/170)
- Conan package [\#103](https://github.com/doctest/doctest/issues/103)
- \[feature request\] Thread-safety for asserts and logging facilities\
 [\#4](https://github.com/doctest/doctest/issues/4)

## [2.2.0](https://github.com/doctest/doctest/tree/2.2.0) (2018-12-05)
[Full Changelog](https://github.com/doctest/doctest/compare/2.1.0...2.2.0)

**Closed issues:**

- remove the FAST\_ versions of the binary asserts \(not a breaking change!\)\
 [\#167](https://github.com/doctest/doctest/issues/167)
- \[compile times\] make the DOCTEST\_CONFIG\_SUPER\_FAST\_ASSERTS identifier\
 affect normal asserts too [\#166](https://github.com/doctest/doctest/issues/\
166)

## [2.1.0](https://github.com/doctest/doctest/tree/2.1.0) (2018-11-30)
[Full Changelog](https://github.com/doctest/doctest/compare/2.0.1...2.1.0)

**Closed issues:**

- doctest::String ctor with non-zero terminated string [\#165](https://github\
.com/doctest/doctest/issues/165)
- thread\_local is not supported on iOS 9.0 [\#164](https://github.com/doctes\
t/doctest/issues/164)
- Compiler error on Android NDK r18 [\#163](https://github.com/doctest/doctes\
t/issues/163)
- \[question\] One setup for multiple tests [\#160](https://github.com/doctes\
t/doctest/issues/160)
- clang unwanted warning in user code [\#156](https://github.com/doctest/doct\
est/issues/156)
- Unsigned integer overflow in fileOrderComparator [\#151](https://github.com\
/doctest/doctest/issues/151)
- ThreadSanitizer: signal-unsafe call inside of a signal [\#147](https://gith\
ub.com/doctest/doctest/issues/147)
- Feature request: check for exception string \(like Catch's\
 CHECK\_THROWS\_WITH\) [\#97](https://github.com/doctest/doctest/issues/97)

**Merged pull requests:**

- Fixed build error under Android NDK [\#162](https://github.com/doctest/doct\
est/pull/162) ([tals](https://github.com/tals))
- Added clang-7 to travis build [\#161](https://github.com/doctest/doctest/pu\
ll/161) ([AMS21](https://github.com/AMS21))
- Remove clang-tidy warnings for static fields created by doctest\
 [\#159](https://github.com/doctest/doctest/pull/159) ([rantasub](https://git\
hub.com/rantasub))
- Make it possible to change the command line options prefix\
 [\#158](https://github.com/doctest/doctest/pull/158) ([tbleher](https://gith\
ub.com/tbleher))

## [2.0.1](https://github.com/doctest/doctest/tree/2.0.1) (2018-10-24)
[Full Changelog](https://github.com/doctest/doctest/compare/2.0.0...2.0.1)

**Closed issues:**

- macro name collision with google log [\#157](https://github.com/doctest/doc\
test/issues/157)
- Add \#define to not run tests by default [\#152](https://github.com/doctest\
/doctest/issues/152)
- REQUIRE\_THROWS\_MESSAGE not checking message correctly [\#150](https://git\
hub.com/doctest/doctest/issues/150)
- Test case passes even though subcase failed [\#149](https://github.com/doct\
est/doctest/issues/149)

**Merged pull requests:**

- Correctly document when a main\(\) entry point will be created\
 [\#155](https://github.com/doctest/doctest/pull/155) ([tbleher](https://gith\
ub.com/tbleher))
- Correct format string for unsigned char [\#154](https://github.com/doctest/\
doctest/pull/154) ([tbleher](https://github.com/tbleher))

## [2.0.0](https://github.com/doctest/doctest/tree/2.0.0) (2018-08-23)
[Full Changelog](https://github.com/doctest/doctest/compare/1.2.9...2.0.0)

**Closed issues:**

- MSVC 2017 15.8.1, New Warnings as Errors [\#144](https://github.com/doctest\
/doctest/issues/144)
- Windows clang-cl -Wdeprecated-declarations warnings [\#143](https://github.\
com/doctest/doctest/issues/143)
- Logo Proposal for Doctest [\#141](https://github.com/doctest/doctest/issues\
/141)
- PCH Support [\#140](https://github.com/doctest/doctest/issues/140)
- improve compile times even further [\#139](https://github.com/doctest/docte\
st/issues/139)
- !!! BREAKING CHANGE !!! - Move to C++11 for next version of the library\
 [\#137](https://github.com/doctest/doctest/issues/137)
- getCurrentTicks producing warning on MinGW [\#133](https://github.com/docte\
st/doctest/issues/133)
- \[enhancement\] Add support for "stand-alone assertions".\
 [\#114](https://github.com/doctest/doctest/issues/114)

**Merged pull requests:**

- Suppress compiler warning on MinGW [\#134](https://github.com/doctest/docte\
st/pull/134) ([AMS21](https://github.com/AMS21))

## [1.2.9](https://github.com/doctest/doctest/tree/1.2.9) (2018-05-10)
[Full Changelog](https://github.com/doctest/doctest/compare/1.2.8...1.2.9)

**Closed issues:**

- GCC 8.0 std::uncaught\_exception\(\) is deprecated  [\#130](https://github.\
com/doctest/doctest/issues/130)
- Signal stack size too small on Linux [\#129](https://github.com/doctest/doc\
test/issues/129)
- Support Intel Compiler [\#128](https://github.com/doctest/doctest/issues/12\
8)
- Please add support for MSVC 2005 [\#127](https://github.com/doctest/doctest\
/issues/127)
- scan-build report "Dereference of null pointer" for function wildcmp\
 [\#124](https://github.com/doctest/doctest/issues/124)
- !!! BREAKING CHANGE \(console output only\)  !!! - Emulate the\
 error/warning format emitted by native compiler gcc/clang/msvc when printing\
 test failures in the log [\#123](https://github.com/doctest/doctest/issues/1\
23)
- ARM builds: FTBFS on armhf - error: cast from 'const char\*' to 'const \
 [\#118](https://github.com/doctest/doctest/issues/118)

**Merged pull requests:**

- Exclude Intel from GCC compiler check [\#132](https://github.com/doctest/do\
ctest/pull/132) ([smcallis](https://github.com/smcallis))
- Fix deprecated-declarations warning with GCC-8.0 [\#131](https://github.com\
/doctest/doctest/pull/131) ([AMS21](https://github.com/AMS21))

## [1.2.8](https://github.com/doctest/doctest/tree/1.2.8) (2018-03-10)
[Full Changelog](https://github.com/doctest/doctest/compare/1.2.7...1.2.8)

**Closed issues:**

- ARM64 builds: templated\_test\_cases.cpp test fails [\#119](https://github.\
com/doctest/doctest/issues/119)

## [1.2.7](https://github.com/doctest/doctest/tree/1.2.7) (2018-02-06)
[Full Changelog](https://github.com/doctest/doctest/compare/1.2.6...1.2.7)

**Closed issues:**

- MSan has runtime error: unsigned integer overflow [\#116](https://github.co\
m/doctest/doctest/issues/116)
- clang-tidy warning about cert-err58-cpp [\#115](https://github.com/doctest/\
doctest/issues/115)
- Linking errors [\#113](https://github.com/doctest/doctest/issues/113)
- inlining function defs [\#111](https://github.com/doctest/doctest/issues/11\
1)
- Nullptr issue. [\#110](https://github.com/doctest/doctest/issues/110)
- MemorySanitizer: use-of-uninitialized-value [\#109](https://github.com/doct\
est/doctest/issues/109)
- Potential memory leak through scan-build [\#108](https://github.com/doctest\
/doctest/issues/108)
- Warnings raised to error with latest MSVC version [\#107](https://github.co\
m/doctest/doctest/issues/107)
- New solution for tests in static libraries ! \(MSVC\) [\#106](https://githu\
b.com/doctest/doctest/issues/106)
- Command line flags do not work after code formatter/beautifier\
 [\#104](https://github.com/doctest/doctest/issues/104)
- Cppcheck 1.81 warnings [\#102](https://github.com/doctest/doctest/issues/10\
2)

**Merged pull requests:**

- Fix macros WIN32\_LEAN\_AND\_MEAN typo [\#112](https://github.com/doctest/d\
octest/pull/112) ([vladimirgamalyan](https://github.com/vladimirgamalyan))
- Correct DOCTEST\_NO\_INSTALL logic; do install unless it is set \(\#99\)\
 [\#100](https://github.com/doctest/doctest/pull/100) ([onqtam](https://githu\
b.com/onqtam))
- Correct DOCTEST\_NO\_INSTALL logic; do install unless it is set\
 [\#99](https://github.com/doctest/doctest/pull/99) ([OdyX](https://github.co\
m/OdyX))

## [1.2.6](https://github.com/doctest/doctest/tree/1.2.6) (2017-10-29)
[Full Changelog](https://github.com/doctest/doctest/compare/1.2.5...1.2.6)

**Closed issues:**

- \[bug\] writing an exception translator in a header file results in it\
 being registered multiple times which is suboptimal [\#98](https://github.co\
m/doctest/doctest/issues/98)
- Warnings when using something more than /W4 for Visual Studio\
 [\#95](https://github.com/doctest/doctest/issues/95)

**Merged pull requests:**

- Added an option to not install Doctest in the CMake scripts\
 [\#96](https://github.com/doctest/doctest/pull/96) ([nm17](https://github.co\
m/nm17))
- Adding a defensive check against a null pointer for the current test suite\
 [\#94](https://github.com/doctest/doctest/pull/94) ([Lectem](https://github.\
com/Lectem))
- Remove incomplete copy ctor [\#93](https://github.com/doctest/doctest/pull/\
93) ([McMartin](https://github.com/McMartin))

## [1.2.5](https://github.com/doctest/doctest/tree/1.2.5) (2017-10-06)
[Full Changelog](https://github.com/doctest/doctest/compare/1.2.4...1.2.5)

**Closed issues:**

- Xcode 9 / clang - unknown warning group [\#92](https://github.com/doctest/d\
octest/issues/92)

## [1.2.4](https://github.com/doctest/doctest/tree/1.2.4) (2017-09-20)
[Full Changelog](https://github.com/doctest/doctest/compare/1.2.3...1.2.4)

**Closed issues:**

- \[bug\] test cases can end up in the wrong test suite [\#91](https://github\
.com/doctest/doctest/issues/91)

## [1.2.3](https://github.com/doctest/doctest/tree/1.2.3) (2017-09-11)
[Full Changelog](https://github.com/doctest/doctest/compare/1.2.2...1.2.3)

**Closed issues:**

- \[bug\] Defining a variable T inside a test with DOCTEST\_CONFIG\_DISABLE\
 defined does not compile [\#90](https://github.com/doctest/doctest/issues/90)
- \[support\] Using `DOCTEST\_CONFIG\_NO\_SHORT\_MACRO\_NAMES` does not\
 compile using g++ 6.3.0 [\#89](https://github.com/doctest/doctest/issues/89)
- \[question\] Why are SUBCASEs executed only once when within a function\
 called multiple times? [\#88](https://github.com/doctest/doctest/issues/88)

## [1.2.2](https://github.com/doctest/doctest/tree/1.2.2) (2017-09-05)
[Full Changelog](https://github.com/doctest/doctest/compare/1.2.1...1.2.2)

**Closed issues:**

- \[question\] Differences between doctest and googletest \(gtest\) for\
 uninitialised local variables in test cases [\#86](https://github.com/doctes\
t/doctest/issues/86)
- !!! BREAKING CHANGE !!! - remove the custom implementation of\
 std::is\_constructible and optionally use the \<type\_traits\> header\
 because of infinite template recursion issues with GCC [\#85](https://github\
.com/doctest/doctest/issues/85)
- Static Analysis results of doctest [\#83](https://github.com/doctest/doctes\
t/issues/83)
- !!! BREAKING CHANGE !!! - catch exceptions as const reference in\
 \<LEVEL\>\_THROWS\_AS [\#81](https://github.com/doctest/doctest/issues/81)
- doctest implementation as static library [\#77](https://github.com/doctest/\
doctest/issues/77)
- Provide some easy way to compare structs containing float/doubles\
 [\#73](https://github.com/doctest/doctest/issues/73)

**Merged pull requests:**

- Add support for templated scenarios [\#87](https://github.com/doctest/docte\
st/pull/87) ([Lectem](https://github.com/Lectem))
- Prefer if\(MSVC\) in CMakeLists.txt. [\#84](https://github.com/doctest/doct\
est/pull/84) ([martinmoene](https://github.com/martinmoene))
- catch throw\_as exception as const reference [\#82](https://github.com/doct\
est/doctest/pull/82) ([a4z](https://github.com/a4z))
- Added doctest\_with\_main static lib [\#78](https://github.com/doctest/doct\
est/pull/78) ([ymadzhunkov](https://github.com/ymadzhunkov))

## [1.2.1](https://github.com/doctest/doctest/tree/1.2.1) (2017-05-24)
[Full Changelog](https://github.com/doctest/doctest/compare/1.2.0...1.2.1)

**Closed issues:**

- Compile error under MSVC 2015/2017 if \<thread\> included in same file as\
 "doctest.h" [\#72](https://github.com/doctest/doctest/issues/72)

**Merged pull requests:**

- docs: TEST\_CASE\_METHOD -\> TEST\_CASE\_FIXTURE [\#71](https://github.com/\
doctest/doctest/pull/71) ([akrzemi1](https://github.com/akrzemi1))

## [1.2.0](https://github.com/doctest/doctest/tree/1.2.0) (2017-05-15)
[Full Changelog](https://github.com/doctest/doctest/compare/1.1.4...1.2.0)

**Closed issues:**

- Further improvements on compile time - disable inlining of functions used\
 in asserts [\#70](https://github.com/doctest/doctest/issues/70)
- Improve runtime performance - lazy stringification, more inlining, no\
 statics on the hot path, move semantics for classes such as doctest::String\
 which are used by value, etc. [\#69](https://github.com/doctest/doctest/issu\
es/69)
- Add option to show duration of test case execution and add a\
 timeout\(seconds\) decorator - marking them as failed if they exceed it\
 [\#68](https://github.com/doctest/doctest/issues/68)
- Add support for test case decorators - label, description, skip, may\_fail,\
 should\_fail, expected\_failures, etc. [\#67](https://github.com/doctest/doc\
test/issues/67)
- Integrate static analysis into the CI builds [\#66](https://github.com/doct\
est/doctest/issues/66)
- Print the test suite name on test case failure [\#65](https://github.com/do\
ctest/doctest/issues/65)
- Add signal handlers to handle crashes \(and use SEH under Windows\) -\
 report which test case failed [\#63](https://github.com/doctest/doctest/issu\
es/63)
- Add support to Approx for strong typedefs of double [\#62](https://github.c\
om/doctest/doctest/issues/62)
- \[question\] Is there a way to always have 0 as the exit code regardless of\
 test results? [\#59](https://github.com/doctest/doctest/issues/59)
- Add support for un-parenthesized expressions containing commas in asserts\
 [\#58](https://github.com/doctest/doctest/issues/58)
- Add ability to filter subcases with filters [\#57](https://github.com/docte\
st/doctest/issues/57)
- Add option to query if code is being ran inside of a test -\
 doctest::is\_running\_in\_test [\#56](https://github.com/doctest/doctest/iss\
ues/56)
- Ability for a binary \(executable / shared object\) to use the test runner\
 implementation of another binary - with exported symbols - so tests end up\
 in a single registry [\#55](https://github.com/doctest/doctest/issues/55)
- How to force the use of colors in the terminal? [\#54](https://github.com/d\
octest/doctest/issues/54)
- How can I mix production code with the Unit Tests? [\#53](https://github.co\
m/doctest/doctest/issues/53)
- add \<= and \>= operators to Approx \(and also maybe \< and \>\)\
 [\#52](https://github.com/doctest/doctest/issues/52)
- Add ability to capture variables from test scope [\#48](https://github.com/\
doctest/doctest/issues/48)
- !!! BREAKING CHANGE !!! - Make TEST\_SUITE work with blocks and add\
 TEST\_SUITE\_BEGIN [\#41](https://github.com/doctest/doctest/issues/41)
- Add option to print which test suites/cases are run [\#39](https://github.c\
om/doctest/doctest/issues/39)
- Add support for templated test cases - parameterized by type\
 [\#38](https://github.com/doctest/doctest/issues/38)
- Add custom failure messages with lazy stringification [\#23](https://github\
.com/doctest/doctest/issues/23)
- Add an exception translation mechanism + the ability for users to extend it\
 with custom exception types [\#12](https://github.com/doctest/doctest/issues\
/12)
- Add API for reporting failures [\#9](https://github.com/doctest/doctest/iss\
ues/9)

**Merged pull requests:**

- Update doctest to work with ARM DS5-compiler [\#64](https://github.com/doct\
est/doctest/pull/64) ([tomasnilefrost](https://github.com/tomasnilefrost))

## [1.1.4](https://github.com/doctest/doctest/tree/1.1.4) (2017-02-18)
[Full Changelog](https://github.com/doctest/doctest/compare/1.1.3...1.1.4)

**Closed issues:**

- Add option --force-colors - for when a tty is not detected for stdout\
 [\#51](https://github.com/doctest/doctest/issues/51)
- Issue with using lambdas in tests in gcc [\#49](https://github.com/doctest/\
doctest/issues/49)
- Add the include file to releases [\#47](https://github.com/doctest/doctest/\
issues/47)

**Merged pull requests:**

- Add translation of std::exception for exceptions that terminate a test case\
 [\#46](https://github.com/doctest/doctest/pull/46) ([eliaskosunen](https://g\
ithub.com/eliaskosunen))

## [1.1.3](https://github.com/doctest/doctest/tree/1.1.3) (2016-11-15)
[Full Changelog](https://github.com/doctest/doctest/compare/1.1.2...1.1.3)

**Closed issues:**

- Exception handlers cause warnings when exceptions are disabled\
 [\#44](https://github.com/doctest/doctest/issues/44)

## [1.1.2](https://github.com/doctest/doctest/tree/1.1.2) (2016-10-10)
[Full Changelog](https://github.com/doctest/doctest/compare/1.1.1...1.1.2)

**Closed issues:**

- clang warnings when using C++11 or newer [\#42](https://github.com/doctest/\
doctest/issues/42)
- \[support\] identical names for test suites? [\#40](https://github.com/doct\
est/doctest/issues/40)

## [1.1.1](https://github.com/doctest/doctest/tree/1.1.1) (2016-09-22)
[Full Changelog](https://github.com/doctest/doctest/compare/1.1.0...1.1.1)

## [1.1.0](https://github.com/doctest/doctest/tree/1.1.0) (2016-09-21)
[Full Changelog](https://github.com/doctest/doctest/compare/1.0.0...1.1.0)

**Closed issues:**

- char\* comparison uses the contents, not the pointer [\#36](https://github.\
com/doctest/doctest/issues/36)
- add configuration preprocessor identifier for passing by value in\
 assertions instead of by reference [\#35](https://github.com/doctest/doctest\
/issues/35)
- restrict expressions in assertion macros to binary comparisons at most with\
 a static assert [\#34](https://github.com/doctest/doctest/issues/34)
- Add clearFilters\(\) to doctest::Context [\#33](https://github.com/doctest/\
doctest/issues/33)
- A way to refrain from polluting “\#define” space for users of tested code?\
 [\#32](https://github.com/doctest/doctest/issues/32)
- drop VC++6 support [\#31](https://github.com/doctest/doctest/issues/31)
- False positive test [\#30](https://github.com/doctest/doctest/issues/30)
- Turn off coloring after tests are finished? [\#28](https://github.com/docte\
st/doctest/issues/28)
- C++11 nullptr [\#27](https://github.com/doctest/doctest/issues/27)
- Only one SUBCASE per line is executed [\#25](https://github.com/doctest/doc\
test/issues/25)
- creative formatting of chars [\#24](https://github.com/doctest/doctest/issu\
es/24)
- DOCTEST\_BREAK\_INTO\_DEBUGGER undefined under OSX [\#22](https://github.co\
m/doctest/doctest/issues/22)
- Tests inside a static library [\#21](https://github.com/doctest/doctest/iss\
ues/21)
- Add example how to remove doctest options from the command line for the\
 program after the tests run [\#20](https://github.com/doctest/doctest/issues\
/20)
- Single-letter options active even without leading '-' \(dash\)\
 [\#19](https://github.com/doctest/doctest/issues/19)
- pointer stringification not working for compilers different from MSVC\
 [\#18](https://github.com/doctest/doctest/issues/18)
- Tests that accompany code run and produce output at default\
 [\#17](https://github.com/doctest/doctest/issues/17)
- GCC 5.3.1 Compiler warning: sign compare [\#16](https://github.com/doctest/\
doctest/issues/16)
- Slower than Catch in realistic test cases [\#14](https://github.com/doctest\
/doctest/issues/14)
- Rename doctest::detail::Result res; in DOCTEST\_ASSERT\_IMPLEMENT\
 [\#10](https://github.com/doctest/doctest/issues/10)
- No red when all tests pass [\#7](https://github.com/doctest/doctest/issues/\
7)
- UNIX line feedings on GitHub please [\#6](https://github.com/doctest/doctes\
t/issues/6)

**Merged pull requests:**

- don't show green when tests fail [\#26](https://github.com/doctest/doctest/\
pull/26) ([ferkulat](https://github.com/ferkulat))
- Include "program code" in example [\#15](https://github.com/doctest/doctest\
/pull/15) ([martinmoene](https://github.com/martinmoene))

## [1.0.0](https://github.com/doctest/doctest/tree/1.0.0) (2016-05-22)
**Merged pull requests:**

- Reduce the header size for test users [\#3](https://github.com/doctest/doct\
est/pull/3) ([zah](https://github.com/zah))
- Add a Gitter chat badge to README.md [\#1](https://github.com/doctest/docte\
st/pull/1) ([gitter-badger](https://github.com/gitter-badger))



\* *This Change Log was automatically generated by [github_changelog_generato\
r](https://github.com/skywinder/Github-Changelog-Generator)*
\
changes-type: text/markdown;variant=GFM
url: https://github.com/doctest/doctest
package-url: https://github.com/build2-packaging/doctest/
email: vik.kirilov@gmail.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = doctest

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are NOT importable unless stated otherwise.
#
hxx{*}: cxx.importable = false

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# doctest's configuration variables that either must be set globally.
#
config [bool] config.doctest.disable                 ?= false
config [bool] config.doctest.treat_char_as_string    ?= false
config [bool] config.doctest.use_std_headers         ?= false
config [bool] config.doctest.no_exceptions           ?= false
config [bool] config.doctest.no_contradicting_inline ?= false

# doctest's configuration variables that must only be set for the\
 implementation.
#
config [string] config.doctest.options_prefix      ?= [null]
config [bool] config.doctest.no_unprefixed_options ?= false
config [bool] config.doctest.colors_none           ?= false
config [bool] config.doctest.colors_windows        ?= false
config [bool] config.doctest.colors_ansi           ?= false
config [bool] config.doctest.windows_seh           ?= false
config [bool] config.doctest.no_windows_seh        ?= false
config [bool] config.doctest.posix_signals         ?= false
config [bool] config.doctest.no_posix_signals      ?= false
config [bool] config.doctest.no_multithreading     ?= false
config [bool] config.doctest.no_multi_lane_atomics ?= false


\
location: doctest/doctest-2.4.12.tar.gz
sha256sum: d5d9d27b3d627637d18c3316940038760c0e2caff71f95e0eb099917707aa26d
:
name: entt
version: 3.15.0
summary: Modern C++ Entity-Component-System (ECS) library
license: MIT
description:
\
![EnTT: Gaming meets modern C++](https://user-images.githubusercontent.com/18\
12216/103550016-90752280-4ea8-11eb-8667-12ed2219e137.png)

[![Build Status](https://github.com/skypjack/entt/workflows/build/badge.svg)]\
(https://github.com/skypjack/entt/actions)
[![Coverage](https://codecov.io/gh/skypjack/entt/branch/master/graph/badge.sv\
g)](https://codecov.io/gh/skypjack/entt)
[![Try online](https://img.shields.io/badge/try-online-brightgreen)](https://\
godbolt.org/z/zxW73f)
[![Documentation](https://img.shields.io/badge/docs-doxygen-blue)](https://sk\
ypjack.github.io/entt/)
[![Vcpkg port](https://img.shields.io/vcpkg/v/entt)](https://vcpkg.link/ports\
/entt)
[![Conan Center](https://img.shields.io/conan/v/entt)](https://conan.io/cente\
r/recipes/entt)
[![Gitter chat](https://badges.gitter.im/skypjack/entt.png)](https://gitter.i\
m/skypjack/entt)
[![Discord channel](https://img.shields.io/discord/707607951396962417?logo=di\
scord)](https://discord.gg/5BjPWBd)

> `EnTT` has been a dream so far, we haven't found a single bug to date and\
 it's
> super easy to work with
>
> -- Every EnTT User Ever

`EnTT` is a header-only, tiny and easy to use library for game programming and
much more written in **modern C++**.<br/>
[Among others](https://github.com/skypjack/entt/wiki/EnTT-in-Action), it's\
 used
in [**Minecraft**](https://minecraft.net/en-us/attribution/) by Mojang, the
[**ArcGIS Runtime SDKs**](https://developers.arcgis.com/arcgis-runtime/) by\
 Esri
and the amazing [**Ragdoll**](https://ragdolldynamics.com/).<br/>
If you don't see your project in the list, please open an issue, submit a PR\
 or
add the [\#entt](https://github.com/topics/entt) tag to your _topics_! :+1:

---

Do you want to **keep up with changes** or do you have a **question** that
doesn't require you to open an issue?<br/>
Join the [gitter channel](https://gitter.im/skypjack/entt) and the
[discord server](https://discord.gg/5BjPWBd), meet other users like you. The
more we are, the better for everyone.<br/>
Don't forget to check the
[FAQs](https://github.com/skypjack/entt/wiki/Frequently-Asked-Questions) and\
 the
[wiki](https://github.com/skypjack/entt/wiki) too. Your answers may already be
there.

Do you want to support `EnTT`? Consider becoming a
[**sponsor**](https://github.com/users/skypjack/sponsorship) or making a
donation via [**PayPal**](https://www.paypal.me/skypjack).<br/>
Many thanks to [these people](https://skypjack.github.io/sponsorship/) and
**special** thanks to:

[![mojang](https://user-images.githubusercontent.com/1812216/106253145-67ca19\
80-6217-11eb-9c0b-d93561b37098.png)](https://mojang.com)
[![imgly](https://user-images.githubusercontent.com/1812216/106253726-271ed00\
0-6218-11eb-98e0-c9c681925770.png)](https://img.ly/)

# Table of Contents

* [Introduction](#introduction)
  * [Code Example](#code-example)
  * [Motivation](#motivation)
  * [Benchmark](#benchmark)
* [Integration](#integration)
  * [Requirements](#requirements)
  * [CMake](#cmake)
  * [Natvis support](#natvis-support)
  * [Packaging Tools](#packaging-tools)
  * [pkg-config](#pkg-config)
* [Documentation](#documentation)
* [Tests](#tests)
* [EnTT in Action](#entt-in-action)
* [Contributors](#contributors)
* [License](#license)

# Introduction

The entity-component-system (also known as _ECS_) is an architectural pattern
used mostly in game development. For further details:

* [Entity Systems Wiki](http://entity-systems.wikidot.com/)
* [Evolve Your Hierarchy](http://cowboyprogramming.com/2007/01/05/evolve-your\
-heirachy/)
* [ECS on Wikipedia](https://en.wikipedia.org/wiki/Entity%E2%80%93component%E\
2%80%93system)

This project started off as a pure entity-component system. Over time the
codebase has grown as more and more classes and functionalities were\
 added.<br/>
Here is a brief, yet incomplete list of what it offers today:

* Built-in **RTTI system** mostly similar to the standard one.
* A `constexpr` utility for human-readable **resource names**.
* Minimal **configuration system** built using the monostate pattern.
* Incredibly fast **entity-component system** with its own _pay for what you
  use_ policy, unconstrained component types with optional pointer stability\
 and
  hooks for storage customization.
* Views and groups to iterate entities and components and allow different\
 access
  patterns, from **perfect SoA** to fully random.
* A lot of **facilities** built on top of the entity-component system to help
  the users and avoid reinventing the wheel.
* General purpose **execution graph builder** for optimal scheduling.
* The smallest and most basic implementation of a **service locator** ever\
 seen.
* A built-in, non-intrusive and macro-free runtime **reflection system**.
* **Static polymorphism** made simple and within everyone's reach.
* A few homemade containers, like a sparse set based **hash map**.
* A **cooperative scheduler** for processes of any type.
* All that is needed for **resource management** (cache, loaders, handles).
* Delegates, **signal handlers** and a tiny event dispatcher.
* A general purpose **event emitter** as a CRTP idiom based class template.
* And **much more**! Check out the
  [**wiki**](https://github.com/skypjack/entt/wiki).

Consider this list a work in progress as well as the project. The whole API is
fully documented in-code for those who are brave enough to read it.<br/>
Please, do note that all tools are also DLL-friendly now and run smoothly\
 across
boundaries.

One thing known to most is that `EnTT` is also used in **Minecraft**.<br/>
Given that the game is available literally everywhere, I can confidently say 
that the library has been sufficiently tested on every platform that can come\
 to 
mind.

## Code Example

```cpp
#include <entt/entt.hpp>

struct position {
    float x;
    float y;
};

struct velocity {
    float dx;
    float dy;
};

void update(entt::registry &registry) {
    auto view = registry.view<const position, velocity>();

    // use a callback
    view.each([](const auto &pos, auto &vel) { /* ... */ });

    // use an extended callback
    view.each([](const auto entity, const auto &pos, auto &vel) { /* ... */\
 });

    // use a range-for
    for(auto [entity, pos, vel]: view.each()) {
        // ...
    }

    // use forward iterators and get only the components of interest
    for(auto entity: view) {
        auto &vel = view.get<velocity>(entity);
        // ...
    }
}

int main() {
    entt::registry registry;

    for(auto i = 0u; i < 10u; ++i) {
        const auto entity = registry.create();
        registry.emplace<position>(entity, i * 1.f, i * 1.f);
        if(i % 2 == 0) { registry.emplace<velocity>(entity, i * .1f, i *\
 .1f); }
    }

    update(registry);
}
```

## Motivation

I started developing `EnTT` for the _wrong_ reason: my goal was to design an
entity-component system to beat another well known open source library both in
terms of performance and possibly memory usage.<br/>
In the end, I did it, but it wasn't very satisfying. Actually it wasn't
satisfying at all. The fastest and nothing more, fairly little indeed. When I
realized it, I tried hard to keep intact the great performance of `EnTT` and\
 to
add all the features I wanted to see in *my own library* at the same time.

Nowadays, `EnTT` is finally what I was looking for: still faster than its
_competitors_, lower memory usage in the average case, a really good API and\
 an
amazing set of features. And even more, of course.

## Benchmark

For what it's worth, you'll **never** see me trying to make other projects\
 look
bad or offer dubious comparisons just to make this library seem cooler.<br/>
I leave this activity to others, if they enjoy it (and it seems that some\
 people
actually like it). I prefer to make better use of my time.

If you are interested, you can compile the `benchmark` test in release mode\
 (to
enable compiler optimizations, otherwise it would make little sense) by\
 setting
the `ENTT_BUILD_BENCHMARK` option of `CMake` to `ON`, then evaluate yourself
whether you're satisfied with the results or not.

There are also a lot of projects out there that use `EnTT` as a basis for
comparison (this should already tell you a lot). Many of these benchmarks are
completely wrong, many others are simply incomplete, good at omitting some
information and using the wrong function to compare a given feature. Certainly
there are also good ones but they age quickly if nobody updates them,\
 especially
when the library they are dealing with is actively developed.<br/>
Out of all of them, [this](https://github.com/abeimler/ecs_benchmark) seems\
 like
the most up-to-date project and also covers a certain number of libraries. I
can't say exactly whether `EnTT` is used correctly or not. However, even if\
 used
poorly, it should still give the reader an idea of where it's going to\
 operate.

# Integration

`EnTT` is a header-only library. This means that including the `entt.hpp`\
 header
is enough to include the library as a whole and use it. For those who are
interested only in the entity-component system, consider to include the sole
`entity/registry.hpp` header instead.<br/>
It's a matter of adding the following line to the top of a file:

```cpp
#include <entt/entt.hpp>
```

Use the line below to include only the entity-component system instead:

```cpp
#include <entt/entity/registry.hpp>
```

Then pass the proper `-I` argument to the compiler to add the `src` directory\
 to
the include paths.

## Requirements

To be able to use `EnTT`, users must provide a full-featured compiler that
supports at least C++17.<br/>
The requirements below are mandatory to compile the tests and to extract the
documentation:

* `CMake` version 3.7 or later.
* `Doxygen` version 1.8 or later.

Alternatively, [Bazel](https://bazel.build) is also supported as a build\
 system
(credits to [zaucy](https://github.com/zaucy) who offered to maintain\
 it).<br/>
In the documentation below I'll still refer to `CMake`, this being the\
 official
build system of the library.

## CMake

To use `EnTT` from a `CMake` project, just link an existing target to the
`EnTT::EnTT` alias.<br/>
The library offers everything you need for locating (as in `find_package`),
embedding (as in `add_subdirectory`), fetching (as in `FetchContent`) or using
it in many of the ways that you can think of and that involve `CMake`.<br/>
Covering all possible cases would require a treatise and not a simple README
file, but I'm confident that anyone reading this section also knows what it's
about and can use `EnTT` from a `CMake` project without problems.

## Natvis support

When using `CMake`, just enable the option `ENTT_INCLUDE_NATVIS` and enjoy
it.<br/>
Otherwise, most of the tools are covered via Natvis and all files can be found
in the `natvis` directory, divided by module.<br/>
If you spot errors or have suggestions, any contribution is welcome!

## Packaging Tools

`EnTT` is available for some of the most known packaging tools. In particular:

* [`Conan`](https://github.com/conan-io/conan-center-index), the C/C++ Package
  Manager for Developers.

* [`vcpkg`](https://github.com/Microsoft/vcpkg), Microsoft VC++ Packaging
  Tool.<br/>
  You can download and install `EnTT` in just a few simple steps:

  ```
  $ git clone https://github.com/Microsoft/vcpkg.git
  $ cd vcpkg
  $ ./bootstrap-vcpkg.sh
  $ ./vcpkg integrate install
  $ vcpkg install entt
  ```

  Or you can use the `experimental` feature to test the latest changes:

  ```
  vcpkg install entt[experimental] --head
  ```

  The `EnTT` port in `vcpkg` is kept up to date by Microsoft team members and
  community contributors.<br/>
  If the version is out of date, please
  [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the
  `vcpkg` repository.

* [`Homebrew`](https://github.com/skypjack/homebrew-entt), the missing package
  manager for macOS.<br/>
  Available as a homebrew formula. Just type the following to install it:

  ```
  brew install skypjack/entt/entt
  ```

* [`build2`](https://build2.org), build toolchain for developing and\
 packaging C
  and C++ code.<br/>
  In order to use the [`entt`](https://cppget.org/entt) package in a `build2`
  project, add the following line or a similar one to the `manifest` file:

  ```
  depends: entt ^3.0.0
  ```

  Also check that the configuration refers to a valid repository, so that the
  package can be found by `build2`:

  * [`cppget.org`](https://cppget.org), the open-source community central
    repository, accessible as `https://pkg.cppget.org/1/stable`.

  * [Package source repository](https://github.com/build2-packaging/entt):
    accessible as either `https://github.com/build2-packaging/entt.git` or
    `ssh://git@github.com/build2-packaging/entt.git`.
    Feel free to [report issues](https://github.com/build2-packaging/entt)\
 with
    this package.

  Both can be used with `bpkg add-repo` or added in a project
  `repositories.manifest`. See the official
  [documentation](https://build2.org/build2-toolchain/doc/build2-toolchain-in\
tro.xhtml#guide-repositories)
  for more details.

* [`bzlmod`](https://bazel.build/external/overview#bzlmod), Bazel's external
  dependency management system.<br/>
  To use the [`entt`](https://registry.bazel.build/modules/entt) module in a
  `bazel` project, add the following to your `MODULE.bazel` file:

  ```starlark
  bazel_dep(name = "entt", version = "3.12.2")
  ```

  EnTT will now be available as `@entt` (short for `@entt//:entt`) to be used
  in your `cc_*` rule `deps`. 

Consider this list a work in progress and help me to make it longer if you\
 like.

## pkg-config

`EnTT` also supports `pkg-config` (for some definition of _supports_ at\
 least).
A suitable file called `entt.pc` is generated and installed in a proper
directory when running `CMake`.<br/>
This should also make it easier to use with tools such as `Meson` or similar.

# Documentation

The documentation is based on [doxygen](http://www.doxygen.nl/). To build it:

    $ cd build
    $ cmake .. -DENTT_BUILD_DOCS=ON
    $ make

The API reference is created in HTML format in the `build/docs/html`\
 directory.
To navigate it with your favorite browser:

    $ cd build
    $ your_favorite_browser docs/html/index.html

The same version is also available [online](https://skypjack.github.io/entt/)
for the latest release, that is the last stable tag.<br/>
Moreover, there exists a [wiki](https://github.com/skypjack/entt/wiki)\
 dedicated
to the project where users can find all related documentation pages.

# Tests

To compile and run the tests, `EnTT` requires *googletest*.<br/>
`cmake` downloads and compiles the library before compiling anything else. In
order to build the tests, set the `CMake` option `ENTT_BUILD_TESTING` to `ON`.

To build the most basic set of tests:

* `$ cd build`
* `$ cmake -DENTT_BUILD_TESTING=ON ..`
* `$ make`
* `$ make test`

Note that benchmarks are not part of this set.

# EnTT in Action

`EnTT` is widely used in private and commercial applications. I cannot even
mention most of them because of some signatures I put on some documents time
ago. Fortunately, there are also people who took the time to implement open
source projects based on `EnTT` and did not hold back when it came to
documenting them.

[Here](https://github.com/skypjack/entt/wiki/EnTT-in-Action) you can find an
incomplete list of games, applications and articles that can be used as a
reference.

If you know of other resources out there that are about `EnTT`, feel free to
open an issue or a PR and I'll be glad to add them to the list.

# Contributors

Requests for features, PRs, suggestions and feedback are highly appreciated.

If you find you can help and want to contribute to the project with your
experience or you do want to get part of the project for some other reason,\
 feel
free to contact me directly (you can find the mail in the
[profile](https://github.com/skypjack)).<br/>
I can't promise that each and every contribution will be accepted, but I can
assure that I'll do my best to take them all as soon as possible.

If you decide to participate, please see the guidelines for
[contributing](https://github.com/skypjack/entt/blob/master/CONTRIBUTING.md)
before to create issues or pull requests.<br/>
Take also a look at the
[contributors list](https://github.com/skypjack/entt/blob/master/AUTHORS) to
know who has participated so far.

# License

Code and documentation Copyright (c) 2017-2025 Michele Caini.<br/>
Colorful logo Copyright (c) 2018-2021 Richard Caseres.

Code released under
[the MIT license](https://github.com/skypjack/entt/blob/master/LICENSE).<br/>
Documentation released under
[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).<br/>
All logos released under
[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).

\
description-type: text/markdown;variant=GFM
doc-url: https://github.com/skypjack/entt/wiki
src-url: https://github.com/skypjack/entt
package-url: https://github.com/build2-packaging/entt
email: michele.caini@gmail.com
package-email: mjklaim@gmail.com
depends: * build2 >= 0.14.0
depends: * bpkg >= 0.14.0
requires: c++17
bootstrap-build2:
\
project = entt

using version
using config
using test
using install
using dist

\
root-build2:
\
cxx.std = latest

using cxx
using c

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp
h{*}: extension = h

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

upstream_dir = $src_root/upstream
include_dir = $upstream_dir/src


\
location: entt/entt-3.15.0.tar.gz
sha256sum: 9e1d3c1342dd110e3dc304ca52fbf502b67907f0cf46b748d43a797b7d17e6ba
:
name: entt
version: 3.16.0
summary: Modern C++ Entity-Component-System (ECS) library
license: MIT
description:
\
![EnTT: Gaming meets modern C++](https://user-images.githubusercontent.com/18\
12216/103550016-90752280-4ea8-11eb-8667-12ed2219e137.png)

[![Build Status](https://github.com/skypjack/entt/workflows/build/badge.svg)]\
(https://github.com/skypjack/entt/actions)
[![Coverage](https://codecov.io/gh/skypjack/entt/branch/master/graph/badge.sv\
g)](https://codecov.io/gh/skypjack/entt)
[![Try online](https://img.shields.io/badge/try-online-brightgreen)](https://\
godbolt.org/z/zxW73f)
[![Documentation](https://img.shields.io/badge/docs-doxygen-blue)](https://sk\
ypjack.github.io/entt/)
[![Vcpkg port](https://img.shields.io/vcpkg/v/entt)](https://vcpkg.link/ports\
/entt)
[![Conan Center](https://img.shields.io/conan/v/entt)](https://conan.io/cente\
r/recipes/entt)
[![Gitter chat](https://badges.gitter.im/skypjack/entt.png)](https://gitter.i\
m/skypjack/entt)
[![Discord channel](https://img.shields.io/discord/707607951396962417?logo=di\
scord)](https://discord.gg/5BjPWBd)

> `EnTT` has been a dream so far, we haven't found a single bug to date and\
 it's
> super easy to work with
>
> -- Every EnTT User Ever

`EnTT` is a header-only, tiny and easy to use library for game programming and
much more written in **modern C++**.<br/>
[Among others](https://github.com/skypjack/entt/wiki/EnTT-in-Action), it's\
 used
in [**Minecraft**](https://minecraft.net/en-us/attribution/) by Mojang, the
[**ArcGIS Runtime SDKs**](https://developers.arcgis.com/arcgis-runtime/) by\
 Esri
and the amazing [**Ragdoll**](https://ragdolldynamics.com/).<br/>
If you don't see your project in the list, please open an issue, submit a PR\
 or
add the [\#entt](https://github.com/topics/entt) tag to your _topics_! :+1:

---

Do you want to **keep up with changes** or do you have a **question** that
doesn't require you to open an issue?<br/>
Join the [gitter channel](https://gitter.im/skypjack/entt) and the
[discord server](https://discord.gg/5BjPWBd), meet other users like you. The
more we are, the better for everyone.<br/>
Don't forget to check the
[FAQs](https://github.com/skypjack/entt/wiki/Frequently-Asked-Questions) and\
 the
[wiki](https://github.com/skypjack/entt/wiki) too. Your answers may already be
there.

Do you want to support `EnTT`? Consider becoming a
[**sponsor**](https://github.com/users/skypjack/sponsorship) or making a
donation via [**PayPal**](https://www.paypal.me/skypjack).<br/>
Many thanks to [these people](https://skypjack.github.io/sponsorship/) and
**special** thanks to:

[![mojang](https://user-images.githubusercontent.com/1812216/106253145-67ca19\
80-6217-11eb-9c0b-d93561b37098.png)](https://mojang.com)
[![imgly](https://user-images.githubusercontent.com/1812216/106253726-271ed00\
0-6218-11eb-98e0-c9c681925770.png)](https://img.ly/)

# Table of Contents

* [Introduction](#introduction)
  * [Code Example](#code-example)
  * [Motivation](#motivation)
  * [Benchmark](#benchmark)
* [Integration](#integration)
  * [Requirements](#requirements)
  * [CMake](#cmake)
  * [Natvis support](#natvis-support)
  * [Packaging Tools](#packaging-tools)
  * [pkg-config](#pkg-config)
* [Documentation](#documentation)
* [Tests](#tests)
* [EnTT in Action](#entt-in-action)
* [Contributors](#contributors)
* [License](#license)

# Introduction

The entity-component-system (also known as _ECS_) is an architectural pattern
used mostly in game development. For further details:

* [Entity Systems Wiki](http://entity-systems.wikidot.com/)
* [Evolve Your Hierarchy](http://cowboyprogramming.com/2007/01/05/evolve-your\
-heirachy/)
* [ECS on Wikipedia](https://en.wikipedia.org/wiki/Entity%E2%80%93component%E\
2%80%93system)

This project started off as a pure entity-component system. Over time the
codebase has grown as more and more classes and functionalities were\
 added.<br/>
Here is a brief, yet incomplete list of what it offers today:

* Built-in **RTTI system** mostly similar to the standard one.
* A `constexpr` utility for human-readable **resource names**.
* Minimal **configuration system** built using the monostate pattern.
* Incredibly fast **entity-component system** with its own _pay for what you
  use_ policy, unconstrained component types with optional pointer stability\
 and
  hooks for storage customization.
* Views and groups to iterate entities and components and allow different\
 access
  patterns, from **perfect SoA** to fully random.
* A lot of **facilities** built on top of the entity-component system to help
  the users and avoid reinventing the wheel.
* General purpose **execution graph builder** for optimal scheduling.
* The smallest and most basic implementation of a **service locator** ever\
 seen.
* A built-in, non-intrusive and macro-free runtime **reflection system**.
* **Static polymorphism** made simple and within everyone's reach.
* A few homemade containers, like a sparse set based **hash map**.
* A **cooperative scheduler** for processes of any type.
* All that is needed for **resource management** (cache, loaders, handles).
* Delegates, **signal handlers** and a tiny event dispatcher.
* A general purpose **event emitter** as a CRTP idiom based class template.
* And **much more**! Check out the
  [**wiki**](https://github.com/skypjack/entt/wiki).

Consider this list a work in progress as well as the project. The whole API is
fully documented in-code for those who are brave enough to read it.<br/>
Please, do note that all tools are also DLL-friendly now and run smoothly\
 across
boundaries.

One thing known to most is that `EnTT` is also used in **Minecraft**.<br/>
Given that the game is available literally everywhere, I can confidently say 
that the library has been sufficiently tested on every platform that can come\
 to 
mind.

## Code Example

```cpp
#include <entt/entt.hpp>

struct position {
    float x;
    float y;
};

struct velocity {
    float dx;
    float dy;
};

void update(entt::registry &registry) {
    auto view = registry.view<const position, velocity>();

    // use a callback
    view.each([](const auto &pos, auto &vel) { /* ... */ });

    // use an extended callback
    view.each([](const auto entity, const auto &pos, auto &vel) { /* ... */\
 });

    // use a range-for
    for(auto [entity, pos, vel]: view.each()) {
        // ...
    }

    // use forward iterators and get only the components of interest
    for(auto entity: view) {
        auto &vel = view.get<velocity>(entity);
        // ...
    }
}

int main() {
    entt::registry registry;

    for(auto i = 0u; i < 10u; ++i) {
        const auto entity = registry.create();
        registry.emplace<position>(entity, i * 1.f, i * 1.f);
        if(i % 2 == 0) { registry.emplace<velocity>(entity, i * .1f, i *\
 .1f); }
    }

    update(registry);
}
```

## Motivation

I started developing `EnTT` for the _wrong_ reason: my goal was to design an
entity-component system to beat another well known open source library both in
terms of performance and possibly memory usage.<br/>
In the end, I did it, but it wasn't very satisfying. Actually it wasn't
satisfying at all. The fastest and nothing more, fairly little indeed. When I
realized it, I tried hard to keep intact the great performance of `EnTT` and\
 to
add all the features I wanted to see in *my own library* at the same time.

Nowadays, `EnTT` is finally what I was looking for: still faster than its
_competitors_, lower memory usage in the average case, a really good API and\
 an
amazing set of features. And even more, of course.

## Benchmark

For what it's worth, you'll **never** see me trying to make other projects\
 look
bad or offer dubious comparisons just to make this library seem cooler.<br/>
I leave this activity to others, if they enjoy it (and it seems that some\
 people
actually like it). I prefer to make better use of my time.

If you are interested, you can compile the `benchmark` test in release mode\
 (to
enable compiler optimizations, otherwise it would make little sense) by\
 setting
the `ENTT_BUILD_BENCHMARK` option of `CMake` to `ON`, then evaluate yourself
whether you're satisfied with the results or not.

There are also a lot of projects out there that use `EnTT` as a basis for
comparison (this should already tell you a lot). Many of these benchmarks are
completely wrong, many others are simply incomplete, good at omitting some
information and using the wrong function to compare a given feature. Certainly
there are also good ones but they age quickly if nobody updates them,\
 especially
when the library they are dealing with is actively developed.<br/>
Out of all of them, [this](https://github.com/abeimler/ecs_benchmark) seems\
 like
the most up-to-date project and also covers a certain number of libraries. I
can't say exactly whether `EnTT` is used correctly or not. However, even if\
 used
poorly, it should still give the reader an idea of where it's going to\
 operate.

# Integration

`EnTT` is a header-only library. This means that including the `entt.hpp`\
 header
is enough to include the library as a whole and use it. For those who are
interested only in the entity-component system, consider to include the sole
`entity/registry.hpp` header instead.<br/>
It's a matter of adding the following line to the top of a file:

```cpp
#include <entt/entt.hpp>
```

Use the line below to include only the entity-component system instead:

```cpp
#include <entt/entity/registry.hpp>
```

Then pass the proper `-I` argument to the compiler to add the `src` directory\
 to
the include paths.

## Requirements

To be able to use `EnTT`, users must provide a full-featured compiler that
supports at least C++17.<br/>
The requirements below are mandatory to compile the tests and to extract the
documentation:

* `CMake` version 3.7 or later.
* `Doxygen` version 1.8 or later.

Alternatively, [Bazel](https://bazel.build) is also supported as a build\
 system
(credits to [zaucy](https://github.com/zaucy) who offered to maintain\
 it).<br/>
In the documentation below I'll still refer to `CMake`, this being the\
 official
build system of the library.

## CMake

To use `EnTT` from a `CMake` project, just link an existing target to the
`EnTT::EnTT` alias.

The library offers everything you need for locating (as in `find_package`),
embedding (as in `add_subdirectory`), fetching (as in `FetchContent`) or using
it in many of the ways that you can think of and that involve `CMake`.<br/>
Covering all possible cases would require a treatise and not a simple README
file, but I'm confident that anyone reading this section also knows what it's
about and can use `EnTT` from a `CMake` project without problems.

Note that all `install` calls are guarded by the `ENTT_INSTALL` option to\
 allow
using `EnTT` as a submodule without conflicting with user logic.<br/>
It is therefore necessary to set the option to true to take advantage of the
installation logic provided by this library.

## Natvis support

When using `CMake`, just enable the option `ENTT_INCLUDE_NATVIS` and enjoy
it.<br/>
Otherwise, most of the tools are covered via Natvis and all files can be found
in the `natvis` subdirectory, divided by module.<br/>
If you spot errors or have suggestions, any contribution is welcome!

## Packaging Tools

`EnTT` is available for some of the most known packaging tools. In particular:

* [`Conan`](https://github.com/conan-io/conan-center-index), the C/C++ Package
  Manager for Developers.

* [`vcpkg`](https://github.com/Microsoft/vcpkg), Microsoft VC++ Packaging
  Tool.<br/>
  You can download and install `EnTT` in just a few simple steps:

  ```
  $ git clone https://github.com/Microsoft/vcpkg.git
  $ cd vcpkg
  $ ./bootstrap-vcpkg.sh
  $ ./vcpkg integrate install
  $ vcpkg install entt
  ```

  Or you can use the `experimental` feature to test the latest changes:

  ```
  vcpkg install entt[experimental] --head
  ```

  The `EnTT` port in `vcpkg` is kept up to date by Microsoft team members and
  community contributors.<br/>
  If the version is out of date, please
  [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the
  `vcpkg` repository.

* [`Homebrew`](https://github.com/skypjack/homebrew-entt), the missing package
  manager for macOS.<br/>
  Available as a homebrew formula. Just type the following to install it:

  ```
  brew install skypjack/entt/entt
  ```

* [`build2`](https://build2.org), build toolchain for developing and\
 packaging C
  and C++ code.<br/>
  In order to use the [`entt`](https://cppget.org/entt) package in a `build2`
  project, add the following line or a similar one to the `manifest` file:

  ```
  depends: entt ^3.0.0
  ```

  Also check that the configuration refers to a valid repository, so that the
  package can be found by `build2`:

  * [`cppget.org`](https://cppget.org), the open-source community central
    repository, accessible as `https://pkg.cppget.org/1/stable`.

  * [Package source repository](https://github.com/build2-packaging/entt):
    accessible as either `https://github.com/build2-packaging/entt.git` or
    `ssh://git@github.com/build2-packaging/entt.git`.
    Feel free to [report issues](https://github.com/build2-packaging/entt)\
 with
    this package.

  Both can be used with `bpkg add-repo` or added in a project
  `repositories.manifest`. See the official
  [documentation](https://build2.org/build2-toolchain/doc/build2-toolchain-in\
tro.xhtml#guide-repositories)
  for more details.

* [`bzlmod`](https://bazel.build/external/overview#bzlmod), Bazel's external
  dependency management system.<br/>
  To use the [`entt`](https://registry.bazel.build/modules/entt) module in a
  `bazel` project, add the following to your `MODULE.bazel` file:

  ```starlark
  bazel_dep(name = "entt", version = "3.12.2")
  ```

  EnTT will now be available as `@entt` (short for `@entt//:entt`) to be used
  in your `cc_*` rule `deps`. 

Consider this list a work in progress and help me to make it longer if you\
 like.

## pkg-config

`EnTT` also supports `pkg-config` (for some definition of _supports_ at\
 least).
A suitable file called `entt.pc` is generated and installed in a proper
directory when running `CMake`.<br/>
This should also make it easier to use with tools such as `Meson` or similar.

# Documentation

The documentation is based on [doxygen](http://www.doxygen.nl/). To build it:

    $ cd build
    $ cmake .. -DENTT_BUILD_DOCS=ON
    $ make

The API reference is created in HTML format in the `build/docs/html`\
 directory.
To navigate it with your favorite browser:

    $ cd build
    $ your_favorite_browser docs/html/index.html

The same version is also available [online](https://skypjack.github.io/entt/)
for the latest release, that is the last stable tag.<br/>
Moreover, there exists a [wiki](https://github.com/skypjack/entt/wiki)\
 dedicated
to the project where users can find all related documentation pages.

# Tests

To compile and run the tests, `EnTT` requires *googletest*.<br/>
`cmake` downloads and compiles the library before compiling anything else. In
order to build the tests, set the `CMake` option `ENTT_BUILD_TESTING` to `ON`.

To build the most basic set of tests:

* `$ cd build`
* `$ cmake -DENTT_BUILD_TESTING=ON ..`
* `$ make`
* `$ make test`

Note that benchmarks are not part of this set.

# EnTT in Action

`EnTT` is widely used in private and commercial applications. I cannot even
mention most of them because of some signatures I put on some documents time
ago. Fortunately, there are also people who took the time to implement open
source projects based on `EnTT` and did not hold back when it came to
documenting them.

[Here](https://github.com/skypjack/entt/wiki/EnTT-in-Action) you can find an
incomplete list of games, applications and articles that can be used as a
reference.

If you know of other resources out there that are about `EnTT`, feel free to
open an issue or a PR and I'll be glad to add them to the list.

# Contributors

Requests for features, PRs, suggestions and feedback are highly appreciated.

If you find you can help and want to contribute to the project with your
experience or you do want to get part of the project for some other reason,\
 feel
free to contact me directly (you can find the mail in the
[profile](https://github.com/skypjack)).<br/>
I can't promise that each and every contribution will be accepted, but I can
assure that I'll do my best to take them all as soon as possible.

If you decide to participate, please see the guidelines for
[contributing](https://github.com/skypjack/entt/blob/master/CONTRIBUTING.md)
before to create issues or pull requests.<br/>
Take also a look at the
[contributors list](https://github.com/skypjack/entt/blob/master/AUTHORS) to
know who has participated so far.

# License

Code and documentation Copyright (c) 2017-2025 Michele Caini.<br/>
Colorful logo Copyright (c) 2018-2021 Richard Caseres.

Code released under
[the MIT license](https://github.com/skypjack/entt/blob/master/LICENSE).<br/>
Documentation released under
[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).<br/>
All logos released under
[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).

\
description-type: text/markdown;variant=GFM
doc-url: https://github.com/skypjack/entt/wiki
src-url: https://github.com/skypjack/entt
package-url: https://github.com/build2-packaging/entt
email: michele.caini@gmail.com
package-email: mjklaim@gmail.com
depends: * build2 >= 0.14.0
depends: * bpkg >= 0.14.0
requires: c++17
bootstrap-build2:
\
project = entt

using version
using config
using test
using install
using dist

\
root-build2:
\
cxx.std = latest

using cxx
using c

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp
h{*}: extension = h

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

upstream_dir = $src_root/upstream
include_dir = $upstream_dir/src


\
location: entt/entt-3.16.0.tar.gz
sha256sum: f5324988a09397ec6347c31dab17ccbff0ae8fa96148f39b51c9c3c9e28ca3a2
:
name: fmt
version: 11.0.2
summary: "{fmt} is an open-source formatting library for C++. It can be used\
 as a safe and fast alternative to (s)printf and iostreams."
license: MIT
description:
\
`{fmt}` library - Build2 package
================================

See [`{fmt}` documentation](https://fmt.dev/) for usage and details.

 - `{fmt}` : https://github.com/fmtlib/fmt/
 - Build2 : https://build2.org

Note: This is the source code for the build2 package of the `{fmt}` C++\
 library,
the actual library sources snapshot can be found in the `./upstream/`\
 submodule.

## Configuration Options

### Experimental C++20 modules support

Modules support is WIP, both in the `build2` package and also in `fmt`\
 upstream. Latest versions of MSVC or Clang are recommended, and the most\
 up-to-date version of the package with regards to modules compatibility can\
 be used via git and the [modules branch](https://github.com/build2-packaging\
/fmt/tree/modules). For example, in project `repositories.manifest`:
```
:
role: prerequisite
location: https://github.com/build2-packaging/fmt.git#modules
```

Enable with `config.cxx.features.modules=true`. When enabled, by default dual\
 mode is used meaning that the library can be consumed either through\
 `import` or via `#include`. To enable this safely, all entities are attached\
 to the global module (extern "C++"). See `modules_only` option for the\
 alternative.
 - `config.fmt.enable_import_std` : Set to `true` to consume the standard\
 library as a module when building the `fmt` module. Support dependent on\
 compiler and std lib. Defaults to `false`.
 - `config.fmt.modules_only` : Set to `true` to enable modules-only mode for\
 the package. In this mode, `fmt` entities are fully encapsulated in the\
 `fmt` module meaning `#include`-based consumption cannot be mixed, and the\
 package will not export headers. Defaults to `false`.


\
description-type: text/markdown;variant=GFM
url: https://github.com/fmtlib/fmt/
doc-url: https://fmt.dev/
package-url: https://github.com/build2-packaging/fmt/
package-email: mjklaim@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
tests: fmt-tests == 11.0.2
builds: default
builds: -freebsd; fmt tests failing, fixed on upstream master, pending\
 removal next package release after 11.0.2
build-exclude: linux_debian_12-clang_17; clang-17 bug with libstdc++\
 std::tuple (https://github.com/llvm/llvm-project/issues/61415)
build-exclude: **/x86_64-w64-mingw32; unknown error building installed tests\
 'error: unable to stat path D:\a\msys64\mingw64\lib\x86_64-w64-mingw32\14.1.\
0\pkgconfig\: the device is not ready'
bootstrap-build:
\
project = fmt

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cc
mxx{*}: extension = cc

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target


##############################
# Project-specific options:

config [bool]    config.fmt.enable_import_std ?= false
config [bool]    config.fmt.modules_only ?= false

\
location: fmt/fmt-11.0.2.tar.gz
sha256sum: 283ef6f5260b25ce49f77a3a6e64c1250a1b783a89b5c67e64d892740630cea2
:
name: fmt
version: 11.1.4
summary: "{fmt} is an open-source formatting library for C++. It can be used\
 as a safe and fast alternative to (s)printf and iostreams."
license: MIT
description:
\
`{fmt}` library - Build2 package
================================

See [`{fmt}` documentation](https://fmt.dev/) for usage and details.

 - `{fmt}` : https://github.com/fmtlib/fmt/
 - Build2 : https://build2.org

Note: This is the source code for the build2 package of the `{fmt}` C++\
 library,
the actual library sources snapshot can be found in the `./upstream/`\
 submodule.

## Configuration Options

### Experimental C++20 modules support

Modules support is WIP, both in the `build2` package and also in `fmt`\
 upstream. Latest versions of MSVC or Clang are recommended, and the most\
 up-to-date version of the package with regards to modules compatibility can\
 be used via git and the [modules branch](https://github.com/build2-packaging\
/fmt/tree/modules). For example, in project `repositories.manifest`:
```
:
role: prerequisite
location: https://github.com/build2-packaging/fmt.git#modules
```

Enable with `config.cxx.features.modules=true`. When enabled, by default dual\
 mode is used meaning that the library can be consumed either through\
 `import` or via `#include`. To enable this safely, all entities are attached\
 to the global module (extern "C++"). See `modules_only` option for the\
 alternative.
 - `config.fmt.enable_import_std` : Set to `true` to consume the standard\
 library as a module when building the `fmt` module. Support dependent on\
 compiler and std lib. Defaults to `false`.
 - `config.fmt.modules_only` : Set to `true` to enable modules-only mode for\
 the package. In this mode, `fmt` entities are fully encapsulated in the\
 `fmt` module meaning `#include`-based consumption cannot be mixed, and the\
 package will not export headers. Defaults to `false`.


\
description-type: text/markdown;variant=GFM
url: https://github.com/fmtlib/fmt/
doc-url: https://fmt.dev/
package-url: https://github.com/build2-packaging/fmt/
package-email: mjklaim@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
tests: fmt-tests == 11.1.4
builds: default
build-exclude: linux_debian_12-clang_17; clang-17 bug with libstdc++\
 std::tuple (https://github.com/llvm/llvm-project/issues/61415)
build-exclude: **/x86_64-w64-mingw32; unknown error building installed tests\
 'error: unable to stat path D:\a\msys64\mingw64\lib\x86_64-w64-mingw32\14.1.\
0\pkgconfig\: the device is not ready'
modules-builds: linux : &( +clang-18+ ); Modules builds only supported for\
 latest Clang and MSVC
modules-build-config: config.cxx.features.modules=true; Enable c++20 modules
modules-only-builds: linux : &( +clang-18+ ); Modules builds only supported\
 for latest Clang and MSVC
modules-only-build-config: config.cxx.features.modules=true\
 config.fmt.modules_only=true; Enable c++20 modules and disable header usage
bootstrap-build:
\
project = fmt

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cc
mxx{*}: extension = cc

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target


##############################
# Project-specific options:

config [bool]    config.fmt.enable_import_std ?= false
config [bool]    config.fmt.modules_only ?= false

\
location: fmt/fmt-11.1.4.tar.gz
sha256sum: 56fbd8376205a99d3a732958e348f37fb829657c2a6603b3cce7aa467532abdf
:
name: fmt-tests
version: 11.0.2
project: fmt
summary: Tests package for fmt upstream tests
license: MIT
url: https://github.com/fmtlib/fmt/
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: gtest ^1.11.0
depends: gmock ^1.11.0
bootstrap-build:
\
project = fmt-tests

using version
using config
using test
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
mxx{*}: extension = cc
cxx{*}: extension = cc

# All executables are tests
#
exe{*}: test = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: fmt/fmt-tests-11.0.2.tar.gz
sha256sum: b201bdb57aa6a47aa2460a5edd965cac69662f5382c8ac1d5747c301c1f7a9c5
:
name: fmt-tests
version: 11.1.4
project: fmt
summary: Tests package for fmt upstream tests
license: MIT
url: https://github.com/fmtlib/fmt/
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: gtest ^1.11.0
depends: gmock ^1.11.0
bootstrap-build:
\
project = fmt-tests

using version
using config
using test
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
mxx{*}: extension = cc
cxx{*}: extension = cc

# All executables are tests
#
exe{*}: test = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: fmt/fmt-tests-11.1.4.tar.gz
sha256sum: d353f8481317a2302c20f81b97c51d4f1743de7460a95b423edd18aff9078904
:
name: glbinding
version: 3.3.0+1
type: lib
language: c++
project: glbinding
summary: OpenGL loader C++ library based on gl.xml specification
license: MIT
description:
\
[//]: # (Comment)

<br><a href="https://glbinding.org"><img src="https://raw.githubusercontent.c\
om/cginternals/glbinding/master/glbinding-logo.svg?sanitize=true"\
 width="50%"></a>

*glbinding* is a cross-platform C++ binding for the [OpenGL\
 API](http://www.opengl.org).

![GitHub release](https://img.shields.io/github/release/cginternals/glbinding\
.svg)
![C++ CI](https://github.com/cginternals/glbinding/actions/workflows/ci.yml/b\
adge.svg)
[![Travis](https://img.shields.io/travis/cginternals/glbinding/master.svg?sty\
le=flat&logo=travis)](https://travis-ci.org/cginternals/glbinding)
[![Appveyor](https://img.shields.io/appveyor/build/scheibel/glbinding/master.\
svg?style=flat&logo=appveyor)](https://ci.appveyor.com/project/scheibel/glbin\
ding)
[![Tokei](https://tokei.rs/b1/github/cginternals/glbinding)](https://github.c\
om/Aaronepower/tokei)

[![Documentation](https://img.shields.io/badge/documentation-online-blue.svg?\
style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL\
3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMC41IDEzLjciPjxwYXRoIGQ9Ik0xMS\
41IDYuOGwtMy43IDYuNEwuNS41aDE0LjdsLTEuMyAyLjFINC4yTDcuOCA5bDIuNS00LjN6bTcuMyA\
0LjNsMS4yIDIuMWgtOS43TDE3LjYuNWwxLjIgMi4xLTQuOSA4LjV6IiBmaWxsPSIjZmZmIi8%2BPC\
9zdmc%2B)](https://glbinding.org/docs.html)
[![Examples](https://img.shields.io/badge/examples-wiki-blue.svg?style=flat&l\
ogo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vc\
mcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMC41IDEzLjciPjxwYXRoIGQ9Ik0xMS41IDYuOGwtMy\
43IDYuNEwuNS41aDE0LjdsLTEuMyAyLjFINC4yTDcuOCA5bDIuNS00LjN6bTcuMyA0LjNsMS4yIDI\
uMWgtOS43TDE3LjYuNWwxLjIgMi4xLTQuOSA4LjV6IiBmaWxsPSIjZmZmIi8%2BPC9zdmc%2B)](h\
ttps://github.com/cginternals/glbinding/wiki/Examples)
[![Tools](https://img.shields.io/badge/tools-wiki-blue.svg?style=flat&logo=da\
ta%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjA\
wMC9zdmciIHZpZXdCb3g9IjAgMCAyMC41IDEzLjciPjxwYXRoIGQ9Ik0xMS41IDYuOGwtMy43IDYu\
NEwuNS41aDE0LjdsLTEuMyAyLjFINC4yTDcuOCA5bDIuNS00LjN6bTcuMyA0LjNsMS4yIDIuMWgtO\
S43TDE3LjYuNWwxLjIgMi4xLTQuOSA4LjV6IiBmaWxsPSIjZmZmIi8%2BPC9zdmc%2B)](https:/\
/github.com/cginternals/glbinding/wiki/Tools)

[//]: # (HEADER_END)

*glbinding* leverages C++11 features like enum classes, lambdas, and variadic\
 templates, instead of relying on macros;
all OpenGL symbols are real functions and variables.
It provides type-safe parameters, per-feature API headers, lazy function\
 resolution, multi-context and multi-thread support, global and local\
 function callbacks, meta information about the generated OpenGL binding and\
 the OpenGL runtime, as well as tools and examples for quick-starting your\
 projects.
Based on the OpenGL API specification ([gl.xml](https://github.com/KhronosGro\
up/OpenGL-Registry/blob/main/xml/gl.xml)) *glbinding* is generated using\
 [python scripts and templates](https://github.com/cginternals/khrbinding-gen\
erator) that can be easily adapted to fit custom needs.

![what-is-glbinding](https://raw.githubusercontent.com/cginternals/glbinding/\
master/docs/what-is-glbinding-v2.png)

Code that is written using a typical C binding for OpenGL, e.g.,\
 [GLEW](http://glew.sourceforge.net/), is fully compatible for the use with\
 *glbinding* and causes no significant impact on runtime performance (see\
 [compare example](https://github.com/cginternals/glbinding/wiki/examples#com\
pare)): just replace all includes to the former binding, replace the\
 initialization code and *use* the appropriate API namespace, e.g., ```gl```\
 for full availability of the OpenGL API.

```cpp
#include <glbinding/gl/gl.h>
using namespace gl;

// ...
auto shader = glCreateShader(GL_COMPUTE_SHADER);
// ...
```

# Resources

* [Tools](https://github.com/cginternals/glbinding/wiki/tools)
* [Examples](https://github.com/cginternals/glbinding/wiki/examples)
* [Context Creation Cheat Sheet](https://github.com/cginternals/glbinding/wik\
i/Context-Creation-Cheat-Sheet)

### Installation and Development

* [Install Instructions](#install-instructions)
* [Build from Source](#build-instructions)
* [Updating the Generated Source Code](#update-generated-source-code)
* [Tips for Linking](#tips-for-linking)
* [Dependency on KHR Headers](#dependency-on-khr-headers)
* [Basic Example](#basic-example)

### Feature Documentation and Code Snippets

* [Type-safe Parameters](#type-safe-parameters)
* [Compilation-Centered Header Design](#compilation-centered-header-design)
* [Feature-Centered Header Design](#feature-centered-header-design)
* [Lazy Function Resolution](#lazy-function-pointer-resolution)
* [Multi-context Support](#multi-context-support)
* [Multi-thread Support](#multi-threading-support)
* [Global and Local Function Callbacks](#function-callbacks)
* [Alternative Signatures for GLboolean and GLenum types](#alternative-signat\
ures)
* [Meta Information System](#meta-information)
* [Doxygen Documentations](https://glbinding.org/docs.html)\
 ([stable](https://glbinding.org/docs/v3.1/), [master](https://glbinding.org/\
docs/master))

# Install Instructions

*glbinding* is available for different platforms using different distribution\
 channels.
You can either download the source and manually [compile](#build-instructions\
) it or use one of the [pre-compiled releases](https://github.com/cginternals\
/glbinding/releases) of this repository.
For systems providing package managers, we generally strive for packages in\
 these package managers.
An overview on availability of glbinding can be found on [repology.org](https\
://repology.org/project/glbinding/versions).

## Windows

The various *glbinding* packages can be installed either by downloading an\
 installer, e.g., the [x64 installer for glbinding v3.1.0](https://github.com\
/cginternals/glbinding/releases/download/v3.1.0/glbinding-3.1.0-msvc2017-x64-\
installer.exe) for Microsoft Visual Studio 2015, or downloading and\
 extracting one of the precompiled archives, e.g. [runtime](https://github.co\
m/cginternals/glbinding/releases/download/v3.1.0/glbinding-3.1.0-msvc2017-x64\
-runtime.zip),
[examples](https://github.com/cginternals/glbinding/releases/download/v3.1.0/\
glbinding-3.1.0-msvc2017-x64-examples.zip),
[dev](https://github.com/cginternals/glbinding/releases/download/v3.1.0/glbin\
ding-3.1.0-msvc2017-x64-dev.zip), and
[tools](https://github.com/cginternals/glbinding/releases/download/v3.1.0/glb\
inding-3.1.0-msvc2017-x64-tools.zip).
Since lately, glbinding is also available on [vcpkg](https://github.com/Micro\
soft/vcpkg/tree/master/ports/glbinding) with more recent releases:
```bash
> vcpkg install glbinding
```
Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## Ubuntu

*glbinding* is provided on Ubuntu using PPAs and in [Ubuntu\
 universe](https://packages.ubuntu.com/source/artful/glbinding) since Artful\
 Aardvark. We maintain our own [PPA](https://launchpad.net/~cginternals/+arch\
ive/ubuntu/ppa) for most recent releases.
Using the current PPA as example, the following lines install *glbinding*\
 including the GLFW examples:

```shell
> sudo apt-add-repository ppa:cginternals/ppa
> sudo apt-get update
> sudo apt-get install libglbinding-examples-glfw
> # start example
> /usr/share/glbinding/cubescape
```

To use *glbinding* as dependency, install the development package:

```shell
> sudo apt-get install libglbinding-dev libglbinding-dbg
```

Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## Arch Linux

On Arch, *glbinding* is provided by the [glbinding](https://www.archlinux.org\
/packages/community/x86_64/glbinding/) package in the community repository.\
 To install *glbinding* execute the following line:

```shell
> sudo pacman -S glbinding
```

Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## macOS

The package manager on macOS we depend on is homebrew. The package there is\
 called [glbinding](http://formulae.brew.sh/formula/glbinding).
To install *glbinding* using homebrew, execute the following line:

```bash
> brew install glbinding
```

Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## Debian-based Systems

*glbinding* is available for Debian 9 (Stretch), 10 (Buster), 11 (Bullseye)\
 and Sid. Install it using `apt install libglbinding-dev`.
For advanced use, download the source code and commence [building from\
 source](#build-instructions).


## Cross-Platform Package Managers

As one of the cross-platform package managers, *conan* provides glbinding in\
 its [center index](https://conan.io/center/glbinding). You can use the\
 following line to install glbinding using conan:

```bash
> conan install glbinding/3.1.0@
```


# Build Instructions

### Prerequisites and Dependencies

The only mandatory run-time dependencies of *glbinding* are the STL of the\
 used compiler and an OpenGL driver library, dynamically linked with your\
 application.
Building *glbinding* from source has several mandatory and optional\
 dependencies:

* [CMake](https://cmake.org/) 3.0 or higher for building *glbinding* from\
 source (mandatory for any build from source)
* [git](https://git-scm.com/) for version control and script supporting tasks
* [GLFW](http://www.glfw.org/) 3.2 or higher for examples and tools
* [GLEW](http://glew.sourceforge.net/) 1.6 or higher for the comparison\
 example (optional)
* [cpplocate](https://github.com/cginternals/cpplocate) for the examples\
 (optional)
* [Qt5](http://www.qt.io/developers/) 5.0 or higher for the qt-based example\
 (optional)
* [googletest](https://github.com/google/googletest) for tests (optional)
* [Doxygen](http://www.stack.nl/~dimitri/doxygen/) 1.8 or higher for\
 generating the documentation on your system
  * [graphviz](http://www.graphviz.org/) for generating diagrams (optional)

### Compile Instructions

For compilation, a C++11 compliant compiler, e.g., GCC 4.8, Clang 3.3, MSVC\
 2013 **Update 3**, is required.
First, download the source code [as archive](https://github.com/cginternals/g\
lbinding/releases) or via git:

```bash
> git clone https://github.com/cginternals/glbinding.git
> cd glbinding
```

Then, depending on the version of *glbinding* you want to build, choose the\
 appropriate tag or branch, e.g., for the 2.1.4 release:

```bash
> git fetch --tags
> git checkout v2.1.4
```

The actual compilation can be done using CMake and your favorite compiler and\
 IDE.

For building *glbinding* CMake via command line can be used (should work on\
 all systems):

First, create a build directory (we do not recommend in-source builds):

```bash
> mkdir build
> cd build
```

Configure *glbinding* with your preferred or default generator, e.g., for\
 Visual Studio 2017 in x64 use
(note: some IDEs have integrated support for CMake projects, e.g., Qt\
 Creator, and allow you to skip the manual project configuration):

```bash
> cmake .. -G "Visual Studio 17 2022" -A x64
```

In order to compile the project, either use you favorite Editor/IDE with the\
 created project or use CMake as follows:

```bash
> cmake --build .
```

For multi-configuration projects specific configuration (e.g., on Windows\
 using MSVC) can be built using:

```bash
> cmake --build . --config Release
> cmake --build . --config Debug
```

### Update Generated Source Code

The generation scripts for *glbinding* are maintained within the\
 [khrbinding-generator](https://github.com/cginternals/khrbinding-generator)\
 project.
Assuming a directory structure with both projects such as `<projects>/glbindi\
ng` and `<projects>/khrbinding-generator`, updating the source code is\
 started as follows:

```bash
> python3 update.py -p "profiles/gl.json"
> python3 generate.py -p "profiles/gl.json" -d "../glbinding/source"
```

# Tips for Linking

We suggest using the build system [CMake](https://cmake.org/) for a smooth\
 integration.
For it, *glbinding* provides a configuration script that should be installed\
 into your system or at least accessible by CMake.
In your projects' `CMakeLists.txt`, add one of the following lines:

```cmake
find_package(glbinding QUIET) # if you want to check for existence
find_package(glbinding REQUIRED) # if it is really required in your project
```

Finally, just link *glbinding* to your own library or executable:

```cmake
target_link_libraries(${target} ... PUBLIC
    glbinding::glbinding
    glbinding::glbinding-aux # for additional, auxiliary features as logging,\
 meta information, or debugging functionality
)
```

# Dependency on KHR Headers

As of mid 2019, the OpenGL API depends on the platform headers from the\
 Khronos group, even on desktop systems.
This introduced a direct dependency of *glbinding* to the `KHR/khrplatform.h`\
 header file. For most Linux systems, these headers are easily available\
 (e.g., by installing `libegl1-mesa-dev` on Ubuntu), whereas on other\
 systems, pre-existing packages are scarce. Even in the case of Ubuntu, one\
 can argue that installing the EGL dependency is strange, as glbinding does\
 not depend on EGL in any way.

For those cases, glbinding comes with a copy of the headers for internal use.

This solution has one significant downside: As those headers are used by the\
 types of the OpenGL API and the types are used within the public interface\
 of glbinding, the `khrplatform.h` headers needs to be present when building\
 downstream projects, i.e., they need to be installed along glbinding. In\
 order to not conflict with packages providing the official headers, this\
 internal header has to be installed on a separate location. This complicates\
 the project setup and results in the following usage scenarios for you to\
 choose from:

### KHR/khrplatform.h Usage

For this usage scenario, glbinding needs to get built with the CMake option\
 `OPTION_BUILD_OWN_KHR_HEADERS` set to `Off` and system-wide availability of\
 the `KHR/khrplatform.h` headers, e.g., by having `libegl1-mesa-dev`\
 installed. If either the option is `On` or the system-wide headers are not\
 found, the internally provided headers are used instead.

This decision is stored as property of the glbinding CMake target and will be\
 used for downstream projects as well.
The use and propagation of this decision is transparent to the user as well,\
 i.e., the user should not need to handle this downstream. The only thing to\
 consider is to have the system-wide `KHR/khrplatform.h` headers available\
 when building the downstream project.

### glbinding-internal khrplatform.h Usage

For this usage scenario, glbinding should get built with the CMake option\
 `OPTION_BUILD_OWN_KHR_HEADERS` set to `On`. Alternatively, this scenario is\
 the fallback if the official `KHR/khrplatform.h` headers are not found.

This decision is stored as property of the glbinding CMake target and will be\
 used for downstream projects as well.
The use and propagation of this decision is transparent to the user as well,\
 i.e., the user should not need to handle this downstream.

# Basic Example

The following examples are tailored for use with *glbinding* 3.0 and above.

*glbinding* has to be initialized once on the active OpenGL context you want\
 to use *glbinding* with. For initialization, a callback for function pointer\
 resolution must be passed, which your context creation API should provide.
In the most basic case, you call ```glbinding::initialize``` once:

```cpp
#include <glbinding/gl/gl.h>
#include <glbinding/glbinding.h>

using namespace gl;

int main()
{
  // create context, e.g. using GLFW, Qt, SDL, GLUT, ...

  // Assume context creation using GLFW
  glbinding::initialize(glfwGetProcAddress);

  glBegin(GL_TRIANGLES);
  // ...
  glEnd();
}
```


# Features

The following examples are tailored for use with *glbinding* 3.0 and above.

### Type-Safe Parameters

The original OpenGL API provides several concepts in their interface, namely\
 functions, booleans, bitfields, enums, as well as special values and basic\
 types but mostly does not differentiate between these types.
Hence, actual knowledge about each function and its parameters is required;\
 there is no way for a basic code assistance.
As *glbinding* differentiates between all these types, IDEs and compilers can\
 detect wrong usages of the OpenGL API.

One example is the passing of a named constant in places where a bit\
 combination is expected:

```cpp
glClear(GL_COLOR_BUFFER_BIT); // valid
glClear(GL_FRAMEBUFFER);      // compilation error: bitfield of group\
 ClearBufferMask expected, got GLenum
```

In the case of bitfields, the OpenGL API offers groups and each parameter\
 states the group valid values must come from.
*glbinding* uses this information to prevent invalid bit combinations:

```cpp
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // valid
glClear(GL_COLOR_BUFFER_BIT | GL_MAP_READ_BIT);     // compile error: both\
 bitfields share no group

glClear(GL_STENCIL_BUFFER_BIT | GL_LIGHTING_BIT);   // compile error: bitwise\
 or operation is valid,
                                                    // the shared group is\
 AttribMask, but the
                                                    // resulting group does\
 not match the expected.
```

Unfortunately, such groups are incomplete and unmaintained for enums (named\
 values).
Thus, *glbinding* could not provide any assistance for cases such as:

```cpp
GLuint vertexShader = glCreateShader(GL_VERTEX_SHADER); // All good
GLuint colorShader = glCreateShader(GL_COLOR);          // No compilation\
 error but a runtime error!
```

### Compilation-Centered Header Design

C++ strictly separates interface from implementation.
For improving the compilation time of a program or system written in C++\
 forward declarations of types are commonly used and includes of unnecessary\
 symbols are omitted.

For an interface of a library, class, or module providing OpenGL related\
 functionality, it is likely that only the type information of OpenGL is\
 needed, not actual functions or constants usually required for\
 implementation.
In addition to the customary all-in-one header ```gl.h``` *glbinding* also\
 provides specialized headers:

```cpp
#include <glbinding/gl/gl.h>        // all of the headers below, meaning the\
 complete OpenGL API

#include <glbinding/gl/bitfield.h>  // bitfield constants (e.g.,\
 GL_COLOR_BUFFER_BIT)
#include <glbinding/gl/boolean.h>   // boolean constants (GL_TRUE and\
 GL_FALSE)
#include <glbinding/gl/enum.h>      // symbol constants (e.g.,\
 GL_VERTEX_SHADER)
#include <glbinding/gl/functions.h> // functions
#include <glbinding/gl/types.h>     // type declarations of the OpenGL API\
 (including bitfields, boolean, enum, and extensions)
#include <glbinding/gl/values.h>    // special values (e.g., GL_INVALID_INDEX)
```

There is one additional header that provides all extensions and provide them\
 as an enumeration in terms of C++ enums.

```cpp
#include <glbinding/gl/extension.h>
```

### Feature-Centered Header Design

The OpenGL API is iteratively developed and released in versions, internally\
 (for the API specification) named *features*.
The latest feature/version of OpenGL is 4.6.
The previous version are 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 2.0, 2.1, 3.0, 3.1,\
 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4., and 4.5.
OpenGL uses a deprecation model for removing outdated parts of its API which\
 results in compatibility (with deprecated API) and core (without deprecated\
 API) usage that is manifested in the targeted OpenGL context.
On top of that, new API concepts are suggested as extensions (often vendor\
 specific) that might be integrated into future versions.
All this results in many possible specific manifestations of the OpenGL API\
 you can use in your program.

One tough task is to adhere to one agreed set of functions in your own OpenGL\
 program (e.g., OpenGL 3.2 Core if you want to develop for every Windows,\
 macOS, and Linux released in the last 4 years).
*glbinding* facilitates this by providing per-feature headers by means of\
 well-defined/generated subsets of the OpenGL API.

#### All-Features OpenGL Headers

If you do not use per-feature headers the OpenGL program can look like this:

```cpp
#include <glbinding/gl/gl.h>

// draw code
gl::glClear(gl::GL_COLOR_BUFFER_BIT | gl::GL_DEPTH_BUFFER_BIT);
gl::glUniform1i(u_numcubes, m_numcubes);
gl::glDrawElementsInstanced(gl::GL_TRIANGLES, 18, gl::GL_UNSIGNED_BYTE, 0,\
 m_numcubes * m_numcubes);
```

#### Single-Feature OpenGL Headers

When developing your code on Windows with latest drivers installed, the code\
 above is likely to compile and run.
But if you want to port it to systems with less mature driver support (e.g.,\
 macOS or Linux using open source drivers), you may wonder if\
 ```glDrawElementsInstanced``` is available.
In this case, just switch to per-feature headers of *glbinding* and choose\
 the OpenGL 3.2 Core headers (as you know that at least this version is\
 available on all target platforms):

```cpp
#include <glbinding/gl32core/gl.h>

// draw code
gl32core::glClear(gl32core::GL_COLOR_BUFFER_BIT | gl32core::GL_DEPTH_BUFFER_B\
IT);
gl32core::glUniform1i(u_numcubes, m_numcubes);
gl32core::glDrawElementsInstanced(gl32core::GL_TRIANGLES, 18,\
 gl32core::GL_UNSIGNED_BYTE, 0, m_numcubes * m_numcubes);
```

If the code compiles you can be sure it is OpenGL 3.2 Core compliant.
Using functions that are not yet available or relying on deprecated\
 functionality is prevented.

### Lazy Function Pointer Resolution

By default, *glbinding* tries to resolve all OpenGL function pointers during\
 initialization, which can consume some time:

```cpp
// Assume context creation using GLFW
glbinding::initialize(glfwGetProcAddress); // immediate function pointer\
 resolution
```

Alternatively, the user can decide that functions pointers are resolved only\
 when used for the first time. This is achieved by:

```cpp
// Assume context creation using GLFW
glbinding::initialize(glfwGetProcAddress, false); // lazy function pointer\
 resolution
```

### Multi-Context Support

*glbinding* has built-in support for multiple contexts. The only requirement\
 is, that the currently active context has to be specified. This feature\
 mixes well with multi-threaded applications, but keep in mind that\
 concurrent use of one context often results in non-meaningful communication\
 with the OpenGL driver.

In order to use multiple contexts, use your favorite context creation library\
 (e.g., glut, SDL, egl, glfw, Qt) to request the required contexts.
The functions to make a context current should be provided by these libraries\
 and is not part of *glbinding* (except that you can get the current context\
 handle).
When using multiple contexts, *glbinding* has to be initialized for each\
 context (when current).

Since each context can correspond to a different feature set of OpenGL and\
 the drivers are free to assign their function pointers, *glbinding* cannot\
 assume any equalities of requested function pointers.
Thus, contexts switches have to be communicated to *glbinding* explicitly in\
 order to have correctly dispatched function pointers:

```cpp
// use the current active context
glbinding::useCurrentContext();

// use another context, identified by platform-specific handle
glbinding::useContext(ContextHandle context);
```

### Multi-Threading Support

Concurrent use of *glbinding* is mainly intended for usage over multiple\
 contexts in different threads (multiple threads operating on a single OpenGL\
 context requires locking, which *glbinding* will not provide).
For it, *glbinding* supports multiple active contexts, one per thread.
This necessitates that *glbinding* gets informed in each thread which context\
 is currently active (see [multi-context example](https://github.com/cgintern\
als/glbinding/tree/master/source/examples/multi-context)).

Note: multi-threaded communication with OpenGL will most likely result in a\
 meaningless sequence of OpenGL calls.
To avoid this, semantic groups of OpenGL calls should be treated as critical\
 sections.

Example for usage of multiple contexts:
```cpp
// Context 1 creation
// GLFWwindow * window1 = glfwCreateWindow(640, 480, "", nullptr, nullptr);
// glfwMakeContextCurrent(window1);
glbinding::initialize(0, glfwGetProcAddress); // 0 here is the context\
 identifier
// Context 1 initialization
glClearColor(1.0f, 0.0f, 0.0f, 0.0f);

// Context 2 creation
// GLFWwindow * window2 = glfwCreateWindow(640, 480, "", nullptr, nullptr);
// glfwMakeContextCurrent(window2);
glbinding::initialize(1, glfwGetProcAddress); // 1 here is the context\
 identifier
// Context 1 initialization
glClearColor(0.0f, 1.0f, 0.0f, 0.0f);

// Rendering
while (doNotClose()) {
  // Make context 1 active
  // glfwMakeContextCurrent(window1);
  glbinding::useContext(0);

  // Context 1 rendering
  glViewport(0, 0, width, height);
  glClear(GL_COLOR_BUFFER_BIT);

  // Swap buffer for context 1
  // glfwSwapBuffers(window1);

  // Make context 2 active
  // glfwMakeContextCurrent(window2);
  glbinding::useContext(1);

  // Context 2 rendering
  glViewport(0, 0, width, height);
  glClear(GL_COLOR_BUFFER_BIT);

  // Swap buffer for context 2
  // glfwSwapBuffers(window2);
}
```

### Multiple OpenGL Contexts in Multiple Threads

The combination of multiple OpenGL contexts and multiple threads for OpenGL\
 usage is supported by *glbinding* in general.
You must tell *glbinding* which OpenGL context is used in which thread by\
 calling the initialize method once the context is used first\
 (```glbinding::initialize```) and if you want to switch the current context\
 for one thread, you have to update the current context, too\
 (```glbinding::useContext```).
However, we discourage the use of one context in multiple threads.

### Function Callbacks

To support orthogonal features of the OpenGL API, *glbinding* allows\
 attaching a number of callbacks to several concepts of the OpenGL API (e.g.\
 a function).
Such orthogonal features include runtime error checking (i.e.,\
 ```glGetError``` after each function call), logging, and caching of driver\
 information.

*glbinding* supports different types of callbacks that can be registered.
The main types are

 * global and local (per-function) before callbacks, that are called before\
 the OpenGL function call,
 * global and local (per-function) after callbacks, that are called after the\
 OpenGL function call,
 * unresolved callbacks, that are called each time an unresolved OpenGL\
 function should be called (instead of a segmentation fault),
 * context switch callbacks, that are called if the internal current OpenGL\
 context of *glbinding* is changed.

The before callbacks are useful , e.g., for tracing or application-specific\
 parameter checking.
The available information in this callback is the wrapped OpenGL function\
 (including its name and bound function address) and all parameters.
The after callbacks are useful, e.g., for tracing, logging, or the obligatory\
 error check (```glGetError```).
Available information is extended by the return value.
The unresolved callback provides information about the (unresolved) wrapped\
 OpenGL function object.

Example for error checking:

```cpp
setCallbackMaskExcept(CallbackMask::After, { "glGetError" });
setAfterCallback([](const FunctionCall &)
{
  const auto error = glGetError();
  if (error != GL_NO_ERROR)
    std::cout << "error: " << std::hex << error << std::endl;
});

// OpenGL Code ...
```

As a shortcut, *glbinding* 3.0 introduced a debugging interface for\
 error-checking after callbacks within the *glbinding-aux* library:

```cpp
#include <glbinding-aux/debug.h>

glbinding::aux::enableGetErrorCallback();

// OpenGL Code ...
```

Example for logging:

```cpp
setCallbackMask(CallbackMask::After | CallbackMask::ParametersAndReturnValue);
setAfterCallback([](const FunctionCall & call)
{
  std::cout << call.function->name() << "(";
  for (unsigned i = 0; i < call.parameters.size(); ++i)
  {
    std::cout << call.parameters[i].get();
    if (i < call.parameters.size() - 1)
      std::cout << ", ";
  }
  std::cout << ")";

  if (call.returnValue)
    std::cout << " -> " << call.returnValue.get();

  std::cout << std::endl;
});

// OpenGL Code ...
```

### Alternative Signatures

The OpenGL API is designed without function overloading using only simple\
 parameter types.
This results in explicit parameter encoding in function names for\
 conceptually overloaded functions (e.g., glTexParameteri and\
 glTexParameterf).
Another design decision for the OpenGL API is the high similarity of the\
 integer, boolean, enum, and bitfield data types.
This means, that for *overloaded* functions, there is no separate function\
 for ```GLboolean```, ```GLenum```, and ```GLbitfield``` types.
Using type-save functions of *glbinding*, some typically compiling code\
 constructs are now deliberately broken.
For most of those cases, we provide alternative *overloaded* function\
 signatures.
Additionally, we also fix signatures that are semantically broken in the\
 OpenGL API specification, i.e., when base types (C types) are similar such\
 as in the case of enums and integers.

Alternative function signatures are enabled by default, so the following\
 example works out-of-the-box:

```cpp
#include <glbinding/gl/gl.h>

using namespace gl;

// ...
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, 64, 64, 0, GL_RED, GL_UNSIGNED_BYTE,\
 terrain.data());
```

### Meta Information

Besides an actual OpenGL binding, *glbinding* also supports queries for both\
 compile time and runtime information about the gl.xml and your OpenGL driver\
 within the *glbinding-aux* library. This library comes with own includes and\
 needs to be linked separately.
Typical use cases are querying the available OpenGL extensions or the\
 associated extensions to an OpenGL feature and their functions and enums.

The following example prints out a list of all available OpenGL\
 versions/features:

```cpp
#include <iostream>

#include <glbinding/Version.h>

#include <glbinding-aux/Meta.h>
#include <glbinding-aux/types_to_string.h>

// ...
using namespace glbinding;

for (const Version & v : aux::Meta::versions())
  std::cout << v << std::endl;
```

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for glbinding

[glbinding](https://glbinding.org/) is a cross-platform C++ binding for the\
 OpenGL API, generated using the gl.xml specification.

[![Official](https://img.shields.io/website/https/github.com/cginternals/glbi\
nding.svg?down_message=offline&label=Official&style=for-the-badge&up_color=bl\
ue&up_message=online)](https://github.com/cginternals/glbinding)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/g\
lbinding.svg?down_message=offline&label=build2&style=for-the-badge&up_color=b\
lue&up_message=online)](https://github.com/build2-packaging/glbinding)
[![cppget.org](https://img.shields.io/website/https/cppget.org/glbinding.svg?\
down_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_me\
ssage=online)](https://cppget.org/glbinding)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/gl\
binding.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=f\
or-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/gl\
binding)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch this package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/glbinding.git

Add the dependency in your project's `manifest` file to make the package\
 available for import.

    depends: glbinding ^3.3.0

Both libraries, `glbinding` and `glbinding-aux`, are provided in the same\
 package `glbinding`.
To import and add them to the variable `libs` in a `buildfile`, one would do\
 the following.

    import libs += glbinding%lib{glbinding}
    import libs += glbinding%lib{glbinding-aux}

Additionally, this repository also contains the `glbinding-tests`,\
 `glbinding-examples`, and `glbinding-tools` packages that contain\
 executables for learning and testing.
These had to be provided as standalone packages to allow for custom\
 configurations during CI runs.
Additionally, `glbinding-tools` is also installable.

## Configuration

### Boost.Thread

    config [bool] config.glbinding.use_boost_thread ?= false

For its implementation `glbinding` allows to optionally use Boost's thread\
 library.
Set the configuration variable to `true` to use `boost::thread` instead of\
 `std::thread` from the C++ STL.

### KHR Headers

    config [bool] config.glbinding.use_packaged_khr ?= true

`glbinding` needs some standard definitions from the `KHR/khrplatform.h`\
 header file.
To be self-contained, it comes with its own version of that header file.
Set the configuration variable to `false` if `glbinding` should use the KHR\
 headers given by the system.

### OpenGL Context Testing for Tests and Tools

    config [bool] config.glbinding_tests.opengl_context_testing ?= true
    config [bool] config.glbinding_tools.opengl_context_testing ?= true

These config variable decide whether to link regression tests or run\
 executables that require a valid OpenGL context to succeed.
As tests and tools will likely to be used on targets where OpenGL drawing is\
 required, these variables are enabled by default.
However, they should be disabled for target configurations in CI runs that do\
 not support GUI mocking.

## Issues
- Compilation might abort due to insufficient memory as it may use up all\
 available RAM. For this case, re-run the compilation process multiple times\
 until no errors occur or use less threads for build2 `b -j 1 ...`.
- The examples fail on a few MinGW-based Windows configurations due to\
 strange undefined references.
- Warnings are generated on Windows that show that redeclarations without\
 dllimport attribute occur. It does not seem to be an actual problem but\
 should be dealt with in the future.

## Contributing
Thanks in advance for your help and contribution to keep this package\
 up-to-date.
For now, please, file an issue on [GitHub](https://github.com/build2-packagin\
g/glbinding/issues) for everything that is not described below.

### Recommend Updating Version
Please, file an issue on [GitHub](https://github.com/build2-packaging/glbindi\
ng/issues) with the new recommended version.

### Update Version by Pull Request
1. Fork the repository on [GitHub](https://github.com/build2-packaging/glbind\
ing) and clone it to your local machine.
2. Run `git submodule init` and `git submodule update` to get the current\
 upstream directory.
3. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
4. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
5. Test if the packages compile and execute examples and tools.
6. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
7. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
8. Run `bdep ci` and test for errors for the package `glbinding` only.
9. If everything works fine, make a pull request on GitHub and write down the\
 `bdep ci` link to your CI tests.
10. After a successful pull request, we will run the appropriate commands to\
 publish a new package version.

### Update Version Directly if You Have Permissions
1. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
2. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
3. Test if the packages compile and execute examples and tools.
4. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
5. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
6. Run `bdep ci` and test for errors and warnings.
7. When successful, run `bdep release --tag --push` to push new tag version\
 to repository.
8. Run `bdep publish` to publish the package to [cppget.org](https://cppget.o\
rg).

\
package-description-type: text/markdown;variant=GFM
url: https://glbinding.org/
doc-url: https://glbinding.org/docs.html
src-url: https://github.com/cginternals/glbinding
package-url: https://github.com/build2-packaging/glbinding
email: opensource@cginternals.com
package-email: packaging@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: libboost-thread ^1.78.0 ? ($config.glbinding.use_boost_thread)
builds: default : -bindist; Binary distributions don't need to be tested.
boost-thread-build-config: config.glbinding.use_boost_thread=true
bootstrap-build:
\
project = glbinding

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.std = latest

# cxx.internal.scope = current

using cxx
using in

hxx{*}: extension = h
ixx{*}: extension = inl
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
# hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# Configuration whether to use Boost's thread library.
#
config [bool] config.glbinding.use_boost_thread ?= false

# Configuration for setting which KHR header should be used.
#
config [bool] config.glbinding.use_packaged_khr ?= true

# Default Variables for Building and Exportation
#
default.intf_libs = # Empty
default.impl_libs = # Empty
#
default.export.poptions = # Empty
default.export.libs = # Empty

# Use Boost.Thread if configured.
#
if ($config.glbinding.use_boost_thread)
{
  import default.impl_libs += libboost-thread%lib{boost_thread}
  cxx.poptions += -DGLBINDING_USE_BOOST_THREAD
}

switch ($cxx.target.class)
{
  case 'linux'
  {
    default.export.poptions += -DSYSTEM_LINUX
    default.export.libs += -pthread -ldl
  }

  case 'macos'
  {
    default.export.poptions += -DSYSTEM_DARWIN
    default.export.libs += -pthread -ldl
  }

  case 'windows'
  {
    default.export.poptions += -DSYSTEM_WINDOWS
    if ($cxx.id == 'msvc')
    {
      cxx.poptions += /D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS
      cxx.coptions += /MP /W4 /wd4251 /wd4592 /wd4127 /Zm200 /Gw /GS- /GL /GF
    }
    elif ($cxx.target.system == 'mingw32')
    {
      # cxx.coptions +=
      # cxx.loptions +=
    }
  }
}

cxx.poptions =+ $default.export.poptions
cxx.libs += $default.export.libs

\
location: glbinding/glbinding-3.3.0+1.tar.gz
sha256sum: bf889d6decacad3618d9ae7ec5a6bc70b921bd6fe0fee462bbf2c0eeecba2dec
:
name: glbinding-examples
version: 3.3.0+1
type: exe
language: c++
project: glbinding
summary: OpenGL loader C++ library based on gl.xml specification, examples
license: MIT
description:
\
[//]: # (Comment)

<br><a href="https://glbinding.org"><img src="https://raw.githubusercontent.c\
om/cginternals/glbinding/master/glbinding-logo.svg?sanitize=true"\
 width="50%"></a>

*glbinding* is a cross-platform C++ binding for the [OpenGL\
 API](http://www.opengl.org).

![GitHub release](https://img.shields.io/github/release/cginternals/glbinding\
.svg)
![C++ CI](https://github.com/cginternals/glbinding/actions/workflows/ci.yml/b\
adge.svg)
[![Travis](https://img.shields.io/travis/cginternals/glbinding/master.svg?sty\
le=flat&logo=travis)](https://travis-ci.org/cginternals/glbinding)
[![Appveyor](https://img.shields.io/appveyor/build/scheibel/glbinding/master.\
svg?style=flat&logo=appveyor)](https://ci.appveyor.com/project/scheibel/glbin\
ding)
[![Tokei](https://tokei.rs/b1/github/cginternals/glbinding)](https://github.c\
om/Aaronepower/tokei)

[![Documentation](https://img.shields.io/badge/documentation-online-blue.svg?\
style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL\
3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMC41IDEzLjciPjxwYXRoIGQ9Ik0xMS\
41IDYuOGwtMy43IDYuNEwuNS41aDE0LjdsLTEuMyAyLjFINC4yTDcuOCA5bDIuNS00LjN6bTcuMyA\
0LjNsMS4yIDIuMWgtOS43TDE3LjYuNWwxLjIgMi4xLTQuOSA4LjV6IiBmaWxsPSIjZmZmIi8%2BPC\
9zdmc%2B)](https://glbinding.org/docs.html)
[![Examples](https://img.shields.io/badge/examples-wiki-blue.svg?style=flat&l\
ogo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vc\
mcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMC41IDEzLjciPjxwYXRoIGQ9Ik0xMS41IDYuOGwtMy\
43IDYuNEwuNS41aDE0LjdsLTEuMyAyLjFINC4yTDcuOCA5bDIuNS00LjN6bTcuMyA0LjNsMS4yIDI\
uMWgtOS43TDE3LjYuNWwxLjIgMi4xLTQuOSA4LjV6IiBmaWxsPSIjZmZmIi8%2BPC9zdmc%2B)](h\
ttps://github.com/cginternals/glbinding/wiki/Examples)
[![Tools](https://img.shields.io/badge/tools-wiki-blue.svg?style=flat&logo=da\
ta%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjA\
wMC9zdmciIHZpZXdCb3g9IjAgMCAyMC41IDEzLjciPjxwYXRoIGQ9Ik0xMS41IDYuOGwtMy43IDYu\
NEwuNS41aDE0LjdsLTEuMyAyLjFINC4yTDcuOCA5bDIuNS00LjN6bTcuMyA0LjNsMS4yIDIuMWgtO\
S43TDE3LjYuNWwxLjIgMi4xLTQuOSA4LjV6IiBmaWxsPSIjZmZmIi8%2BPC9zdmc%2B)](https:/\
/github.com/cginternals/glbinding/wiki/Tools)

[//]: # (HEADER_END)

*glbinding* leverages C++11 features like enum classes, lambdas, and variadic\
 templates, instead of relying on macros;
all OpenGL symbols are real functions and variables.
It provides type-safe parameters, per-feature API headers, lazy function\
 resolution, multi-context and multi-thread support, global and local\
 function callbacks, meta information about the generated OpenGL binding and\
 the OpenGL runtime, as well as tools and examples for quick-starting your\
 projects.
Based on the OpenGL API specification ([gl.xml](https://github.com/KhronosGro\
up/OpenGL-Registry/blob/main/xml/gl.xml)) *glbinding* is generated using\
 [python scripts and templates](https://github.com/cginternals/khrbinding-gen\
erator) that can be easily adapted to fit custom needs.

![what-is-glbinding](https://raw.githubusercontent.com/cginternals/glbinding/\
master/docs/what-is-glbinding-v2.png)

Code that is written using a typical C binding for OpenGL, e.g.,\
 [GLEW](http://glew.sourceforge.net/), is fully compatible for the use with\
 *glbinding* and causes no significant impact on runtime performance (see\
 [compare example](https://github.com/cginternals/glbinding/wiki/examples#com\
pare)): just replace all includes to the former binding, replace the\
 initialization code and *use* the appropriate API namespace, e.g., ```gl```\
 for full availability of the OpenGL API.

```cpp
#include <glbinding/gl/gl.h>
using namespace gl;

// ...
auto shader = glCreateShader(GL_COMPUTE_SHADER);
// ...
```

# Resources

* [Tools](https://github.com/cginternals/glbinding/wiki/tools)
* [Examples](https://github.com/cginternals/glbinding/wiki/examples)
* [Context Creation Cheat Sheet](https://github.com/cginternals/glbinding/wik\
i/Context-Creation-Cheat-Sheet)

### Installation and Development

* [Install Instructions](#install-instructions)
* [Build from Source](#build-instructions)
* [Updating the Generated Source Code](#update-generated-source-code)
* [Tips for Linking](#tips-for-linking)
* [Dependency on KHR Headers](#dependency-on-khr-headers)
* [Basic Example](#basic-example)

### Feature Documentation and Code Snippets

* [Type-safe Parameters](#type-safe-parameters)
* [Compilation-Centered Header Design](#compilation-centered-header-design)
* [Feature-Centered Header Design](#feature-centered-header-design)
* [Lazy Function Resolution](#lazy-function-pointer-resolution)
* [Multi-context Support](#multi-context-support)
* [Multi-thread Support](#multi-threading-support)
* [Global and Local Function Callbacks](#function-callbacks)
* [Alternative Signatures for GLboolean and GLenum types](#alternative-signat\
ures)
* [Meta Information System](#meta-information)
* [Doxygen Documentations](https://glbinding.org/docs.html)\
 ([stable](https://glbinding.org/docs/v3.1/), [master](https://glbinding.org/\
docs/master))

# Install Instructions

*glbinding* is available for different platforms using different distribution\
 channels.
You can either download the source and manually [compile](#build-instructions\
) it or use one of the [pre-compiled releases](https://github.com/cginternals\
/glbinding/releases) of this repository.
For systems providing package managers, we generally strive for packages in\
 these package managers.
An overview on availability of glbinding can be found on [repology.org](https\
://repology.org/project/glbinding/versions).

## Windows

The various *glbinding* packages can be installed either by downloading an\
 installer, e.g., the [x64 installer for glbinding v3.1.0](https://github.com\
/cginternals/glbinding/releases/download/v3.1.0/glbinding-3.1.0-msvc2017-x64-\
installer.exe) for Microsoft Visual Studio 2015, or downloading and\
 extracting one of the precompiled archives, e.g. [runtime](https://github.co\
m/cginternals/glbinding/releases/download/v3.1.0/glbinding-3.1.0-msvc2017-x64\
-runtime.zip),
[examples](https://github.com/cginternals/glbinding/releases/download/v3.1.0/\
glbinding-3.1.0-msvc2017-x64-examples.zip),
[dev](https://github.com/cginternals/glbinding/releases/download/v3.1.0/glbin\
ding-3.1.0-msvc2017-x64-dev.zip), and
[tools](https://github.com/cginternals/glbinding/releases/download/v3.1.0/glb\
inding-3.1.0-msvc2017-x64-tools.zip).
Since lately, glbinding is also available on [vcpkg](https://github.com/Micro\
soft/vcpkg/tree/master/ports/glbinding) with more recent releases:
```bash
> vcpkg install glbinding
```
Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## Ubuntu

*glbinding* is provided on Ubuntu using PPAs and in [Ubuntu\
 universe](https://packages.ubuntu.com/source/artful/glbinding) since Artful\
 Aardvark. We maintain our own [PPA](https://launchpad.net/~cginternals/+arch\
ive/ubuntu/ppa) for most recent releases.
Using the current PPA as example, the following lines install *glbinding*\
 including the GLFW examples:

```shell
> sudo apt-add-repository ppa:cginternals/ppa
> sudo apt-get update
> sudo apt-get install libglbinding-examples-glfw
> # start example
> /usr/share/glbinding/cubescape
```

To use *glbinding* as dependency, install the development package:

```shell
> sudo apt-get install libglbinding-dev libglbinding-dbg
```

Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## Arch Linux

On Arch, *glbinding* is provided by the [glbinding](https://www.archlinux.org\
/packages/community/x86_64/glbinding/) package in the community repository.\
 To install *glbinding* execute the following line:

```shell
> sudo pacman -S glbinding
```

Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## macOS

The package manager on macOS we depend on is homebrew. The package there is\
 called [glbinding](http://formulae.brew.sh/formula/glbinding).
To install *glbinding* using homebrew, execute the following line:

```bash
> brew install glbinding
```

Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## Debian-based Systems

*glbinding* is available for Debian 9 (Stretch), 10 (Buster), 11 (Bullseye)\
 and Sid. Install it using `apt install libglbinding-dev`.
For advanced use, download the source code and commence [building from\
 source](#build-instructions).


## Cross-Platform Package Managers

As one of the cross-platform package managers, *conan* provides glbinding in\
 its [center index](https://conan.io/center/glbinding). You can use the\
 following line to install glbinding using conan:

```bash
> conan install glbinding/3.1.0@
```


# Build Instructions

### Prerequisites and Dependencies

The only mandatory run-time dependencies of *glbinding* are the STL of the\
 used compiler and an OpenGL driver library, dynamically linked with your\
 application.
Building *glbinding* from source has several mandatory and optional\
 dependencies:

* [CMake](https://cmake.org/) 3.0 or higher for building *glbinding* from\
 source (mandatory for any build from source)
* [git](https://git-scm.com/) for version control and script supporting tasks
* [GLFW](http://www.glfw.org/) 3.2 or higher for examples and tools
* [GLEW](http://glew.sourceforge.net/) 1.6 or higher for the comparison\
 example (optional)
* [cpplocate](https://github.com/cginternals/cpplocate) for the examples\
 (optional)
* [Qt5](http://www.qt.io/developers/) 5.0 or higher for the qt-based example\
 (optional)
* [googletest](https://github.com/google/googletest) for tests (optional)
* [Doxygen](http://www.stack.nl/~dimitri/doxygen/) 1.8 or higher for\
 generating the documentation on your system
  * [graphviz](http://www.graphviz.org/) for generating diagrams (optional)

### Compile Instructions

For compilation, a C++11 compliant compiler, e.g., GCC 4.8, Clang 3.3, MSVC\
 2013 **Update 3**, is required.
First, download the source code [as archive](https://github.com/cginternals/g\
lbinding/releases) or via git:

```bash
> git clone https://github.com/cginternals/glbinding.git
> cd glbinding
```

Then, depending on the version of *glbinding* you want to build, choose the\
 appropriate tag or branch, e.g., for the 2.1.4 release:

```bash
> git fetch --tags
> git checkout v2.1.4
```

The actual compilation can be done using CMake and your favorite compiler and\
 IDE.

For building *glbinding* CMake via command line can be used (should work on\
 all systems):

First, create a build directory (we do not recommend in-source builds):

```bash
> mkdir build
> cd build
```

Configure *glbinding* with your preferred or default generator, e.g., for\
 Visual Studio 2017 in x64 use
(note: some IDEs have integrated support for CMake projects, e.g., Qt\
 Creator, and allow you to skip the manual project configuration):

```bash
> cmake .. -G "Visual Studio 17 2022" -A x64
```

In order to compile the project, either use you favorite Editor/IDE with the\
 created project or use CMake as follows:

```bash
> cmake --build .
```

For multi-configuration projects specific configuration (e.g., on Windows\
 using MSVC) can be built using:

```bash
> cmake --build . --config Release
> cmake --build . --config Debug
```

### Update Generated Source Code

The generation scripts for *glbinding* are maintained within the\
 [khrbinding-generator](https://github.com/cginternals/khrbinding-generator)\
 project.
Assuming a directory structure with both projects such as `<projects>/glbindi\
ng` and `<projects>/khrbinding-generator`, updating the source code is\
 started as follows:

```bash
> python3 update.py -p "profiles/gl.json"
> python3 generate.py -p "profiles/gl.json" -d "../glbinding/source"
```

# Tips for Linking

We suggest using the build system [CMake](https://cmake.org/) for a smooth\
 integration.
For it, *glbinding* provides a configuration script that should be installed\
 into your system or at least accessible by CMake.
In your projects' `CMakeLists.txt`, add one of the following lines:

```cmake
find_package(glbinding QUIET) # if you want to check for existence
find_package(glbinding REQUIRED) # if it is really required in your project
```

Finally, just link *glbinding* to your own library or executable:

```cmake
target_link_libraries(${target} ... PUBLIC
    glbinding::glbinding
    glbinding::glbinding-aux # for additional, auxiliary features as logging,\
 meta information, or debugging functionality
)
```

# Dependency on KHR Headers

As of mid 2019, the OpenGL API depends on the platform headers from the\
 Khronos group, even on desktop systems.
This introduced a direct dependency of *glbinding* to the `KHR/khrplatform.h`\
 header file. For most Linux systems, these headers are easily available\
 (e.g., by installing `libegl1-mesa-dev` on Ubuntu), whereas on other\
 systems, pre-existing packages are scarce. Even in the case of Ubuntu, one\
 can argue that installing the EGL dependency is strange, as glbinding does\
 not depend on EGL in any way.

For those cases, glbinding comes with a copy of the headers for internal use.

This solution has one significant downside: As those headers are used by the\
 types of the OpenGL API and the types are used within the public interface\
 of glbinding, the `khrplatform.h` headers needs to be present when building\
 downstream projects, i.e., they need to be installed along glbinding. In\
 order to not conflict with packages providing the official headers, this\
 internal header has to be installed on a separate location. This complicates\
 the project setup and results in the following usage scenarios for you to\
 choose from:

### KHR/khrplatform.h Usage

For this usage scenario, glbinding needs to get built with the CMake option\
 `OPTION_BUILD_OWN_KHR_HEADERS` set to `Off` and system-wide availability of\
 the `KHR/khrplatform.h` headers, e.g., by having `libegl1-mesa-dev`\
 installed. If either the option is `On` or the system-wide headers are not\
 found, the internally provided headers are used instead.

This decision is stored as property of the glbinding CMake target and will be\
 used for downstream projects as well.
The use and propagation of this decision is transparent to the user as well,\
 i.e., the user should not need to handle this downstream. The only thing to\
 consider is to have the system-wide `KHR/khrplatform.h` headers available\
 when building the downstream project.

### glbinding-internal khrplatform.h Usage

For this usage scenario, glbinding should get built with the CMake option\
 `OPTION_BUILD_OWN_KHR_HEADERS` set to `On`. Alternatively, this scenario is\
 the fallback if the official `KHR/khrplatform.h` headers are not found.

This decision is stored as property of the glbinding CMake target and will be\
 used for downstream projects as well.
The use and propagation of this decision is transparent to the user as well,\
 i.e., the user should not need to handle this downstream.

# Basic Example

The following examples are tailored for use with *glbinding* 3.0 and above.

*glbinding* has to be initialized once on the active OpenGL context you want\
 to use *glbinding* with. For initialization, a callback for function pointer\
 resolution must be passed, which your context creation API should provide.
In the most basic case, you call ```glbinding::initialize``` once:

```cpp
#include <glbinding/gl/gl.h>
#include <glbinding/glbinding.h>

using namespace gl;

int main()
{
  // create context, e.g. using GLFW, Qt, SDL, GLUT, ...

  // Assume context creation using GLFW
  glbinding::initialize(glfwGetProcAddress);

  glBegin(GL_TRIANGLES);
  // ...
  glEnd();
}
```


# Features

The following examples are tailored for use with *glbinding* 3.0 and above.

### Type-Safe Parameters

The original OpenGL API provides several concepts in their interface, namely\
 functions, booleans, bitfields, enums, as well as special values and basic\
 types but mostly does not differentiate between these types.
Hence, actual knowledge about each function and its parameters is required;\
 there is no way for a basic code assistance.
As *glbinding* differentiates between all these types, IDEs and compilers can\
 detect wrong usages of the OpenGL API.

One example is the passing of a named constant in places where a bit\
 combination is expected:

```cpp
glClear(GL_COLOR_BUFFER_BIT); // valid
glClear(GL_FRAMEBUFFER);      // compilation error: bitfield of group\
 ClearBufferMask expected, got GLenum
```

In the case of bitfields, the OpenGL API offers groups and each parameter\
 states the group valid values must come from.
*glbinding* uses this information to prevent invalid bit combinations:

```cpp
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // valid
glClear(GL_COLOR_BUFFER_BIT | GL_MAP_READ_BIT);     // compile error: both\
 bitfields share no group

glClear(GL_STENCIL_BUFFER_BIT | GL_LIGHTING_BIT);   // compile error: bitwise\
 or operation is valid,
                                                    // the shared group is\
 AttribMask, but the
                                                    // resulting group does\
 not match the expected.
```

Unfortunately, such groups are incomplete and unmaintained for enums (named\
 values).
Thus, *glbinding* could not provide any assistance for cases such as:

```cpp
GLuint vertexShader = glCreateShader(GL_VERTEX_SHADER); // All good
GLuint colorShader = glCreateShader(GL_COLOR);          // No compilation\
 error but a runtime error!
```

### Compilation-Centered Header Design

C++ strictly separates interface from implementation.
For improving the compilation time of a program or system written in C++\
 forward declarations of types are commonly used and includes of unnecessary\
 symbols are omitted.

For an interface of a library, class, or module providing OpenGL related\
 functionality, it is likely that only the type information of OpenGL is\
 needed, not actual functions or constants usually required for\
 implementation.
In addition to the customary all-in-one header ```gl.h``` *glbinding* also\
 provides specialized headers:

```cpp
#include <glbinding/gl/gl.h>        // all of the headers below, meaning the\
 complete OpenGL API

#include <glbinding/gl/bitfield.h>  // bitfield constants (e.g.,\
 GL_COLOR_BUFFER_BIT)
#include <glbinding/gl/boolean.h>   // boolean constants (GL_TRUE and\
 GL_FALSE)
#include <glbinding/gl/enum.h>      // symbol constants (e.g.,\
 GL_VERTEX_SHADER)
#include <glbinding/gl/functions.h> // functions
#include <glbinding/gl/types.h>     // type declarations of the OpenGL API\
 (including bitfields, boolean, enum, and extensions)
#include <glbinding/gl/values.h>    // special values (e.g., GL_INVALID_INDEX)
```

There is one additional header that provides all extensions and provide them\
 as an enumeration in terms of C++ enums.

```cpp
#include <glbinding/gl/extension.h>
```

### Feature-Centered Header Design

The OpenGL API is iteratively developed and released in versions, internally\
 (for the API specification) named *features*.
The latest feature/version of OpenGL is 4.6.
The previous version are 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 2.0, 2.1, 3.0, 3.1,\
 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4., and 4.5.
OpenGL uses a deprecation model for removing outdated parts of its API which\
 results in compatibility (with deprecated API) and core (without deprecated\
 API) usage that is manifested in the targeted OpenGL context.
On top of that, new API concepts are suggested as extensions (often vendor\
 specific) that might be integrated into future versions.
All this results in many possible specific manifestations of the OpenGL API\
 you can use in your program.

One tough task is to adhere to one agreed set of functions in your own OpenGL\
 program (e.g., OpenGL 3.2 Core if you want to develop for every Windows,\
 macOS, and Linux released in the last 4 years).
*glbinding* facilitates this by providing per-feature headers by means of\
 well-defined/generated subsets of the OpenGL API.

#### All-Features OpenGL Headers

If you do not use per-feature headers the OpenGL program can look like this:

```cpp
#include <glbinding/gl/gl.h>

// draw code
gl::glClear(gl::GL_COLOR_BUFFER_BIT | gl::GL_DEPTH_BUFFER_BIT);
gl::glUniform1i(u_numcubes, m_numcubes);
gl::glDrawElementsInstanced(gl::GL_TRIANGLES, 18, gl::GL_UNSIGNED_BYTE, 0,\
 m_numcubes * m_numcubes);
```

#### Single-Feature OpenGL Headers

When developing your code on Windows with latest drivers installed, the code\
 above is likely to compile and run.
But if you want to port it to systems with less mature driver support (e.g.,\
 macOS or Linux using open source drivers), you may wonder if\
 ```glDrawElementsInstanced``` is available.
In this case, just switch to per-feature headers of *glbinding* and choose\
 the OpenGL 3.2 Core headers (as you know that at least this version is\
 available on all target platforms):

```cpp
#include <glbinding/gl32core/gl.h>

// draw code
gl32core::glClear(gl32core::GL_COLOR_BUFFER_BIT | gl32core::GL_DEPTH_BUFFER_B\
IT);
gl32core::glUniform1i(u_numcubes, m_numcubes);
gl32core::glDrawElementsInstanced(gl32core::GL_TRIANGLES, 18,\
 gl32core::GL_UNSIGNED_BYTE, 0, m_numcubes * m_numcubes);
```

If the code compiles you can be sure it is OpenGL 3.2 Core compliant.
Using functions that are not yet available or relying on deprecated\
 functionality is prevented.

### Lazy Function Pointer Resolution

By default, *glbinding* tries to resolve all OpenGL function pointers during\
 initialization, which can consume some time:

```cpp
// Assume context creation using GLFW
glbinding::initialize(glfwGetProcAddress); // immediate function pointer\
 resolution
```

Alternatively, the user can decide that functions pointers are resolved only\
 when used for the first time. This is achieved by:

```cpp
// Assume context creation using GLFW
glbinding::initialize(glfwGetProcAddress, false); // lazy function pointer\
 resolution
```

### Multi-Context Support

*glbinding* has built-in support for multiple contexts. The only requirement\
 is, that the currently active context has to be specified. This feature\
 mixes well with multi-threaded applications, but keep in mind that\
 concurrent use of one context often results in non-meaningful communication\
 with the OpenGL driver.

In order to use multiple contexts, use your favorite context creation library\
 (e.g., glut, SDL, egl, glfw, Qt) to request the required contexts.
The functions to make a context current should be provided by these libraries\
 and is not part of *glbinding* (except that you can get the current context\
 handle).
When using multiple contexts, *glbinding* has to be initialized for each\
 context (when current).

Since each context can correspond to a different feature set of OpenGL and\
 the drivers are free to assign their function pointers, *glbinding* cannot\
 assume any equalities of requested function pointers.
Thus, contexts switches have to be communicated to *glbinding* explicitly in\
 order to have correctly dispatched function pointers:

```cpp
// use the current active context
glbinding::useCurrentContext();

// use another context, identified by platform-specific handle
glbinding::useContext(ContextHandle context);
```

### Multi-Threading Support

Concurrent use of *glbinding* is mainly intended for usage over multiple\
 contexts in different threads (multiple threads operating on a single OpenGL\
 context requires locking, which *glbinding* will not provide).
For it, *glbinding* supports multiple active contexts, one per thread.
This necessitates that *glbinding* gets informed in each thread which context\
 is currently active (see [multi-context example](https://github.com/cgintern\
als/glbinding/tree/master/source/examples/multi-context)).

Note: multi-threaded communication with OpenGL will most likely result in a\
 meaningless sequence of OpenGL calls.
To avoid this, semantic groups of OpenGL calls should be treated as critical\
 sections.

Example for usage of multiple contexts:
```cpp
// Context 1 creation
// GLFWwindow * window1 = glfwCreateWindow(640, 480, "", nullptr, nullptr);
// glfwMakeContextCurrent(window1);
glbinding::initialize(0, glfwGetProcAddress); // 0 here is the context\
 identifier
// Context 1 initialization
glClearColor(1.0f, 0.0f, 0.0f, 0.0f);

// Context 2 creation
// GLFWwindow * window2 = glfwCreateWindow(640, 480, "", nullptr, nullptr);
// glfwMakeContextCurrent(window2);
glbinding::initialize(1, glfwGetProcAddress); // 1 here is the context\
 identifier
// Context 1 initialization
glClearColor(0.0f, 1.0f, 0.0f, 0.0f);

// Rendering
while (doNotClose()) {
  // Make context 1 active
  // glfwMakeContextCurrent(window1);
  glbinding::useContext(0);

  // Context 1 rendering
  glViewport(0, 0, width, height);
  glClear(GL_COLOR_BUFFER_BIT);

  // Swap buffer for context 1
  // glfwSwapBuffers(window1);

  // Make context 2 active
  // glfwMakeContextCurrent(window2);
  glbinding::useContext(1);

  // Context 2 rendering
  glViewport(0, 0, width, height);
  glClear(GL_COLOR_BUFFER_BIT);

  // Swap buffer for context 2
  // glfwSwapBuffers(window2);
}
```

### Multiple OpenGL Contexts in Multiple Threads

The combination of multiple OpenGL contexts and multiple threads for OpenGL\
 usage is supported by *glbinding* in general.
You must tell *glbinding* which OpenGL context is used in which thread by\
 calling the initialize method once the context is used first\
 (```glbinding::initialize```) and if you want to switch the current context\
 for one thread, you have to update the current context, too\
 (```glbinding::useContext```).
However, we discourage the use of one context in multiple threads.

### Function Callbacks

To support orthogonal features of the OpenGL API, *glbinding* allows\
 attaching a number of callbacks to several concepts of the OpenGL API (e.g.\
 a function).
Such orthogonal features include runtime error checking (i.e.,\
 ```glGetError``` after each function call), logging, and caching of driver\
 information.

*glbinding* supports different types of callbacks that can be registered.
The main types are

 * global and local (per-function) before callbacks, that are called before\
 the OpenGL function call,
 * global and local (per-function) after callbacks, that are called after the\
 OpenGL function call,
 * unresolved callbacks, that are called each time an unresolved OpenGL\
 function should be called (instead of a segmentation fault),
 * context switch callbacks, that are called if the internal current OpenGL\
 context of *glbinding* is changed.

The before callbacks are useful , e.g., for tracing or application-specific\
 parameter checking.
The available information in this callback is the wrapped OpenGL function\
 (including its name and bound function address) and all parameters.
The after callbacks are useful, e.g., for tracing, logging, or the obligatory\
 error check (```glGetError```).
Available information is extended by the return value.
The unresolved callback provides information about the (unresolved) wrapped\
 OpenGL function object.

Example for error checking:

```cpp
setCallbackMaskExcept(CallbackMask::After, { "glGetError" });
setAfterCallback([](const FunctionCall &)
{
  const auto error = glGetError();
  if (error != GL_NO_ERROR)
    std::cout << "error: " << std::hex << error << std::endl;
});

// OpenGL Code ...
```

As a shortcut, *glbinding* 3.0 introduced a debugging interface for\
 error-checking after callbacks within the *glbinding-aux* library:

```cpp
#include <glbinding-aux/debug.h>

glbinding::aux::enableGetErrorCallback();

// OpenGL Code ...
```

Example for logging:

```cpp
setCallbackMask(CallbackMask::After | CallbackMask::ParametersAndReturnValue);
setAfterCallback([](const FunctionCall & call)
{
  std::cout << call.function->name() << "(";
  for (unsigned i = 0; i < call.parameters.size(); ++i)
  {
    std::cout << call.parameters[i].get();
    if (i < call.parameters.size() - 1)
      std::cout << ", ";
  }
  std::cout << ")";

  if (call.returnValue)
    std::cout << " -> " << call.returnValue.get();

  std::cout << std::endl;
});

// OpenGL Code ...
```

### Alternative Signatures

The OpenGL API is designed without function overloading using only simple\
 parameter types.
This results in explicit parameter encoding in function names for\
 conceptually overloaded functions (e.g., glTexParameteri and\
 glTexParameterf).
Another design decision for the OpenGL API is the high similarity of the\
 integer, boolean, enum, and bitfield data types.
This means, that for *overloaded* functions, there is no separate function\
 for ```GLboolean```, ```GLenum```, and ```GLbitfield``` types.
Using type-save functions of *glbinding*, some typically compiling code\
 constructs are now deliberately broken.
For most of those cases, we provide alternative *overloaded* function\
 signatures.
Additionally, we also fix signatures that are semantically broken in the\
 OpenGL API specification, i.e., when base types (C types) are similar such\
 as in the case of enums and integers.

Alternative function signatures are enabled by default, so the following\
 example works out-of-the-box:

```cpp
#include <glbinding/gl/gl.h>

using namespace gl;

// ...
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, 64, 64, 0, GL_RED, GL_UNSIGNED_BYTE,\
 terrain.data());
```

### Meta Information

Besides an actual OpenGL binding, *glbinding* also supports queries for both\
 compile time and runtime information about the gl.xml and your OpenGL driver\
 within the *glbinding-aux* library. This library comes with own includes and\
 needs to be linked separately.
Typical use cases are querying the available OpenGL extensions or the\
 associated extensions to an OpenGL feature and their functions and enums.

The following example prints out a list of all available OpenGL\
 versions/features:

```cpp
#include <iostream>

#include <glbinding/Version.h>

#include <glbinding-aux/Meta.h>
#include <glbinding-aux/types_to_string.h>

// ...
using namespace glbinding;

for (const Version & v : aux::Meta::versions())
  std::cout << v << std::endl;
```

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for glbinding

[glbinding](https://glbinding.org/) is a cross-platform C++ binding for the\
 OpenGL API, generated using the gl.xml specification.

[![Official](https://img.shields.io/website/https/github.com/cginternals/glbi\
nding.svg?down_message=offline&label=Official&style=for-the-badge&up_color=bl\
ue&up_message=online)](https://github.com/cginternals/glbinding)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/g\
lbinding.svg?down_message=offline&label=build2&style=for-the-badge&up_color=b\
lue&up_message=online)](https://github.com/build2-packaging/glbinding)
[![cppget.org](https://img.shields.io/website/https/cppget.org/glbinding.svg?\
down_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_me\
ssage=online)](https://cppget.org/glbinding)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/gl\
binding.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=f\
or-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/gl\
binding)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch this package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/glbinding.git

Add the dependency in your project's `manifest` file to make the package\
 available for import.

    depends: glbinding ^3.3.0

Both libraries, `glbinding` and `glbinding-aux`, are provided in the same\
 package `glbinding`.
To import and add them to the variable `libs` in a `buildfile`, one would do\
 the following.

    import libs += glbinding%lib{glbinding}
    import libs += glbinding%lib{glbinding-aux}

Additionally, this repository also contains the `glbinding-tests`,\
 `glbinding-examples`, and `glbinding-tools` packages that contain\
 executables for learning and testing.
These had to be provided as standalone packages to allow for custom\
 configurations during CI runs.
Additionally, `glbinding-tools` is also installable.

## Configuration

### Boost.Thread

    config [bool] config.glbinding.use_boost_thread ?= false

For its implementation `glbinding` allows to optionally use Boost's thread\
 library.
Set the configuration variable to `true` to use `boost::thread` instead of\
 `std::thread` from the C++ STL.

### KHR Headers

    config [bool] config.glbinding.use_packaged_khr ?= true

`glbinding` needs some standard definitions from the `KHR/khrplatform.h`\
 header file.
To be self-contained, it comes with its own version of that header file.
Set the configuration variable to `false` if `glbinding` should use the KHR\
 headers given by the system.

### OpenGL Context Testing for Tests and Tools

    config [bool] config.glbinding_tests.opengl_context_testing ?= true
    config [bool] config.glbinding_tools.opengl_context_testing ?= true

These config variable decide whether to link regression tests or run\
 executables that require a valid OpenGL context to succeed.
As tests and tools will likely to be used on targets where OpenGL drawing is\
 required, these variables are enabled by default.
However, they should be disabled for target configurations in CI runs that do\
 not support GUI mocking.

## Issues
- Compilation might abort due to insufficient memory as it may use up all\
 available RAM. For this case, re-run the compilation process multiple times\
 until no errors occur or use less threads for build2 `b -j 1 ...`.
- The examples fail on a few MinGW-based Windows configurations due to\
 strange undefined references.
- Warnings are generated on Windows that show that redeclarations without\
 dllimport attribute occur. It does not seem to be an actual problem but\
 should be dealt with in the future.

## Contributing
Thanks in advance for your help and contribution to keep this package\
 up-to-date.
For now, please, file an issue on [GitHub](https://github.com/build2-packagin\
g/glbinding/issues) for everything that is not described below.

### Recommend Updating Version
Please, file an issue on [GitHub](https://github.com/build2-packaging/glbindi\
ng/issues) with the new recommended version.

### Update Version by Pull Request
1. Fork the repository on [GitHub](https://github.com/build2-packaging/glbind\
ing) and clone it to your local machine.
2. Run `git submodule init` and `git submodule update` to get the current\
 upstream directory.
3. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
4. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
5. Test if the packages compile and execute examples and tools.
6. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
7. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
8. Run `bdep ci` and test for errors for the package `glbinding` only.
9. If everything works fine, make a pull request on GitHub and write down the\
 `bdep ci` link to your CI tests.
10. After a successful pull request, we will run the appropriate commands to\
 publish a new package version.

### Update Version Directly if You Have Permissions
1. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
2. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
3. Test if the packages compile and execute examples and tools.
4. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
5. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
6. Run `bdep ci` and test for errors and warnings.
7. When successful, run `bdep release --tag --push` to push new tag version\
 to repository.
8. Run `bdep publish` to publish the package to [cppget.org](https://cppget.o\
rg).

\
package-description-type: text/markdown;variant=GFM
url: https://glbinding.org/
doc-url: https://glbinding.org/docs.html
src-url: https://github.com/cginternals/glbinding
package-url: https://github.com/build2-packaging/glbinding
email: opensource@cginternals.com
package-email: packaging@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: glbinding == 3.3.0
depends: glew ^2.2.0
depends: glfw ^3.3.8
builds: default
builds: -bindist; glbinding does not support bindist configs.
builds: -freebsd; GLFW does not support FreeBSD
builds: -( +macos &gcc ); GLFW does not support GCC on MacOS
build-exclude: **-emcc*; GLFW does not support Emscripten
bootstrap-build:
\
project = glbinding-examples

using version
using config
using test
using dist

# using install

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = h
ixx{*}: extension = inl
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
# hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# Default Library Dependencies
#
import libs = glbinding%lib{glbinding}
import libs += glbinding%lib{glbinding-aux}
import libs += glfw%lib{glfw}
cxx.poptions += -DGLFW_INCLUDE_NONE

\
location: glbinding/glbinding-examples-3.3.0+1.tar.gz
sha256sum: fcc8976c4e32726959ee8b08b0367b1d328e88fc739a1c69903a323672cefa21
:
name: glbinding-tests
version: 3.3.0+1
type: exe
language: c++
project: glbinding
summary: OpenGL loader C++ library based on gl.xml specification, tests
license: MIT
description:
\
[//]: # (Comment)

<br><a href="https://glbinding.org"><img src="https://raw.githubusercontent.c\
om/cginternals/glbinding/master/glbinding-logo.svg?sanitize=true"\
 width="50%"></a>

*glbinding* is a cross-platform C++ binding for the [OpenGL\
 API](http://www.opengl.org).

![GitHub release](https://img.shields.io/github/release/cginternals/glbinding\
.svg)
![C++ CI](https://github.com/cginternals/glbinding/actions/workflows/ci.yml/b\
adge.svg)
[![Travis](https://img.shields.io/travis/cginternals/glbinding/master.svg?sty\
le=flat&logo=travis)](https://travis-ci.org/cginternals/glbinding)
[![Appveyor](https://img.shields.io/appveyor/build/scheibel/glbinding/master.\
svg?style=flat&logo=appveyor)](https://ci.appveyor.com/project/scheibel/glbin\
ding)
[![Tokei](https://tokei.rs/b1/github/cginternals/glbinding)](https://github.c\
om/Aaronepower/tokei)

[![Documentation](https://img.shields.io/badge/documentation-online-blue.svg?\
style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL\
3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMC41IDEzLjciPjxwYXRoIGQ9Ik0xMS\
41IDYuOGwtMy43IDYuNEwuNS41aDE0LjdsLTEuMyAyLjFINC4yTDcuOCA5bDIuNS00LjN6bTcuMyA\
0LjNsMS4yIDIuMWgtOS43TDE3LjYuNWwxLjIgMi4xLTQuOSA4LjV6IiBmaWxsPSIjZmZmIi8%2BPC\
9zdmc%2B)](https://glbinding.org/docs.html)
[![Examples](https://img.shields.io/badge/examples-wiki-blue.svg?style=flat&l\
ogo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vc\
mcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMC41IDEzLjciPjxwYXRoIGQ9Ik0xMS41IDYuOGwtMy\
43IDYuNEwuNS41aDE0LjdsLTEuMyAyLjFINC4yTDcuOCA5bDIuNS00LjN6bTcuMyA0LjNsMS4yIDI\
uMWgtOS43TDE3LjYuNWwxLjIgMi4xLTQuOSA4LjV6IiBmaWxsPSIjZmZmIi8%2BPC9zdmc%2B)](h\
ttps://github.com/cginternals/glbinding/wiki/Examples)
[![Tools](https://img.shields.io/badge/tools-wiki-blue.svg?style=flat&logo=da\
ta%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjA\
wMC9zdmciIHZpZXdCb3g9IjAgMCAyMC41IDEzLjciPjxwYXRoIGQ9Ik0xMS41IDYuOGwtMy43IDYu\
NEwuNS41aDE0LjdsLTEuMyAyLjFINC4yTDcuOCA5bDIuNS00LjN6bTcuMyA0LjNsMS4yIDIuMWgtO\
S43TDE3LjYuNWwxLjIgMi4xLTQuOSA4LjV6IiBmaWxsPSIjZmZmIi8%2BPC9zdmc%2B)](https:/\
/github.com/cginternals/glbinding/wiki/Tools)

[//]: # (HEADER_END)

*glbinding* leverages C++11 features like enum classes, lambdas, and variadic\
 templates, instead of relying on macros;
all OpenGL symbols are real functions and variables.
It provides type-safe parameters, per-feature API headers, lazy function\
 resolution, multi-context and multi-thread support, global and local\
 function callbacks, meta information about the generated OpenGL binding and\
 the OpenGL runtime, as well as tools and examples for quick-starting your\
 projects.
Based on the OpenGL API specification ([gl.xml](https://github.com/KhronosGro\
up/OpenGL-Registry/blob/main/xml/gl.xml)) *glbinding* is generated using\
 [python scripts and templates](https://github.com/cginternals/khrbinding-gen\
erator) that can be easily adapted to fit custom needs.

![what-is-glbinding](https://raw.githubusercontent.com/cginternals/glbinding/\
master/docs/what-is-glbinding-v2.png)

Code that is written using a typical C binding for OpenGL, e.g.,\
 [GLEW](http://glew.sourceforge.net/), is fully compatible for the use with\
 *glbinding* and causes no significant impact on runtime performance (see\
 [compare example](https://github.com/cginternals/glbinding/wiki/examples#com\
pare)): just replace all includes to the former binding, replace the\
 initialization code and *use* the appropriate API namespace, e.g., ```gl```\
 for full availability of the OpenGL API.

```cpp
#include <glbinding/gl/gl.h>
using namespace gl;

// ...
auto shader = glCreateShader(GL_COMPUTE_SHADER);
// ...
```

# Resources

* [Tools](https://github.com/cginternals/glbinding/wiki/tools)
* [Examples](https://github.com/cginternals/glbinding/wiki/examples)
* [Context Creation Cheat Sheet](https://github.com/cginternals/glbinding/wik\
i/Context-Creation-Cheat-Sheet)

### Installation and Development

* [Install Instructions](#install-instructions)
* [Build from Source](#build-instructions)
* [Updating the Generated Source Code](#update-generated-source-code)
* [Tips for Linking](#tips-for-linking)
* [Dependency on KHR Headers](#dependency-on-khr-headers)
* [Basic Example](#basic-example)

### Feature Documentation and Code Snippets

* [Type-safe Parameters](#type-safe-parameters)
* [Compilation-Centered Header Design](#compilation-centered-header-design)
* [Feature-Centered Header Design](#feature-centered-header-design)
* [Lazy Function Resolution](#lazy-function-pointer-resolution)
* [Multi-context Support](#multi-context-support)
* [Multi-thread Support](#multi-threading-support)
* [Global and Local Function Callbacks](#function-callbacks)
* [Alternative Signatures for GLboolean and GLenum types](#alternative-signat\
ures)
* [Meta Information System](#meta-information)
* [Doxygen Documentations](https://glbinding.org/docs.html)\
 ([stable](https://glbinding.org/docs/v3.1/), [master](https://glbinding.org/\
docs/master))

# Install Instructions

*glbinding* is available for different platforms using different distribution\
 channels.
You can either download the source and manually [compile](#build-instructions\
) it or use one of the [pre-compiled releases](https://github.com/cginternals\
/glbinding/releases) of this repository.
For systems providing package managers, we generally strive for packages in\
 these package managers.
An overview on availability of glbinding can be found on [repology.org](https\
://repology.org/project/glbinding/versions).

## Windows

The various *glbinding* packages can be installed either by downloading an\
 installer, e.g., the [x64 installer for glbinding v3.1.0](https://github.com\
/cginternals/glbinding/releases/download/v3.1.0/glbinding-3.1.0-msvc2017-x64-\
installer.exe) for Microsoft Visual Studio 2015, or downloading and\
 extracting one of the precompiled archives, e.g. [runtime](https://github.co\
m/cginternals/glbinding/releases/download/v3.1.0/glbinding-3.1.0-msvc2017-x64\
-runtime.zip),
[examples](https://github.com/cginternals/glbinding/releases/download/v3.1.0/\
glbinding-3.1.0-msvc2017-x64-examples.zip),
[dev](https://github.com/cginternals/glbinding/releases/download/v3.1.0/glbin\
ding-3.1.0-msvc2017-x64-dev.zip), and
[tools](https://github.com/cginternals/glbinding/releases/download/v3.1.0/glb\
inding-3.1.0-msvc2017-x64-tools.zip).
Since lately, glbinding is also available on [vcpkg](https://github.com/Micro\
soft/vcpkg/tree/master/ports/glbinding) with more recent releases:
```bash
> vcpkg install glbinding
```
Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## Ubuntu

*glbinding* is provided on Ubuntu using PPAs and in [Ubuntu\
 universe](https://packages.ubuntu.com/source/artful/glbinding) since Artful\
 Aardvark. We maintain our own [PPA](https://launchpad.net/~cginternals/+arch\
ive/ubuntu/ppa) for most recent releases.
Using the current PPA as example, the following lines install *glbinding*\
 including the GLFW examples:

```shell
> sudo apt-add-repository ppa:cginternals/ppa
> sudo apt-get update
> sudo apt-get install libglbinding-examples-glfw
> # start example
> /usr/share/glbinding/cubescape
```

To use *glbinding* as dependency, install the development package:

```shell
> sudo apt-get install libglbinding-dev libglbinding-dbg
```

Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## Arch Linux

On Arch, *glbinding* is provided by the [glbinding](https://www.archlinux.org\
/packages/community/x86_64/glbinding/) package in the community repository.\
 To install *glbinding* execute the following line:

```shell
> sudo pacman -S glbinding
```

Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## macOS

The package manager on macOS we depend on is homebrew. The package there is\
 called [glbinding](http://formulae.brew.sh/formula/glbinding).
To install *glbinding* using homebrew, execute the following line:

```bash
> brew install glbinding
```

Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## Debian-based Systems

*glbinding* is available for Debian 9 (Stretch), 10 (Buster), 11 (Bullseye)\
 and Sid. Install it using `apt install libglbinding-dev`.
For advanced use, download the source code and commence [building from\
 source](#build-instructions).


## Cross-Platform Package Managers

As one of the cross-platform package managers, *conan* provides glbinding in\
 its [center index](https://conan.io/center/glbinding). You can use the\
 following line to install glbinding using conan:

```bash
> conan install glbinding/3.1.0@
```


# Build Instructions

### Prerequisites and Dependencies

The only mandatory run-time dependencies of *glbinding* are the STL of the\
 used compiler and an OpenGL driver library, dynamically linked with your\
 application.
Building *glbinding* from source has several mandatory and optional\
 dependencies:

* [CMake](https://cmake.org/) 3.0 or higher for building *glbinding* from\
 source (mandatory for any build from source)
* [git](https://git-scm.com/) for version control and script supporting tasks
* [GLFW](http://www.glfw.org/) 3.2 or higher for examples and tools
* [GLEW](http://glew.sourceforge.net/) 1.6 or higher for the comparison\
 example (optional)
* [cpplocate](https://github.com/cginternals/cpplocate) for the examples\
 (optional)
* [Qt5](http://www.qt.io/developers/) 5.0 or higher for the qt-based example\
 (optional)
* [googletest](https://github.com/google/googletest) for tests (optional)
* [Doxygen](http://www.stack.nl/~dimitri/doxygen/) 1.8 or higher for\
 generating the documentation on your system
  * [graphviz](http://www.graphviz.org/) for generating diagrams (optional)

### Compile Instructions

For compilation, a C++11 compliant compiler, e.g., GCC 4.8, Clang 3.3, MSVC\
 2013 **Update 3**, is required.
First, download the source code [as archive](https://github.com/cginternals/g\
lbinding/releases) or via git:

```bash
> git clone https://github.com/cginternals/glbinding.git
> cd glbinding
```

Then, depending on the version of *glbinding* you want to build, choose the\
 appropriate tag or branch, e.g., for the 2.1.4 release:

```bash
> git fetch --tags
> git checkout v2.1.4
```

The actual compilation can be done using CMake and your favorite compiler and\
 IDE.

For building *glbinding* CMake via command line can be used (should work on\
 all systems):

First, create a build directory (we do not recommend in-source builds):

```bash
> mkdir build
> cd build
```

Configure *glbinding* with your preferred or default generator, e.g., for\
 Visual Studio 2017 in x64 use
(note: some IDEs have integrated support for CMake projects, e.g., Qt\
 Creator, and allow you to skip the manual project configuration):

```bash
> cmake .. -G "Visual Studio 17 2022" -A x64
```

In order to compile the project, either use you favorite Editor/IDE with the\
 created project or use CMake as follows:

```bash
> cmake --build .
```

For multi-configuration projects specific configuration (e.g., on Windows\
 using MSVC) can be built using:

```bash
> cmake --build . --config Release
> cmake --build . --config Debug
```

### Update Generated Source Code

The generation scripts for *glbinding* are maintained within the\
 [khrbinding-generator](https://github.com/cginternals/khrbinding-generator)\
 project.
Assuming a directory structure with both projects such as `<projects>/glbindi\
ng` and `<projects>/khrbinding-generator`, updating the source code is\
 started as follows:

```bash
> python3 update.py -p "profiles/gl.json"
> python3 generate.py -p "profiles/gl.json" -d "../glbinding/source"
```

# Tips for Linking

We suggest using the build system [CMake](https://cmake.org/) for a smooth\
 integration.
For it, *glbinding* provides a configuration script that should be installed\
 into your system or at least accessible by CMake.
In your projects' `CMakeLists.txt`, add one of the following lines:

```cmake
find_package(glbinding QUIET) # if you want to check for existence
find_package(glbinding REQUIRED) # if it is really required in your project
```

Finally, just link *glbinding* to your own library or executable:

```cmake
target_link_libraries(${target} ... PUBLIC
    glbinding::glbinding
    glbinding::glbinding-aux # for additional, auxiliary features as logging,\
 meta information, or debugging functionality
)
```

# Dependency on KHR Headers

As of mid 2019, the OpenGL API depends on the platform headers from the\
 Khronos group, even on desktop systems.
This introduced a direct dependency of *glbinding* to the `KHR/khrplatform.h`\
 header file. For most Linux systems, these headers are easily available\
 (e.g., by installing `libegl1-mesa-dev` on Ubuntu), whereas on other\
 systems, pre-existing packages are scarce. Even in the case of Ubuntu, one\
 can argue that installing the EGL dependency is strange, as glbinding does\
 not depend on EGL in any way.

For those cases, glbinding comes with a copy of the headers for internal use.

This solution has one significant downside: As those headers are used by the\
 types of the OpenGL API and the types are used within the public interface\
 of glbinding, the `khrplatform.h` headers needs to be present when building\
 downstream projects, i.e., they need to be installed along glbinding. In\
 order to not conflict with packages providing the official headers, this\
 internal header has to be installed on a separate location. This complicates\
 the project setup and results in the following usage scenarios for you to\
 choose from:

### KHR/khrplatform.h Usage

For this usage scenario, glbinding needs to get built with the CMake option\
 `OPTION_BUILD_OWN_KHR_HEADERS` set to `Off` and system-wide availability of\
 the `KHR/khrplatform.h` headers, e.g., by having `libegl1-mesa-dev`\
 installed. If either the option is `On` or the system-wide headers are not\
 found, the internally provided headers are used instead.

This decision is stored as property of the glbinding CMake target and will be\
 used for downstream projects as well.
The use and propagation of this decision is transparent to the user as well,\
 i.e., the user should not need to handle this downstream. The only thing to\
 consider is to have the system-wide `KHR/khrplatform.h` headers available\
 when building the downstream project.

### glbinding-internal khrplatform.h Usage

For this usage scenario, glbinding should get built with the CMake option\
 `OPTION_BUILD_OWN_KHR_HEADERS` set to `On`. Alternatively, this scenario is\
 the fallback if the official `KHR/khrplatform.h` headers are not found.

This decision is stored as property of the glbinding CMake target and will be\
 used for downstream projects as well.
The use and propagation of this decision is transparent to the user as well,\
 i.e., the user should not need to handle this downstream.

# Basic Example

The following examples are tailored for use with *glbinding* 3.0 and above.

*glbinding* has to be initialized once on the active OpenGL context you want\
 to use *glbinding* with. For initialization, a callback for function pointer\
 resolution must be passed, which your context creation API should provide.
In the most basic case, you call ```glbinding::initialize``` once:

```cpp
#include <glbinding/gl/gl.h>
#include <glbinding/glbinding.h>

using namespace gl;

int main()
{
  // create context, e.g. using GLFW, Qt, SDL, GLUT, ...

  // Assume context creation using GLFW
  glbinding::initialize(glfwGetProcAddress);

  glBegin(GL_TRIANGLES);
  // ...
  glEnd();
}
```


# Features

The following examples are tailored for use with *glbinding* 3.0 and above.

### Type-Safe Parameters

The original OpenGL API provides several concepts in their interface, namely\
 functions, booleans, bitfields, enums, as well as special values and basic\
 types but mostly does not differentiate between these types.
Hence, actual knowledge about each function and its parameters is required;\
 there is no way for a basic code assistance.
As *glbinding* differentiates between all these types, IDEs and compilers can\
 detect wrong usages of the OpenGL API.

One example is the passing of a named constant in places where a bit\
 combination is expected:

```cpp
glClear(GL_COLOR_BUFFER_BIT); // valid
glClear(GL_FRAMEBUFFER);      // compilation error: bitfield of group\
 ClearBufferMask expected, got GLenum
```

In the case of bitfields, the OpenGL API offers groups and each parameter\
 states the group valid values must come from.
*glbinding* uses this information to prevent invalid bit combinations:

```cpp
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // valid
glClear(GL_COLOR_BUFFER_BIT | GL_MAP_READ_BIT);     // compile error: both\
 bitfields share no group

glClear(GL_STENCIL_BUFFER_BIT | GL_LIGHTING_BIT);   // compile error: bitwise\
 or operation is valid,
                                                    // the shared group is\
 AttribMask, but the
                                                    // resulting group does\
 not match the expected.
```

Unfortunately, such groups are incomplete and unmaintained for enums (named\
 values).
Thus, *glbinding* could not provide any assistance for cases such as:

```cpp
GLuint vertexShader = glCreateShader(GL_VERTEX_SHADER); // All good
GLuint colorShader = glCreateShader(GL_COLOR);          // No compilation\
 error but a runtime error!
```

### Compilation-Centered Header Design

C++ strictly separates interface from implementation.
For improving the compilation time of a program or system written in C++\
 forward declarations of types are commonly used and includes of unnecessary\
 symbols are omitted.

For an interface of a library, class, or module providing OpenGL related\
 functionality, it is likely that only the type information of OpenGL is\
 needed, not actual functions or constants usually required for\
 implementation.
In addition to the customary all-in-one header ```gl.h``` *glbinding* also\
 provides specialized headers:

```cpp
#include <glbinding/gl/gl.h>        // all of the headers below, meaning the\
 complete OpenGL API

#include <glbinding/gl/bitfield.h>  // bitfield constants (e.g.,\
 GL_COLOR_BUFFER_BIT)
#include <glbinding/gl/boolean.h>   // boolean constants (GL_TRUE and\
 GL_FALSE)
#include <glbinding/gl/enum.h>      // symbol constants (e.g.,\
 GL_VERTEX_SHADER)
#include <glbinding/gl/functions.h> // functions
#include <glbinding/gl/types.h>     // type declarations of the OpenGL API\
 (including bitfields, boolean, enum, and extensions)
#include <glbinding/gl/values.h>    // special values (e.g., GL_INVALID_INDEX)
```

There is one additional header that provides all extensions and provide them\
 as an enumeration in terms of C++ enums.

```cpp
#include <glbinding/gl/extension.h>
```

### Feature-Centered Header Design

The OpenGL API is iteratively developed and released in versions, internally\
 (for the API specification) named *features*.
The latest feature/version of OpenGL is 4.6.
The previous version are 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 2.0, 2.1, 3.0, 3.1,\
 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4., and 4.5.
OpenGL uses a deprecation model for removing outdated parts of its API which\
 results in compatibility (with deprecated API) and core (without deprecated\
 API) usage that is manifested in the targeted OpenGL context.
On top of that, new API concepts are suggested as extensions (often vendor\
 specific) that might be integrated into future versions.
All this results in many possible specific manifestations of the OpenGL API\
 you can use in your program.

One tough task is to adhere to one agreed set of functions in your own OpenGL\
 program (e.g., OpenGL 3.2 Core if you want to develop for every Windows,\
 macOS, and Linux released in the last 4 years).
*glbinding* facilitates this by providing per-feature headers by means of\
 well-defined/generated subsets of the OpenGL API.

#### All-Features OpenGL Headers

If you do not use per-feature headers the OpenGL program can look like this:

```cpp
#include <glbinding/gl/gl.h>

// draw code
gl::glClear(gl::GL_COLOR_BUFFER_BIT | gl::GL_DEPTH_BUFFER_BIT);
gl::glUniform1i(u_numcubes, m_numcubes);
gl::glDrawElementsInstanced(gl::GL_TRIANGLES, 18, gl::GL_UNSIGNED_BYTE, 0,\
 m_numcubes * m_numcubes);
```

#### Single-Feature OpenGL Headers

When developing your code on Windows with latest drivers installed, the code\
 above is likely to compile and run.
But if you want to port it to systems with less mature driver support (e.g.,\
 macOS or Linux using open source drivers), you may wonder if\
 ```glDrawElementsInstanced``` is available.
In this case, just switch to per-feature headers of *glbinding* and choose\
 the OpenGL 3.2 Core headers (as you know that at least this version is\
 available on all target platforms):

```cpp
#include <glbinding/gl32core/gl.h>

// draw code
gl32core::glClear(gl32core::GL_COLOR_BUFFER_BIT | gl32core::GL_DEPTH_BUFFER_B\
IT);
gl32core::glUniform1i(u_numcubes, m_numcubes);
gl32core::glDrawElementsInstanced(gl32core::GL_TRIANGLES, 18,\
 gl32core::GL_UNSIGNED_BYTE, 0, m_numcubes * m_numcubes);
```

If the code compiles you can be sure it is OpenGL 3.2 Core compliant.
Using functions that are not yet available or relying on deprecated\
 functionality is prevented.

### Lazy Function Pointer Resolution

By default, *glbinding* tries to resolve all OpenGL function pointers during\
 initialization, which can consume some time:

```cpp
// Assume context creation using GLFW
glbinding::initialize(glfwGetProcAddress); // immediate function pointer\
 resolution
```

Alternatively, the user can decide that functions pointers are resolved only\
 when used for the first time. This is achieved by:

```cpp
// Assume context creation using GLFW
glbinding::initialize(glfwGetProcAddress, false); // lazy function pointer\
 resolution
```

### Multi-Context Support

*glbinding* has built-in support for multiple contexts. The only requirement\
 is, that the currently active context has to be specified. This feature\
 mixes well with multi-threaded applications, but keep in mind that\
 concurrent use of one context often results in non-meaningful communication\
 with the OpenGL driver.

In order to use multiple contexts, use your favorite context creation library\
 (e.g., glut, SDL, egl, glfw, Qt) to request the required contexts.
The functions to make a context current should be provided by these libraries\
 and is not part of *glbinding* (except that you can get the current context\
 handle).
When using multiple contexts, *glbinding* has to be initialized for each\
 context (when current).

Since each context can correspond to a different feature set of OpenGL and\
 the drivers are free to assign their function pointers, *glbinding* cannot\
 assume any equalities of requested function pointers.
Thus, contexts switches have to be communicated to *glbinding* explicitly in\
 order to have correctly dispatched function pointers:

```cpp
// use the current active context
glbinding::useCurrentContext();

// use another context, identified by platform-specific handle
glbinding::useContext(ContextHandle context);
```

### Multi-Threading Support

Concurrent use of *glbinding* is mainly intended for usage over multiple\
 contexts in different threads (multiple threads operating on a single OpenGL\
 context requires locking, which *glbinding* will not provide).
For it, *glbinding* supports multiple active contexts, one per thread.
This necessitates that *glbinding* gets informed in each thread which context\
 is currently active (see [multi-context example](https://github.com/cgintern\
als/glbinding/tree/master/source/examples/multi-context)).

Note: multi-threaded communication with OpenGL will most likely result in a\
 meaningless sequence of OpenGL calls.
To avoid this, semantic groups of OpenGL calls should be treated as critical\
 sections.

Example for usage of multiple contexts:
```cpp
// Context 1 creation
// GLFWwindow * window1 = glfwCreateWindow(640, 480, "", nullptr, nullptr);
// glfwMakeContextCurrent(window1);
glbinding::initialize(0, glfwGetProcAddress); // 0 here is the context\
 identifier
// Context 1 initialization
glClearColor(1.0f, 0.0f, 0.0f, 0.0f);

// Context 2 creation
// GLFWwindow * window2 = glfwCreateWindow(640, 480, "", nullptr, nullptr);
// glfwMakeContextCurrent(window2);
glbinding::initialize(1, glfwGetProcAddress); // 1 here is the context\
 identifier
// Context 1 initialization
glClearColor(0.0f, 1.0f, 0.0f, 0.0f);

// Rendering
while (doNotClose()) {
  // Make context 1 active
  // glfwMakeContextCurrent(window1);
  glbinding::useContext(0);

  // Context 1 rendering
  glViewport(0, 0, width, height);
  glClear(GL_COLOR_BUFFER_BIT);

  // Swap buffer for context 1
  // glfwSwapBuffers(window1);

  // Make context 2 active
  // glfwMakeContextCurrent(window2);
  glbinding::useContext(1);

  // Context 2 rendering
  glViewport(0, 0, width, height);
  glClear(GL_COLOR_BUFFER_BIT);

  // Swap buffer for context 2
  // glfwSwapBuffers(window2);
}
```

### Multiple OpenGL Contexts in Multiple Threads

The combination of multiple OpenGL contexts and multiple threads for OpenGL\
 usage is supported by *glbinding* in general.
You must tell *glbinding* which OpenGL context is used in which thread by\
 calling the initialize method once the context is used first\
 (```glbinding::initialize```) and if you want to switch the current context\
 for one thread, you have to update the current context, too\
 (```glbinding::useContext```).
However, we discourage the use of one context in multiple threads.

### Function Callbacks

To support orthogonal features of the OpenGL API, *glbinding* allows\
 attaching a number of callbacks to several concepts of the OpenGL API (e.g.\
 a function).
Such orthogonal features include runtime error checking (i.e.,\
 ```glGetError``` after each function call), logging, and caching of driver\
 information.

*glbinding* supports different types of callbacks that can be registered.
The main types are

 * global and local (per-function) before callbacks, that are called before\
 the OpenGL function call,
 * global and local (per-function) after callbacks, that are called after the\
 OpenGL function call,
 * unresolved callbacks, that are called each time an unresolved OpenGL\
 function should be called (instead of a segmentation fault),
 * context switch callbacks, that are called if the internal current OpenGL\
 context of *glbinding* is changed.

The before callbacks are useful , e.g., for tracing or application-specific\
 parameter checking.
The available information in this callback is the wrapped OpenGL function\
 (including its name and bound function address) and all parameters.
The after callbacks are useful, e.g., for tracing, logging, or the obligatory\
 error check (```glGetError```).
Available information is extended by the return value.
The unresolved callback provides information about the (unresolved) wrapped\
 OpenGL function object.

Example for error checking:

```cpp
setCallbackMaskExcept(CallbackMask::After, { "glGetError" });
setAfterCallback([](const FunctionCall &)
{
  const auto error = glGetError();
  if (error != GL_NO_ERROR)
    std::cout << "error: " << std::hex << error << std::endl;
});

// OpenGL Code ...
```

As a shortcut, *glbinding* 3.0 introduced a debugging interface for\
 error-checking after callbacks within the *glbinding-aux* library:

```cpp
#include <glbinding-aux/debug.h>

glbinding::aux::enableGetErrorCallback();

// OpenGL Code ...
```

Example for logging:

```cpp
setCallbackMask(CallbackMask::After | CallbackMask::ParametersAndReturnValue);
setAfterCallback([](const FunctionCall & call)
{
  std::cout << call.function->name() << "(";
  for (unsigned i = 0; i < call.parameters.size(); ++i)
  {
    std::cout << call.parameters[i].get();
    if (i < call.parameters.size() - 1)
      std::cout << ", ";
  }
  std::cout << ")";

  if (call.returnValue)
    std::cout << " -> " << call.returnValue.get();

  std::cout << std::endl;
});

// OpenGL Code ...
```

### Alternative Signatures

The OpenGL API is designed without function overloading using only simple\
 parameter types.
This results in explicit parameter encoding in function names for\
 conceptually overloaded functions (e.g., glTexParameteri and\
 glTexParameterf).
Another design decision for the OpenGL API is the high similarity of the\
 integer, boolean, enum, and bitfield data types.
This means, that for *overloaded* functions, there is no separate function\
 for ```GLboolean```, ```GLenum```, and ```GLbitfield``` types.
Using type-save functions of *glbinding*, some typically compiling code\
 constructs are now deliberately broken.
For most of those cases, we provide alternative *overloaded* function\
 signatures.
Additionally, we also fix signatures that are semantically broken in the\
 OpenGL API specification, i.e., when base types (C types) are similar such\
 as in the case of enums and integers.

Alternative function signatures are enabled by default, so the following\
 example works out-of-the-box:

```cpp
#include <glbinding/gl/gl.h>

using namespace gl;

// ...
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, 64, 64, 0, GL_RED, GL_UNSIGNED_BYTE,\
 terrain.data());
```

### Meta Information

Besides an actual OpenGL binding, *glbinding* also supports queries for both\
 compile time and runtime information about the gl.xml and your OpenGL driver\
 within the *glbinding-aux* library. This library comes with own includes and\
 needs to be linked separately.
Typical use cases are querying the available OpenGL extensions or the\
 associated extensions to an OpenGL feature and their functions and enums.

The following example prints out a list of all available OpenGL\
 versions/features:

```cpp
#include <iostream>

#include <glbinding/Version.h>

#include <glbinding-aux/Meta.h>
#include <glbinding-aux/types_to_string.h>

// ...
using namespace glbinding;

for (const Version & v : aux::Meta::versions())
  std::cout << v << std::endl;
```

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for glbinding

[glbinding](https://glbinding.org/) is a cross-platform C++ binding for the\
 OpenGL API, generated using the gl.xml specification.

[![Official](https://img.shields.io/website/https/github.com/cginternals/glbi\
nding.svg?down_message=offline&label=Official&style=for-the-badge&up_color=bl\
ue&up_message=online)](https://github.com/cginternals/glbinding)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/g\
lbinding.svg?down_message=offline&label=build2&style=for-the-badge&up_color=b\
lue&up_message=online)](https://github.com/build2-packaging/glbinding)
[![cppget.org](https://img.shields.io/website/https/cppget.org/glbinding.svg?\
down_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_me\
ssage=online)](https://cppget.org/glbinding)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/gl\
binding.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=f\
or-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/gl\
binding)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch this package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/glbinding.git

Add the dependency in your project's `manifest` file to make the package\
 available for import.

    depends: glbinding ^3.3.0

Both libraries, `glbinding` and `glbinding-aux`, are provided in the same\
 package `glbinding`.
To import and add them to the variable `libs` in a `buildfile`, one would do\
 the following.

    import libs += glbinding%lib{glbinding}
    import libs += glbinding%lib{glbinding-aux}

Additionally, this repository also contains the `glbinding-tests`,\
 `glbinding-examples`, and `glbinding-tools` packages that contain\
 executables for learning and testing.
These had to be provided as standalone packages to allow for custom\
 configurations during CI runs.
Additionally, `glbinding-tools` is also installable.

## Configuration

### Boost.Thread

    config [bool] config.glbinding.use_boost_thread ?= false

For its implementation `glbinding` allows to optionally use Boost's thread\
 library.
Set the configuration variable to `true` to use `boost::thread` instead of\
 `std::thread` from the C++ STL.

### KHR Headers

    config [bool] config.glbinding.use_packaged_khr ?= true

`glbinding` needs some standard definitions from the `KHR/khrplatform.h`\
 header file.
To be self-contained, it comes with its own version of that header file.
Set the configuration variable to `false` if `glbinding` should use the KHR\
 headers given by the system.

### OpenGL Context Testing for Tests and Tools

    config [bool] config.glbinding_tests.opengl_context_testing ?= true
    config [bool] config.glbinding_tools.opengl_context_testing ?= true

These config variable decide whether to link regression tests or run\
 executables that require a valid OpenGL context to succeed.
As tests and tools will likely to be used on targets where OpenGL drawing is\
 required, these variables are enabled by default.
However, they should be disabled for target configurations in CI runs that do\
 not support GUI mocking.

## Issues
- Compilation might abort due to insufficient memory as it may use up all\
 available RAM. For this case, re-run the compilation process multiple times\
 until no errors occur or use less threads for build2 `b -j 1 ...`.
- The examples fail on a few MinGW-based Windows configurations due to\
 strange undefined references.
- Warnings are generated on Windows that show that redeclarations without\
 dllimport attribute occur. It does not seem to be an actual problem but\
 should be dealt with in the future.

## Contributing
Thanks in advance for your help and contribution to keep this package\
 up-to-date.
For now, please, file an issue on [GitHub](https://github.com/build2-packagin\
g/glbinding/issues) for everything that is not described below.

### Recommend Updating Version
Please, file an issue on [GitHub](https://github.com/build2-packaging/glbindi\
ng/issues) with the new recommended version.

### Update Version by Pull Request
1. Fork the repository on [GitHub](https://github.com/build2-packaging/glbind\
ing) and clone it to your local machine.
2. Run `git submodule init` and `git submodule update` to get the current\
 upstream directory.
3. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
4. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
5. Test if the packages compile and execute examples and tools.
6. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
7. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
8. Run `bdep ci` and test for errors for the package `glbinding` only.
9. If everything works fine, make a pull request on GitHub and write down the\
 `bdep ci` link to your CI tests.
10. After a successful pull request, we will run the appropriate commands to\
 publish a new package version.

### Update Version Directly if You Have Permissions
1. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
2. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
3. Test if the packages compile and execute examples and tools.
4. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
5. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
6. Run `bdep ci` and test for errors and warnings.
7. When successful, run `bdep release --tag --push` to push new tag version\
 to repository.
8. Run `bdep publish` to publish the package to [cppget.org](https://cppget.o\
rg).

\
package-description-type: text/markdown;variant=GFM
url: https://glbinding.org/
doc-url: https://glbinding.org/docs.html
src-url: https://github.com/cginternals/glbinding
package-url: https://github.com/build2-packaging/glbinding
email: opensource@cginternals.com
package-email: packaging@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: glbinding == 3.3.0
depends: glfw ^3.3.8
depends: gtest ^1.11.0
depends: gmock ^1.11.0
builds: default
builds: -bindist; glbinding does not support bindist configs.
builds: -freebsd; GLFW does not support FreeBSD.
builds: -( +macos &gcc ); GLFW does not support GCC on MacOS.
build-exclude: **-emcc*; GLFW does not support Emscripten.
default-build-config: config.glbinding_tests.opengl_context_testing=false
opengl-context-builds: default : &( +linux -bindist ); So far only these\
 target configurations support GUI mocking.
opengl-context-build-config: config.glbinding_tests.opengl_context_testing=tr\
ue
bootstrap-build:
\
project = glbinding-tests

using version
using config
using test
using dist

# Do not install the tests.
#
# using install

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = h
ixx{*}: extension = inl
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
# hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

exe{*}: test = true

# This config variable decides whether to link regression tests
# that require a valid OpenGL context to succeed.
# It should be disabled for target configurations
# in CI runs that do not support GUI mocking.
#
config [bool] config.glbinding_tests.opengl_context_testing ?= true

\
location: glbinding/glbinding-tests-3.3.0+1.tar.gz
sha256sum: 6d3c8e508c32dc8fd56e2194c0a0f26746b43be982f650f1848d09f6a1eeff76
:
name: glbinding-tools
version: 3.3.0+1
type: exe
language: c++
project: glbinding
summary: OpenGL loader utilities and tools based on glbinding
license: MIT
description:
\
[//]: # (Comment)

<br><a href="https://glbinding.org"><img src="https://raw.githubusercontent.c\
om/cginternals/glbinding/master/glbinding-logo.svg?sanitize=true"\
 width="50%"></a>

*glbinding* is a cross-platform C++ binding for the [OpenGL\
 API](http://www.opengl.org).

![GitHub release](https://img.shields.io/github/release/cginternals/glbinding\
.svg)
![C++ CI](https://github.com/cginternals/glbinding/actions/workflows/ci.yml/b\
adge.svg)
[![Travis](https://img.shields.io/travis/cginternals/glbinding/master.svg?sty\
le=flat&logo=travis)](https://travis-ci.org/cginternals/glbinding)
[![Appveyor](https://img.shields.io/appveyor/build/scheibel/glbinding/master.\
svg?style=flat&logo=appveyor)](https://ci.appveyor.com/project/scheibel/glbin\
ding)
[![Tokei](https://tokei.rs/b1/github/cginternals/glbinding)](https://github.c\
om/Aaronepower/tokei)

[![Documentation](https://img.shields.io/badge/documentation-online-blue.svg?\
style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL\
3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMC41IDEzLjciPjxwYXRoIGQ9Ik0xMS\
41IDYuOGwtMy43IDYuNEwuNS41aDE0LjdsLTEuMyAyLjFINC4yTDcuOCA5bDIuNS00LjN6bTcuMyA\
0LjNsMS4yIDIuMWgtOS43TDE3LjYuNWwxLjIgMi4xLTQuOSA4LjV6IiBmaWxsPSIjZmZmIi8%2BPC\
9zdmc%2B)](https://glbinding.org/docs.html)
[![Examples](https://img.shields.io/badge/examples-wiki-blue.svg?style=flat&l\
ogo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vc\
mcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMC41IDEzLjciPjxwYXRoIGQ9Ik0xMS41IDYuOGwtMy\
43IDYuNEwuNS41aDE0LjdsLTEuMyAyLjFINC4yTDcuOCA5bDIuNS00LjN6bTcuMyA0LjNsMS4yIDI\
uMWgtOS43TDE3LjYuNWwxLjIgMi4xLTQuOSA4LjV6IiBmaWxsPSIjZmZmIi8%2BPC9zdmc%2B)](h\
ttps://github.com/cginternals/glbinding/wiki/Examples)
[![Tools](https://img.shields.io/badge/tools-wiki-blue.svg?style=flat&logo=da\
ta%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjA\
wMC9zdmciIHZpZXdCb3g9IjAgMCAyMC41IDEzLjciPjxwYXRoIGQ9Ik0xMS41IDYuOGwtMy43IDYu\
NEwuNS41aDE0LjdsLTEuMyAyLjFINC4yTDcuOCA5bDIuNS00LjN6bTcuMyA0LjNsMS4yIDIuMWgtO\
S43TDE3LjYuNWwxLjIgMi4xLTQuOSA4LjV6IiBmaWxsPSIjZmZmIi8%2BPC9zdmc%2B)](https:/\
/github.com/cginternals/glbinding/wiki/Tools)

[//]: # (HEADER_END)

*glbinding* leverages C++11 features like enum classes, lambdas, and variadic\
 templates, instead of relying on macros;
all OpenGL symbols are real functions and variables.
It provides type-safe parameters, per-feature API headers, lazy function\
 resolution, multi-context and multi-thread support, global and local\
 function callbacks, meta information about the generated OpenGL binding and\
 the OpenGL runtime, as well as tools and examples for quick-starting your\
 projects.
Based on the OpenGL API specification ([gl.xml](https://github.com/KhronosGro\
up/OpenGL-Registry/blob/main/xml/gl.xml)) *glbinding* is generated using\
 [python scripts and templates](https://github.com/cginternals/khrbinding-gen\
erator) that can be easily adapted to fit custom needs.

![what-is-glbinding](https://raw.githubusercontent.com/cginternals/glbinding/\
master/docs/what-is-glbinding-v2.png)

Code that is written using a typical C binding for OpenGL, e.g.,\
 [GLEW](http://glew.sourceforge.net/), is fully compatible for the use with\
 *glbinding* and causes no significant impact on runtime performance (see\
 [compare example](https://github.com/cginternals/glbinding/wiki/examples#com\
pare)): just replace all includes to the former binding, replace the\
 initialization code and *use* the appropriate API namespace, e.g., ```gl```\
 for full availability of the OpenGL API.

```cpp
#include <glbinding/gl/gl.h>
using namespace gl;

// ...
auto shader = glCreateShader(GL_COMPUTE_SHADER);
// ...
```

# Resources

* [Tools](https://github.com/cginternals/glbinding/wiki/tools)
* [Examples](https://github.com/cginternals/glbinding/wiki/examples)
* [Context Creation Cheat Sheet](https://github.com/cginternals/glbinding/wik\
i/Context-Creation-Cheat-Sheet)

### Installation and Development

* [Install Instructions](#install-instructions)
* [Build from Source](#build-instructions)
* [Updating the Generated Source Code](#update-generated-source-code)
* [Tips for Linking](#tips-for-linking)
* [Dependency on KHR Headers](#dependency-on-khr-headers)
* [Basic Example](#basic-example)

### Feature Documentation and Code Snippets

* [Type-safe Parameters](#type-safe-parameters)
* [Compilation-Centered Header Design](#compilation-centered-header-design)
* [Feature-Centered Header Design](#feature-centered-header-design)
* [Lazy Function Resolution](#lazy-function-pointer-resolution)
* [Multi-context Support](#multi-context-support)
* [Multi-thread Support](#multi-threading-support)
* [Global and Local Function Callbacks](#function-callbacks)
* [Alternative Signatures for GLboolean and GLenum types](#alternative-signat\
ures)
* [Meta Information System](#meta-information)
* [Doxygen Documentations](https://glbinding.org/docs.html)\
 ([stable](https://glbinding.org/docs/v3.1/), [master](https://glbinding.org/\
docs/master))

# Install Instructions

*glbinding* is available for different platforms using different distribution\
 channels.
You can either download the source and manually [compile](#build-instructions\
) it or use one of the [pre-compiled releases](https://github.com/cginternals\
/glbinding/releases) of this repository.
For systems providing package managers, we generally strive for packages in\
 these package managers.
An overview on availability of glbinding can be found on [repology.org](https\
://repology.org/project/glbinding/versions).

## Windows

The various *glbinding* packages can be installed either by downloading an\
 installer, e.g., the [x64 installer for glbinding v3.1.0](https://github.com\
/cginternals/glbinding/releases/download/v3.1.0/glbinding-3.1.0-msvc2017-x64-\
installer.exe) for Microsoft Visual Studio 2015, or downloading and\
 extracting one of the precompiled archives, e.g. [runtime](https://github.co\
m/cginternals/glbinding/releases/download/v3.1.0/glbinding-3.1.0-msvc2017-x64\
-runtime.zip),
[examples](https://github.com/cginternals/glbinding/releases/download/v3.1.0/\
glbinding-3.1.0-msvc2017-x64-examples.zip),
[dev](https://github.com/cginternals/glbinding/releases/download/v3.1.0/glbin\
ding-3.1.0-msvc2017-x64-dev.zip), and
[tools](https://github.com/cginternals/glbinding/releases/download/v3.1.0/glb\
inding-3.1.0-msvc2017-x64-tools.zip).
Since lately, glbinding is also available on [vcpkg](https://github.com/Micro\
soft/vcpkg/tree/master/ports/glbinding) with more recent releases:
```bash
> vcpkg install glbinding
```
Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## Ubuntu

*glbinding* is provided on Ubuntu using PPAs and in [Ubuntu\
 universe](https://packages.ubuntu.com/source/artful/glbinding) since Artful\
 Aardvark. We maintain our own [PPA](https://launchpad.net/~cginternals/+arch\
ive/ubuntu/ppa) for most recent releases.
Using the current PPA as example, the following lines install *glbinding*\
 including the GLFW examples:

```shell
> sudo apt-add-repository ppa:cginternals/ppa
> sudo apt-get update
> sudo apt-get install libglbinding-examples-glfw
> # start example
> /usr/share/glbinding/cubescape
```

To use *glbinding* as dependency, install the development package:

```shell
> sudo apt-get install libglbinding-dev libglbinding-dbg
```

Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## Arch Linux

On Arch, *glbinding* is provided by the [glbinding](https://www.archlinux.org\
/packages/community/x86_64/glbinding/) package in the community repository.\
 To install *glbinding* execute the following line:

```shell
> sudo pacman -S glbinding
```

Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## macOS

The package manager on macOS we depend on is homebrew. The package there is\
 called [glbinding](http://formulae.brew.sh/formula/glbinding).
To install *glbinding* using homebrew, execute the following line:

```bash
> brew install glbinding
```

Alternatively, download the source code and commence [building from\
 source](#build-instructions).

## Debian-based Systems

*glbinding* is available for Debian 9 (Stretch), 10 (Buster), 11 (Bullseye)\
 and Sid. Install it using `apt install libglbinding-dev`.
For advanced use, download the source code and commence [building from\
 source](#build-instructions).


## Cross-Platform Package Managers

As one of the cross-platform package managers, *conan* provides glbinding in\
 its [center index](https://conan.io/center/glbinding). You can use the\
 following line to install glbinding using conan:

```bash
> conan install glbinding/3.1.0@
```


# Build Instructions

### Prerequisites and Dependencies

The only mandatory run-time dependencies of *glbinding* are the STL of the\
 used compiler and an OpenGL driver library, dynamically linked with your\
 application.
Building *glbinding* from source has several mandatory and optional\
 dependencies:

* [CMake](https://cmake.org/) 3.0 or higher for building *glbinding* from\
 source (mandatory for any build from source)
* [git](https://git-scm.com/) for version control and script supporting tasks
* [GLFW](http://www.glfw.org/) 3.2 or higher for examples and tools
* [GLEW](http://glew.sourceforge.net/) 1.6 or higher for the comparison\
 example (optional)
* [cpplocate](https://github.com/cginternals/cpplocate) for the examples\
 (optional)
* [Qt5](http://www.qt.io/developers/) 5.0 or higher for the qt-based example\
 (optional)
* [googletest](https://github.com/google/googletest) for tests (optional)
* [Doxygen](http://www.stack.nl/~dimitri/doxygen/) 1.8 or higher for\
 generating the documentation on your system
  * [graphviz](http://www.graphviz.org/) for generating diagrams (optional)

### Compile Instructions

For compilation, a C++11 compliant compiler, e.g., GCC 4.8, Clang 3.3, MSVC\
 2013 **Update 3**, is required.
First, download the source code [as archive](https://github.com/cginternals/g\
lbinding/releases) or via git:

```bash
> git clone https://github.com/cginternals/glbinding.git
> cd glbinding
```

Then, depending on the version of *glbinding* you want to build, choose the\
 appropriate tag or branch, e.g., for the 2.1.4 release:

```bash
> git fetch --tags
> git checkout v2.1.4
```

The actual compilation can be done using CMake and your favorite compiler and\
 IDE.

For building *glbinding* CMake via command line can be used (should work on\
 all systems):

First, create a build directory (we do not recommend in-source builds):

```bash
> mkdir build
> cd build
```

Configure *glbinding* with your preferred or default generator, e.g., for\
 Visual Studio 2017 in x64 use
(note: some IDEs have integrated support for CMake projects, e.g., Qt\
 Creator, and allow you to skip the manual project configuration):

```bash
> cmake .. -G "Visual Studio 17 2022" -A x64
```

In order to compile the project, either use you favorite Editor/IDE with the\
 created project or use CMake as follows:

```bash
> cmake --build .
```

For multi-configuration projects specific configuration (e.g., on Windows\
 using MSVC) can be built using:

```bash
> cmake --build . --config Release
> cmake --build . --config Debug
```

### Update Generated Source Code

The generation scripts for *glbinding* are maintained within the\
 [khrbinding-generator](https://github.com/cginternals/khrbinding-generator)\
 project.
Assuming a directory structure with both projects such as `<projects>/glbindi\
ng` and `<projects>/khrbinding-generator`, updating the source code is\
 started as follows:

```bash
> python3 update.py -p "profiles/gl.json"
> python3 generate.py -p "profiles/gl.json" -d "../glbinding/source"
```

# Tips for Linking

We suggest using the build system [CMake](https://cmake.org/) for a smooth\
 integration.
For it, *glbinding* provides a configuration script that should be installed\
 into your system or at least accessible by CMake.
In your projects' `CMakeLists.txt`, add one of the following lines:

```cmake
find_package(glbinding QUIET) # if you want to check for existence
find_package(glbinding REQUIRED) # if it is really required in your project
```

Finally, just link *glbinding* to your own library or executable:

```cmake
target_link_libraries(${target} ... PUBLIC
    glbinding::glbinding
    glbinding::glbinding-aux # for additional, auxiliary features as logging,\
 meta information, or debugging functionality
)
```

# Dependency on KHR Headers

As of mid 2019, the OpenGL API depends on the platform headers from the\
 Khronos group, even on desktop systems.
This introduced a direct dependency of *glbinding* to the `KHR/khrplatform.h`\
 header file. For most Linux systems, these headers are easily available\
 (e.g., by installing `libegl1-mesa-dev` on Ubuntu), whereas on other\
 systems, pre-existing packages are scarce. Even in the case of Ubuntu, one\
 can argue that installing the EGL dependency is strange, as glbinding does\
 not depend on EGL in any way.

For those cases, glbinding comes with a copy of the headers for internal use.

This solution has one significant downside: As those headers are used by the\
 types of the OpenGL API and the types are used within the public interface\
 of glbinding, the `khrplatform.h` headers needs to be present when building\
 downstream projects, i.e., they need to be installed along glbinding. In\
 order to not conflict with packages providing the official headers, this\
 internal header has to be installed on a separate location. This complicates\
 the project setup and results in the following usage scenarios for you to\
 choose from:

### KHR/khrplatform.h Usage

For this usage scenario, glbinding needs to get built with the CMake option\
 `OPTION_BUILD_OWN_KHR_HEADERS` set to `Off` and system-wide availability of\
 the `KHR/khrplatform.h` headers, e.g., by having `libegl1-mesa-dev`\
 installed. If either the option is `On` or the system-wide headers are not\
 found, the internally provided headers are used instead.

This decision is stored as property of the glbinding CMake target and will be\
 used for downstream projects as well.
The use and propagation of this decision is transparent to the user as well,\
 i.e., the user should not need to handle this downstream. The only thing to\
 consider is to have the system-wide `KHR/khrplatform.h` headers available\
 when building the downstream project.

### glbinding-internal khrplatform.h Usage

For this usage scenario, glbinding should get built with the CMake option\
 `OPTION_BUILD_OWN_KHR_HEADERS` set to `On`. Alternatively, this scenario is\
 the fallback if the official `KHR/khrplatform.h` headers are not found.

This decision is stored as property of the glbinding CMake target and will be\
 used for downstream projects as well.
The use and propagation of this decision is transparent to the user as well,\
 i.e., the user should not need to handle this downstream.

# Basic Example

The following examples are tailored for use with *glbinding* 3.0 and above.

*glbinding* has to be initialized once on the active OpenGL context you want\
 to use *glbinding* with. For initialization, a callback for function pointer\
 resolution must be passed, which your context creation API should provide.
In the most basic case, you call ```glbinding::initialize``` once:

```cpp
#include <glbinding/gl/gl.h>
#include <glbinding/glbinding.h>

using namespace gl;

int main()
{
  // create context, e.g. using GLFW, Qt, SDL, GLUT, ...

  // Assume context creation using GLFW
  glbinding::initialize(glfwGetProcAddress);

  glBegin(GL_TRIANGLES);
  // ...
  glEnd();
}
```


# Features

The following examples are tailored for use with *glbinding* 3.0 and above.

### Type-Safe Parameters

The original OpenGL API provides several concepts in their interface, namely\
 functions, booleans, bitfields, enums, as well as special values and basic\
 types but mostly does not differentiate between these types.
Hence, actual knowledge about each function and its parameters is required;\
 there is no way for a basic code assistance.
As *glbinding* differentiates between all these types, IDEs and compilers can\
 detect wrong usages of the OpenGL API.

One example is the passing of a named constant in places where a bit\
 combination is expected:

```cpp
glClear(GL_COLOR_BUFFER_BIT); // valid
glClear(GL_FRAMEBUFFER);      // compilation error: bitfield of group\
 ClearBufferMask expected, got GLenum
```

In the case of bitfields, the OpenGL API offers groups and each parameter\
 states the group valid values must come from.
*glbinding* uses this information to prevent invalid bit combinations:

```cpp
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // valid
glClear(GL_COLOR_BUFFER_BIT | GL_MAP_READ_BIT);     // compile error: both\
 bitfields share no group

glClear(GL_STENCIL_BUFFER_BIT | GL_LIGHTING_BIT);   // compile error: bitwise\
 or operation is valid,
                                                    // the shared group is\
 AttribMask, but the
                                                    // resulting group does\
 not match the expected.
```

Unfortunately, such groups are incomplete and unmaintained for enums (named\
 values).
Thus, *glbinding* could not provide any assistance for cases such as:

```cpp
GLuint vertexShader = glCreateShader(GL_VERTEX_SHADER); // All good
GLuint colorShader = glCreateShader(GL_COLOR);          // No compilation\
 error but a runtime error!
```

### Compilation-Centered Header Design

C++ strictly separates interface from implementation.
For improving the compilation time of a program or system written in C++\
 forward declarations of types are commonly used and includes of unnecessary\
 symbols are omitted.

For an interface of a library, class, or module providing OpenGL related\
 functionality, it is likely that only the type information of OpenGL is\
 needed, not actual functions or constants usually required for\
 implementation.
In addition to the customary all-in-one header ```gl.h``` *glbinding* also\
 provides specialized headers:

```cpp
#include <glbinding/gl/gl.h>        // all of the headers below, meaning the\
 complete OpenGL API

#include <glbinding/gl/bitfield.h>  // bitfield constants (e.g.,\
 GL_COLOR_BUFFER_BIT)
#include <glbinding/gl/boolean.h>   // boolean constants (GL_TRUE and\
 GL_FALSE)
#include <glbinding/gl/enum.h>      // symbol constants (e.g.,\
 GL_VERTEX_SHADER)
#include <glbinding/gl/functions.h> // functions
#include <glbinding/gl/types.h>     // type declarations of the OpenGL API\
 (including bitfields, boolean, enum, and extensions)
#include <glbinding/gl/values.h>    // special values (e.g., GL_INVALID_INDEX)
```

There is one additional header that provides all extensions and provide them\
 as an enumeration in terms of C++ enums.

```cpp
#include <glbinding/gl/extension.h>
```

### Feature-Centered Header Design

The OpenGL API is iteratively developed and released in versions, internally\
 (for the API specification) named *features*.
The latest feature/version of OpenGL is 4.6.
The previous version are 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 2.0, 2.1, 3.0, 3.1,\
 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4., and 4.5.
OpenGL uses a deprecation model for removing outdated parts of its API which\
 results in compatibility (with deprecated API) and core (without deprecated\
 API) usage that is manifested in the targeted OpenGL context.
On top of that, new API concepts are suggested as extensions (often vendor\
 specific) that might be integrated into future versions.
All this results in many possible specific manifestations of the OpenGL API\
 you can use in your program.

One tough task is to adhere to one agreed set of functions in your own OpenGL\
 program (e.g., OpenGL 3.2 Core if you want to develop for every Windows,\
 macOS, and Linux released in the last 4 years).
*glbinding* facilitates this by providing per-feature headers by means of\
 well-defined/generated subsets of the OpenGL API.

#### All-Features OpenGL Headers

If you do not use per-feature headers the OpenGL program can look like this:

```cpp
#include <glbinding/gl/gl.h>

// draw code
gl::glClear(gl::GL_COLOR_BUFFER_BIT | gl::GL_DEPTH_BUFFER_BIT);
gl::glUniform1i(u_numcubes, m_numcubes);
gl::glDrawElementsInstanced(gl::GL_TRIANGLES, 18, gl::GL_UNSIGNED_BYTE, 0,\
 m_numcubes * m_numcubes);
```

#### Single-Feature OpenGL Headers

When developing your code on Windows with latest drivers installed, the code\
 above is likely to compile and run.
But if you want to port it to systems with less mature driver support (e.g.,\
 macOS or Linux using open source drivers), you may wonder if\
 ```glDrawElementsInstanced``` is available.
In this case, just switch to per-feature headers of *glbinding* and choose\
 the OpenGL 3.2 Core headers (as you know that at least this version is\
 available on all target platforms):

```cpp
#include <glbinding/gl32core/gl.h>

// draw code
gl32core::glClear(gl32core::GL_COLOR_BUFFER_BIT | gl32core::GL_DEPTH_BUFFER_B\
IT);
gl32core::glUniform1i(u_numcubes, m_numcubes);
gl32core::glDrawElementsInstanced(gl32core::GL_TRIANGLES, 18,\
 gl32core::GL_UNSIGNED_BYTE, 0, m_numcubes * m_numcubes);
```

If the code compiles you can be sure it is OpenGL 3.2 Core compliant.
Using functions that are not yet available or relying on deprecated\
 functionality is prevented.

### Lazy Function Pointer Resolution

By default, *glbinding* tries to resolve all OpenGL function pointers during\
 initialization, which can consume some time:

```cpp
// Assume context creation using GLFW
glbinding::initialize(glfwGetProcAddress); // immediate function pointer\
 resolution
```

Alternatively, the user can decide that functions pointers are resolved only\
 when used for the first time. This is achieved by:

```cpp
// Assume context creation using GLFW
glbinding::initialize(glfwGetProcAddress, false); // lazy function pointer\
 resolution
```

### Multi-Context Support

*glbinding* has built-in support for multiple contexts. The only requirement\
 is, that the currently active context has to be specified. This feature\
 mixes well with multi-threaded applications, but keep in mind that\
 concurrent use of one context often results in non-meaningful communication\
 with the OpenGL driver.

In order to use multiple contexts, use your favorite context creation library\
 (e.g., glut, SDL, egl, glfw, Qt) to request the required contexts.
The functions to make a context current should be provided by these libraries\
 and is not part of *glbinding* (except that you can get the current context\
 handle).
When using multiple contexts, *glbinding* has to be initialized for each\
 context (when current).

Since each context can correspond to a different feature set of OpenGL and\
 the drivers are free to assign their function pointers, *glbinding* cannot\
 assume any equalities of requested function pointers.
Thus, contexts switches have to be communicated to *glbinding* explicitly in\
 order to have correctly dispatched function pointers:

```cpp
// use the current active context
glbinding::useCurrentContext();

// use another context, identified by platform-specific handle
glbinding::useContext(ContextHandle context);
```

### Multi-Threading Support

Concurrent use of *glbinding* is mainly intended for usage over multiple\
 contexts in different threads (multiple threads operating on a single OpenGL\
 context requires locking, which *glbinding* will not provide).
For it, *glbinding* supports multiple active contexts, one per thread.
This necessitates that *glbinding* gets informed in each thread which context\
 is currently active (see [multi-context example](https://github.com/cgintern\
als/glbinding/tree/master/source/examples/multi-context)).

Note: multi-threaded communication with OpenGL will most likely result in a\
 meaningless sequence of OpenGL calls.
To avoid this, semantic groups of OpenGL calls should be treated as critical\
 sections.

Example for usage of multiple contexts:
```cpp
// Context 1 creation
// GLFWwindow * window1 = glfwCreateWindow(640, 480, "", nullptr, nullptr);
// glfwMakeContextCurrent(window1);
glbinding::initialize(0, glfwGetProcAddress); // 0 here is the context\
 identifier
// Context 1 initialization
glClearColor(1.0f, 0.0f, 0.0f, 0.0f);

// Context 2 creation
// GLFWwindow * window2 = glfwCreateWindow(640, 480, "", nullptr, nullptr);
// glfwMakeContextCurrent(window2);
glbinding::initialize(1, glfwGetProcAddress); // 1 here is the context\
 identifier
// Context 1 initialization
glClearColor(0.0f, 1.0f, 0.0f, 0.0f);

// Rendering
while (doNotClose()) {
  // Make context 1 active
  // glfwMakeContextCurrent(window1);
  glbinding::useContext(0);

  // Context 1 rendering
  glViewport(0, 0, width, height);
  glClear(GL_COLOR_BUFFER_BIT);

  // Swap buffer for context 1
  // glfwSwapBuffers(window1);

  // Make context 2 active
  // glfwMakeContextCurrent(window2);
  glbinding::useContext(1);

  // Context 2 rendering
  glViewport(0, 0, width, height);
  glClear(GL_COLOR_BUFFER_BIT);

  // Swap buffer for context 2
  // glfwSwapBuffers(window2);
}
```

### Multiple OpenGL Contexts in Multiple Threads

The combination of multiple OpenGL contexts and multiple threads for OpenGL\
 usage is supported by *glbinding* in general.
You must tell *glbinding* which OpenGL context is used in which thread by\
 calling the initialize method once the context is used first\
 (```glbinding::initialize```) and if you want to switch the current context\
 for one thread, you have to update the current context, too\
 (```glbinding::useContext```).
However, we discourage the use of one context in multiple threads.

### Function Callbacks

To support orthogonal features of the OpenGL API, *glbinding* allows\
 attaching a number of callbacks to several concepts of the OpenGL API (e.g.\
 a function).
Such orthogonal features include runtime error checking (i.e.,\
 ```glGetError``` after each function call), logging, and caching of driver\
 information.

*glbinding* supports different types of callbacks that can be registered.
The main types are

 * global and local (per-function) before callbacks, that are called before\
 the OpenGL function call,
 * global and local (per-function) after callbacks, that are called after the\
 OpenGL function call,
 * unresolved callbacks, that are called each time an unresolved OpenGL\
 function should be called (instead of a segmentation fault),
 * context switch callbacks, that are called if the internal current OpenGL\
 context of *glbinding* is changed.

The before callbacks are useful , e.g., for tracing or application-specific\
 parameter checking.
The available information in this callback is the wrapped OpenGL function\
 (including its name and bound function address) and all parameters.
The after callbacks are useful, e.g., for tracing, logging, or the obligatory\
 error check (```glGetError```).
Available information is extended by the return value.
The unresolved callback provides information about the (unresolved) wrapped\
 OpenGL function object.

Example for error checking:

```cpp
setCallbackMaskExcept(CallbackMask::After, { "glGetError" });
setAfterCallback([](const FunctionCall &)
{
  const auto error = glGetError();
  if (error != GL_NO_ERROR)
    std::cout << "error: " << std::hex << error << std::endl;
});

// OpenGL Code ...
```

As a shortcut, *glbinding* 3.0 introduced a debugging interface for\
 error-checking after callbacks within the *glbinding-aux* library:

```cpp
#include <glbinding-aux/debug.h>

glbinding::aux::enableGetErrorCallback();

// OpenGL Code ...
```

Example for logging:

```cpp
setCallbackMask(CallbackMask::After | CallbackMask::ParametersAndReturnValue);
setAfterCallback([](const FunctionCall & call)
{
  std::cout << call.function->name() << "(";
  for (unsigned i = 0; i < call.parameters.size(); ++i)
  {
    std::cout << call.parameters[i].get();
    if (i < call.parameters.size() - 1)
      std::cout << ", ";
  }
  std::cout << ")";

  if (call.returnValue)
    std::cout << " -> " << call.returnValue.get();

  std::cout << std::endl;
});

// OpenGL Code ...
```

### Alternative Signatures

The OpenGL API is designed without function overloading using only simple\
 parameter types.
This results in explicit parameter encoding in function names for\
 conceptually overloaded functions (e.g., glTexParameteri and\
 glTexParameterf).
Another design decision for the OpenGL API is the high similarity of the\
 integer, boolean, enum, and bitfield data types.
This means, that for *overloaded* functions, there is no separate function\
 for ```GLboolean```, ```GLenum```, and ```GLbitfield``` types.
Using type-save functions of *glbinding*, some typically compiling code\
 constructs are now deliberately broken.
For most of those cases, we provide alternative *overloaded* function\
 signatures.
Additionally, we also fix signatures that are semantically broken in the\
 OpenGL API specification, i.e., when base types (C types) are similar such\
 as in the case of enums and integers.

Alternative function signatures are enabled by default, so the following\
 example works out-of-the-box:

```cpp
#include <glbinding/gl/gl.h>

using namespace gl;

// ...
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, 64, 64, 0, GL_RED, GL_UNSIGNED_BYTE,\
 terrain.data());
```

### Meta Information

Besides an actual OpenGL binding, *glbinding* also supports queries for both\
 compile time and runtime information about the gl.xml and your OpenGL driver\
 within the *glbinding-aux* library. This library comes with own includes and\
 needs to be linked separately.
Typical use cases are querying the available OpenGL extensions or the\
 associated extensions to an OpenGL feature and their functions and enums.

The following example prints out a list of all available OpenGL\
 versions/features:

```cpp
#include <iostream>

#include <glbinding/Version.h>

#include <glbinding-aux/Meta.h>
#include <glbinding-aux/types_to_string.h>

// ...
using namespace glbinding;

for (const Version & v : aux::Meta::versions())
  std::cout << v << std::endl;
```

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for glbinding

[glbinding](https://glbinding.org/) is a cross-platform C++ binding for the\
 OpenGL API, generated using the gl.xml specification.

[![Official](https://img.shields.io/website/https/github.com/cginternals/glbi\
nding.svg?down_message=offline&label=Official&style=for-the-badge&up_color=bl\
ue&up_message=online)](https://github.com/cginternals/glbinding)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/g\
lbinding.svg?down_message=offline&label=build2&style=for-the-badge&up_color=b\
lue&up_message=online)](https://github.com/build2-packaging/glbinding)
[![cppget.org](https://img.shields.io/website/https/cppget.org/glbinding.svg?\
down_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_me\
ssage=online)](https://cppget.org/glbinding)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/gl\
binding.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=f\
or-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/gl\
binding)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch this package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/glbinding.git

Add the dependency in your project's `manifest` file to make the package\
 available for import.

    depends: glbinding ^3.3.0

Both libraries, `glbinding` and `glbinding-aux`, are provided in the same\
 package `glbinding`.
To import and add them to the variable `libs` in a `buildfile`, one would do\
 the following.

    import libs += glbinding%lib{glbinding}
    import libs += glbinding%lib{glbinding-aux}

Additionally, this repository also contains the `glbinding-tests`,\
 `glbinding-examples`, and `glbinding-tools` packages that contain\
 executables for learning and testing.
These had to be provided as standalone packages to allow for custom\
 configurations during CI runs.
Additionally, `glbinding-tools` is also installable.

## Configuration

### Boost.Thread

    config [bool] config.glbinding.use_boost_thread ?= false

For its implementation `glbinding` allows to optionally use Boost's thread\
 library.
Set the configuration variable to `true` to use `boost::thread` instead of\
 `std::thread` from the C++ STL.

### KHR Headers

    config [bool] config.glbinding.use_packaged_khr ?= true

`glbinding` needs some standard definitions from the `KHR/khrplatform.h`\
 header file.
To be self-contained, it comes with its own version of that header file.
Set the configuration variable to `false` if `glbinding` should use the KHR\
 headers given by the system.

### OpenGL Context Testing for Tests and Tools

    config [bool] config.glbinding_tests.opengl_context_testing ?= true
    config [bool] config.glbinding_tools.opengl_context_testing ?= true

These config variable decide whether to link regression tests or run\
 executables that require a valid OpenGL context to succeed.
As tests and tools will likely to be used on targets where OpenGL drawing is\
 required, these variables are enabled by default.
However, they should be disabled for target configurations in CI runs that do\
 not support GUI mocking.

## Issues
- Compilation might abort due to insufficient memory as it may use up all\
 available RAM. For this case, re-run the compilation process multiple times\
 until no errors occur or use less threads for build2 `b -j 1 ...`.
- The examples fail on a few MinGW-based Windows configurations due to\
 strange undefined references.
- Warnings are generated on Windows that show that redeclarations without\
 dllimport attribute occur. It does not seem to be an actual problem but\
 should be dealt with in the future.

## Contributing
Thanks in advance for your help and contribution to keep this package\
 up-to-date.
For now, please, file an issue on [GitHub](https://github.com/build2-packagin\
g/glbinding/issues) for everything that is not described below.

### Recommend Updating Version
Please, file an issue on [GitHub](https://github.com/build2-packaging/glbindi\
ng/issues) with the new recommended version.

### Update Version by Pull Request
1. Fork the repository on [GitHub](https://github.com/build2-packaging/glbind\
ing) and clone it to your local machine.
2. Run `git submodule init` and `git submodule update` to get the current\
 upstream directory.
3. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
4. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
5. Test if the packages compile and execute examples and tools.
6. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
7. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
8. Run `bdep ci` and test for errors for the package `glbinding` only.
9. If everything works fine, make a pull request on GitHub and write down the\
 `bdep ci` link to your CI tests.
10. After a successful pull request, we will run the appropriate commands to\
 publish a new package version.

### Update Version Directly if You Have Permissions
1. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
2. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
3. Test if the packages compile and execute examples and tools.
4. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
5. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
6. Run `bdep ci` and test for errors and warnings.
7. When successful, run `bdep release --tag --push` to push new tag version\
 to repository.
8. Run `bdep publish` to publish the package to [cppget.org](https://cppget.o\
rg).

\
package-description-type: text/markdown;variant=GFM
url: https://glbinding.org/
doc-url: https://glbinding.org/docs.html
src-url: https://github.com/cginternals/glbinding
package-url: https://github.com/build2-packaging/glbinding
email: opensource@cginternals.com
package-email: packaging@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: glbinding == 3.3.0
depends: glfw ^3.3.8
builds: default
builds: -bindist; glbinding does not support bindist configs.
builds: -freebsd; GLFW does not support FreeBSD
builds: -( +macos &gcc ); GLFW does not support GCC on MacOS
build-exclude: **-emcc*; GLFW does not support Emscripten
default-build-config: config.glbinding_tools.opengl_context_testing=false
opengl-context-builds: default : &( +linux -bindist ); So far only these\
 target configurations support GUI mocking.
opengl-context-build-config: config.glbinding_tools.opengl_context_testing=tr\
ue
bootstrap-build:
\
project = glbinding-tools

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.std = latest

using cxx
using in

hxx{*}: extension = h
ixx{*}: extension = inl
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
# hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# This config variable decides whether to run and test
# executables that require a valid OpenGL context to succeed.
# It should be disabled for target configurations
# in CI runs that do not support GUI mocking.
#
config [bool] config.glbinding_tools.opengl_context_testing ?= true

# The tool executables will try to create a valid
# OpenGL context and fail if this might not be possible.
#
exe{*}: test = $config.glbinding_tools.opengl_context_testing

# Default Library Dependencies
#
import libs = glbinding%lib{glbinding}
import libs += glbinding%lib{glbinding-aux}
import libs += glfw%lib{glfw}
cxx.poptions += -DGLFW_INCLUDE_NONE

\
location: glbinding/glbinding-tools-3.3.0+1.tar.gz
sha256sum: f68bf67299cc5fe186ae75d9ce7e4d984fc4a919354ea5dacd35d7cb771c9dcb
:
name: glfw
version: 3.4.0+5
type: lib
language: c
summary: Multi-platform library for OpenGL, OpenGL ES and Vulkan development\
 on the desktop
license: Zlib
package-description:
\
# GLFW - A C library

This is a `build2` package for the [`GLFW`](https://github.com/glfw/glfw) C\
 library. It provides a simple API for creating windows, contexts and\
 surfaces, receiving input and events.


## Usage

To start using `GLFW` in your project, add the following [`depends`](https://\
build2.org/bpkg/doc/build2-package-manager-manual.xhtml#manifest-package-depe\
nds) value to your [`manifest`](https://build2.org/bpkg/doc/build2-package-ma\
nager-manual.xhtml#manifests), adjusting the version constraint as\
 appropriate:

```
depends: GLFW ^3.4.0
```

Then import the library in your `buildfile`:

```
import libs += glfw%lib{glfw}
```


## Importable targets

This package provides the following importable targets:

```
lib{glfw}
```

### Importable targets description

* `glfw` - Multi-platform library for OpenGL, OpenGL ES and Vulkan\
 development on the desktop.


## Configuration variables

This package provides the following configuration variables:

```
[bool] config.glfw.build_x11 ?= false
[bool] config.glfw.build_wayland ?= false
[bool] config.glfw.use_hybrid_hpg ?= false
[bool] config.glfw.use_msvc_runtime_library_dll ?= false
```

### Configuration variables description

* `build_x11` - Build support for X11.
* `build_wayland` - Build support for Wayland.
* `use_hybrid_hpg` - Force use of high-performance GPU on hybrid systems.
* `use_msvc_runtime_library_dll` - Use MSVC runtime library DLL

\
package-description-type: text/markdown;variant=GFM
url: https://www.glfw.org
doc-url: https://www.glfw.org/docs/latest/
src-url: https://github.com/glfw/glfw
package-url: https://github.com/build2-packaging/glfw
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
tests: glfw-tests
examples: glfw-examples
builds: -freebsd
builds: -linux
builds: -macos
builds: -bindist
debian-wayland-builds: sys
debian-wayland-builds: -static
debian-wayland-builds: -bindist
debian-wayland-build-include: linux_debian_12-**
debian-wayland-build-exclude: **
debian-wayland-build-config:
\
config.glfw.build_x11=true
config.glfw.build_wayland=true
\
debian-x11-builds: sys
debian-x11-builds: -static
debian-x11-builds: -bindist
debian-x11-build-include: linux_debian*-**
debian-x11-build-exclude: **
debian-x11-build-config: config.glfw.build_x11=true
fedora-wayland-builds: sys
fedora-wayland-builds: -static
fedora-wayland-builds: -bindist
fedora-wayland-build-include: linux_fedora*-**
fedora-wayland-build-exclude: **
fedora-wayland-build-config:
\
config.glfw.build_x11=true
config.glfw.build_wayland=true
\
fedora-x11-builds: sys
fedora-x11-builds: -static
fedora-x11-builds: -bindist
fedora-x11-build-include: linux_fedora*-**
fedora-x11-build-exclude: **
fedora-x11-build-config:
\
config.glfw.build_x11=true

# Note: System package names are case-sensitive. For example, `libxkbcommon`\
 is
# correctly lowercase, whereas `libXcursor`, `libXi`, etc., use an uppercase\
 'X'
# as per their upstream and packaging conventions. These are not typos.
#
sys:libXcursor
sys:libXi
sys:libXinerama
sys:libXrandr
sys:libxkbcommon
\
macos-clang-builds: macos
macos-clang-build-include: macos_*-clang
macos-clang-build-exclude: **
bootstrap-build:
\
project = glfw

using version
using config
using test
using install
using dist

\
root-build:
\
using in

# Uncomment to suppress warnings coming from external libraries.
#
# c.internal.scope = current

using c
using c.objc

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

# Pre-defined semantics to distinguish between development and consumption
# builds.
#
config [bool] config.glfw.develop ?= false
develop = $config.glfw.develop # shorthand

# Platform shorthands.
#
windows = ($c.target.class == 'windows')
macos = ($c.target.class == 'macos')
linux = ($c.target.class == 'linux')
freebsd = ($c.target.class == 'freebsd')

# Upstream options.
#
# Note that we deliberately exclude build_win32 and build_cocoa because those
# options are already implicitly handled by the platform shorthands above.
#
config [bool, config.report] config.glfw.build_x11 ?= false
config [bool, config.report] config.glfw.build_wayland ?= false
config [bool, config.report] config.glfw.use_hybrid_hpg ?= false
config [bool, config.report] config.glfw.use_msvc_runtime_library_dll ?= false

# Upstream options shorthands.
#
build_x11 = $config.glfw.build_x11
build_wayland = $config.glfw.build_wayland
use_hybrid_hpg = $config.glfw.use_hybrid_hpg
use_msvc_runtime_library_dll = $config.glfw.use_msvc_runtime_library_dll

\
location: glfw/glfw-3.4.0+5.tar.gz
sha256sum: 1d137c43112a0691201bbff76bd8328b9cf2862f7ea10896d7013cc69b56a3d5
:
name: glfw-examples
version: 3.4.0+5
type: examples
language: c
project: glfw
summary: Multi-platform library for OpenGL, OpenGL ES and Vulkan development\
 on the desktop ; examples
license: Zlib
url: https://www.glfw.org
doc-url: https://www.glfw.org/docs/latest/
src-url: https://github.com/glfw/glfw
package-url: https://github.com/build2-packaging/glfw
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
builds: -freebsd
builds: -linux
builds: -macos
builds: -bindist
debian-wayland-builds: sys
debian-wayland-builds: -static
debian-wayland-builds: -bindist
debian-wayland-build-include: linux_debian_12-**
debian-wayland-build-exclude: **
debian-x11-builds: sys
debian-x11-builds: -static
debian-x11-builds: -bindist
debian-x11-build-include: linux_debian*-**
debian-x11-build-exclude: **
fedora-wayland-builds: sys
fedora-wayland-builds: -static
fedora-wayland-builds: -bindist
fedora-wayland-build-include: linux_fedora*-**
fedora-wayland-build-exclude: **
fedora-x11-builds: sys
fedora-x11-builds: -static
fedora-x11-builds: -bindist
fedora-x11-build-include: linux_fedora*-**
fedora-x11-build-exclude: **
fedora-x11-build-config:
\
# Note: System package names are case-sensitive. For example, `libxkbcommon`\
 is
# correctly lowercase, whereas `libXcursor`, `libXi`, etc., use an uppercase\
 'X'
# as per their upstream and packaging conventions. These are not typos.
#
sys:libXcursor
sys:libXi
sys:libXinerama
sys:libXrandr
sys:libxkbcommon
\
macos-clang-builds: macos
macos-clang-build-include: macos_*-clang
macos-clang-build-exclude: **
bootstrap-build:
\
project = glfw-examples

using config
using test
using dist
using version
\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
# c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

\
location: glfw/glfw-examples-3.4.0+5.tar.gz
sha256sum: efd607c7f18ae5edf4e56cc71447e72651ff398c1ec896fa95550a2fab90c87b
:
name: glfw-tests
version: 3.4.0+5
type: tests
language: c
project: glfw
summary: Multi-platform library for OpenGL, OpenGL ES and Vulkan development\
 on the desktop ; tests
license: Zlib
url: https://www.glfw.org
doc-url: https://www.glfw.org/docs/latest/
src-url: https://github.com/glfw/glfw
package-url: https://github.com/build2-packaging/glfw
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
builds: -freebsd
builds: -linux
builds: -macos
builds: -bindist
debian-wayland-builds: sys
debian-wayland-builds: -static
debian-wayland-builds: -bindist
debian-wayland-build-include: linux_debian_12-**
debian-wayland-build-exclude: **
debian-x11-builds: sys
debian-x11-builds: -static
debian-x11-builds: -bindist
debian-x11-build-include: linux_debian*-**
debian-x11-build-exclude: **
fedora-wayland-builds: sys
fedora-wayland-builds: -static
fedora-wayland-builds: -bindist
fedora-wayland-build-include: linux_fedora*-**
fedora-wayland-build-exclude: **
fedora-x11-builds: sys
fedora-x11-builds: -static
fedora-x11-builds: -bindist
fedora-x11-build-include: linux_fedora*-**
fedora-x11-build-exclude: **
fedora-x11-build-config:
\
# Note: System package names are case-sensitive. For example, `libxkbcommon`\
 is
# correctly lowercase, whereas `libXcursor`, `libXi`, etc., use an uppercase\
 'X'
# as per their upstream and packaging conventions. These are not typos.
#
sys:libXcursor
sys:libXi
sys:libXinerama
sys:libXrandr
sys:libxkbcommon
\
macos-clang-builds: macos
macos-clang-build-include: macos_*-clang
macos-clang-build-exclude: **
bootstrap-build:
\
project = glfw-tests

using version
using config
using test
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
# c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

# Every exe{} in this project is by default a test, but the majority are
# interactive programs intended for manual execution and are not suitable for
# automated test environments. To avoid running these programs in test
# environments, we set test = false.
#
# Some exceptions apply: tests designed for non-interactive execution, that\
 is,
# driver executables with an associated testscript, are enabled explicitly.
#
exe{*}: test = false

\
location: glfw/glfw-tests-3.4.0+5.tar.gz
sha256sum: c397b30ad947efa564c5c725c17989365026001f5f71a2d10f244a50ee621319
:
name: gsl
version: 4.0.0+1
type: lib,binless
language: c++
summary: The Guidelines Support Library (GSL) contains functions and types\
 that are suggested for use by the C++ Core Guidelines maintained by the\
 Standard C++ Foundation.
license: MIT
description:
\
# GSL: Guidelines Support Library
[![Build Status](https://dev.azure.com/cppstat/GSL/_apis/build/status/microso\
ft.GSL?branchName=main)](https://dev.azure.com/cppstat/GSL/_build/latest?defi\
nitionId=1&branchName=main)

The Guidelines Support Library (GSL) contains functions and types that are\
 suggested for use by the
[C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines) maintained\
 by the [Standard C++ Foundation](https://isocpp.org).
This repo contains Microsoft's implementation of GSL.

The entire implementation is provided inline in the headers under the\
 [gsl](./include/gsl) directory. The implementation generally assumes a\
 platform that implements C++14 support.

While some types have been broken out into their own headers (e.g.\
 [gsl/span](./include/gsl/span)),
it is simplest to just include [gsl/gsl](./include/gsl/gsl) and gain access\
 to the entire library.

> NOTE: We encourage contributions that improve or refine any of the types in\
 this library as well as ports to
other platforms. Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for more\
 information about contributing.

# Project Code of Conduct
This project has adopted the [Microsoft Open Source Code of\
 Conduct](https://opensource.microsoft.com/codeofconduct/). For more\
 information see the [Code of Conduct FAQ](https://opensource.microsoft.com/c\
odeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@micros\
oft.com) with any additional questions or comments.

# Usage of Third Party Libraries
This project makes use of the [Google Test](https://github.com/google/googlet\
est) testing library. Please see the [ThirdPartyNotices.txt](./ThirdPartyNoti\
ces.txt) file for details regarding the licensing of Google Test.

# Supported features
## Microsoft GSL implements the following from the C++ Core Guidelines:

Feature                                                                  |\
 Supported? | Description
-------------------------------------------------------------------------|:--\
--------:|-------------
[**1. Views**][cg-views]                                                 |   \
         |
[owner](docs/headers.md#user-content-H-pointers-owner)                   |\
 &#x2611;   | An alias for a raw pointer
[not_null](docs/headers.md#user-content-H-pointers-not_null)             |\
 &#x2611;   | Restricts a pointer / smart pointer to hold non-null values
[span](docs/headers.md#user-content-H-span-span)                         |\
 &#x2611;   | A view over a contiguous sequence of memory. Based on the\
 standardized version of `std::span`, however `gsl::span` enforces bounds\
 checking.
span_p                                                                   |\
 &#x2610;   | Spans a range starting from a pointer to the first place for\
 which the predicate is true
[basic_zstring](docs/headers.md#user-content-H-string_span)              |\
 &#x2611;   | A pointer to a C-string (zero-terminated array) with a\
 templated char type
[zstring](docs/headers.md#user-content-H-string_span)                    |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of char
[czstring](docs/headers.md#user-content-H-string_span)                   |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of const char
[wzstring](docs/headers.md#user-content-H-string_span)                   |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of wchar_t
[cwzstring](docs/headers.md#user-content-H-string_span)                  |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of const wchar_t
[u16zstring](docs/headers.md#user-content-H-string_span)                 |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of char16_t
[cu16zstring](docs/headers.md#user-content-H-string_span)                |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of const char16_t
[u32zstring](docs/headers.md#user-content-H-string_span)                 |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of char32_t
[cu32zstring](docs/headers.md#user-content-H-string_span)                |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of const char32_t
[**2. Owners**][cg-owners]                                               |   \
         |
[unique_ptr](docs/headers.md#user-content-H-pointers-unique_ptr)         |\
 &#x2611;   | An alias to `std::unique_ptr`
[shared_ptr](docs/headers.md#user-content-H-pointers-shared_ptr)         |\
 &#x2611;   | An alias to `std::shared_ptr`
stack_array                                                              |\
 &#x2610;   | A stack-allocated array
dyn_array                                                                |\
 &#x2610;   | A heap-allocated array
[**3. Assertions**][cg-assertions]                                       |   \
         |
[Expects](docs/headers.md#user-content-H-assert-expects)                 |\
 &#x2611;   | A precondition assertion; on failure it terminates
[Ensures](docs/headers.md#user-content-H-assert-ensures)                 |\
 &#x2611;   | A postcondition assertion; on failure it terminates
[**4. Utilities**][cg-utilities]                                         |   \
         |
move_owner                                                               |\
 &#x2610;   | A helper function that moves one `owner` to the other
[byte](docs/headers.md#user-content-H-byte-byte)                         |\
 &#x2611;   | Either an alias to `std::byte` or a byte type
[final_action](docs/headers.md#user-content-H-util-final_action)         |\
 &#x2611;   | A RAII style class that invokes a functor on its destruction
[finally](docs/headers.md#user-content-H-util-finally)                   |\
 &#x2611;   | A helper function instantiating `final_action`
[GSL_SUPPRESS](docs/headers.md#user-content-H-assert-gsl_suppress)       |\
 &#x2611;   | A macro that takes an argument and turns it into\
 `[[gsl::suppress(x)]]` or `[[gsl::suppress("x")]]`
[[implicit]]                                                             |\
 &#x2610;   | A "marker" to put on single-argument constructors to explicitly\
 make them non-explicit
[index](docs/headers.md#user-content-H-util-index)                       |\
 &#x2611;   | A type to use for all container and array indexing (currently\
 an alias for `std::ptrdiff_t`)
joining_thread                                                           |\
 &#x2610;   | A RAII style version of `std::thread` that joins
[narrow](docs/headers.md#user-content-H-narrow-narrow)                   |\
 &#x2611;   | A checked version of `narrow_cast`; it can throw\
 `narrowing_error`
[narrow_cast](docs/headers.md#user-content-H-util-narrow_cast)           |\
 &#x2611;   | A narrowing cast for values and a synonym for `static_cast`
[narrowing_error](docs/headers.md#user-content-H-narrow-narrowing_error) |\
 &#x2611;   | A custom exception type thrown by `narrow()`
[**5. Concepts**][cg-concepts]                                           |\
 &#x2610;   |

## The following features do not exist in or have been removed from the C++\
 Core Guidelines:
Feature                            | Supported? | Description
-----------------------------------|:----------:|-------------
[strict_not_null](docs/headers.md#user-content-H-pointers-strict_not_null) |\
 &#x2611;   | A stricter version of `not_null` with explicit constructors
multi_span                         | &#x2610;   | Deprecated.\
 Multi-dimensional span.
strided_span                       | &#x2610;   | Deprecated. Support for\
 this type has been discontinued.
basic_string_span                  | &#x2610;   | Deprecated. Like `span` but\
 for strings with a templated char type
string_span                        | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of char
cstring_span                       | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of const char
wstring_span                       | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of wchar_t
cwstring_span                      | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of const wchar_t
u16string_span                     | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of char16_t
cu16string_span                    | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of const char16_t
u32string_span                     | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of char32_t
cu32string_span                    | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of const char32_t

This is based on [CppCoreGuidelines semi-specification](https://github.com/is\
ocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#gsl-guidelines-suppor\
t-library).

[cg-views]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGu\
idelines.md#gslview-views
[cg-owners]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreG\
uidelines.md#gslowner-ownership-pointers
[cg-assertions]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC\
oreGuidelines.md#gslassert-assertions
[cg-utilities]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCo\
reGuidelines.md#gslutil-utilities
[cg-concepts]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCor\
eGuidelines.md#gslconcept-concepts

# Quick Start
## Supported Compilers / Toolsets
The GSL officially supports the latest and previous major versions of VS with\
 MSVC & LLVM, GCC, Clang, and XCode with Apple-Clang.
Within these two major versions, we try to target the latest minor updates /\
 revisions (although this may be affected by
delays between a toolchain's release and when it becomes widely available for\
 use).
Below is a table showing the versions currently being tested.

Compiler |Toolset Versions Currently Tested
:------- |--:
 XCode | 13.2.1 & 12.5.1
 GCC | 11[^1] & 10[^2]
 Clang | 12[^2] & 11[^2]
 Visual Studio with MSVC | VS2022[^3] & VS2019[^4]
 Visual Studio with LLVM | VS2022[^3] & VS2019[^4]


[^1]: Precise version may be found in the [latest CI results](https://dev.azu\
re.com/cppstat/GSL/_build?definitionId=1&branchFilter=26).
[^2]: Precise version may be found in the [latest CI results](https://dev.azu\
re.com/cppstat/GSL/_build?definitionId=1&branchFilter=26). Should be the\
 version specified [here](https://github.com/actions/virtual-environments/blo\
b/main/images/linux/Ubuntu2004-Readme.md#language-and-runtime).
[^3]: Precise version may be found in the [latest CI results](https://dev.azu\
re.com/cppstat/GSL/_build?definitionId=1&branchFilter=26). Should be the\
 version specified [here](https://github.com/actions/virtual-environments/blo\
b/main/images/win/Windows2022-Readme.md#visual-studio-enterprise-2022).
[^4]: Precise version may be found in the [latest CI results](https://dev.azu\
re.com/cppstat/GSL/_build?definitionId=1&branchFilter=26). Should be the\
 version specified [here](https://github.com/actions/virtual-environments/blo\
b/main/images/win/Windows2019-Readme.md#visual-studio-enterprise-2019).

---
If you successfully port GSL to another platform, we would love to hear from\
 you!
- Submit an issue specifying the platform and target.
- Consider contributing your changes by filing a pull request with any\
 necessary changes.
- If at all possible, add a CI/CD step and add the button to the table below!

Target | CI/CD Status
:------- | -----------:
iOS | ![CI_iOS](https://github.com/microsoft/GSL/workflows/CI_iOS/badge.svg)
Android | ![CI_Android](https://github.com/microsoft/GSL/workflows/CI_Android\
/badge.svg)

Note: These CI/CD steps are run with each pull request, however failures in\
 them are non-blocking.

## Building the tests
To build the tests, you will require the following:

* [CMake](http://cmake.org), version 3.14 or later to be installed and in\
 your PATH.

These steps assume the source code of this repository has been cloned into a\
 directory named `c:\GSL`.

1. Create a directory to contain the build outputs for a particular\
 architecture (we name it `c:\GSL\build-x86` in this example).

        cd GSL
        md build-x86
        cd build-x86

2. Configure CMake to use the compiler of your choice (you can see a list by\
 running `cmake --help`).

        cmake -G "Visual Studio 15 2017" c:\GSL

3. Build the test suite (in this case, in the Debug configuration, Release is\
 another good choice).

        cmake --build . --config Debug

4. Run the test suite.

        ctest -C Debug

All tests should pass - indicating your platform is fully supported and you\
 are ready to use the GSL types!

## Building GSL - Using vcpkg

You can download and install GSL using the [vcpkg](https://github.com/Microso\
ft/vcpkg) dependency manager:

    git clone https://github.com/Microsoft/vcpkg.git
    cd vcpkg
    ./bootstrap-vcpkg.sh
    ./vcpkg integrate install
    vcpkg install ms-gsl

The GSL port in vcpkg is kept up to date by Microsoft team members and\
 community contributors. If the version is out of date, please [create an\
 issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg\
 repository.

## Using the libraries
As the types are entirely implemented inline in headers, there are no linking\
 requirements.

You can copy the [gsl](./include/gsl) directory into your source tree so it\
 is available
to your compiler, then include the appropriate headers in your program.

Alternatively set your compiler's *include path* flag to point to the GSL\
 development folder (`c:\GSL\include` in the example above) or installation\
 folder (after running the install). Eg.

MSVC++

    /I c:\GSL\include

GCC/clang

    -I$HOME/dev/GSL/include

Include the library using:

    #include <gsl/gsl>

## Usage in CMake

The library provides a Config file for CMake, once installed it can be found\
 via `find_package`.

Which, when successful, will add library target called `Microsoft.GSL::GSL`\
 which you can use via the usual
`target_link_libraries` mechanism.

```cmake
find_package(Microsoft.GSL CONFIG REQUIRED)

target_link_libraries(foobar PRIVATE Microsoft.GSL::GSL)
```

### FetchContent

If you are using CMake version 3.11+ you can use the offical [FetchContent\
 module](https://cmake.org/cmake/help/latest/module/FetchContent.html).
This allows you to easily incorporate GSL into your project.

```cmake
# NOTE: This example uses CMake version 3.14 (FetchContent_MakeAvailable).
# Since it streamlines the FetchContent process
cmake_minimum_required(VERSION 3.14)

include(FetchContent)

FetchContent_Declare(GSL
    GIT_REPOSITORY "https://github.com/microsoft/GSL"
    GIT_TAG "v4.0.0"
    GIT_SHALLOW ON
)

FetchContent_MakeAvailable(GSL)

target_link_libraries(foobar PRIVATE Microsoft.GSL::GSL)
```

## Debugging visualization support
For Visual Studio users, the file [GSL.natvis](./GSL.natvis) in the root\
 directory of the repository can be added to your project if you would like\
 more helpful visualization of GSL types in the Visual Studio debugger than\
 would be offered by default.

If you are using CMake this will be done automatically for you.
See `GSL_VS_ADD_NATIVE_VISUALIZERS`

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for GSL

This project is a [build2](https://build2.org) package repository that\
 provides access to the [Guidelines Support Library (GSL)](https://github.com\
/doctest/doctest), a C++ header-only library that contains functions and\
 types that are suggested for use by the [C++ Core Guidelines](https://github\
.com/isocpp/CppCoreGuidelines) maintained by the Standard C++ Foundation.

[![Official](https://img.shields.io/website/https/github.com/microsoft/gsl.sv\
g?down_message=offline&label=Official&style=for-the-badge&up_color=blue&up_me\
ssage=online)](https://github.com/microsoft/gsl)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/g\
sl.svg?down_message=offline&label=build2&style=for-the-badge&up_color=blue&up\
_message=online)](https://github.com/build2-packaging/gsl)
[![cppget.org](https://img.shields.io/website/https/cppget.org/gsl.svg?down_m\
essage=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_message=\
online)](https://cppget.org/gsl)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/gs\
l.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=for-the\
-badge&up_color=orange&up_message=running)](https://queue.cppget.org/gsl)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch this package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/gsl.git

Add the respective dependency in your project's `manifest` file to make the\
 package available for import.

    depends: gsl ^4.0.0

The library can be imported by the following declaration in a `buildfile`.

    import gsl = gsl%lib{gsl}

## Configuration
There are no configuration options available.

## Issues and Notes
- All test source files are not provided as symbolic links but have been\
 deeply copied and altered to be executable with `doctest` and not `gtest`.\
 At the time of creation, `gtest` was not available. For the next package\
 version, this will most likely be changed. The tests will be provided as\
 external tests packages depending on `gtest`.

## Contributing
Thank you in advance for your help and contribution to keep this package\
 up-to-date.
Please, file an issue on [GitHub](https://github.com/build2-packaging/gsl/iss\
ues) for questions, bug reports, or to recommend updating the package version.
If you're making a pull request to fix bugs or update the package version\
 yourself, refer to the [`build2` Packaging Guidelines](https://build2.org/bu\
ild2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management).

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/microsoft/GSL
package-url: https://github.com/build2-packaging/gsl/
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = gsl

using version
using config
using test
using install
using dist
\
root-build:
\
cxx.std = latest

using cxx

# GSL does not use extensions for header files.
#
hxx{*}: extension =
cxx{*}: extension = cpp

test.target = $cxx.target

\
location: gsl/gsl-4.0.0+1.tar.gz
sha256sum: 75f757b39bd06abdb48215edb3014392cb86c8225743c81b0888610819d3bc87
:
name: gsl
version: 4.2.0
type: lib,binless
language: c++
project: gsl
summary: Support Library for C++ Core Guidelines
license: MIT
description:
\
# GSL: Guidelines Support Library
[![CI](https://github.com/Microsoft/GSL/actions/workflows/compilers.yml/badge\
.svg)](https://github.com/microsoft/GSL/actions/workflows/compilers.yml?query\
=branch%3Amain)
[![vcpkg](https://img.shields.io/vcpkg/v/ms-gsl)](https://vcpkg.io/en/package\
/ms-gsl)

The Guidelines Support Library (GSL) contains functions and types that are\
 suggested for use by the
[C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines) maintained\
 by the [Standard C++ Foundation](https://isocpp.org).
This repo contains Microsoft's implementation of GSL.

The entire implementation is provided inline in the headers under the\
 [gsl](./include/gsl) directory. The implementation generally assumes a\
 platform that implements C++14 support.

While some types have been broken out into their own headers (e.g.\
 [gsl/span](./include/gsl/span)),
it is simplest to just include [gsl/gsl](./include/gsl/gsl) and gain access\
 to the entire library.

> NOTE: We encourage contributions that improve or refine any of the types in\
 this library as well as ports to
other platforms. Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for more\
 information about contributing.

# Project Code of Conduct
This project has adopted the [Microsoft Open Source Code of\
 Conduct](https://opensource.microsoft.com/codeofconduct/). For more\
 information see the [Code of Conduct FAQ](https://opensource.microsoft.com/c\
odeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@micros\
oft.com) with any additional questions or comments.

# Usage of Third Party Libraries
This project makes use of the [Google Test](https://github.com/google/googlet\
est) testing library. Please see the [ThirdPartyNotices.txt](./ThirdPartyNoti\
ces.txt) file for details regarding the licensing of Google Test.

# Supported features
## Microsoft GSL implements the following from the C++ Core Guidelines:

Feature                                                                  |\
 Supported? | Description
-------------------------------------------------------------------------|:--\
--------:|-------------
[**1. Views**][cg-views]                                                 |   \
         |
[owner](docs/headers.md#user-content-H-pointers-owner)                   |\
 &#x2611;   | An alias for a raw pointer
[not_null](docs/headers.md#user-content-H-pointers-not_null)             |\
 &#x2611;   | Restricts a pointer/smart pointer to hold non-null values
[span](docs/headers.md#user-content-H-span-span)                         |\
 &#x2611;   | A view over a contiguous sequence of memory. Based on the\
 standardized version of `std::span`, however `gsl::span` enforces bounds\
 checking.
span_p                                                                   |\
 &#x2610;   | Spans a range starting from a pointer to the first place for\
 which the predicate is true
[basic_zstring](docs/headers.md#user-content-H-zstring)                  |\
 &#x2611;   | A pointer to a C-string (zero-terminated array) with a\
 templated char type
[zstring](docs/headers.md#user-content-H-zstring)                        |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `char`
[czstring](docs/headers.md#user-content-H-zstring)                       |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `const char`
[wzstring](docs/headers.md#user-content-H-zstring)                       |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `wchar_t`
[cwzstring](docs/headers.md#user-content-H-zstring)                      |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `const wchar_t`
[u16zstring](docs/headers.md#user-content-H-zstring)                     |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `char16_t`
[cu16zstring](docs/headers.md#user-content-H-zstring)                    |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `const char16_t`
[u32zstring](docs/headers.md#user-content-H-zstring)                     |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `char32_t`
[cu32zstring](docs/headers.md#user-content-H-zstring)                    |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `const char32_t`
[**2. Owners**][cg-owners]                                               |   \
         |
stack_array                                                              |\
 &#x2610;   | A stack-allocated array
dyn_array                                                                |\
 &#x2610;   | A heap-allocated array
[**3. Assertions**][cg-assertions]                                       |   \
         |
[Expects](docs/headers.md#user-content-H-assert-expects)                 |\
 &#x2611;   | A precondition assertion; on failure it terminates
[Ensures](docs/headers.md#user-content-H-assert-ensures)                 |\
 &#x2611;   | A postcondition assertion; on failure it terminates
[**4. Utilities**][cg-utilities]                                         |   \
         |
move_owner                                                               |\
 &#x2610;   | A helper function that moves one `owner` to the other
[final_action](docs/headers.md#user-content-H-util-final_action)         |\
 &#x2611;   | A RAII style class that invokes a functor on its destruction
[finally](docs/headers.md#user-content-H-util-finally)                   |\
 &#x2611;   | A helper function instantiating [final_action](docs/headers.md#\
user-content-H-util-final_action)
[GSL_SUPPRESS](docs/headers.md#user-content-H-assert-gsl_suppress)       |\
 &#x2611;   | A macro that takes an argument and turns it into\
 `[[gsl::suppress(x)]]` or `[[gsl::suppress("x")]]`
[[implicit]]                                                             |\
 &#x2610;   | A "marker" to put on single-argument constructors to explicitly\
 make them non-explicit
[index](docs/headers.md#user-content-H-util-index)                       |\
 &#x2611;   | A type to use for all container and array indexing (currently\
 an alias for `std::ptrdiff_t`)
[narrow](docs/headers.md#user-content-H-narrow-narrow)                   |\
 &#x2611;   | A checked version of `narrow_cast`; it can throw\
 [narrowing_error](docs/headers.md#user-content-H-narrow-narrowing_error)
[narrow_cast](docs/headers.md#user-content-H-util-narrow_cast)           |\
 &#x2611;   | A narrowing cast for values and a synonym for `static_cast`
[narrowing_error](docs/headers.md#user-content-H-narrow-narrowing_error) |\
 &#x2611;   | A custom exception type thrown by [narrow](docs/headers.md#user\
-content-H-narrow-narrow)
[**5. Concepts**][cg-concepts]                                           |\
 &#x2610;   |

## The following features do not exist in or have been removed from the C++\
 Core Guidelines:
Feature                            | Supported? | Description
-----------------------------------|:----------:|-------------
[strict_not_null](docs/headers.md#user-content-H-pointers-strict_not_null) |\
 &#x2611;   | A stricter version of [not_null](docs/headers.md#user-content-H\
-pointers-not_null) with explicit constructors
multi_span                         | &#x2610;   | Deprecated.\
 Multi-dimensional span.
strided_span                       | &#x2610;   | Deprecated. Support for\
 this type has been discontinued.
basic_string_span                  | &#x2610;   | Deprecated. Like `span` but\
 for strings with a templated char type
string_span                        | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `char`
cstring_span                       | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `const char`
wstring_span                       | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `wchar_t`
cwstring_span                      | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `const wchar_t`
u16string_span                     | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `char16_t`
cu16string_span                    | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `const char16_t`
u32string_span                     | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `char32_t`
cu32string_span                    | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `const char32_t`

## The following features have been adopted by WG21. They are deprecated in\
 GSL.
Feature                                                           |\
 Deprecated Since | Notes
------------------------------------------------------------------|----------\
--------|------
[unique_ptr](docs/headers.md#user-content-H-pointers-unique_ptr)  | C++11    \
        | Use std::unique_ptr instead.
[shared_ptr](docs/headers.md#user-content-H-pointers-shared_ptr)  | C++11    \
        | Use std::shared_ptr instead.
[byte](docs/headers.md#user-content-H-byte-byte)                  | C++17    \
        | Use std::byte instead.
joining_thread                                                    | C++20\
 (Note: Not yet implemented in GSL) | Use std::jthread instead.

This is based on [CppCoreGuidelines semi-specification](https://github.com/is\
ocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#gsl-guidelines-suppor\
t-library).

[cg-views]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGu\
idelines.md#gslview-views
[cg-owners]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreG\
uidelines.md#gslowner-ownership-pointers
[cg-assertions]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC\
oreGuidelines.md#gslassert-assertions
[cg-utilities]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCo\
reGuidelines.md#gslutil-utilities
[cg-concepts]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCor\
eGuidelines.md#gslconcept-concepts

# Quick Start
## Supported Compilers / Toolsets
The GSL officially supports recent major versions of Visual Studio with both\
 MSVC and LLVM, GCC, Clang, and XCode with Apple-Clang.
For each of these major versions, the GSL officially supports C++14, C++17,\
 C++20, and C++23 (when supported by the compiler).
Below is a table showing the versions currently being tested (also see\
 [.github/workflows/compilers.yml](the workflow).)

Compiler |Toolset Versions Currently Tested
:------- |--:
 GCC | 12, 13, 14
 XCode | 14.3.1, 15.4
 Clang | 16, 17, 18
 Visual Studio with MSVC | VS2019, VS2022 
 Visual Studio with LLVM | VS2019, VS2022

---
If you successfully port GSL to another platform, we would love to hear from\
 you!
- Submit an issue specifying the platform and target.
- Consider contributing your changes by filing a pull request with any\
 necessary changes.
- If at all possible, add a CI/CD step and add the button to the table below!

Target | CI/CD Status
:------- | -----------:
iOS | [![CI_iOS](https://github.com/microsoft/GSL/workflows/CI_iOS/badge.svg?\
branch=main)](https://github.com/microsoft/GSL/actions/workflows/ios.yml?quer\
y=branch%3Amain)
Android | [![CI_Android](https://github.com/microsoft/GSL/workflows/CI_Androi\
d/badge.svg?branch=main)](https://github.com/microsoft/GSL/actions/workflows/\
android.yml?query=branch%3Amain)

Note: These CI/CD steps are run with each pull request, however failures in\
 them are non-blocking.

## Building the tests
To build the tests, you will require the following:

* [CMake](http://cmake.org), version 3.14 or later to be installed and in\
 your PATH.

These steps assume the source code of this repository has been cloned into a\
 directory named `c:\GSL`.

1. Create a directory to contain the build outputs for a particular\
 architecture (we name it `c:\GSL\build-x86` in this example).

        cd GSL
        md build-x86
        cd build-x86

2. Configure CMake to use the compiler of your choice (you can see a list by\
 running `cmake --help`).

        cmake -G "Visual Studio 15 2017" c:\GSL

3. Build the test suite (in this case, in the Debug configuration, Release is\
 another good choice).

        cmake --build . --config Debug

4. Run the test suite.

        ctest -C Debug

All tests should pass - indicating your platform is fully supported and you\
 are ready to use the GSL types!

## Building GSL - Using vcpkg

You can download and install GSL using the [vcpkg](https://github.com/Microso\
ft/vcpkg) dependency manager:

    git clone https://github.com/Microsoft/vcpkg.git
    cd vcpkg
    ./bootstrap-vcpkg.sh
    ./vcpkg integrate install
    vcpkg install ms-gsl

The GSL port in vcpkg is kept up to date by Microsoft team members and\
 community contributors. If the version is out of date, please [create an\
 issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg\
 repository.

## Using the libraries
As the types are entirely implemented inline in headers, there are no linking\
 requirements.

You can copy the [gsl](./include/gsl) directory into your source tree so it\
 is available
to your compiler, then include the appropriate headers in your program.

Alternatively set your compiler's *include path* flag to point to the GSL\
 development folder (`c:\GSL\include` in the example above) or installation\
 folder (after running the install). Eg.

MSVC++

    /I c:\GSL\include

GCC/clang

    -I$HOME/dev/GSL/include

Include the library using:

    #include <gsl/gsl>

## Usage in CMake

The library provides a Config file for CMake, once installed it can be found\
 via `find_package`.

Which, when successful, will add library target called `Microsoft.GSL::GSL`\
 which you can use via the usual
`target_link_libraries` mechanism.

```cmake
find_package(Microsoft.GSL CONFIG REQUIRED)

target_link_libraries(foobar PRIVATE Microsoft.GSL::GSL)
```

### FetchContent

If you are using CMake version 3.11+ you can use the official [FetchContent\
 module](https://cmake.org/cmake/help/latest/module/FetchContent.html).
This allows you to easily incorporate GSL into your project.

```cmake
# NOTE: This example uses CMake version 3.14 (FetchContent_MakeAvailable).
# Since it streamlines the FetchContent process
cmake_minimum_required(VERSION 3.14)

include(FetchContent)

FetchContent_Declare(GSL
    GIT_REPOSITORY "https://github.com/microsoft/GSL"
    GIT_TAG "v4.1.0"
    GIT_SHALLOW ON
)

FetchContent_MakeAvailable(GSL)

target_link_libraries(foobar PRIVATE Microsoft.GSL::GSL)
```

## Debugging visualization support

For Visual Studio users, the file [GSL.natvis](./GSL.natvis) in the root\
 directory of the repository can be added to your project if you would like\
 more helpful visualization of GSL types in the Visual Studio debugger than\
 would be offered by default.

## See Also

For information on [Microsoft Gray Systems Lab (GSL)](https://aka.ms/gsl) of\
 applied data management and system research see <https://aka.ms/gsl>.

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for GSL

This project is a [build2](https://build2.org) package repository that\
 provides access to the [Guidelines Support Library (GSL)](https://github.com\
/microsoft/GSL), a C++ header-only library that contains functions and types\
 that are suggested for use by the [C++ Core Guidelines](https://github.com/i\
socpp/CppCoreGuidelines) maintained by the Standard C++ Foundation.

[![Official](https://img.shields.io/website/https/github.com/microsoft/gsl.sv\
g?down_message=offline&label=Official&style=for-the-badge&up_color=blue&up_me\
ssage=online)](https://github.com/microsoft/gsl)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/g\
sl.svg?down_message=offline&label=build2&style=for-the-badge&up_color=blue&up\
_message=online)](https://github.com/build2-packaging/gsl)
[![cppget.org](https://img.shields.io/website/https/cppget.org/gsl.svg?down_m\
essage=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_message=\
online)](https://cppget.org/gsl)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/gs\
l.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=for-the\
-badge&up_color=orange&up_message=running)](https://queue.cppget.org/gsl)

## Usage
Make sure to add the stable or testing section of the `cppget.org` repository\
 to your project's `repositories.manifest` to be able to fetch this package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable and testing sections of `cppget.org` are not an option then add\
 this Git repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/gsl.git

Add the respective dependency in your project's `manifest` file to make the\
 package available for import.

    depends: gsl ^4.2.0

The library can be imported by the following declaration in a `buildfile`.

    import gsl = gsl%lib{gsl}

## Configuration
There are no configuration options available.

## Issues and Notes
Currently, there are no known issues.

## Contributing
Thank you in advance for your help and contribution to keep this package\
 up-to-date.
Please, file an issue on [GitHub](https://github.com/build2-packaging/gsl/iss\
ues) for questions, bug reports, or to recommend updating the package version.
If you're making a pull request to fix bugs or update the package version\
 yourself, refer to the [`build2` Packaging Guidelines](https://build2.org/bu\
ild2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management).

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/microsoft/GSL
package-url: https://github.com/build2-packaging/gsl/
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
tests: gsl-tests == 4.2.0
bootstrap-build:
\
project = gsl

using version
using config
using test
using install
using dist
\
root-build:
\
cxx.std = latest

using cxx

# GSL does not use extensions for header files.
#
hxx{*}: extension =
cxx{*}: extension = cpp

test.target = $cxx.target

\
location: gsl/gsl-4.2.0.tar.gz
sha256sum: 5f673e0f6a421ee2b11dd88e108dae98138f710a2c75d7e4773e127a9aa99be7
:
name: gsl-tests
version: 4.2.0
type: exe
language: c++
project: gsl
summary: Support Library for C++ Core Guidelines, tests
license: MIT
description:
\
# GSL: Guidelines Support Library
[![CI](https://github.com/Microsoft/GSL/actions/workflows/compilers.yml/badge\
.svg)](https://github.com/microsoft/GSL/actions/workflows/compilers.yml?query\
=branch%3Amain)
[![vcpkg](https://img.shields.io/vcpkg/v/ms-gsl)](https://vcpkg.io/en/package\
/ms-gsl)

The Guidelines Support Library (GSL) contains functions and types that are\
 suggested for use by the
[C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines) maintained\
 by the [Standard C++ Foundation](https://isocpp.org).
This repo contains Microsoft's implementation of GSL.

The entire implementation is provided inline in the headers under the\
 [gsl](./include/gsl) directory. The implementation generally assumes a\
 platform that implements C++14 support.

While some types have been broken out into their own headers (e.g.\
 [gsl/span](./include/gsl/span)),
it is simplest to just include [gsl/gsl](./include/gsl/gsl) and gain access\
 to the entire library.

> NOTE: We encourage contributions that improve or refine any of the types in\
 this library as well as ports to
other platforms. Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for more\
 information about contributing.

# Project Code of Conduct
This project has adopted the [Microsoft Open Source Code of\
 Conduct](https://opensource.microsoft.com/codeofconduct/). For more\
 information see the [Code of Conduct FAQ](https://opensource.microsoft.com/c\
odeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@micros\
oft.com) with any additional questions or comments.

# Usage of Third Party Libraries
This project makes use of the [Google Test](https://github.com/google/googlet\
est) testing library. Please see the [ThirdPartyNotices.txt](./ThirdPartyNoti\
ces.txt) file for details regarding the licensing of Google Test.

# Supported features
## Microsoft GSL implements the following from the C++ Core Guidelines:

Feature                                                                  |\
 Supported? | Description
-------------------------------------------------------------------------|:--\
--------:|-------------
[**1. Views**][cg-views]                                                 |   \
         |
[owner](docs/headers.md#user-content-H-pointers-owner)                   |\
 &#x2611;   | An alias for a raw pointer
[not_null](docs/headers.md#user-content-H-pointers-not_null)             |\
 &#x2611;   | Restricts a pointer/smart pointer to hold non-null values
[span](docs/headers.md#user-content-H-span-span)                         |\
 &#x2611;   | A view over a contiguous sequence of memory. Based on the\
 standardized version of `std::span`, however `gsl::span` enforces bounds\
 checking.
span_p                                                                   |\
 &#x2610;   | Spans a range starting from a pointer to the first place for\
 which the predicate is true
[basic_zstring](docs/headers.md#user-content-H-zstring)                  |\
 &#x2611;   | A pointer to a C-string (zero-terminated array) with a\
 templated char type
[zstring](docs/headers.md#user-content-H-zstring)                        |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `char`
[czstring](docs/headers.md#user-content-H-zstring)                       |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `const char`
[wzstring](docs/headers.md#user-content-H-zstring)                       |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `wchar_t`
[cwzstring](docs/headers.md#user-content-H-zstring)                      |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `const wchar_t`
[u16zstring](docs/headers.md#user-content-H-zstring)                     |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `char16_t`
[cu16zstring](docs/headers.md#user-content-H-zstring)                    |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `const char16_t`
[u32zstring](docs/headers.md#user-content-H-zstring)                     |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `char32_t`
[cu32zstring](docs/headers.md#user-content-H-zstring)                    |\
 &#x2611;   | An alias to `basic_zstring` with dynamic extent and a char type\
 of `const char32_t`
[**2. Owners**][cg-owners]                                               |   \
         |
stack_array                                                              |\
 &#x2610;   | A stack-allocated array
dyn_array                                                                |\
 &#x2610;   | A heap-allocated array
[**3. Assertions**][cg-assertions]                                       |   \
         |
[Expects](docs/headers.md#user-content-H-assert-expects)                 |\
 &#x2611;   | A precondition assertion; on failure it terminates
[Ensures](docs/headers.md#user-content-H-assert-ensures)                 |\
 &#x2611;   | A postcondition assertion; on failure it terminates
[**4. Utilities**][cg-utilities]                                         |   \
         |
move_owner                                                               |\
 &#x2610;   | A helper function that moves one `owner` to the other
[final_action](docs/headers.md#user-content-H-util-final_action)         |\
 &#x2611;   | A RAII style class that invokes a functor on its destruction
[finally](docs/headers.md#user-content-H-util-finally)                   |\
 &#x2611;   | A helper function instantiating [final_action](docs/headers.md#\
user-content-H-util-final_action)
[GSL_SUPPRESS](docs/headers.md#user-content-H-assert-gsl_suppress)       |\
 &#x2611;   | A macro that takes an argument and turns it into\
 `[[gsl::suppress(x)]]` or `[[gsl::suppress("x")]]`
[[implicit]]                                                             |\
 &#x2610;   | A "marker" to put on single-argument constructors to explicitly\
 make them non-explicit
[index](docs/headers.md#user-content-H-util-index)                       |\
 &#x2611;   | A type to use for all container and array indexing (currently\
 an alias for `std::ptrdiff_t`)
[narrow](docs/headers.md#user-content-H-narrow-narrow)                   |\
 &#x2611;   | A checked version of `narrow_cast`; it can throw\
 [narrowing_error](docs/headers.md#user-content-H-narrow-narrowing_error)
[narrow_cast](docs/headers.md#user-content-H-util-narrow_cast)           |\
 &#x2611;   | A narrowing cast for values and a synonym for `static_cast`
[narrowing_error](docs/headers.md#user-content-H-narrow-narrowing_error) |\
 &#x2611;   | A custom exception type thrown by [narrow](docs/headers.md#user\
-content-H-narrow-narrow)
[**5. Concepts**][cg-concepts]                                           |\
 &#x2610;   |

## The following features do not exist in or have been removed from the C++\
 Core Guidelines:
Feature                            | Supported? | Description
-----------------------------------|:----------:|-------------
[strict_not_null](docs/headers.md#user-content-H-pointers-strict_not_null) |\
 &#x2611;   | A stricter version of [not_null](docs/headers.md#user-content-H\
-pointers-not_null) with explicit constructors
multi_span                         | &#x2610;   | Deprecated.\
 Multi-dimensional span.
strided_span                       | &#x2610;   | Deprecated. Support for\
 this type has been discontinued.
basic_string_span                  | &#x2610;   | Deprecated. Like `span` but\
 for strings with a templated char type
string_span                        | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `char`
cstring_span                       | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `const char`
wstring_span                       | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `wchar_t`
cwstring_span                      | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `const wchar_t`
u16string_span                     | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `char16_t`
cu16string_span                    | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `const char16_t`
u32string_span                     | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `char32_t`
cu32string_span                    | &#x2610;   | Deprecated. An alias to\
 `basic_string_span` with a char type of `const char32_t`

## The following features have been adopted by WG21. They are deprecated in\
 GSL.
Feature                                                           |\
 Deprecated Since | Notes
------------------------------------------------------------------|----------\
--------|------
[unique_ptr](docs/headers.md#user-content-H-pointers-unique_ptr)  | C++11    \
        | Use std::unique_ptr instead.
[shared_ptr](docs/headers.md#user-content-H-pointers-shared_ptr)  | C++11    \
        | Use std::shared_ptr instead.
[byte](docs/headers.md#user-content-H-byte-byte)                  | C++17    \
        | Use std::byte instead.
joining_thread                                                    | C++20\
 (Note: Not yet implemented in GSL) | Use std::jthread instead.

This is based on [CppCoreGuidelines semi-specification](https://github.com/is\
ocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#gsl-guidelines-suppor\
t-library).

[cg-views]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGu\
idelines.md#gslview-views
[cg-owners]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreG\
uidelines.md#gslowner-ownership-pointers
[cg-assertions]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC\
oreGuidelines.md#gslassert-assertions
[cg-utilities]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCo\
reGuidelines.md#gslutil-utilities
[cg-concepts]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCor\
eGuidelines.md#gslconcept-concepts

# Quick Start
## Supported Compilers / Toolsets
The GSL officially supports recent major versions of Visual Studio with both\
 MSVC and LLVM, GCC, Clang, and XCode with Apple-Clang.
For each of these major versions, the GSL officially supports C++14, C++17,\
 C++20, and C++23 (when supported by the compiler).
Below is a table showing the versions currently being tested (also see\
 [.github/workflows/compilers.yml](the workflow).)

Compiler |Toolset Versions Currently Tested
:------- |--:
 GCC | 12, 13, 14
 XCode | 14.3.1, 15.4
 Clang | 16, 17, 18
 Visual Studio with MSVC | VS2019, VS2022 
 Visual Studio with LLVM | VS2019, VS2022

---
If you successfully port GSL to another platform, we would love to hear from\
 you!
- Submit an issue specifying the platform and target.
- Consider contributing your changes by filing a pull request with any\
 necessary changes.
- If at all possible, add a CI/CD step and add the button to the table below!

Target | CI/CD Status
:------- | -----------:
iOS | [![CI_iOS](https://github.com/microsoft/GSL/workflows/CI_iOS/badge.svg?\
branch=main)](https://github.com/microsoft/GSL/actions/workflows/ios.yml?quer\
y=branch%3Amain)
Android | [![CI_Android](https://github.com/microsoft/GSL/workflows/CI_Androi\
d/badge.svg?branch=main)](https://github.com/microsoft/GSL/actions/workflows/\
android.yml?query=branch%3Amain)

Note: These CI/CD steps are run with each pull request, however failures in\
 them are non-blocking.

## Building the tests
To build the tests, you will require the following:

* [CMake](http://cmake.org), version 3.14 or later to be installed and in\
 your PATH.

These steps assume the source code of this repository has been cloned into a\
 directory named `c:\GSL`.

1. Create a directory to contain the build outputs for a particular\
 architecture (we name it `c:\GSL\build-x86` in this example).

        cd GSL
        md build-x86
        cd build-x86

2. Configure CMake to use the compiler of your choice (you can see a list by\
 running `cmake --help`).

        cmake -G "Visual Studio 15 2017" c:\GSL

3. Build the test suite (in this case, in the Debug configuration, Release is\
 another good choice).

        cmake --build . --config Debug

4. Run the test suite.

        ctest -C Debug

All tests should pass - indicating your platform is fully supported and you\
 are ready to use the GSL types!

## Building GSL - Using vcpkg

You can download and install GSL using the [vcpkg](https://github.com/Microso\
ft/vcpkg) dependency manager:

    git clone https://github.com/Microsoft/vcpkg.git
    cd vcpkg
    ./bootstrap-vcpkg.sh
    ./vcpkg integrate install
    vcpkg install ms-gsl

The GSL port in vcpkg is kept up to date by Microsoft team members and\
 community contributors. If the version is out of date, please [create an\
 issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg\
 repository.

## Using the libraries
As the types are entirely implemented inline in headers, there are no linking\
 requirements.

You can copy the [gsl](./include/gsl) directory into your source tree so it\
 is available
to your compiler, then include the appropriate headers in your program.

Alternatively set your compiler's *include path* flag to point to the GSL\
 development folder (`c:\GSL\include` in the example above) or installation\
 folder (after running the install). Eg.

MSVC++

    /I c:\GSL\include

GCC/clang

    -I$HOME/dev/GSL/include

Include the library using:

    #include <gsl/gsl>

## Usage in CMake

The library provides a Config file for CMake, once installed it can be found\
 via `find_package`.

Which, when successful, will add library target called `Microsoft.GSL::GSL`\
 which you can use via the usual
`target_link_libraries` mechanism.

```cmake
find_package(Microsoft.GSL CONFIG REQUIRED)

target_link_libraries(foobar PRIVATE Microsoft.GSL::GSL)
```

### FetchContent

If you are using CMake version 3.11+ you can use the official [FetchContent\
 module](https://cmake.org/cmake/help/latest/module/FetchContent.html).
This allows you to easily incorporate GSL into your project.

```cmake
# NOTE: This example uses CMake version 3.14 (FetchContent_MakeAvailable).
# Since it streamlines the FetchContent process
cmake_minimum_required(VERSION 3.14)

include(FetchContent)

FetchContent_Declare(GSL
    GIT_REPOSITORY "https://github.com/microsoft/GSL"
    GIT_TAG "v4.1.0"
    GIT_SHALLOW ON
)

FetchContent_MakeAvailable(GSL)

target_link_libraries(foobar PRIVATE Microsoft.GSL::GSL)
```

## Debugging visualization support

For Visual Studio users, the file [GSL.natvis](./GSL.natvis) in the root\
 directory of the repository can be added to your project if you would like\
 more helpful visualization of GSL types in the Visual Studio debugger than\
 would be offered by default.

## See Also

For information on [Microsoft Gray Systems Lab (GSL)](https://aka.ms/gsl) of\
 applied data management and system research see <https://aka.ms/gsl>.

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for GSL

This project is a [build2](https://build2.org) package repository that\
 provides access to the [Guidelines Support Library (GSL)](https://github.com\
/microsoft/GSL), a C++ header-only library that contains functions and types\
 that are suggested for use by the [C++ Core Guidelines](https://github.com/i\
socpp/CppCoreGuidelines) maintained by the Standard C++ Foundation.

[![Official](https://img.shields.io/website/https/github.com/microsoft/gsl.sv\
g?down_message=offline&label=Official&style=for-the-badge&up_color=blue&up_me\
ssage=online)](https://github.com/microsoft/gsl)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/g\
sl.svg?down_message=offline&label=build2&style=for-the-badge&up_color=blue&up\
_message=online)](https://github.com/build2-packaging/gsl)
[![cppget.org](https://img.shields.io/website/https/cppget.org/gsl.svg?down_m\
essage=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_message=\
online)](https://cppget.org/gsl)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/gs\
l.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=for-the\
-badge&up_color=orange&up_message=running)](https://queue.cppget.org/gsl)

## Usage
Make sure to add the stable or testing section of the `cppget.org` repository\
 to your project's `repositories.manifest` to be able to fetch this package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable and testing sections of `cppget.org` are not an option then add\
 this Git repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/gsl.git

Add the respective dependency in your project's `manifest` file to make the\
 package available for import.

    depends: gsl ^4.2.0

The library can be imported by the following declaration in a `buildfile`.

    import gsl = gsl%lib{gsl}

## Configuration
There are no configuration options available.

## Issues and Notes
Currently, there are no known issues.

## Contributing
Thank you in advance for your help and contribution to keep this package\
 up-to-date.
Please, file an issue on [GitHub](https://github.com/build2-packaging/gsl/iss\
ues) for questions, bug reports, or to recommend updating the package version.
If you're making a pull request to fix bugs or update the package version\
 yourself, refer to the [`build2` Packaging Guidelines](https://build2.org/bu\
ild2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management).

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/microsoft/GSL
package-url: https://github.com/build2-packaging/gsl/
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: gtest ^1.11.0
bootstrap-build:
\
project = gsl-tests

using version
using config
using test
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# All executables in this package are tests.
#
exe{*}: test = true

\
location: gsl/gsl-tests-4.2.0.tar.gz
sha256sum: 7c0f3fb46d3767532a9376002e51677f406fc281486ff683f06e447d19f1894f
:
name: icu-tools
version: 74.2.0+2
upstream-version: 74.2
language: c++
language: c
project: icu
summary: ICU tools
license: Unicode-3.0 AND BSD-3-Clause AND BSD-2-Clause; Unicode License V3\
 for most of the original files.
topics: C, C++, Unicode, internationalization
description:
\
International Components for Unicode (ICU) is a set of cross-platform Unicode-
based globalization libraries with libicuuc C/C++ library providing core
Unicode support and basic functionality (character properties, locales, etc)
and libicudata C library providing data for libicuuc and libicui18n (locale
data, etc). For more information see:

http://site.icu-project.org/

This package contains the original ICU tools source code and ICU data source
files overlaid with the build2-based build system and packaged for the build2
package manager (bpkg).

See the INSTALL file for the prerequisites and installation instructions.

Send questions, bug reports, or any other feedback about library itself to the
ICU mailing lists. Send build system and packaging-related feedback to the
packaging@build2.org mailing list (see https://lists.build2.org for posting
guidelines, etc).

The packaging of the ICU tools for build2 is tracked in a Git repository at:

https://git.build2.org/cgit/packaging/icu/

\
description-type: text/plain
url: http://site.icu-project.org/
doc-url: https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/
src-url: https://git.build2.org/cgit/packaging/icu/icu/tree/icu-tools/
package-url: https://git.build2.org/cgit/packaging/icu/
email: icu-support@lists.sourceforge.net; Mailing list.
package-email: packaging@build2.org; Mailing list.
build-error-email: builds@build2.org
depends: * build2 >= 0.18.0-
depends: * bpkg >= 0.18.0-
builds: all
bootstrap-build:
\
project = icu-tools

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cc.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

c.std = 11

using c
using c.predefs

h{*}: extension = h
c{*}: extension = c

using in

using c.as-cpp

# Resource bundle.
#
define res: file
res{*}: extension = res

# The ICU data directory path for the installed and develop cases. This is
# the directory that contains the ICU data archive.
#
data_dir_develop = [dir_path] $out_root/data
data_dir_install = [dir_path] ($install.root != [null]           \\
                               ? $install.resolve($install.data) \\
                               : .)

if ($build.mode != 'skeleton')
  source build/common.build

\
debian-name: libicu-devtools
fedora-name: icu
location: icu/icu-tools-74.2.0+2.tar.gz
sha256sum: 1983cad588c5dbcd86171f27273953ad4fc33ce62a755761d39fe3f670458c47
:
name: libadwaita
version: 1.5.0+4
language: c
summary: Building blocks for modern GNOME applications
license: LGPL-2.0-or-later; GNU Library General Public License v2 or later
description:
\
# Adwaita

Building blocks for modern GNOME applications.

## License

Libadwaita is licensed under the LGPL-2.1+.

## Building

We use the Meson (and thereby Ninja) build system for libadwaita. The quickest
way to get going is to do the following:

```sh
meson . _build
ninja -C _build
ninja -C _build install
```

For build options see [meson_options.txt](./meson_options.txt). E.g. to\
 enable documentation:

```sh
meson . _build -Dgtk_doc=true
ninja -C _build
```

## Usage

There's a C example:

```sh
_build/run _build/demo/adwaita-1-demo
```

## Documentation

The documentation can be found online
[here](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/).

## Getting in Touch

Matrix room: [#libadwaita:gnome.org](https://matrix.to/#/#libadwaita:gnome.or\
g)

\
description-type: text/markdown;variant=GFM
package-description:
\
# libadwaita - A C library

The `libadwaita` C library provides building blocks for modern GNOME\
 applications.

## Usage

To start using `libadwaita` in your project, add the following\
 [`depends`](https://build2.org/bpkg/doc/build2-package-manager-manual.xhtml#\
manifest-package-depends) value to your [`manifest`](https://build2.org/bpkg/\
doc/build2-package-manager-manual.xhtml#manifests), adjusting the version\
 constraint as appropriate:

```
depends: libadwaita ^1.5.0
```

Then import the library in your `buildfile`:

```
import libs = libadwaita%lib{adwaita}
```

## Importable targets

This package provides the following importable targets:

```
lib{adwaita}
lib{gtk-4}
lib{glib-2.0}
lib{appstream}
```

### Importable targets description

* `adwaita` - Building blocks for modern GNOME applications.
* `gtk-4` - Cross-platform widget toolkit for creating graphical user\
 interfaces.
* `glib-2.0` - General-purpose, portable utility library, which provides many\
 useful data types, macros, type conversions, string utilities, file\
 utilities, a mainloop abstraction, and so on.
* `appstream` -  Tools and libraries to work with AppStream metadata.

\
package-description-type: text/markdown;variant=GFM
url: https://gitlab.gnome.org/GNOME/libadwaita
doc-url: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1.5/
package-url: https://github.com/build2-packaging/libadwaita
email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
tests: libadwaita-tests == 1.5.0
builds: none
bindist-fedora-builds: bindist
bindist-fedora-build-include: linux_fedora_40-**
bindist-fedora-build-exclude: **
bindist-fedora-build-config:
\
+bpkg.bindist.fedora:
+bbot.bindist.upload:
b.create:config.c.std=gnu11
sys:gtk4-devel
sys:glib2-devel
sys:appstream-devel
sys:dbus-x11
\
bootstrap-build:
\
project = libadwaita

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

\
location: libadwaita/libadwaita-1.5.0+4.tar.gz
sha256sum: c4dcfab467f66304aa9a6b4b706bcfd33881f16a54abc032abf9eae53f9fc839
:
name: libadwaita-tests
version: 1.5.0+4
type: exe
language: c
project: libadwaita
summary: Building blocks for modern GNOME applications; tests
license: LGPL-2.0-or-later; GNU Library General Public License v2 or later
url: https://gitlab.gnome.org/GNOME/libadwaita
doc-url: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1.5/
package-url: https://github.com/build2-packaging/libadwaita
email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
builds: none
bindist-fedora-builds: bindist
bindist-fedora-build-include: linux_fedora_40-**
bindist-fedora-build-exclude: **
bindist-fedora-build-config:
\
+bpkg.bindist.fedora:
+bbot.bindist.upload:
b.create:config.c.std=gnu11
sys:gtk4-devel
sys:glib2-devel
sys:appstream-devel
sys:dbus-x11
\
bootstrap-build:
\
project = libadwaita-tests

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

\
location: libadwaita/libadwaita-tests-1.5.0+4.tar.gz
sha256sum: f5bf39a5c190158e85db8298ff277b25ab4d5742f05ec39193b0359048ec6f8c
:
name: libasio
version: 1.34.1
language: c++
summary: Cross-platform C++ library for asynchronous network programming
license: BSL-1.0; Boost Software License 1.0.
description:
\
asio version 1.34.1
Released Monday, 31 March 2025.

See doc/index.html for API documentation and a tutorial.

\
description-type: text/plain
package-description:
\
# libasio

Asio is a cross-platform C++ library for network and low-level I/O programming
that provides developers with a consistent asynchronous model using a modern
C++ approach.

Asio provides the basic building blocks for C++ networking, concurrency and
other kinds of I/O. Asio is used in all kinds of applications, from phone apps
to the world’s fastest share markets.

For more information see: https://think-async.com/Asio/

This is a `build2` package for the standalone version of the Asio library.

# Usage

This package provides the `lib{asio}` library.

SSL support is disabled by default. To enable it, add the following to your
`manifest`:

```
depends:
\\
libasio ^1.28.0
{
  require
  {
    config.libasio.ssl = true
  }
}
\\
```

Note that on some platforms (such as MinGW) it may be necessary for
applications to define `_WIN32_WINNT` to an appropriate value. If it's not
defined the library's `config.hpp` header will issue a warning and choose a
default (currently `0x0601`, meaning Windows 7 and later; this is also the
value that the library is built with).

\
package-description-type: text/markdown;variant=GFM
url: https://think-async.com/Asio/
src-url: https://github.com/chriskohlhoff/asio/
package-url: https://github.com/build2-packaging/libasio/
email: https://sourceforge.net/p/asio/mailman/asio-users/; Mailing list.
package-email: packaging@build2.org; Mailing list.
build-error-email: builds@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: libssl >= 1.1.1 ? ($config.libasio.ssl)
depends: libcrypto >= 1.1.1 ? ($config.libasio.ssl)
ssl-build-config: config.libasio.ssl=true; Enable SSL support.
bootstrap-build:
\
project = libasio

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# If true, enable SSL support.
#
config [bool] config.libasio.ssl ?= false

\
location: libasio/libasio-1.34.1.tar.gz
sha256sum: 08988f97f022d7644c1b00469840e93d76a4ce890b03663bc6882bac317509a6
:
name: libasio
version: 1.34.2
language: c++
summary: Cross-platform C++ library for asynchronous network programming
license: BSL-1.0; Boost Software License 1.0.
description:
\
asio version 1.34.2
Released Friday, 11 April 2025.

See doc/index.html for API documentation and a tutorial.

\
description-type: text/plain
package-description:
\
# libasio

Asio is a cross-platform C++ library for network and low-level I/O programming
that provides developers with a consistent asynchronous model using a modern
C++ approach.

Asio provides the basic building blocks for C++ networking, concurrency and
other kinds of I/O. Asio is used in all kinds of applications, from phone apps
to the world’s fastest share markets.

For more information see: https://think-async.com/Asio/

This is a `build2` package for the standalone version of the Asio library.

# Usage

This package provides the `lib{asio}` library.

SSL support is disabled by default. To enable it, add the following to your
`manifest`:

```
depends:
\\
libasio ^1.28.0
{
  require
  {
    config.libasio.ssl = true
  }
}
\\
```

Note that on some platforms (such as MinGW) it may be necessary for
applications to define `_WIN32_WINNT` to an appropriate value. If it's not
defined the library's `config.hpp` header will issue a warning and choose a
default (currently `0x0601`, meaning Windows 7 and later; this is also the
value that the library is built with).

\
package-description-type: text/markdown;variant=GFM
url: https://think-async.com/Asio/
src-url: https://github.com/chriskohlhoff/asio/
package-url: https://github.com/build2-packaging/libasio/
email: https://sourceforge.net/p/asio/mailman/asio-users/; Mailing list.
package-email: packaging@build2.org; Mailing list.
build-error-email: builds@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: libssl >= 1.1.1 ? ($config.libasio.ssl)
depends: libcrypto >= 1.1.1 ? ($config.libasio.ssl)
ssl-build-config: config.libasio.ssl=true; Enable SSL support.
bootstrap-build:
\
project = libasio

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# If true, enable SSL support.
#
config [bool] config.libasio.ssl ?= false

\
location: libasio/libasio-1.34.2.tar.gz
sha256sum: 3f165575975672dd08b3c4899a7b55e7de4b1553b2ce1afcd8f9ae1fae60cd30
:
name: libasio
version: 1.36.0
language: c++
summary: Cross-platform C++ library for asynchronous network programming
license: BSL-1.0; Boost Software License 1.0.
description:
\
asio version 1.36.0
Released Saturday, 16 August 2025.

See doc/index.html for API documentation and a tutorial.

\
description-type: text/plain
package-description:
\
# libasio

Asio is a cross-platform C++ library for network and low-level I/O programming
that provides developers with a consistent asynchronous model using a modern
C++ approach.

Asio provides the basic building blocks for C++ networking, concurrency and
other kinds of I/O. Asio is used in all kinds of applications, from phone apps
to the world’s fastest share markets.

For more information see: https://think-async.com/Asio/

This is a `build2` package for the standalone version of the Asio library.

# Usage

This package provides the `lib{asio}` library.

SSL support is disabled by default. To enable it, add the following to your
`manifest`:

```
depends:
\\
libasio ^1.28.0
{
  require
  {
    config.libasio.ssl = true
  }
}
\\
```

Note that on some platforms (such as MinGW) it may be necessary for
applications to define `_WIN32_WINNT` to an appropriate value. If it's not
defined the library's `config.hpp` header will issue a warning and choose a
default (currently `0x0601`, meaning Windows 7 and later; this is also the
value that the library is built with).

\
package-description-type: text/markdown;variant=GFM
url: https://think-async.com/Asio/
src-url: https://github.com/chriskohlhoff/asio/
package-url: https://github.com/build2-packaging/libasio/
email: https://sourceforge.net/p/asio/mailman/asio-users/; Mailing list.
package-email: packaging@build2.org; Mailing list.
build-error-email: builds@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: libssl >= 1.1.1 ? ($config.libasio.ssl)
depends: libcrypto >= 1.1.1 ? ($config.libasio.ssl)
ssl-build-config: config.libasio.ssl=true; Enable SSL support.
bootstrap-build:
\
project = libasio

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# If true, enable SSL support.
#
config [bool] config.libasio.ssl ?= false

\
location: libasio/libasio-1.36.0.tar.gz
sha256sum: d39d378cb0c68375e90aebcd6aeef02218896c076a5170ca556eeb61230ece5a
:
name: libavcodec
version: 7.0.2+2
language: c
project: FFmpeg
summary: Utility library to aid portable multimedia programming
license: LGPL-2.1-or-later; GNU Lesser General Public License v2.1 or later.
description:
\
Libavcodec Documentation
************************


1 Description
2 See Also
3 Authors
1 Description
*************

The libavcodec library provides a generic encoding/decoding framework
and contains multiple decoders and encoders for audio, video and
subtitle streams, and several bitstream filters.

   The shared architecture provides various services ranging from bit
stream I/O to DSP optimizations, and makes it suitable for implementing
robust and fast codecs as well as for experimentation.

2 See Also
**********

ffmpeg(1), ffplay(1), ffprobe(1), ffmpeg-codecs(1),
ffmpeg-bitstream-filters(1), libavutil(3)

3 Authors
*********

The FFmpeg developers.

   For details about the authorship, see the Git history of the project
(https://git.ffmpeg.org/ffmpeg), e.g.  by typing the command ‘git log’
in the FFmpeg source directory, or browsing the online repository at
<https://git.ffmpeg.org/ffmpeg>.

   Maintainers for the specific components are listed in the file
‘MAINTAINERS’ in the source code tree.


\
description-type: text/plain
package-description:
\
# libavcodec - A C library

This is a `build2` package for the [`libavcodec`](https://github.com/FFmpeg/F\
Fmpeg)
C library. It provides a generic encoding/decoding framework
and contains multiple decoders and encoders for audio, video and
subtitle streams, and several bitstream filters.


## Usage

To start using `libavcodec` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libavcodec ^7.0.2
```

Then import the library in your `buildfile`:

```
import libs = libavcodec%lib{avcodec}
```


## Importable targets

This package provides the following importable targets:

```
lib{avcodec}
```

The `libavcodec` library provides a generic encoding/decoding framework
and contains multiple decoders and encoders for audio, video and
subtitle streams, and several bitstream filters.

\
package-description-type: text/markdown;variant=GFM
url: https://git.ffmpeg.org/ffmpeg.git
package-url: https://github.com/build2-packaging/build2-FFmpeg
email: libav-user@ffmpeg.org; Mailing list.
package-email: libav-user@ffmpeg.org; Mailing list.
depends: * build2 >= 0.18.0-
depends: * bpkg >= 0.18.0-
depends: * nasm ^2.16.3
depends: libavutil == 7.0.2
depends: libswresample == 7.0.2
depends: libz ^1.2.1200
bootstrap-build:
\
project = libavcodec

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

c.std = 17

using c
using c.as-cpp
using c.predefs

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

if ($build.mode != 'skeleton')
  source build/common-configs.build

\
location: FFmpeg/libavcodec-7.0.2+2.tar.gz
sha256sum: 1e4cc24c138be69b552f3803474e04b92b577fa6a94f53e6e1552ba98d6ee346
:
name: libavdevice
version: 7.0.2+2
language: c
project: FFmpeg
summary: Utility library to aid portable multimedia programming
license: LGPL-2.1-or-later; GNU Lesser General Public License v2.1 or later.
description:
\
Libavdevice Documentation
*************************


1 Description
2 See Also
3 Authors
1 Description
*************

The libavdevice library provides a generic framework for grabbing from
and rendering to many common multimedia input/output devices, and
supports several input and output devices, including Video4Linux2, VfW,
DShow, and ALSA.

2 See Also
**********

ffmpeg(1), ffplay(1), ffprobe(1), ffmpeg-devices(1), libavutil(3),
libavcodec(3), libavformat(3)

3 Authors
*********

The FFmpeg developers.

   For details about the authorship, see the Git history of the project
(https://git.ffmpeg.org/ffmpeg), e.g.  by typing the command ‘git log’
in the FFmpeg source directory, or browsing the online repository at
<https://git.ffmpeg.org/ffmpeg>.

   Maintainers for the specific components are listed in the file
‘MAINTAINERS’ in the source code tree.


\
description-type: text/plain
package-description:
\
# libavdevice - A C library

This is a `build2` package for the [`libavdevice`](https://github.com/FFmpeg/\
FFmpeg)
C library. It provides a generic framework for grabbing from
and rendering to many common multimedia input/output devices.


## Usage

To start using `libavdevice` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libavdevice ^7.0.2
```

Then import the library in your `buildfile`:

```
import libs = libavdevice%lib{avdevice}
```


## Importable targets

This package provides the following importable targets:

```
lib{avdevice}
```

The `libavdevice` library provides a generic framework for grabbing from
and rendering to many common multimedia input/output devices, and
supports several input and output devices, including Video4Linux2, VfW,
DShow, and ALSA.

\
package-description-type: text/markdown;variant=GFM
url: https://git.ffmpeg.org/ffmpeg.git
package-url: https://github.com/build2-packaging/build2-FFmpeg
email: libav-user@ffmpeg.org; Mailing list.
package-email: libav-user@ffmpeg.org; Mailing list.
depends: * build2 >= 0.18.0-
depends: * bpkg >= 0.18.0-
depends: * nasm ^2.16.3
depends: libavutil == 7.0.2
depends: libavformat == 7.0.2
bootstrap-build:
\
project = libavdevice

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

c.std = 17

using c
using c.as-cpp
using c.predefs
using c.objc

h{*}: extension = h
c{*}: extension = c

cxx.std = latest

using cxx

cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

if ($build.mode != 'skeleton')
  source build/common-configs.build

\
location: FFmpeg/libavdevice-7.0.2+2.tar.gz
sha256sum: a76fdade7899575b786a77e3b240d643750de6b1fc2a6769cb5e994348fbda5f
:
name: libavfilter
version: 7.0.2+2
language: c
project: FFmpeg
summary: Utility library to aid portable multimedia programming
license: LGPL-2.1-or-later; GNU Lesser General Public License v2.1 or later.
description:
\
Libavfilter Documentation
*************************


1 Description
2 See Also
3 Authors
1 Description
*************

The libavfilter library provides a generic audio/video filtering
framework containing several filters, sources and sinks.

2 See Also
**********

ffmpeg(1), ffplay(1), ffprobe(1), ffmpeg-filters(1), libavutil(3),
libswscale(3), libswresample(3), libavcodec(3), libavformat(3),
libavdevice(3)

3 Authors
*********

The FFmpeg developers.

   For details about the authorship, see the Git history of the project
(https://git.ffmpeg.org/ffmpeg), e.g.  by typing the command ‘git log’
in the FFmpeg source directory, or browsing the online repository at
<https://git.ffmpeg.org/ffmpeg>.

   Maintainers for the specific components are listed in the file
‘MAINTAINERS’ in the source code tree.


\
description-type: text/plain
package-description:
\
# libavfilter - A C library

This is a `build2` package for the [`libavfilter`](https://github.com/FFmpeg/\
FFmpeg)
C library. It provides a generic audio/video filtering
framework containing several filters, sources and sinks.


## Usage

To start using `libavfilter` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libavfilter ^7.0.2
```

Then import the library in your `buildfile`:

```
import libs = libavfilter%lib{avfilter}
```


## Importable targets

This package provides the following importable targets:

```
lib{avfilter}
```

The `libavfilter` library provides a generic audio/video filtering
framework containing several filters, sources and sinks.

\
package-description-type: text/markdown;variant=GFM
url: https://git.ffmpeg.org/ffmpeg.git
package-url: https://github.com/build2-packaging/build2-FFmpeg
email: libav-user@ffmpeg.org; Mailing list.
package-email: libav-user@ffmpeg.org; Mailing list.
depends: * build2 >= 0.18.0-
depends: * bpkg >= 0.18.0-
depends: * nasm ^2.16.3
depends: libavutil == 7.0.2
depends: libswscale == 7.0.2
depends: libavcodec == 7.0.2
depends: libavformat == 7.0.2
bootstrap-build:
\
project = libavfilter

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

c.std = 17

using c
using c.as-cpp
using c.predefs

using c.objc

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

if ($build.mode != 'skeleton')
  source build/common-configs.build

\
location: FFmpeg/libavfilter-7.0.2+2.tar.gz
sha256sum: 771c3daf970a2fd83e6d18c43c6d71e23ed5cb00a3d19c44058462f6f7a65237
:
name: libavformat
version: 7.0.2+2
language: c
project: FFmpeg
summary: Utility library to aid portable multimedia programming
license: LGPL-2.1-or-later; GNU Lesser General Public License v2.1 or later.
description:
\
Libavformat Documentation
*************************


1 Description
2 See Also
3 Authors
1 Description
*************

The libavformat library provides a generic framework for multiplexing
and demultiplexing (muxing and demuxing) audio, video and subtitle
streams.  It encompasses multiple muxers and demuxers for multimedia
container formats.

   It also supports several input and output protocols to access a media
resource.

2 See Also
**********

ffmpeg(1), ffplay(1), ffprobe(1), ffmpeg-formats(1),
ffmpeg-protocols(1), libavutil(3), libavcodec(3)

3 Authors
*********

The FFmpeg developers.

   For details about the authorship, see the Git history of the project
(https://git.ffmpeg.org/ffmpeg), e.g.  by typing the command ‘git log’
in the FFmpeg source directory, or browsing the online repository at
<https://git.ffmpeg.org/ffmpeg>.

   Maintainers for the specific components are listed in the file
‘MAINTAINERS’ in the source code tree.


\
description-type: text/plain
package-description:
\
# libavformat - A C library

This is a `build2` package for the [`libavformat`](https://github.com/FFmpeg/\
FFmpeg)
C library. It provides a generic framework for multiplexing
and demultiplexing (muxing and demuxing) audio, video and subtitle
streams.


## Usage

To start using `libavformat` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libavformat ^7.0.2
```

Then import the library in your `buildfile`:

```
import libs = libavformat%lib{avformat}
```


## Importable targets

This package provides the following importable targets:

```
lib{avformat}
```

The `libavformat` library provides a generic framework for multiplexing
and demultiplexing (muxing and demuxing) audio, video and subtitle
streams.  It encompasses multiple muxers and demuxers for multimedia
container formats.

\
package-description-type: text/markdown;variant=GFM
url: https://git.ffmpeg.org/ffmpeg.git
package-url: https://github.com/build2-packaging/build2-FFmpeg
email: libav-user@ffmpeg.org; Mailing list.
package-email: libav-user@ffmpeg.org; Mailing list.
depends: * build2 >= 0.18.0-
depends: * bpkg >= 0.18.0-
depends: * nasm ^2.16.3
depends: libavutil == 7.0.2
depends: libavcodec == 7.0.2
depends: libz ^1.2.1200
bootstrap-build:
\
project = libavformat

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

c.std = 17

using c
using c.as-cpp
using c.predefs

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

if ($build.mode != 'skeleton')
  source build/common-configs.build

\
location: FFmpeg/libavformat-7.0.2+2.tar.gz
sha256sum: 8f4872fc7125b36e84741e4fa5765e68f3dc653e52a53876380035dfe2f14965
:
name: libavutil
version: 7.0.2+2
language: c
project: FFmpeg
summary: Utility library to aid portable multimedia programming
license: LGPL-2.1-or-later; GNU Lesser General Public License v2.1 or later.
description:
\
Libavutil Documentation
***********************


1 Description
2 See Also
3 Authors
1 Description
*************

The libavutil library is a utility library to aid portable multimedia
programming.  It contains safe portable string functions, random number
generators, data structures, additional mathematics functions,
cryptography and multimedia related functionality (like enumerations for
pixel and sample formats).  It is not a library for code needed by both
libavcodec and libavformat.

   The goals for this library is to be:

*Modular*
     It should have few interdependencies and the possibility of
     disabling individual parts during ‘./configure’.

*Small*
     Both sources and objects should be small.

*Efficient*
     It should have low CPU and memory usage.

*Useful*
     It should avoid useless features that almost no one needs.

2 See Also
**********

ffmpeg(1), ffplay(1), ffprobe(1), ffmpeg-utils(1)

3 Authors
*********

The FFmpeg developers.

   For details about the authorship, see the Git history of the project
(https://git.ffmpeg.org/ffmpeg), e.g.  by typing the command ‘git log’
in the FFmpeg source directory, or browsing the online repository at
<https://git.ffmpeg.org/ffmpeg>.

   Maintainers for the specific components are listed in the file
‘MAINTAINERS’ in the source code tree.


\
description-type: text/plain
package-description:
\
# libavutil - A C library

This is a `build2` package for the [`libavutil`](https://github.com/FFmpeg/FF\
mpeg)
C library. It provides safe portable string functions, random number
generators, data structures, additional mathematics functions,
cryptography and multimedia related functionality (like enumerations for
pixel and sample formats).


## Usage

To start using `libavutil` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libavutil ^7.0.2
```

Then import the library in your `buildfile`:

```
import libs = libavutil%lib{avutil}
```


## Importable targets

This package provides the following importable targets:

```
lib{avutil}
```

The `libavutil` library is a utility library to aid portable multimedia
programming.  It contains safe portable string functions, random number
generators, data structures, additional mathematics functions,
cryptography and multimedia related functionality (like enumerations for
pixel and sample formats).  It is not a library for code needed by both
libavcodec and libavformat.


## Configuration variables

This package provides thousands of configuration variables.
See [`root.build`](./build/root.build) for full list.

\
package-description-type: text/markdown;variant=GFM
url: https://git.ffmpeg.org/ffmpeg.git
package-url: https://github.com/build2-packaging/FFmpeg
email: libav-user@ffmpeg.org; Mailing list.
package-email: libav-user@ffmpeg.org; Mailing list.
depends: * build2 >= 0.18.0-
depends: * bpkg >= 0.18.0-
depends: * nasm ^2.16.3
bootstrap-build:
\
project = libavutil

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

c.std = 17

using c
using c.as-cpp
using c.predefs

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

config [bool] config.libavutil.avcodec    ?= true
config [bool] config.libavutil.avdevice   ?= true
config [bool] config.libavutil.avfilter   ?= true
config [bool] config.libavutil.avformat   ?= true
config [bool] config.libavutil.avutil     ?= true
config [bool] config.libavutil.postproc   ?= true
config [bool] config.libavutil.swresample ?= true
config [bool] config.libavutil.swscale    ?= true

config [bool] config.libavutil.ffmpeg  ?= false
config [bool] config.libavutil.ffplay  ?= false
config [bool] config.libavutil.ffprobe ?= false

# Optimization options
# config [bool] config.libavutil.disable_asm                   ?= false #\
 disable all assembly optimizations
# config [bool] config.libavutil.disable_altivec               ?= false #\
 disable AltiVec optimizations
# config [bool] config.libavutil.disable_vsx                   ?= false #\
 disable VSX optimizations
# config [bool] config.libavutil.disable_power8                ?= false #\
 disable POWER8 optimizations
# config [bool] config.libavutil.disable_amd3dnow              ?= false #\
 disable 3DNow! optimizations
# config [bool] config.libavutil.disable_amd3dnowext           ?= false #\
 disable 3DNow! extended optimizations
config [bool] config.libavutil.disable_mmx                   ?= false #\
 disable MMX optimizations
config [bool] config.libavutil.disable_mmxext                ?= false #\
 disable MMXEXT optimizations
config [bool] config.libavutil.disable_sse                   ?= false #\
 disable SSE optimizations
config [bool] config.libavutil.disable_sse2                  ?= false #\
 disable SSE2 optimizations
config [bool] config.libavutil.disable_sse3                  ?= false #\
 disable SSE3 optimizations
config [bool] config.libavutil.disable_ssse3                 ?= false #\
 disable SSSE3 optimizations
config [bool] config.libavutil.disable_sse4                  ?= false #\
 disable SSE4 optimizations
config [bool] config.libavutil.disable_sse42                 ?= false #\
 disable SSE4.2 optimizations
# config [bool] config.libavutil.disable_xop                   ?= false #\
 disable XOP optimizations
config [bool] config.libavutil.disable_fma3                  ?= false #\
 disable FMA3 optimizations
config [bool] config.libavutil.disable_fma4                  ?= false #\
 disable FMA4 optimizations
config [bool] config.libavutil.disable_avx                   ?= false #\
 disable AVX optimizations
config [bool] config.libavutil.disable_avx2                  ?= false #\
 disable AVX2 optimizations
config [bool] config.libavutil.disable_avx512                ?= false #\
 disable AVX-512 optimizations
config [bool] config.libavutil.disable_avx512icl             ?= false #\
 disable AVX-512ICL optimizations
config [bool] config.libavutil.disable_aesni                 ?= false #\
 disable AESNI optimizations
# config [bool] config.libavutil.disable_armv5te               ?= false #\
 disable armv5te optimizations
# config [bool] config.libavutil.disable_armv6                 ?= false #\
 disable armv6 optimizations
# config [bool] config.libavutil.disable_armv6t2               ?= false #\
 disable armv6t2 optimizations
# config [bool] config.libavutil.disable_vfp                   ?= false #\
 disable VFP optimizations
config [bool] config.libavutil.disable_neon                  ?= false #\
 disable NEON optimizations
# config [bool] config.libavutil.disable_dotprod               ?= false #\
 disable DOTPROD optimizations
# config [bool] config.libavutil.disable_i8mm                  ?= false #\
 disable I8MM optimizations
# config [bool] config.libavutil.disable_inline-asm            ?= false #\
 disable use of inline assembly
# config [bool] config.libavutil.disable_x86asm                ?= false #\
 disable use of standalone x86 assembly
# config [bool] config.libavutil.disable_mipsdsp               ?= false #\
 disable MIPS DSP ASE R1 optimizations
# config [bool] config.libavutil.disable_mipsdspr2             ?= false #\
 disable MIPS DSP ASE R2 optimizations
# config [bool] config.libavutil.disable_msa                   ?= false #\
 disable MSA optimizations
# config [bool] config.libavutil.disable_mipsfpu               ?= false #\
 disable floating point MIPS optimizations
# config [bool] config.libavutil.disable_mmi                   ?= false #\
 disable Loongson MMI optimizations
# config [bool] config.libavutil.disable_lsx                   ?= false #\
 disable Loongson LSX optimizations
# config [bool] config.libavutil.disable_lasx                  ?= false #\
 disable Loongson LASX optimizations
config [bool] config.libavutil.disable_rvv                   ?= false #\
 disable RISC-V Vector optimizations
# config [bool] config.libavutil.disable_fast-unaligned        ?= false #\
 consider unaligned accesses slow

config [bool] config.libavutil.have_compile_time_nan         ?=\
 ($c.target.class != 'windows')

# Configuration Options
config [bool] config.libavutil.doc                           ?= false
config [bool] config.libavutil.htmlpages                     ?= false
config [bool] config.libavutil.manpages                      ?= false
config [bool] config.libavutil.podpages                      ?= false
config [bool] config.libavutil.txtpages                      ?= false
config [bool] config.libavutil.avio_http_serve_files_example ?= false
config [bool] config.libavutil.avio_list_dir_example         ?= false
config [bool] config.libavutil.avio_read_callback_example    ?= false
config [bool] config.libavutil.decode_audio_example          ?= false
config [bool] config.libavutil.decode_filter_audio_example   ?= false
config [bool] config.libavutil.decode_filter_video_example   ?= false
config [bool] config.libavutil.decode_video_example          ?= false
config [bool] config.libavutil.demux_decode_example          ?= false
config [bool] config.libavutil.encode_audio_example          ?= false
config [bool] config.libavutil.encode_video_example          ?= false
config [bool] config.libavutil.extract_mvs_example           ?= false
config [bool] config.libavutil.filter_audio_example          ?= false
config [bool] config.libavutil.hw_decode_example             ?= false
config [bool] config.libavutil.mux_example                   ?= false
config [bool] config.libavutil.qsv_decode_example            ?= false
config [bool] config.libavutil.remux_example                 ?= false
config [bool] config.libavutil.resample_audio_example        ?= false
config [bool] config.libavutil.scale_video_example           ?= false
config [bool] config.libavutil.show_metadata_example         ?= false
config [bool] config.libavutil.transcode_aac_example         ?= false
config [bool] config.libavutil.transcode_example             ?= false
config [bool] config.libavutil.vaapi_encode_example          ?= false
config [bool] config.libavutil.vaapi_transcode_example       ?= false
config [bool] config.libavutil.qsv_transcode_example         ?= false
config [bool] config.libavutil.avisynth                      ?= false
config [bool] config.libavutil.frei0r                        ?= false
config [bool] config.libavutil.libcdio                       ?= false
config [bool] config.libavutil.libdavs2                      ?= false
config [bool] config.libavutil.libdvdnav                     ?= false
config [bool] config.libavutil.libdvdread                    ?= false
config [bool] config.libavutil.librubberband                 ?= false
config [bool] config.libavutil.libvidstab                    ?= false
config [bool] config.libavutil.libx264                       ?= false
config [bool] config.libavutil.libx265                       ?= false
config [bool] config.libavutil.libxavs                       ?= false
config [bool] config.libavutil.libxavs2                      ?= false
config [bool] config.libavutil.libxvid                       ?= false
config [bool] config.libavutil.decklink                      ?= false
config [bool] config.libavutil.libfdk_aac                    ?= false
config [bool] config.libavutil.libtls                        ?= false
config [bool] config.libavutil.gmp                           ?= false
config [bool] config.libavutil.libaribb24                    ?= false
config [bool] config.libavutil.liblensfun                    ?= false
config [bool] config.libavutil.libopencore_amrnb             ?= false
config [bool] config.libavutil.libopencore_amrwb             ?= false
config [bool] config.libavutil.libvo_amrwbenc                ?= false
config [bool] config.libavutil.mbedtls                       ?= false
config [bool] config.libavutil.rkmpp                         ?= false
config [bool] config.libavutil.libsmbclient                  ?= false
config [bool] config.libavutil.chromaprint                   ?= false
config [bool] config.libavutil.gcrypt                        ?= false
config [bool] config.libavutil.gnutls                        ?= false
config [bool] config.libavutil.jni                           ?= false
config [bool] config.libavutil.ladspa                        ?= false
config [bool] config.libavutil.lcms2                         ?= false
config [bool] config.libavutil.libaom                        ?= false
config [bool] config.libavutil.libaribcaption                ?= false
config [bool] config.libavutil.libass                        ?= false
config [bool] config.libavutil.libbluray                     ?= false
config [bool] config.libavutil.libbs2b                       ?= false
config [bool] config.libavutil.libcaca                       ?= false
config [bool] config.libavutil.libcelt                       ?= false
config [bool] config.libavutil.libcodec2                     ?= false
config [bool] config.libavutil.libdav1d                      ?= false
config [bool] config.libavutil.libdc1394                     ?= false
config [bool] config.libavutil.libflite                      ?= false
config [bool] config.libavutil.libfontconfig                 ?= false
config [bool] config.libavutil.libfreetype                   ?= false
config [bool] config.libavutil.libfribidi                    ?= false
config [bool] config.libavutil.libharfbuzz                   ?= false
config [bool] config.libavutil.libglslang                    ?= false
config [bool] config.libavutil.libgme                        ?= false
config [bool] config.libavutil.libgsm                        ?= false
config [bool] config.libavutil.libiec61883                   ?= false
config [bool] config.libavutil.libilbc                       ?= false
config [bool] config.libavutil.libjack                       ?= false
config [bool] config.libavutil.libjxl                        ?= false
config [bool] config.libavutil.libklvanc                     ?= false
config [bool] config.libavutil.libkvazaar                    ?= false
config [bool] config.libavutil.libmodplug                    ?= false
config [bool] config.libavutil.libmp3lame                    ?= false
config [bool] config.libavutil.libmysofa                     ?= false
config [bool] config.libavutil.libopencv                     ?= false
config [bool] config.libavutil.libopenh264                   ?= false
config [bool] config.libavutil.libopenjpeg                   ?= false
config [bool] config.libavutil.libopenmpt                    ?= false
config [bool] config.libavutil.libopenvino                   ?= false
config [bool] config.libavutil.libopus                       ?= false
config [bool] config.libavutil.libplacebo                    ?= false
config [bool] config.libavutil.libpulse                      ?= false
config [bool] config.libavutil.libqrencode                   ?= false
config [bool] config.libavutil.libquirc                      ?= false
config [bool] config.libavutil.librabbitmq                   ?= false
config [bool] config.libavutil.librav1e                      ?= false
config [bool] config.libavutil.librist                       ?= false
config [bool] config.libavutil.librsvg                       ?= false
config [bool] config.libavutil.librtmp                       ?= false
config [bool] config.libavutil.libshaderc                    ?= false
config [bool] config.libavutil.libshine                      ?= false
config [bool] config.libavutil.libsmbclient                  ?= false
config [bool] config.libavutil.libsnappy                     ?= false
config [bool] config.libavutil.libsoxr                       ?= false
config [bool] config.libavutil.libspeex                      ?= false
config [bool] config.libavutil.libsrt                        ?= false
config [bool] config.libavutil.libssh                        ?= false
config [bool] config.libavutil.libsvtav1                     ?= false
config [bool] config.libavutil.libtensorflow                 ?= false
config [bool] config.libavutil.libtesseract                  ?= false
config [bool] config.libavutil.libtheora                     ?= false
config [bool] config.libavutil.libtorch                      ?= false
config [bool] config.libavutil.libtwolame                    ?= false
config [bool] config.libavutil.libuavs3d                     ?= false
config [bool] config.libavutil.libv4l2                       ?= false
config [bool] config.libavutil.libvmaf                       ?= false
config [bool] config.libavutil.libvorbis                     ?= false
config [bool] config.libavutil.libvpx                        ?= false
config [bool] config.libavutil.libwebp                       ?= false
config [bool] config.libavutil.libxevd                       ?= false
config [bool] config.libavutil.libxeve                       ?= false
config [bool] config.libavutil.libxml2                       ?= false
config [bool] config.libavutil.libzimg                       ?= false
config [bool] config.libavutil.libzmq                        ?= false
config [bool] config.libavutil.libzvbi                       ?= false
config [bool] config.libavutil.lv2                           ?= false
config [bool] config.libavutil.mediacodec                    ?= false
config [bool] config.libavutil.openal                        ?= false
config [bool] config.libavutil.opengl                        ?= false
config [bool] config.libavutil.openssl                       ?= false
config [bool] config.libavutil.pocketsphinx                  ?= false
config [bool] config.libavutil.vapoursynth                   ?= false
config [bool] config.libavutil.alsa                          ?= false
config [bool] config.libavutil.appkit                        ?= false
config [bool] config.libavutil.avfoundation                  ?= false
config [bool] config.libavutil.bzlib                         ?= false
config [bool] config.libavutil.coreimage                     ?= false
config [bool] config.libavutil.iconv                         ?= false
config [bool] config.libavutil.libxcb                        ?= false
config [bool] config.libavutil.libxcb_shm                    ?= false
config [bool] config.libavutil.libxcb_shape                  ?= false
config [bool] config.libavutil.libxcb_xfixes                 ?= false
config [bool] config.libavutil.lzma                          ?= false
config [bool] config.libavutil.mediafoundation               ?= false
config [bool] config.libavutil.metal                         ?= false
config [bool] config.libavutil.schannel                      ?= false
config [bool] config.libavutil.sdl2                          ?= false
config [bool] config.libavutil.securetransport               ?= false
config [bool] config.libavutil.sndio                         ?= false
config [bool] config.libavutil.xlib                          ?= false
config [bool] config.libavutil.zlib                          ?= true
config [bool] config.libavutil.cuda_nvcc                     ?= false
config [bool] config.libavutil.cuda_sdk                      ?= false
config [bool] config.libavutil.libnpp                        ?= false
config [bool] config.libavutil.libmfx                        ?= false
config [bool] config.libavutil.libvpl                        ?= false
config [bool] config.libavutil.mmal                          ?= false
config [bool] config.libavutil.omx                           ?= false
config [bool] config.libavutil.opencl                        ?= false
config [bool] config.libavutil.amf                           ?= false
config [bool] config.libavutil.audiotoolbox                  ?= false
config [bool] config.libavutil.cuda                          ?= false
config [bool] config.libavutil.cuda_llvm                     ?= false
config [bool] config.libavutil.cuvid                         ?= false
config [bool] config.libavutil.d3d11va                       ?= false
config [bool] config.libavutil.d3d12va                       ?= false
config [bool] config.libavutil.dxva2                         ?= false
config [bool] config.libavutil.ffnvcodec                     ?= false
config [bool] config.libavutil.libdrm                        ?= false
config [bool] config.libavutil.nvdec                         ?= false
config [bool] config.libavutil.nvenc                         ?= false
config [bool] config.libavutil.vaapi                         ?= false
config [bool] config.libavutil.vdpau                         ?= false
config [bool] config.libavutil.videotoolbox                  ?= false
config [bool] config.libavutil.vulkan                        ?= false
config [bool] config.libavutil.v4l2_m2m                      ?= false
config [bool] config.libavutil.ftrapv                        ?= false
config [bool] config.libavutil.gray                          ?= false
config [bool] config.libavutil.hardcoded_tables              ?= false
config [bool] config.libavutil.omx_rpi                       ?= false
config [bool] config.libavutil.runtime_cpudetect             ?= false
config [bool] config.libavutil.safe_bitstream_reader         ?= false
config [bool] config.libavutil.small                         ?= false
config [bool] config.libavutil.swscale_alpha                 ?= false
config [bool] config.libavutil.gpl                           ?= false
config [bool] config.libavutil.nonfree                       ?= false
config [bool] config.libavutil.version3                      ?= false
config [bool] config.libavutil.dwt                           ?= false
config [bool] config.libavutil.error_resilience              ?= true
config [bool] config.libavutil.faan                          ?= false
config [bool] config.libavutil.fast_unaligned                ?= false
config [bool] config.libavutil.lsp                           ?= false
config [bool] config.libavutil.pixelutils                    ?= true
config [bool] config.libavutil.network                       ?= true
config [bool] config.libavutil.autodetect                    ?= false
config [bool] config.libavutil.fontconfig                    ?= false
config [bool] config.libavutil.large_tests                   ?= false
config [bool] config.libavutil.linux_perf                    ?= false
config [bool] config.libavutil.macos_kperf                   ?= false
config [bool] config.libavutil.memory_poisoning              ?= false
config [bool] config.libavutil.neon_clobber_test             ?= false
config [bool] config.libavutil.ossfuzz                       ?= false
config [bool] config.libavutil.ptx_compression               ?= true
config [bool] config.libavutil.thumb                         ?= false
config [bool] config.libavutil.valgrind_backtrace            ?= false
config [bool] config.libavutil.xmm_clobber_test              ?= false
config [bool] config.libavutil.bsfs                          ?= true
config [bool] config.libavutil.decoders                      ?= true
config [bool] config.libavutil.encoders                      ?= true
config [bool] config.libavutil.hwaccels                      ?= true
config [bool] config.libavutil.parsers                       ?= true
config [bool] config.libavutil.indevs                        ?= true
config [bool] config.libavutil.outdevs                       ?= true
config [bool] config.libavutil.filters                       ?= true
config [bool] config.libavutil.demuxers                      ?= true
config [bool] config.libavutil.muxers                        ?= true
config [bool] config.libavutil.protocols                     ?= true
config [bool] config.libavutil.aandcttables                  ?= true
config [bool] config.libavutil.ac3dsp                        ?= false
config [bool] config.libavutil.adts_header                   ?= true
config [bool] config.libavutil.atsc_a53                      ?= true
config [bool] config.libavutil.audio_frame_queue             ?= true
config [bool] config.libavutil.audiodsp                      ?= true
config [bool] config.libavutil.blockdsp                      ?= true
config [bool] config.libavutil.bswapdsp                      ?= true
config [bool] config.libavutil.cabac                         ?= true
config [bool] config.libavutil.cbs                           ?= true
config [bool] config.libavutil.cbs_av1                       ?= true
config [bool] config.libavutil.cbs_h264                      ?= true
config [bool] config.libavutil.cbs_h265                      ?= false
config [bool] config.libavutil.cbs_h266                      ?= false
config [bool] config.libavutil.cbs_jpeg                      ?= false
config [bool] config.libavutil.cbs_mpeg2                     ?= true
config [bool] config.libavutil.cbs_vp8                       ?= false
config [bool] config.libavutil.cbs_vp9                       ?= false
config [bool] config.libavutil.deflate_wrapper               ?= true
config [bool] config.libavutil.dirac_parse                   ?= true
config [bool] config.libavutil.dnn                           ?= false
config [bool] config.libavutil.dovi_rpu                      ?= true
config [bool] config.libavutil.dvprofile                     ?= true
config [bool] config.libavutil.evcparse                      ?= true
config [bool] config.libavutil.exif                          ?= true
config [bool] config.libavutil.faandct                       ?= false
config [bool] config.libavutil.faanidct                      ?= false
config [bool] config.libavutil.fdctdsp                       ?= true
config [bool] config.libavutil.fmtconvert                    ?= true
config [bool] config.libavutil.frame_thread_encoder          ?= true
config [bool] config.libavutil.g722dsp                       ?= true
config [bool] config.libavutil.golomb                        ?= true
config [bool] config.libavutil.gplv3                         ?= false
config [bool] config.libavutil.h263dsp                       ?= true
config [bool] config.libavutil.h264chroma                    ?= true
config [bool] config.libavutil.h264dsp                       ?= true
config [bool] config.libavutil.h264parse                     ?= true
config [bool] config.libavutil.h264pred                      ?= true
config [bool] config.libavutil.h264qpel                      ?= true
config [bool] config.libavutil.h264_sei                      ?= true
config [bool] config.libavutil.hevcparse                     ?= false
config [bool] config.libavutil.hevc_sei                      ?= false
config [bool] config.libavutil.hpeldsp                       ?= true
config [bool] config.libavutil.huffman                       ?= true
config [bool] config.libavutil.huffyuvdsp                    ?= true
config [bool] config.libavutil.huffyuvencdsp                 ?= true
config [bool] config.libavutil.iamfdec                       ?= true
config [bool] config.libavutil.iamfenc                       ?= true
config [bool] config.libavutil.idctdsp                       ?= true
config [bool] config.libavutil.iirfilter                     ?= true
config [bool] config.libavutil.inflate_wrapper               ?= true
config [bool] config.libavutil.intrax8                       ?= true
config [bool] config.libavutil.iso_media                     ?= true
config [bool] config.libavutil.ividsp                        ?= true
config [bool] config.libavutil.jpegtables                    ?= true
config [bool] config.libavutil.lgplv3                        ?= true
config [bool] config.libavutil.libx262                       ?= false
config [bool] config.libavutil.libx264_hdr10                 ?= false
config [bool] config.libavutil.llauddsp                      ?= true
config [bool] config.libavutil.llviddsp                      ?= true
config [bool] config.libavutil.llvidencdsp                   ?= true
config [bool] config.libavutil.lpc                           ?= true
config [bool] config.libavutil.lzf                           ?= true
config [bool] config.libavutil.me_cmp                        ?= true
config [bool] config.libavutil.mpeg_er                       ?= true
config [bool] config.libavutil.mpegaudio                     ?= true
config [bool] config.libavutil.mpegaudiodsp                  ?= true
config [bool] config.libavutil.mpegaudioheader               ?= true
config [bool] config.libavutil.mpeg4audio                    ?= true
config [bool] config.libavutil.mpegvideo                     ?= true
config [bool] config.libavutil.mpegvideodec                  ?= true
config [bool] config.libavutil.mpegvideoenc                  ?= true
config [bool] config.libavutil.msmpeg4dec                    ?= true
config [bool] config.libavutil.msmpeg4enc                    ?= true
config [bool] config.libavutil.mss34dsp                      ?= true
config [bool] config.libavutil.pixblockdsp                   ?= true
config [bool] config.libavutil.qpeldsp                       ?= true
config [bool] config.libavutil.qsv                           ?= false
config [bool] config.libavutil.qsvdec                        ?= false
config [bool] config.libavutil.qsvenc                        ?= false
config [bool] config.libavutil.qsvvpp                        ?= false
config [bool] config.libavutil.rangecoder                    ?= true
config [bool] config.libavutil.riffdec                       ?= true
config [bool] config.libavutil.riffenc                       ?= true
config [bool] config.libavutil.rtpdec                        ?= true
config [bool] config.libavutil.rtpenc_chain                  ?= true
config [bool] config.libavutil.rv34dsp                       ?= true
config [bool] config.libavutil.scene_sad                     ?= false
config [bool] config.libavutil.sinewin                       ?= true
config [bool] config.libavutil.snappy                        ?= false
config [bool] config.libavutil.srtp                          ?= true
config [bool] config.libavutil.startcode                     ?= true
config [bool] config.libavutil.texturedsp                    ?= true
config [bool] config.libavutil.texturedspenc                 ?= true
config [bool] config.libavutil.tpeldsp                       ?= true
config [bool] config.libavutil.vaapi_1                       ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.vaapi_encode                  ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.vc1dsp                        ?= true
config [bool] config.libavutil.videodsp                      ?= true
config [bool] config.libavutil.vp3dsp                        ?= false
config [bool] config.libavutil.vp56dsp                       ?= false
config [bool] config.libavutil.vp8dsp                        ?= false
config [bool] config.libavutil.wma_freqs                     ?= true
config [bool] config.libavutil.wmv2dsp                       ?= true

# config_components.h.in
config [bool] config.libavutil.aac_adtstoasc_bsf             ?= false
config [bool] config.libavutil.av1_frame_merge_bsf           ?= true
config [bool] config.libavutil.av1_frame_split_bsf           ?= true
config [bool] config.libavutil.av1_metadata_bsf              ?= true
config [bool] config.libavutil.chomp_bsf                     ?= true
config [bool] config.libavutil.dump_extradata_bsf            ?= true
config [bool] config.libavutil.dca_core_bsf                  ?= true
config [bool] config.libavutil.dovi_rpu_bsf                  ?= true
config [bool] config.libavutil.dts2pts_bsf                   ?= true
config [bool] config.libavutil.dv_error_marker_bsf           ?= false
config [bool] config.libavutil.eac3_core_bsf                 ?= false
config [bool] config.libavutil.evc_frame_merge_bsf           ?= true
config [bool] config.libavutil.extract_extradata_bsf         ?= true
config [bool] config.libavutil.filter_units_bsf              ?= true
config [bool] config.libavutil.h264_metadata_bsf             ?=\
 $config.libavutil.have_compile_time_nan
config [bool] config.libavutil.h264_mp4toannexb_bsf          ?= true
config [bool] config.libavutil.h264_redundant_pps_bsf        ?= true
config [bool] config.libavutil.hapqa_extract_bsf             ?= true
config [bool] config.libavutil.hevc_metadata_bsf             ?= true
config [bool] config.libavutil.hevc_mp4toannexb_bsf          ?= true
config [bool] config.libavutil.imx_dump_header_bsf           ?= true
config [bool] config.libavutil.media100_to_mjpegb_bsf        ?= true
config [bool] config.libavutil.mjpeg2jpeg_bsf                ?= true
config [bool] config.libavutil.mjpega_dump_header_bsf        ?= true
config [bool] config.libavutil.mpeg2_metadata_bsf            ?= true
config [bool] config.libavutil.mpeg4_unpack_bframes_bsf      ?= true
config [bool] config.libavutil.mov2textsub_bsf               ?= true
config [bool] config.libavutil.noise_bsf                     ?= true
config [bool] config.libavutil.null_bsf                      ?= true
config [bool] config.libavutil.opus_metadata_bsf             ?= false
config [bool] config.libavutil.pcm_rechunk_bsf               ?= true
config [bool] config.libavutil.pgs_frame_merge_bsf           ?= true
config [bool] config.libavutil.prores_metadata_bsf           ?= true
config [bool] config.libavutil.remove_extradata_bsf          ?= true
config [bool] config.libavutil.setts_bsf                     ?= true
config [bool] config.libavutil.showinfo_bsf                  ?= true
config [bool] config.libavutil.text2movsub_bsf               ?= true
config [bool] config.libavutil.trace_headers_bsf             ?= true
config [bool] config.libavutil.truehd_core_bsf               ?= true
config [bool] config.libavutil.vp9_metadata_bsf              ?= false
config [bool] config.libavutil.vp9_raw_reorder_bsf           ?= false
config [bool] config.libavutil.vp9_superframe_bsf            ?= false
config [bool] config.libavutil.vp9_superframe_split_bsf      ?= false
config [bool] config.libavutil.vvc_metadata_bsf              ?= true
config [bool] config.libavutil.vvc_mp4toannexb_bsf           ?= true
config [bool] config.libavutil.aasc_decoder                  ?= true
config [bool] config.libavutil.aic_decoder                   ?= true
config [bool] config.libavutil.alias_pix_decoder             ?= false
config [bool] config.libavutil.agm_decoder                   ?= true
config [bool] config.libavutil.amv_decoder                   ?= true
config [bool] config.libavutil.anm_decoder                   ?= true
config [bool] config.libavutil.ansi_decoder                  ?= true
config [bool] config.libavutil.apng_decoder                  ?= true
config [bool] config.libavutil.arbc_decoder                  ?= true
config [bool] config.libavutil.argo_decoder                  ?= true
config [bool] config.libavutil.asv1_decoder                  ?= true
config [bool] config.libavutil.asv2_decoder                  ?= true
config [bool] config.libavutil.aura_decoder                  ?= true
config [bool] config.libavutil.aura2_decoder                 ?= true
config [bool] config.libavutil.avrp_decoder                  ?= true
config [bool] config.libavutil.avrn_decoder                  ?= true
config [bool] config.libavutil.avs_decoder                   ?= true
config [bool] config.libavutil.avui_decoder                  ?= true
config [bool] config.libavutil.bethsoftvid_decoder           ?= true
config [bool] config.libavutil.bfi_decoder                   ?= true
config [bool] config.libavutil.bink_decoder                  ?= true
config [bool] config.libavutil.bitpacked_decoder             ?= true
config [bool] config.libavutil.bmp_decoder                   ?= true
config [bool] config.libavutil.bmv_video_decoder             ?= false
config [bool] config.libavutil.brender_pix_decoder           ?= false
config [bool] config.libavutil.c93_decoder                   ?= true
config [bool] config.libavutil.cavs_decoder                  ?= true
config [bool] config.libavutil.cdgraphics_decoder            ?= true
config [bool] config.libavutil.cdtoons_decoder               ?= true
config [bool] config.libavutil.cdxl_decoder                  ?= true
config [bool] config.libavutil.cfhd_decoder                  ?= true
config [bool] config.libavutil.cinepak_decoder               ?= true
config [bool] config.libavutil.clearvideo_decoder            ?= true
config [bool] config.libavutil.cljr_decoder                  ?= true
config [bool] config.libavutil.cllc_decoder                  ?= true
config [bool] config.libavutil.comfortnoise_decoder          ?= true
config [bool] config.libavutil.cpia_decoder                  ?= true
config [bool] config.libavutil.cri_decoder                   ?= true
config [bool] config.libavutil.cscd_decoder                  ?= true
config [bool] config.libavutil.cyuv_decoder                  ?= true
config [bool] config.libavutil.dds_decoder                   ?= true
config [bool] config.libavutil.dfa_decoder                   ?= true
config [bool] config.libavutil.dirac_decoder                 ?= true
config [bool] config.libavutil.dnxhd_decoder                 ?= true
config [bool] config.libavutil.dpx_decoder                   ?= true
config [bool] config.libavutil.dsicinvideo_decoder           ?= true
config [bool] config.libavutil.dvaudio_decoder               ?= true
config [bool] config.libavutil.dvvideo_decoder               ?= true
config [bool] config.libavutil.dxa_decoder                   ?= false
config [bool] config.libavutil.dxtory_decoder                ?= false
config [bool] config.libavutil.dxv_decoder                   ?= false
config [bool] config.libavutil.eacmv_decoder                 ?= true
config [bool] config.libavutil.eamad_decoder                 ?= true
config [bool] config.libavutil.eatgq_decoder                 ?= true
config [bool] config.libavutil.eatgv_decoder                 ?= true
config [bool] config.libavutil.eatqi_decoder                 ?= true
config [bool] config.libavutil.eightbps_decoder              ?= true
config [bool] config.libavutil.eightsvx_exp_decoder          ?= false
config [bool] config.libavutil.eightsvx_fib_decoder          ?= false
config [bool] config.libavutil.escape124_decoder             ?= true
config [bool] config.libavutil.escape130_decoder             ?= true
config [bool] config.libavutil.exr_decoder                   ?= true
config [bool] config.libavutil.ffv1_decoder                  ?= true
config [bool] config.libavutil.ffvhuff_decoder               ?= true
config [bool] config.libavutil.fic_decoder                   ?= true
config [bool] config.libavutil.fits_decoder                  ?= true
config [bool] config.libavutil.flashsv_decoder               ?= true
config [bool] config.libavutil.flashsv2_decoder              ?= true
config [bool] config.libavutil.flic_decoder                  ?= true
config [bool] config.libavutil.flv_decoder                   ?= true
config [bool] config.libavutil.fmvc_decoder                  ?= true
config [bool] config.libavutil.fourxm_decoder                ?= true
config [bool] config.libavutil.fraps_decoder                 ?= true
config [bool] config.libavutil.frwu_decoder                  ?= true
config [bool] config.libavutil.g2m_decoder                   ?= true
config [bool] config.libavutil.gdv_decoder                   ?= true
config [bool] config.libavutil.gem_decoder                   ?= true
config [bool] config.libavutil.gif_decoder                   ?= true
config [bool] config.libavutil.h261_decoder                  ?= true
config [bool] config.libavutil.h263_decoder                  ?= true
config [bool] config.libavutil.h263i_decoder                 ?= true
config [bool] config.libavutil.h263p_decoder                 ?= true
config [bool] config.libavutil.h263_v4l2m2m_decoder          ?= false
config [bool] config.libavutil.h264_decoder                  ?= true
config [bool] config.libavutil.h264_v4l2m2m_decoder          ?= false
config [bool] config.libavutil.h264_mediacodec_decoder       ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.h264_mmal_decoder             ?=\
 $config.libavutil.mmal
config [bool] config.libavutil.h264_qsv_decoder              ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.h264_rkmpp_decoder            ?=\
 $config.libavutil.rkmpp
config [bool] config.libavutil.hap_decoder                   ?= false
config [bool] config.libavutil.hevc_decoder                  ?= false
config [bool] config.libavutil.hevc_qsv_decoder              ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.hevc_rkmpp_decoder            ?=\
 $config.libavutil.rkmpp
config [bool] config.libavutil.hevc_v4l2m2m_decoder          ?= false
config [bool] config.libavutil.hnm4_video_decoder            ?= false
config [bool] config.libavutil.hq_hqa_decoder                ?= false
config [bool] config.libavutil.hqx_decoder                   ?= true
config [bool] config.libavutil.huffyuv_decoder               ?= true
config [bool] config.libavutil.hymt_decoder                  ?= true
config [bool] config.libavutil.idcin_decoder                 ?= true
config [bool] config.libavutil.iff_ilbm_decoder              ?= false
config [bool] config.libavutil.imm4_decoder                  ?= true
config [bool] config.libavutil.imm5_decoder                  ?= true
config [bool] config.libavutil.indeo2_decoder                ?= true
config [bool] config.libavutil.indeo3_decoder                ?= true
config [bool] config.libavutil.indeo4_decoder                ?= true
config [bool] config.libavutil.indeo5_decoder                ?= true
config [bool] config.libavutil.interplay_video_decoder       ?= false
config [bool] config.libavutil.ipu_decoder                   ?= true
config [bool] config.libavutil.jpeg2000_decoder              ?= true
config [bool] config.libavutil.jpegls_decoder                ?= true
config [bool] config.libavutil.jv_decoder                    ?= true
config [bool] config.libavutil.kgv1_decoder                  ?= true
config [bool] config.libavutil.kmvc_decoder                  ?= true
config [bool] config.libavutil.lagarith_decoder              ?= true
config [bool] config.libavutil.lead_decoder                  ?= true
config [bool] config.libavutil.loco_decoder                  ?= true
config [bool] config.libavutil.lscr_decoder                  ?= true
config [bool] config.libavutil.m101_decoder                  ?= true
config [bool] config.libavutil.magicyuv_decoder              ?= true
config [bool] config.libavutil.mdec_decoder                  ?= true
config [bool] config.libavutil.media100_decoder              ?= true
config [bool] config.libavutil.mimic_decoder                 ?= true
config [bool] config.libavutil.mjpeg_decoder                 ?= true
config [bool] config.libavutil.mjpegb_decoder                ?= true
config [bool] config.libavutil.mmvideo_decoder               ?= true
config [bool] config.libavutil.mobiclip_decoder              ?= true
config [bool] config.libavutil.motionpixels_decoder          ?= true
config [bool] config.libavutil.mpeg1video_decoder            ?= true
config [bool] config.libavutil.mpeg2video_decoder            ?= true
config [bool] config.libavutil.mpeg4_decoder                 ?= true
config [bool] config.libavutil.mpeg4_v4l2m2m_decoder         ?= false
config [bool] config.libavutil.mpeg4_mmal_decoder            ?=\
 $config.libavutil.mmal
config [bool] config.libavutil.mpegvideo_decoder             ?= true
config [bool] config.libavutil.mpeg1_v4l2m2m_decoder         ?= false
config [bool] config.libavutil.mpeg2_mmal_decoder            ?=\
 $config.libavutil.mmal
config [bool] config.libavutil.mpeg2_v4l2m2m_decoder         ?= false
config [bool] config.libavutil.mpeg2_qsv_decoder             ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.mpeg2_mediacodec_decoder      ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.msa1_decoder                  ?= false
config [bool] config.libavutil.mscc_decoder                  ?= false
config [bool] config.libavutil.msmpeg4v1_decoder             ?= false
config [bool] config.libavutil.msmpeg4v2_decoder             ?= false
config [bool] config.libavutil.msmpeg4v3_decoder             ?= false
config [bool] config.libavutil.msp2_decoder                  ?= false
config [bool] config.libavutil.msrle_decoder                 ?= false
config [bool] config.libavutil.mss1_decoder                  ?= false
config [bool] config.libavutil.mss2_decoder                  ?= false
config [bool] config.libavutil.msvideo1_decoder              ?= false
config [bool] config.libavutil.mszh_decoder                  ?= false
config [bool] config.libavutil.mts2_decoder                  ?= true
config [bool] config.libavutil.mv30_decoder                  ?= true
config [bool] config.libavutil.mvc1_decoder                  ?= true
config [bool] config.libavutil.mvc2_decoder                  ?= true
config [bool] config.libavutil.mvdv_decoder                  ?= true
config [bool] config.libavutil.mvha_decoder                  ?= true
config [bool] config.libavutil.mwsc_decoder                  ?= true
config [bool] config.libavutil.mxpeg_decoder                 ?= true
config [bool] config.libavutil.notchlc_decoder               ?= true
config [bool] config.libavutil.nuv_decoder                   ?= true
config [bool] config.libavutil.paf_video_decoder             ?= false
config [bool] config.libavutil.pam_decoder                   ?= true
config [bool] config.libavutil.pbm_decoder                   ?= true
config [bool] config.libavutil.pcx_decoder                   ?= true
config [bool] config.libavutil.pdv_decoder                   ?= true
config [bool] config.libavutil.pfm_decoder                   ?= true
config [bool] config.libavutil.pgm_decoder                   ?= true
config [bool] config.libavutil.pgmyuv_decoder                ?= true
config [bool] config.libavutil.pgx_decoder                   ?= true
config [bool] config.libavutil.phm_decoder                   ?= true
config [bool] config.libavutil.photocd_decoder               ?= true
config [bool] config.libavutil.pictor_decoder                ?= true
config [bool] config.libavutil.pixlet_decoder                ?= true
config [bool] config.libavutil.png_decoder                   ?= true
config [bool] config.libavutil.ppm_decoder                   ?= true
config [bool] config.libavutil.prores_decoder                ?= true
config [bool] config.libavutil.prosumer_decoder              ?= true
config [bool] config.libavutil.psd_decoder                   ?= true
config [bool] config.libavutil.ptx_decoder                   ?= true
config [bool] config.libavutil.qdraw_decoder                 ?= true
config [bool] config.libavutil.qoi_decoder                   ?= true
config [bool] config.libavutil.qpeg_decoder                  ?= true
config [bool] config.libavutil.qtrle_decoder                 ?= true
config [bool] config.libavutil.r10k_decoder                  ?= true
config [bool] config.libavutil.r210_decoder                  ?= true
config [bool] config.libavutil.rasc_decoder                  ?= true
config [bool] config.libavutil.rawvideo_decoder              ?= true
config [bool] config.libavutil.rka_decoder                   ?= true
config [bool] config.libavutil.rl2_decoder                   ?= true
config [bool] config.libavutil.roq_decoder                   ?= true
config [bool] config.libavutil.rpza_decoder                  ?= true
config [bool] config.libavutil.rscc_decoder                  ?= true
config [bool] config.libavutil.rtv1_decoder                  ?= true
config [bool] config.libavutil.rv10_decoder                  ?= true
config [bool] config.libavutil.rv20_decoder                  ?= true
config [bool] config.libavutil.rv30_decoder                  ?= true
config [bool] config.libavutil.rv40_decoder                  ?= true
config [bool] config.libavutil.s302m_decoder                 ?= true
config [bool] config.libavutil.sanm_decoder                  ?= true
config [bool] config.libavutil.scpr_decoder                  ?= true
config [bool] config.libavutil.screenpresso_decoder          ?= true
config [bool] config.libavutil.sga_decoder                   ?= true
config [bool] config.libavutil.sgi_decoder                   ?= true
config [bool] config.libavutil.sgirle_decoder                ?= true
config [bool] config.libavutil.sheervideo_decoder            ?= true
config [bool] config.libavutil.simbiosis_imx_decoder         ?= false
config [bool] config.libavutil.smacker_decoder               ?= true
config [bool] config.libavutil.smc_decoder                   ?= true
config [bool] config.libavutil.smvjpeg_decoder               ?= true
config [bool] config.libavutil.snow_decoder                  ?= true
config [bool] config.libavutil.sp5x_decoder                  ?= true
config [bool] config.libavutil.speedhq_decoder               ?= true
config [bool] config.libavutil.speex_decoder                 ?= true
config [bool] config.libavutil.srgc_decoder                  ?= true
config [bool] config.libavutil.sunrast_decoder               ?= true
config [bool] config.libavutil.svq1_decoder                  ?= true
config [bool] config.libavutil.svq3_decoder                  ?= true
config [bool] config.libavutil.targa_decoder                 ?= false
config [bool] config.libavutil.targa_y216_decoder            ?= false
config [bool] config.libavutil.tdsc_decoder                  ?= true
config [bool] config.libavutil.theora_decoder                ?= false
config [bool] config.libavutil.thp_decoder                   ?= true
config [bool] config.libavutil.tiertexseqvideo_decoder       ?= true
config [bool] config.libavutil.tiff_decoder                  ?= true
config [bool] config.libavutil.tmv_decoder                   ?= true
config [bool] config.libavutil.truemotion1_decoder           ?= true
config [bool] config.libavutil.truemotion2_decoder           ?= true
config [bool] config.libavutil.truemotion2rt_decoder         ?= true
config [bool] config.libavutil.tscc_decoder                  ?= true
config [bool] config.libavutil.tscc2_decoder                 ?= true
config [bool] config.libavutil.txd_decoder                   ?= true
config [bool] config.libavutil.ulti_decoder                  ?= true
config [bool] config.libavutil.utvideo_decoder               ?= true
config [bool] config.libavutil.v210_decoder                  ?= true
config [bool] config.libavutil.v210x_decoder                 ?= true
config [bool] config.libavutil.v308_decoder                  ?= true
config [bool] config.libavutil.v408_decoder                  ?= true
config [bool] config.libavutil.v410_decoder                  ?= true
config [bool] config.libavutil.vb_decoder                    ?= true
config [bool] config.libavutil.vbn_decoder                   ?= true
config [bool] config.libavutil.vble_decoder                  ?= true
config [bool] config.libavutil.vc1_decoder                   ?= true
config [bool] config.libavutil.vc1image_decoder              ?= true
config [bool] config.libavutil.vc1_mmal_decoder              ?=\
 $config.libavutil.mmal
config [bool] config.libavutil.vc1_qsv_decoder               ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.vc1_v4l2m2m_decoder           ?= false
config [bool] config.libavutil.vcr1_decoder                  ?= true
config [bool] config.libavutil.vmdvideo_decoder              ?= true
config [bool] config.libavutil.vmix_decoder                  ?= true
config [bool] config.libavutil.vmnc_decoder                  ?= true
config [bool] config.libavutil.vp3_decoder                   ?= false
config [bool] config.libavutil.vp4_decoder                   ?= false
config [bool] config.libavutil.vp5_decoder                   ?= false
config [bool] config.libavutil.vp6_decoder                   ?= false
config [bool] config.libavutil.vp6a_decoder                  ?= false
config [bool] config.libavutil.vp6f_decoder                  ?= false
config [bool] config.libavutil.vp7_decoder                   ?= false
config [bool] config.libavutil.vp8_decoder                   ?= false
config [bool] config.libavutil.vp8_rkmpp_decoder             ?=\
 $config.libavutil.rkmpp
config [bool] config.libavutil.vp8_v4l2m2m_decoder           ?= false
config [bool] config.libavutil.vp9_decoder                   ?= false
config [bool] config.libavutil.vp9_rkmpp_decoder             ?=\
 $config.libavutil.rkmpp
config [bool] config.libavutil.vp9_v4l2m2m_decoder           ?= false
config [bool] config.libavutil.vqa_decoder                   ?= true
config [bool] config.libavutil.vqc_decoder                   ?= true
config [bool] config.libavutil.vvc_decoder                   ?= true
config [bool] config.libavutil.wbmp_decoder                  ?= true
config [bool] config.libavutil.webp_decoder                  ?= false
config [bool] config.libavutil.wcmv_decoder                  ?= true
config [bool] config.libavutil.wrapped_avframe_decoder       ?= false
config [bool] config.libavutil.wmv1_decoder                  ?= true
config [bool] config.libavutil.wmv2_decoder                  ?= true
config [bool] config.libavutil.wmv3_decoder                  ?= true
config [bool] config.libavutil.wmv3image_decoder             ?= true
config [bool] config.libavutil.wnv1_decoder                  ?= true
config [bool] config.libavutil.xan_wc3_decoder               ?= false
config [bool] config.libavutil.xan_wc4_decoder               ?= false
config [bool] config.libavutil.xbm_decoder                   ?= true
config [bool] config.libavutil.xface_decoder                 ?= true
config [bool] config.libavutil.xl_decoder                    ?= true
config [bool] config.libavutil.xpm_decoder                   ?= true
config [bool] config.libavutil.xwd_decoder                   ?= true
config [bool] config.libavutil.y41p_decoder                  ?= true
config [bool] config.libavutil.ylc_decoder                   ?= true
config [bool] config.libavutil.yop_decoder                   ?= true
config [bool] config.libavutil.yuv4_decoder                  ?= true
config [bool] config.libavutil.zero12v_decoder               ?= true
config [bool] config.libavutil.zerocodec_decoder             ?= true
config [bool] config.libavutil.zlib_decoder                  ?= true
config [bool] config.libavutil.zmbv_decoder                  ?= true
config [bool] config.libavutil.aac_decoder                   ?= true
config [bool] config.libavutil.aac_fixed_decoder             ?= true
config [bool] config.libavutil.aac_latm_decoder              ?= false
config [bool] config.libavutil.ac3_decoder                   ?= false
config [bool] config.libavutil.ac3_fixed_decoder             ?= false
config [bool] config.libavutil.acelp_kelvin_decoder          ?= false
config [bool] config.libavutil.alac_decoder                  ?= true
config [bool] config.libavutil.als_decoder                   ?= true
config [bool] config.libavutil.amrnb_decoder                 ?= true
config [bool] config.libavutil.amrwb_decoder                 ?= true
config [bool] config.libavutil.apac_decoder                  ?= true
config [bool] config.libavutil.ape_decoder                   ?= true
config [bool] config.libavutil.aptx_decoder                  ?= true
config [bool] config.libavutil.aptx_hd_decoder               ?= false
config [bool] config.libavutil.atrac1_decoder                ?= true
config [bool] config.libavutil.atrac3_decoder                ?= true
config [bool] config.libavutil.atrac3al_decoder              ?= true
config [bool] config.libavutil.atrac3p_decoder               ?= true
config [bool] config.libavutil.atrac3pal_decoder             ?= true
config [bool] config.libavutil.atrac9_decoder                ?= true
config [bool] config.libavutil.binkaudio_dct_decoder         ?= false
config [bool] config.libavutil.binkaudio_rdft_decoder        ?= false
config [bool] config.libavutil.bmv_audio_decoder             ?= false
config [bool] config.libavutil.bonk_decoder                  ?= true
config [bool] config.libavutil.cook_decoder                  ?= true
config [bool] config.libavutil.dca_decoder                   ?= true
config [bool] config.libavutil.dfpwm_decoder                 ?= true
config [bool] config.libavutil.dolby_e_decoder               ?= false
config [bool] config.libavutil.dsd_lsbf_decoder              ?= false
config [bool] config.libavutil.dsd_msbf_decoder              ?= false
config [bool] config.libavutil.dsd_lsbf_planar_decoder       ?= false
config [bool] config.libavutil.dsd_msbf_planar_decoder       ?= false
config [bool] config.libavutil.dsicinaudio_decoder           ?= true
config [bool] config.libavutil.dss_sp_decoder                ?= false
config [bool] config.libavutil.dst_decoder                   ?= true
config [bool] config.libavutil.eac3_decoder                  ?= false
config [bool] config.libavutil.evrc_decoder                  ?= true
config [bool] config.libavutil.fastaudio_decoder             ?= true
config [bool] config.libavutil.ffwavesynth_decoder           ?= true
config [bool] config.libavutil.flac_decoder                  ?= true
config [bool] config.libavutil.ftr_decoder                   ?= true
config [bool] config.libavutil.g723_1_decoder                ?= false
config [bool] config.libavutil.g729_decoder                  ?= true
config [bool] config.libavutil.gsm_decoder                   ?= true
config [bool] config.libavutil.gsm_ms_decoder                ?= false
config [bool] config.libavutil.hca_decoder                   ?= true
config [bool] config.libavutil.hcom_decoder                  ?= true
config [bool] config.libavutil.hdr_decoder                   ?= true
config [bool] config.libavutil.iac_decoder                   ?= true
config [bool] config.libavutil.ilbc_decoder                  ?= true
config [bool] config.libavutil.imc_decoder                   ?= true
config [bool] config.libavutil.interplay_acm_decoder         ?= false
config [bool] config.libavutil.mace3_decoder                 ?= true
config [bool] config.libavutil.mace6_decoder                 ?= true
config [bool] config.libavutil.metasound_decoder             ?= true
config [bool] config.libavutil.misc4_decoder                 ?= true
config [bool] config.libavutil.mlp_decoder                   ?= true
config [bool] config.libavutil.mp1_decoder                   ?= true
config [bool] config.libavutil.mp1float_decoder              ?= true
config [bool] config.libavutil.mp2_decoder                   ?= true
config [bool] config.libavutil.mp2float_decoder              ?= true
config [bool] config.libavutil.mp3float_decoder              ?= true
config [bool] config.libavutil.mp3_decoder                   ?= true
config [bool] config.libavutil.mp3adufloat_decoder           ?= true
config [bool] config.libavutil.mp3adu_decoder                ?= true
config [bool] config.libavutil.mp3on4float_decoder           ?= true
config [bool] config.libavutil.mp3on4_decoder                ?= true
config [bool] config.libavutil.mpc7_decoder                  ?= true
config [bool] config.libavutil.mpc8_decoder                  ?= true
config [bool] config.libavutil.msnsiren_decoder              ?= false
config [bool] config.libavutil.nellymoser_decoder            ?= true
config [bool] config.libavutil.on2avc_decoder                ?= true
config [bool] config.libavutil.opus_decoder                  ?= false
config [bool] config.libavutil.osq_decoder                   ?= true
config [bool] config.libavutil.paf_audio_decoder             ?= false
config [bool] config.libavutil.qcelp_decoder                 ?= true
config [bool] config.libavutil.qdm2_decoder                  ?= true
config [bool] config.libavutil.qdmc_decoder                  ?= true
config [bool] config.libavutil.qoa_decoder                   ?= true
config [bool] config.libavutil.ra_144_decoder                ?= false
config [bool] config.libavutil.ra_288_decoder                ?= false
config [bool] config.libavutil.ralf_decoder                  ?= true
config [bool] config.libavutil.sbc_decoder                   ?= true
config [bool] config.libavutil.shorten_decoder               ?= true
config [bool] config.libavutil.sipr_decoder                  ?= true
config [bool] config.libavutil.siren_decoder                 ?= true
config [bool] config.libavutil.smackaud_decoder              ?= true
config [bool] config.libavutil.sonic_decoder                 ?= true
config [bool] config.libavutil.tak_decoder                   ?= true
config [bool] config.libavutil.truehd_decoder                ?= true
config [bool] config.libavutil.truespeech_decoder            ?= true
config [bool] config.libavutil.tta_decoder                   ?= true
config [bool] config.libavutil.twinvq_decoder                ?= true
config [bool] config.libavutil.vmdaudio_decoder              ?= true
config [bool] config.libavutil.vorbis_decoder                ?= false
config [bool] config.libavutil.wavarc_decoder                ?= true
config [bool] config.libavutil.wavpack_decoder               ?= true
config [bool] config.libavutil.wmalossless_decoder           ?= true
config [bool] config.libavutil.wmapro_decoder                ?= true
config [bool] config.libavutil.wmav1_decoder                 ?= true
config [bool] config.libavutil.wmav2_decoder                 ?= true
config [bool] config.libavutil.wmavoice_decoder              ?= true
config [bool] config.libavutil.ws_snd1_decoder               ?= false
config [bool] config.libavutil.xma1_decoder                  ?= true
config [bool] config.libavutil.xma2_decoder                  ?= true
config [bool] config.libavutil.pcm_alaw_decoder              ?= false
config [bool] config.libavutil.pcm_bluray_decoder            ?= false
config [bool] config.libavutil.pcm_dvd_decoder               ?= false
config [bool] config.libavutil.pcm_f16le_decoder             ?= false
config [bool] config.libavutil.pcm_f24le_decoder             ?= false
config [bool] config.libavutil.pcm_f32be_decoder             ?= false
config [bool] config.libavutil.pcm_f32le_decoder             ?= false
config [bool] config.libavutil.pcm_f64be_decoder             ?= false
config [bool] config.libavutil.pcm_f64le_decoder             ?= false
config [bool] config.libavutil.pcm_lxf_decoder               ?= false
config [bool] config.libavutil.pcm_mulaw_decoder             ?= false
config [bool] config.libavutil.pcm_s8_decoder                ?= false
config [bool] config.libavutil.pcm_s8_planar_decoder         ?= false
config [bool] config.libavutil.pcm_s16be_decoder             ?= false
config [bool] config.libavutil.pcm_s16be_planar_decoder      ?= false
config [bool] config.libavutil.pcm_s16le_decoder             ?= false
config [bool] config.libavutil.pcm_s16le_planar_decoder      ?= false
config [bool] config.libavutil.pcm_s24be_decoder             ?= false
config [bool] config.libavutil.pcm_s24daud_decoder           ?= false
config [bool] config.libavutil.pcm_s24le_decoder             ?= false
config [bool] config.libavutil.pcm_s24le_planar_decoder      ?= false
config [bool] config.libavutil.pcm_s32be_decoder             ?= false
config [bool] config.libavutil.pcm_s32le_decoder             ?= false
config [bool] config.libavutil.pcm_s32le_planar_decoder      ?= false
config [bool] config.libavutil.pcm_s64be_decoder             ?= false
config [bool] config.libavutil.pcm_s64le_decoder             ?= false
config [bool] config.libavutil.pcm_sga_decoder               ?= false
config [bool] config.libavutil.pcm_u8_decoder                ?= false
config [bool] config.libavutil.pcm_u16be_decoder             ?= false
config [bool] config.libavutil.pcm_u16le_decoder             ?= false
config [bool] config.libavutil.pcm_u24be_decoder             ?= false
config [bool] config.libavutil.pcm_u24le_decoder             ?= false
config [bool] config.libavutil.pcm_u32be_decoder             ?= false
config [bool] config.libavutil.pcm_u32le_decoder             ?= false
config [bool] config.libavutil.pcm_vidc_decoder              ?= false
config [bool] config.libavutil.cbd2_dpcm_decoder             ?= false
config [bool] config.libavutil.derf_dpcm_decoder             ?= false
config [bool] config.libavutil.gremlin_dpcm_decoder          ?= false
config [bool] config.libavutil.interplay_dpcm_decoder        ?= false
config [bool] config.libavutil.roq_dpcm_decoder              ?= true
config [bool] config.libavutil.sdx2_dpcm_decoder             ?= false
config [bool] config.libavutil.sol_dpcm_decoder              ?= false
config [bool] config.libavutil.xan_dpcm_decoder              ?= false
config [bool] config.libavutil.wady_dpcm_decoder             ?= false
config [bool] config.libavutil.adpcm_4xm_decoder             ?= false
config [bool] config.libavutil.adpcm_adx_decoder             ?= false
config [bool] config.libavutil.adpcm_afc_decoder             ?= false
config [bool] config.libavutil.adpcm_agm_decoder             ?= true
config [bool] config.libavutil.adpcm_aica_decoder            ?= false
config [bool] config.libavutil.adpcm_argo_decoder            ?= true
config [bool] config.libavutil.adpcm_ct_decoder              ?= false
config [bool] config.libavutil.adpcm_dtk_decoder             ?= false
config [bool] config.libavutil.adpcm_ea_decoder              ?= false
config [bool] config.libavutil.adpcm_ea_maxis_xa_decoder     ?= false
config [bool] config.libavutil.adpcm_ea_r1_decoder           ?= false
config [bool] config.libavutil.adpcm_ea_r2_decoder           ?= false
config [bool] config.libavutil.adpcm_ea_r3_decoder           ?= false
config [bool] config.libavutil.adpcm_ea_xas_decoder          ?= false
config [bool] config.libavutil.adpcm_g722_decoder            ?= false
config [bool] config.libavutil.adpcm_g726_decoder            ?= false
config [bool] config.libavutil.adpcm_g726le_decoder          ?= false
config [bool] config.libavutil.adpcm_ima_acorn_decoder       ?= false
config [bool] config.libavutil.adpcm_ima_amv_decoder         ?= true
config [bool] config.libavutil.adpcm_ima_alp_decoder         ?= false
config [bool] config.libavutil.adpcm_ima_apc_decoder         ?= false
config [bool] config.libavutil.adpcm_ima_apm_decoder         ?= false
config [bool] config.libavutil.adpcm_ima_cunning_decoder     ?= false
config [bool] config.libavutil.adpcm_ima_dat4_decoder        ?= false
config [bool] config.libavutil.adpcm_ima_dk3_decoder         ?= false
config [bool] config.libavutil.adpcm_ima_dk4_decoder         ?= false
config [bool] config.libavutil.adpcm_ima_ea_eacs_decoder     ?= false
config [bool] config.libavutil.adpcm_ima_ea_sead_decoder     ?= false
config [bool] config.libavutil.adpcm_ima_iss_decoder         ?= false
config [bool] config.libavutil.adpcm_ima_moflex_decoder      ?= false
config [bool] config.libavutil.adpcm_ima_mtf_decoder         ?= false
config [bool] config.libavutil.adpcm_ima_oki_decoder         ?= false
config [bool] config.libavutil.adpcm_ima_qt_decoder          ?= false
config [bool] config.libavutil.adpcm_ima_rad_decoder         ?= false
config [bool] config.libavutil.adpcm_ima_ssi_decoder         ?= false
config [bool] config.libavutil.adpcm_ima_smjpeg_decoder      ?= false
config [bool] config.libavutil.adpcm_ima_wav_decoder         ?= false
config [bool] config.libavutil.adpcm_ima_ws_decoder          ?= false
config [bool] config.libavutil.adpcm_ms_decoder              ?= false
config [bool] config.libavutil.adpcm_mtaf_decoder            ?= false
config [bool] config.libavutil.adpcm_psx_decoder             ?= false
config [bool] config.libavutil.adpcm_sbpro_2_decoder         ?= false
config [bool] config.libavutil.adpcm_sbpro_3_decoder         ?= false
config [bool] config.libavutil.adpcm_sbpro_4_decoder         ?= false
config [bool] config.libavutil.adpcm_swf_decoder             ?= false
config [bool] config.libavutil.adpcm_thp_decoder             ?= false
config [bool] config.libavutil.adpcm_thp_le_decoder          ?= false
config [bool] config.libavutil.adpcm_vima_decoder            ?= false
config [bool] config.libavutil.adpcm_xa_decoder              ?= false
config [bool] config.libavutil.adpcm_xmd_decoder             ?= false
config [bool] config.libavutil.adpcm_yamaha_decoder          ?= false
config [bool] config.libavutil.adpcm_zork_decoder            ?= false
config [bool] config.libavutil.ssa_decoder                   ?= true
config [bool] config.libavutil.ass_decoder                   ?= true
config [bool] config.libavutil.ccaption_decoder              ?= true
config [bool] config.libavutil.dvbsub_decoder                ?= false
config [bool] config.libavutil.dvdsub_decoder                ?= false
config [bool] config.libavutil.jacosub_decoder               ?= true
config [bool] config.libavutil.microdvd_decoder              ?= true
config [bool] config.libavutil.movtext_decoder               ?= true
config [bool] config.libavutil.mpl2_decoder                  ?= true
config [bool] config.libavutil.pgssub_decoder                ?= true
config [bool] config.libavutil.pjs_decoder                   ?= true
config [bool] config.libavutil.realtext_decoder              ?= true
config [bool] config.libavutil.sami_decoder                  ?= true
config [bool] config.libavutil.srt_decoder                   ?= true
config [bool] config.libavutil.stl_decoder                   ?= true
config [bool] config.libavutil.subrip_decoder                ?= true
config [bool] config.libavutil.subviewer_decoder             ?= true
config [bool] config.libavutil.subviewer1_decoder            ?= true
config [bool] config.libavutil.text_decoder                  ?= true
config [bool] config.libavutil.vplayer_decoder               ?= true
config [bool] config.libavutil.webvtt_decoder                ?= true
config [bool] config.libavutil.xsub_decoder                  ?= true
config [bool] config.libavutil.aac_at_decoder                ?= false
config [bool] config.libavutil.ac3_at_decoder                ?= false
config [bool] config.libavutil.adpcm_ima_qt_at_decoder       ?= false
config [bool] config.libavutil.alac_at_decoder               ?= false
config [bool] config.libavutil.amr_nb_at_decoder             ?= false
config [bool] config.libavutil.eac3_at_decoder               ?= false
config [bool] config.libavutil.gsm_ms_at_decoder             ?= false
config [bool] config.libavutil.ilbc_at_decoder               ?= false
config [bool] config.libavutil.mp1_at_decoder                ?= false
config [bool] config.libavutil.mp2_at_decoder                ?= false
config [bool] config.libavutil.mp3_at_decoder                ?= false
config [bool] config.libavutil.pcm_alaw_at_decoder           ?= false
config [bool] config.libavutil.pcm_mulaw_at_decoder          ?= false
config [bool] config.libavutil.qdmc_at_decoder               ?= false
config [bool] config.libavutil.qdm2_at_decoder               ?= false
config [bool] config.libavutil.libaribcaption_decoder        ?= false
config [bool] config.libavutil.libaribb24_decoder            ?= false
config [bool] config.libavutil.libcelt_decoder               ?= false
config [bool] config.libavutil.libcodec2_decoder             ?= false
config [bool] config.libavutil.libdav1d_decoder              ?= false
config [bool] config.libavutil.libdavs2_decoder              ?= false
config [bool] config.libavutil.libfdk_aac_decoder            ?= false
config [bool] config.libavutil.libgsm_decoder                ?= false
config [bool] config.libavutil.libgsm_ms_decoder             ?= false
config [bool] config.libavutil.libilbc_decoder               ?= false
config [bool] config.libavutil.libjxl_decoder                ?= false
config [bool] config.libavutil.liblc3_decoder                ?= false
config [bool] config.libavutil.libopencore_amrnb_decoder     ?= false
config [bool] config.libavutil.libopencore_amrwb_decoder     ?= false
config [bool] config.libavutil.libopus_decoder               ?= false
config [bool] config.libavutil.librsvg_decoder               ?= false
config [bool] config.libavutil.libspeex_decoder              ?= false
config [bool] config.libavutil.libuavs3d_decoder             ?= false
config [bool] config.libavutil.libvorbis_decoder             ?= false
config [bool] config.libavutil.libvpx_vp8_decoder            ?= false
config [bool] config.libavutil.libvpx_vp9_decoder            ?= false
config [bool] config.libavutil.libxevd_decoder               ?= false
config [bool] config.libavutil.libzvbi_teletext_decoder      ?= false
config [bool] config.libavutil.bintext_decoder               ?= true
config [bool] config.libavutil.xbin_decoder                  ?= true
config [bool] config.libavutil.idf_decoder                   ?= true
config [bool] config.libavutil.aac_mediacodec_decoder        ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.amrnb_mediacodec_decoder      ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.amrwb_mediacodec_decoder      ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.libaom_av1_decoder            ?= false
config [bool] config.libavutil.av1_decoder                   ?= true
config [bool] config.libavutil.av1_cuvid_decoder             ?= false
config [bool] config.libavutil.av1_mediacodec_decoder        ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.av1_qsv_decoder               ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.libopenh264_decoder           ?= false
config [bool] config.libavutil.h264_cuvid_decoder            ?= false
config [bool] config.libavutil.hevc_cuvid_decoder            ?= false
config [bool] config.libavutil.hevc_mediacodec_decoder       ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.mjpeg_cuvid_decoder           ?= false
config [bool] config.libavutil.mjpeg_qsv_decoder             ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.mp3_mediacodec_decoder        ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.mpeg1_cuvid_decoder           ?= false
config [bool] config.libavutil.mpeg2_cuvid_decoder           ?= false
config [bool] config.libavutil.mpeg4_cuvid_decoder           ?= false
config [bool] config.libavutil.mpeg4_mediacodec_decoder      ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.vc1_cuvid_decoder             ?= false
config [bool] config.libavutil.vp8_cuvid_decoder             ?= false
config [bool] config.libavutil.vp8_mediacodec_decoder        ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.vp8_qsv_decoder               ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.vp9_cuvid_decoder             ?= false
config [bool] config.libavutil.vp9_mediacodec_decoder        ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.vp9_qsv_decoder               ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.vvc_qsv_decoder               ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.vnull_decoder                 ?= true
config [bool] config.libavutil.anull_decoder                 ?= true
config [bool] config.libavutil.a64multi_encoder              ?= true
config [bool] config.libavutil.a64multi5_encoder             ?= true
config [bool] config.libavutil.alias_pix_encoder             ?= false
config [bool] config.libavutil.amv_encoder                   ?= true
config [bool] config.libavutil.apng_encoder                  ?= true
config [bool] config.libavutil.asv1_encoder                  ?= true
config [bool] config.libavutil.asv2_encoder                  ?= true
config [bool] config.libavutil.avrp_encoder                  ?= true
config [bool] config.libavutil.avui_encoder                  ?= true
config [bool] config.libavutil.bitpacked_encoder             ?= true
config [bool] config.libavutil.bmp_encoder                   ?= true
config [bool] config.libavutil.cfhd_encoder                  ?= true
config [bool] config.libavutil.cinepak_encoder               ?= true
config [bool] config.libavutil.cljr_encoder                  ?= true
config [bool] config.libavutil.comfortnoise_encoder          ?= true
config [bool] config.libavutil.dnxhd_encoder                 ?= true
config [bool] config.libavutil.dpx_encoder                   ?= true
config [bool] config.libavutil.dvvideo_encoder               ?= true
config [bool] config.libavutil.dxv_encoder                   ?= false
config [bool] config.libavutil.exr_encoder                   ?= true
config [bool] config.libavutil.ffv1_encoder                  ?= true
config [bool] config.libavutil.ffvhuff_encoder               ?= true
config [bool] config.libavutil.fits_encoder                  ?= true
config [bool] config.libavutil.flashsv_encoder               ?= true
config [bool] config.libavutil.flashsv2_encoder              ?= true
config [bool] config.libavutil.flv_encoder                   ?= true
config [bool] config.libavutil.gif_encoder                   ?= true
config [bool] config.libavutil.h261_encoder                  ?= true
config [bool] config.libavutil.h263_encoder                  ?= true
config [bool] config.libavutil.h263p_encoder                 ?= true
config [bool] config.libavutil.h264_mediacodec_encoder       ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.hap_encoder                   ?= false
config [bool] config.libavutil.huffyuv_encoder               ?= true
config [bool] config.libavutil.jpeg2000_encoder              ?= true
config [bool] config.libavutil.jpegls_encoder                ?= true
config [bool] config.libavutil.ljpeg_encoder                 ?= true
config [bool] config.libavutil.magicyuv_encoder              ?= true
config [bool] config.libavutil.mjpeg_encoder                 ?= true
config [bool] config.libavutil.mpeg1video_encoder            ?= true
config [bool] config.libavutil.mpeg2video_encoder            ?= true
config [bool] config.libavutil.mpeg4_encoder                 ?= true
config [bool] config.libavutil.msmpeg4v2_encoder             ?= true
config [bool] config.libavutil.msmpeg4v3_encoder             ?= true
config [bool] config.libavutil.msrle_encoder                 ?= false
config [bool] config.libavutil.msvideo1_encoder              ?= false
config [bool] config.libavutil.pam_encoder                   ?= true
config [bool] config.libavutil.pbm_encoder                   ?= true
config [bool] config.libavutil.pcx_encoder                   ?= true
config [bool] config.libavutil.pfm_encoder                   ?= true
config [bool] config.libavutil.pgm_encoder                   ?= true
config [bool] config.libavutil.pgmyuv_encoder                ?= true
config [bool] config.libavutil.phm_encoder                   ?= true
config [bool] config.libavutil.png_encoder                   ?= true
config [bool] config.libavutil.ppm_encoder                   ?= true
config [bool] config.libavutil.prores_encoder                ?= true
config [bool] config.libavutil.prores_aw_encoder             ?= true
config [bool] config.libavutil.prores_ks_encoder             ?= true
config [bool] config.libavutil.qoi_encoder                   ?= true
config [bool] config.libavutil.qtrle_encoder                 ?= true
config [bool] config.libavutil.r10k_encoder                  ?= true
config [bool] config.libavutil.r210_encoder                  ?= true
config [bool] config.libavutil.rawvideo_encoder              ?= true
config [bool] config.libavutil.roq_encoder                   ?= true
config [bool] config.libavutil.rpza_encoder                  ?= true
config [bool] config.libavutil.rv10_encoder                  ?= true
config [bool] config.libavutil.rv20_encoder                  ?= true
config [bool] config.libavutil.s302m_encoder                 ?= true
config [bool] config.libavutil.sgi_encoder                   ?= true
config [bool] config.libavutil.smc_encoder                   ?= true
config [bool] config.libavutil.snow_encoder                  ?= true
config [bool] config.libavutil.speedhq_encoder               ?= true
config [bool] config.libavutil.sunrast_encoder               ?= true
config [bool] config.libavutil.svq1_encoder                  ?= true
config [bool] config.libavutil.targa_encoder                 ?= false
config [bool] config.libavutil.tiff_encoder                  ?= true
config [bool] config.libavutil.utvideo_encoder               ?= true
config [bool] config.libavutil.v210_encoder                  ?= true
config [bool] config.libavutil.v308_encoder                  ?= true
config [bool] config.libavutil.v408_encoder                  ?= true
config [bool] config.libavutil.v410_encoder                  ?= true
config [bool] config.libavutil.vbn_encoder                   ?= true
config [bool] config.libavutil.vc2_encoder                   ?= true
config [bool] config.libavutil.wbmp_encoder                  ?= true
config [bool] config.libavutil.wrapped_avframe_encoder       ?= false
config [bool] config.libavutil.wmv1_encoder                  ?= true
config [bool] config.libavutil.wmv2_encoder                  ?= true
config [bool] config.libavutil.xbm_encoder                   ?= true
config [bool] config.libavutil.xface_encoder                 ?= true
config [bool] config.libavutil.xwd_encoder                   ?= true
config [bool] config.libavutil.y41p_encoder                  ?= true
config [bool] config.libavutil.yuv4_encoder                  ?= true
config [bool] config.libavutil.zlib_encoder                  ?= true
config [bool] config.libavutil.zmbv_encoder                  ?= true
config [bool] config.libavutil.aac_encoder                   ?= true
config [bool] config.libavutil.ac3_encoder                   ?= false
config [bool] config.libavutil.ac3_fixed_encoder             ?= false
config [bool] config.libavutil.alac_encoder                  ?= true
config [bool] config.libavutil.aptx_encoder                  ?= true
config [bool] config.libavutil.aptx_hd_encoder               ?= false
config [bool] config.libavutil.dca_encoder                   ?= true
config [bool] config.libavutil.dfpwm_encoder                 ?= true
config [bool] config.libavutil.eac3_encoder                  ?= false
config [bool] config.libavutil.flac_encoder                  ?= true
config [bool] config.libavutil.g723_1_encoder                ?= false
config [bool] config.libavutil.hdr_encoder                   ?= true
config [bool] config.libavutil.mlp_encoder                   ?= true
config [bool] config.libavutil.mp2_encoder                   ?= true
config [bool] config.libavutil.mp2fixed_encoder              ?= true
config [bool] config.libavutil.nellymoser_encoder            ?= true
config [bool] config.libavutil.opus_encoder                  ?= false
config [bool] config.libavutil.ra_144_encoder                ?= false
config [bool] config.libavutil.sbc_encoder                   ?= true
config [bool] config.libavutil.sonic_encoder                 ?= true
config [bool] config.libavutil.sonic_ls_encoder              ?= false
config [bool] config.libavutil.truehd_encoder                ?= true
config [bool] config.libavutil.tta_encoder                   ?= true
config [bool] config.libavutil.vorbis_encoder                ?= false
config [bool] config.libavutil.wavpack_encoder               ?= true
config [bool] config.libavutil.wmav1_encoder                 ?= true
config [bool] config.libavutil.wmav2_encoder                 ?= true
config [bool] config.libavutil.pcm_alaw_encoder              ?= false
config [bool] config.libavutil.pcm_bluray_encoder            ?= false
config [bool] config.libavutil.pcm_dvd_encoder               ?= false
config [bool] config.libavutil.pcm_f32be_encoder             ?= false
config [bool] config.libavutil.pcm_f32le_encoder             ?= false
config [bool] config.libavutil.pcm_f64be_encoder             ?= false
config [bool] config.libavutil.pcm_f64le_encoder             ?= false
config [bool] config.libavutil.pcm_mulaw_encoder             ?= false
config [bool] config.libavutil.pcm_s8_encoder                ?= false
config [bool] config.libavutil.pcm_s8_planar_encoder         ?= false
config [bool] config.libavutil.pcm_s16be_encoder             ?= false
config [bool] config.libavutil.pcm_s16be_planar_encoder      ?= false
config [bool] config.libavutil.pcm_s16le_encoder             ?= false
config [bool] config.libavutil.pcm_s16le_planar_encoder      ?= false
config [bool] config.libavutil.pcm_s24be_encoder             ?= false
config [bool] config.libavutil.pcm_s24daud_encoder           ?= false
config [bool] config.libavutil.pcm_s24le_encoder             ?= false
config [bool] config.libavutil.pcm_s24le_planar_encoder      ?= false
config [bool] config.libavutil.pcm_s32be_encoder             ?= false
config [bool] config.libavutil.pcm_s32le_encoder             ?= false
config [bool] config.libavutil.pcm_s32le_planar_encoder      ?= false
config [bool] config.libavutil.pcm_s64be_encoder             ?= false
config [bool] config.libavutil.pcm_s64le_encoder             ?= false
config [bool] config.libavutil.pcm_u8_encoder                ?= false
config [bool] config.libavutil.pcm_u16be_encoder             ?= false
config [bool] config.libavutil.pcm_u16le_encoder             ?= false
config [bool] config.libavutil.pcm_u24be_encoder             ?= false
config [bool] config.libavutil.pcm_u24le_encoder             ?= false
config [bool] config.libavutil.pcm_u32be_encoder             ?= false
config [bool] config.libavutil.pcm_u32le_encoder             ?= false
config [bool] config.libavutil.pcm_vidc_encoder              ?= false
config [bool] config.libavutil.roq_dpcm_encoder              ?= true
config [bool] config.libavutil.adpcm_adx_encoder             ?= false
config [bool] config.libavutil.adpcm_argo_encoder            ?= false
config [bool] config.libavutil.adpcm_g722_encoder            ?= false
config [bool] config.libavutil.adpcm_g726_encoder            ?= false
config [bool] config.libavutil.adpcm_g726le_encoder          ?= false
config [bool] config.libavutil.adpcm_ima_amv_encoder         ?= false
config [bool] config.libavutil.adpcm_ima_alp_encoder         ?= false
config [bool] config.libavutil.adpcm_ima_apm_encoder         ?= false
config [bool] config.libavutil.adpcm_ima_qt_encoder          ?= false
config [bool] config.libavutil.adpcm_ima_ssi_encoder         ?= false
config [bool] config.libavutil.adpcm_ima_wav_encoder         ?= false
config [bool] config.libavutil.adpcm_ima_ws_encoder          ?= false
config [bool] config.libavutil.adpcm_ms_encoder              ?= false
config [bool] config.libavutil.adpcm_swf_encoder             ?= false
config [bool] config.libavutil.adpcm_yamaha_encoder          ?= false
config [bool] config.libavutil.ssa_encoder                   ?= true
config [bool] config.libavutil.ass_encoder                   ?= true
config [bool] config.libavutil.dvbsub_encoder                ?= false
config [bool] config.libavutil.dvdsub_encoder                ?= false
config [bool] config.libavutil.movtext_encoder               ?= false
config [bool] config.libavutil.srt_encoder                   ?= true
config [bool] config.libavutil.subrip_encoder                ?= true
config [bool] config.libavutil.text_encoder                  ?= true
config [bool] config.libavutil.ttml_encoder                  ?= true
config [bool] config.libavutil.webvtt_encoder                ?= true
config [bool] config.libavutil.xsub_encoder                  ?= true
config [bool] config.libavutil.aac_at_encoder                ?= false
config [bool] config.libavutil.alac_at_encoder               ?= false
config [bool] config.libavutil.ilbc_at_encoder               ?= false
config [bool] config.libavutil.pcm_alaw_at_encoder           ?= false
config [bool] config.libavutil.pcm_mulaw_at_encoder          ?= false
config [bool] config.libavutil.libaom_av1_encoder            ?= false
config [bool] config.libavutil.libcodec2_encoder             ?= false
config [bool] config.libavutil.libfdk_aac_encoder            ?= false
config [bool] config.libavutil.libgsm_encoder                ?= false
config [bool] config.libavutil.libgsm_ms_encoder             ?= false
config [bool] config.libavutil.libilbc_encoder               ?= false
config [bool] config.libavutil.libjxl_encoder                ?= false
config [bool] config.libavutil.liblc3_encoder                ?= false
config [bool] config.libavutil.libmp3lame_encoder            ?= false
config [bool] config.libavutil.libopencore_amrnb_encoder     ?= false
config [bool] config.libavutil.libopenjpeg_encoder           ?= false
config [bool] config.libavutil.libopus_encoder               ?= false
config [bool] config.libavutil.librav1e_encoder              ?= false
config [bool] config.libavutil.libshine_encoder              ?= false
config [bool] config.libavutil.libspeex_encoder              ?= false
config [bool] config.libavutil.libsvtav1_encoder             ?= false
config [bool] config.libavutil.libtheora_encoder             ?= false
config [bool] config.libavutil.libtwolame_encoder            ?= false
config [bool] config.libavutil.libvo_amrwbenc_encoder        ?= false
config [bool] config.libavutil.libvorbis_encoder             ?= false
config [bool] config.libavutil.libvpx_vp8_encoder            ?= false
config [bool] config.libavutil.libvpx_vp9_encoder            ?= false
config [bool] config.libavutil.libvvenc_encoder              ?= false
config [bool] config.libavutil.libwebp_anim_encoder          ?= false
config [bool] config.libavutil.libwebp_encoder               ?= false
config [bool] config.libavutil.libx262_encoder               ?= false
config [bool] config.libavutil.libx264_encoder               ?= false
config [bool] config.libavutil.libx264rgb_encoder            ?= false
config [bool] config.libavutil.libx265_encoder               ?= false
config [bool] config.libavutil.libxeve_encoder               ?= false
config [bool] config.libavutil.libxavs_encoder               ?= false
config [bool] config.libavutil.libxavs2_encoder              ?= false
config [bool] config.libavutil.libxvid_encoder               ?= false
config [bool] config.libavutil.aac_mf_encoder                ?= false
config [bool] config.libavutil.ac3_mf_encoder                ?= false
config [bool] config.libavutil.h263_v4l2m2m_encoder          ?= false
config [bool] config.libavutil.av1_mediacodec_encoder        ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.av1_nvenc_encoder             ?=\
 $config.libavutil.nvenc
config [bool] config.libavutil.av1_qsv_encoder               ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.av1_amf_encoder               ?=\
 $config.libavutil.amf
config [bool] config.libavutil.av1_mf_encoder                ?= false
config [bool] config.libavutil.av1_vaapi_encoder             ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.libopenh264_encoder           ?= false
config [bool] config.libavutil.h264_amf_encoder              ?=\
 $config.libavutil.amf
config [bool] config.libavutil.h264_mf_encoder               ?= false
config [bool] config.libavutil.h264_nvenc_encoder            ?=\
 $config.libavutil.nvenc
config [bool] config.libavutil.h264_omx_encoder              ?=\
 $config.libavutil.omx
config [bool] config.libavutil.h264_qsv_encoder              ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.h264_v4l2m2m_encoder          ?= false
config [bool] config.libavutil.h264_vaapi_encoder            ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.h264_videotoolbox_encoder     ?=\
 $config.libavutil.videotoolbox
config [bool] config.libavutil.h264_vulkan_encoder           ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.hevc_amf_encoder              ?=\
 $config.libavutil.amf
config [bool] config.libavutil.hevc_d3d12va_encoder          ?=\
 $config.libavutil.d3d12va
config [bool] config.libavutil.hevc_mediacodec_encoder       ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.hevc_mf_encoder               ?= false
config [bool] config.libavutil.hevc_nvenc_encoder            ?=\
 $config.libavutil.nvenc
config [bool] config.libavutil.hevc_qsv_encoder              ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.hevc_v4l2m2m_encoder          ?= false
config [bool] config.libavutil.hevc_vaapi_encoder            ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.hevc_videotoolbox_encoder     ?=\
 $config.libavutil.videotoolbox
config [bool] config.libavutil.hevc_vulkan_encoder           ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.libkvazaar_encoder            ?= false
config [bool] config.libavutil.mjpeg_qsv_encoder             ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.mjpeg_vaapi_encoder           ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.mp3_mf_encoder                ?= false
config [bool] config.libavutil.mpeg2_qsv_encoder             ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.mpeg2_vaapi_encoder           ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.mpeg4_mediacodec_encoder      ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.mpeg4_omx_encoder             ?=\
 $config.libavutil.omx
config [bool] config.libavutil.mpeg4_v4l2m2m_encoder         ?= false
config [bool] config.libavutil.prores_videotoolbox_encoder   ?=\
 $config.libavutil.videotoolbox
config [bool] config.libavutil.vp8_mediacodec_encoder        ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.vp8_v4l2m2m_encoder           ?= false
config [bool] config.libavutil.vp8_vaapi_encoder             ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.vp9_mediacodec_encoder        ?=\
 $config.libavutil.mediacodec
config [bool] config.libavutil.vp9_vaapi_encoder             ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.vp9_qsv_encoder               ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.vnull_encoder                 ?= true
config [bool] config.libavutil.anull_encoder                 ?= true
config [bool] config.libavutil.av1_d3d11va_hwaccel           ?=\
 $config.libavutil.d3d11va
config [bool] config.libavutil.av1_d3d11va2_hwaccel          ?=\
 $config.libavutil.dxva2
config [bool] config.libavutil.av1_d3d12va_hwaccel           ?=\
 $config.libavutil.d3d12va
config [bool] config.libavutil.av1_dxva2_hwaccel             ?=\
 $config.libavutil.dxva2
config [bool] config.libavutil.av1_nvdec_hwaccel             ?=\
 $config.libavutil.nvdec
config [bool] config.libavutil.av1_vaapi_hwaccel             ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.av1_vdpau_hwaccel             ?=\
 $config.libavutil.vdpau
config [bool] config.libavutil.av1_videotoolbox_hwaccel      ?=\
 $config.libavutil.videotoolbox
config [bool] config.libavutil.av1_vulkan_hwaccel            ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.h263_vaapi_hwaccel            ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.h263_videotoolbox_hwaccel     ?=\
 $config.libavutil.videotoolbox
config [bool] config.libavutil.h264_d3d11va_hwaccel          ?=\
 $config.libavutil.d3d11va
config [bool] config.libavutil.h264_d3d11va2_hwaccel         ?=\
 $config.libavutil.dxva2
config [bool] config.libavutil.h264_d3d12va_hwaccel          ?=\
 $config.libavutil.d3d12va
config [bool] config.libavutil.h264_dxva2_hwaccel            ?=\
 $config.libavutil.dxva2
config [bool] config.libavutil.h264_nvdec_hwaccel            ?=\
 $config.libavutil.nvdec
config [bool] config.libavutil.h264_vaapi_hwaccel            ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.h264_vdpau_hwaccel            ?=\
 $config.libavutil.vdpau
config [bool] config.libavutil.h264_videotoolbox_hwaccel     ?=\
 $config.libavutil.videotoolbox
config [bool] config.libavutil.h264_vulkan_hwaccel           ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.hevc_d3d11va_hwaccel          ?=\
 $config.libavutil.d3d11va
config [bool] config.libavutil.hevc_d3d11va2_hwaccel         ?=\
 $config.libavutil.dxva2
config [bool] config.libavutil.hevc_d3d12va_hwaccel          ?=\
 $config.libavutil.d3d12va
config [bool] config.libavutil.hevc_dxva2_hwaccel            ?=\
 $config.libavutil.dxva2
config [bool] config.libavutil.hevc_nvdec_hwaccel            ?=\
 $config.libavutil.nvdec
config [bool] config.libavutil.hevc_vaapi_hwaccel            ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.hevc_vdpau_hwaccel            ?=\
 $config.libavutil.vdpau
config [bool] config.libavutil.hevc_videotoolbox_hwaccel     ?=\
 $config.libavutil.videotoolbox
config [bool] config.libavutil.hevc_vulkan_hwaccel           ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.mjpeg_nvdec_hwaccel           ?=\
 $config.libavutil.nvdec
config [bool] config.libavutil.mjpeg_vaapi_hwaccel           ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.mpeg1_nvdec_hwaccel           ?=\
 $config.libavutil.nvdec
config [bool] config.libavutil.mpeg1_vdpau_hwaccel           ?=\
 $config.libavutil.vdpau
config [bool] config.libavutil.mpeg1_videotoolbox_hwaccel    ?=\
 $config.libavutil.videotoolbox
config [bool] config.libavutil.mpeg2_d3d11va_hwaccel         ?=\
 $config.libavutil.d3d11va
config [bool] config.libavutil.mpeg2_d3d11va2_hwaccel        ?=\
 $config.libavutil.dxva2
config [bool] config.libavutil.mpeg2_d3d12va_hwaccel         ?=\
 $config.libavutil.d3d12va
config [bool] config.libavutil.mpeg2_dxva2_hwaccel           ?=\
 $config.libavutil.dxva2
config [bool] config.libavutil.mpeg2_nvdec_hwaccel           ?=\
 $config.libavutil.nvdec
config [bool] config.libavutil.mpeg2_vaapi_hwaccel           ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.mpeg2_vdpau_hwaccel           ?=\
 $config.libavutil.vdpau
config [bool] config.libavutil.mpeg2_videotoolbox_hwaccel    ?=\
 $config.libavutil.videotoolbox
config [bool] config.libavutil.mpeg4_nvdec_hwaccel           ?=\
 $config.libavutil.nvdec
config [bool] config.libavutil.mpeg4_vaapi_hwaccel           ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.mpeg4_vdpau_hwaccel           ?=\
 $config.libavutil.vdpau
config [bool] config.libavutil.mpeg4_videotoolbox_hwaccel    ?=\
 $config.libavutil.videotoolbox
config [bool] config.libavutil.prores_videotoolbox_hwaccel   ?=\
 $config.libavutil.videotoolbox
config [bool] config.libavutil.vc1_d3d11va_hwaccel           ?=\
 $config.libavutil.d3d11va
config [bool] config.libavutil.vc1_d3d11va2_hwaccel          ?=\
 $config.libavutil.dxva2
config [bool] config.libavutil.vc1_d3d12va_hwaccel           ?=\
 $config.libavutil.d3d12va
config [bool] config.libavutil.vc1_dxva2_hwaccel             ?=\
 $config.libavutil.dxva2
config [bool] config.libavutil.vc1_nvdec_hwaccel             ?=\
 $config.libavutil.nvdec
config [bool] config.libavutil.vc1_vaapi_hwaccel             ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.vc1_vdpau_hwaccel             ?=\
 $config.libavutil.vdpau
config [bool] config.libavutil.vp8_nvdec_hwaccel             ?=\
 $config.libavutil.nvdec
config [bool] config.libavutil.vp8_vaapi_hwaccel             ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.vp9_d3d11va_hwaccel           ?=\
 $config.libavutil.d3d11va
config [bool] config.libavutil.vp9_d3d11va2_hwaccel          ?=\
 $config.libavutil.dxva2
config [bool] config.libavutil.vp9_d3d12va_hwaccel           ?=\
 $config.libavutil.d3d12va
config [bool] config.libavutil.vp9_dxva2_hwaccel             ?=\
 $config.libavutil.dxva2
config [bool] config.libavutil.vp9_nvdec_hwaccel             ?=\
 $config.libavutil.nvdec
config [bool] config.libavutil.vp9_vaapi_hwaccel             ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.vp9_vdpau_hwaccel             ?=\
 $config.libavutil.vdpau
config [bool] config.libavutil.vp9_videotoolbox_hwaccel      ?=\
 $config.libavutil.videotoolbox
config [bool] config.libavutil.wmv3_d3d11va_hwaccel          ?=\
 $config.libavutil.d3d11va
config [bool] config.libavutil.wmv3_d3d11va2_hwaccel         ?=\
 $config.libavutil.dxva2
config [bool] config.libavutil.wmv3_d3d12va_hwaccel          ?=\
 $config.libavutil.d3d12va
config [bool] config.libavutil.wmv3_dxva2_hwaccel            ?=\
 $config.libavutil.dxva2
config [bool] config.libavutil.wmv3_nvdec_hwaccel            ?=\
 $config.libavutil.nvdec
config [bool] config.libavutil.wmv3_vaapi_hwaccel            ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.wmv3_vdpau_hwaccel            ?=\
 $config.libavutil.vdpau
config [bool] config.libavutil.aac_parser                    ?= true
config [bool] config.libavutil.aac_latm_parser               ?= false
config [bool] config.libavutil.ac3_parser                    ?= false
config [bool] config.libavutil.adx_parser                    ?= false
config [bool] config.libavutil.amr_parser                    ?= false
config [bool] config.libavutil.av1_parser                    ?= true
config [bool] config.libavutil.avs2_parser                   ?= false
config [bool] config.libavutil.avs3_parser                   ?= false
config [bool] config.libavutil.bmp_parser                    ?= true
config [bool] config.libavutil.cavsvideo_parser              ?= false
config [bool] config.libavutil.cook_parser                   ?= false
config [bool] config.libavutil.cri_parser                    ?= true
config [bool] config.libavutil.dca_parser                    ?= true
config [bool] config.libavutil.dirac_parser                  ?= true
config [bool] config.libavutil.dnxhd_parser                  ?= true
config [bool] config.libavutil.dnxuc_parser                  ?= false
config [bool] config.libavutil.dolby_e_parser                ?= false
config [bool] config.libavutil.dpx_parser                    ?= false
config [bool] config.libavutil.dvaudio_parser                ?= true
config [bool] config.libavutil.dvbsub_parser                 ?= false
config [bool] config.libavutil.dvdsub_parser                 ?= false
config [bool] config.libavutil.dvd_nav_parser                ?= false
config [bool] config.libavutil.evc_parser                    ?= false
config [bool] config.libavutil.flac_parser                   ?= false
config [bool] config.libavutil.ftr_parser                    ?= false
config [bool] config.libavutil.g723_1_parser                 ?= false
config [bool] config.libavutil.g729_parser                   ?= false
config [bool] config.libavutil.gif_parser                    ?= true
config [bool] config.libavutil.gsm_parser                    ?= false
config [bool] config.libavutil.h261_parser                   ?= true
config [bool] config.libavutil.h263_parser                   ?= true
config [bool] config.libavutil.h264_parser                   ?= true
config [bool] config.libavutil.hevc_parser                   ?= false
config [bool] config.libavutil.hdr_parser                    ?= false
config [bool] config.libavutil.ipu_parser                    ?= true
config [bool] config.libavutil.jpeg2000_parser               ?= true
config [bool] config.libavutil.jpegxl_parser                 ?= false
config [bool] config.libavutil.misc4_parser                  ?= false
config [bool] config.libavutil.mjpeg_parser                  ?= true
config [bool] config.libavutil.mlp_parser                    ?= false
config [bool] config.libavutil.mpeg4video_parser             ?= true
config [bool] config.libavutil.mpegaudio_parser              ?= true
config [bool] config.libavutil.mpegvideo_parser              ?= true
config [bool] config.libavutil.opus_parser                   ?= false
config [bool] config.libavutil.png_parser                    ?= true
config [bool] config.libavutil.pnm_parser                    ?= false
config [bool] config.libavutil.qoi_parser                    ?= true
config [bool] config.libavutil.rv34_parser                   ?= true
config [bool] config.libavutil.sbc_parser                    ?= false
config [bool] config.libavutil.sipr_parser                   ?= false
config [bool] config.libavutil.tak_parser                    ?= false
config [bool] config.libavutil.vc1_parser                    ?= true
config [bool] config.libavutil.vorbis_parser                 ?= false
config [bool] config.libavutil.vp3_parser                    ?= false
config [bool] config.libavutil.vp8_parser                    ?= false
config [bool] config.libavutil.vp9_parser                    ?= false
config [bool] config.libavutil.vvc_parser                    ?= true
config [bool] config.libavutil.webp_parser                   ?= false
config [bool] config.libavutil.xbm_parser                    ?= false
config [bool] config.libavutil.xma_parser                    ?= false
config [bool] config.libavutil.xwd_parser                    ?= false
config [bool] config.libavutil.alsa_indev                    ?= false
config [bool] config.libavutil.android_camera_indev          ?= false
config [bool] config.libavutil.avfoundation_indev            ?= false
config [bool] config.libavutil.bktr_indev                    ?= false
config [bool] config.libavutil.decklink_indev                ?= false
config [bool] config.libavutil.dshow_indev                   ?= false
config [bool] config.libavutil.fbdev_indev                   ?=\
 ($c.target.class == 'linux')
config [bool] config.libavutil.gdigrab_indev                 ?= false
config [bool] config.libavutil.iec61883_indev                ?= false
config [bool] config.libavutil.jack_indev                    ?= false
config [bool] config.libavutil.kmsgrab_indev                 ?= false
config [bool] config.libavutil.lavfi_indev                   ?= false
config [bool] config.libavutil.openal_indev                  ?= false
config [bool] config.libavutil.oss_indev                     ?= false
config [bool] config.libavutil.pulse_indev                   ?= false
config [bool] config.libavutil.sndio_indev                   ?= false
config [bool] config.libavutil.v4l2_indev                    ?= false
config [bool] config.libavutil.vfwcap_indev                  ?= false
config [bool] config.libavutil.xcbgrab_indev                 ?= false
config [bool] config.libavutil.libcdio_indev                 ?= false
config [bool] config.libavutil.libdc1394_indev               ?= false
config [bool] config.libavutil.alsa_outdev                   ?= false
config [bool] config.libavutil.audiotoolbox_outdev           ?= false
config [bool] config.libavutil.caca_outdev                   ?= false
config [bool] config.libavutil.decklink_outdev               ?= false
config [bool] config.libavutil.fbdev_outdev                  ?=\
 ($c.target.class == 'linux')
config [bool] config.libavutil.opengl_outdev                 ?= false
config [bool] config.libavutil.oss_outdev                    ?= false
config [bool] config.libavutil.pulse_outdev                  ?= false
config [bool] config.libavutil.sdl2_outdev                   ?= false
config [bool] config.libavutil.sndio_outdev                  ?= false
config [bool] config.libavutil.v4l2_outdev                   ?= false
config [bool] config.libavutil.xv_outdev                     ?= false
config [bool] config.libavutil.aap_filter                    ?= false
config [bool] config.libavutil.abench_filter                 ?= false
config [bool] config.libavutil.acompressor_filter            ?= false
config [bool] config.libavutil.acontrast_filter              ?= false
config [bool] config.libavutil.acopy_filter                  ?= false
config [bool] config.libavutil.acue_filter                   ?= false
config [bool] config.libavutil.acrossfade_filter             ?= false
config [bool] config.libavutil.acrossover_filter             ?= false
config [bool] config.libavutil.acrusher_filter               ?= false
config [bool] config.libavutil.adeclick_filter               ?= false
config [bool] config.libavutil.adeclip_filter                ?= false
config [bool] config.libavutil.adecorrelate_filter           ?= false
config [bool] config.libavutil.adelay_filter                 ?= false
config [bool] config.libavutil.adenorm_filter                ?= false
config [bool] config.libavutil.aderivative_filter            ?= false
config [bool] config.libavutil.adrc_filter                   ?= false
config [bool] config.libavutil.adynamicequalizer_filter      ?= false
config [bool] config.libavutil.adynamicsmooth_filter         ?= false
config [bool] config.libavutil.aecho_filter                  ?= false
config [bool] config.libavutil.aemphasis_filter              ?= false
config [bool] config.libavutil.aeval_filter                  ?= false
config [bool] config.libavutil.aexciter_filter               ?= false
config [bool] config.libavutil.afade_filter                  ?= true
config [bool] config.libavutil.afftdn_filter                 ?= true
config [bool] config.libavutil.afftfilt_filter               ?= true
config [bool] config.libavutil.afir_filter                   ?= true
config [bool] config.libavutil.aformat_filter                ?= true
config [bool] config.libavutil.afreqshift_filter             ?= true
config [bool] config.libavutil.afwtdn_filter                 ?= true
config [bool] config.libavutil.agate_filter                  ?= false
config [bool] config.libavutil.aiir_filter                   ?= true
config [bool] config.libavutil.aintegral_filter              ?= false
config [bool] config.libavutil.ainterleave_filter            ?= false
config [bool] config.libavutil.alatency_filter               ?= false
config [bool] config.libavutil.alimiter_filter               ?= false
config [bool] config.libavutil.allpass_filter                ?= false
config [bool] config.libavutil.aloop_filter                  ?= false
config [bool] config.libavutil.amerge_filter                 ?= false
config [bool] config.libavutil.ametadata_filter              ?= false
config [bool] config.libavutil.amix_filter                   ?= false
config [bool] config.libavutil.amultiply_filter              ?= false
config [bool] config.libavutil.anequalizer_filter            ?= false
config [bool] config.libavutil.anlmdn_filter                 ?= false
config [bool] config.libavutil.anlmf_filter                  ?= false
config [bool] config.libavutil.anlms_filter                  ?= false
config [bool] config.libavutil.anull_filter                  ?= false
config [bool] config.libavutil.apad_filter                   ?= false
config [bool] config.libavutil.aperms_filter                 ?= false
config [bool] config.libavutil.aphaser_filter                ?= false
config [bool] config.libavutil.aphaseshift_filter            ?= false
config [bool] config.libavutil.apsnr_filter                  ?= false
config [bool] config.libavutil.apsyclip_filter               ?= false
config [bool] config.libavutil.apulsator_filter              ?= false
config [bool] config.libavutil.arealtime_filter              ?= false
config [bool] config.libavutil.aresample_filter              ?= false
config [bool] config.libavutil.areverse_filter               ?= false
config [bool] config.libavutil.arls_filter                   ?= false
config [bool] config.libavutil.arnndn_filter                 ?= false
config [bool] config.libavutil.asdr_filter                   ?= false
config [bool] config.libavutil.asegment_filter               ?= false
config [bool] config.libavutil.aselect_filter                ?= false
config [bool] config.libavutil.asendcmd_filter               ?= false
config [bool] config.libavutil.asetnsamples_filter           ?= false
config [bool] config.libavutil.asetpts_filter                ?= false
config [bool] config.libavutil.asetrate_filter               ?= false
config [bool] config.libavutil.asettb_filter                 ?= false
config [bool] config.libavutil.ashowinfo_filter              ?= false
config [bool] config.libavutil.asidedata_filter              ?= false
config [bool] config.libavutil.asisdr_filter                 ?= false
config [bool] config.libavutil.asoftclip_filter              ?= false
config [bool] config.libavutil.aspectralstats_filter         ?= false
config [bool] config.libavutil.asplit_filter                 ?= false
config [bool] config.libavutil.asr_filter                    ?= false
config [bool] config.libavutil.astats_filter                 ?= false
config [bool] config.libavutil.astreamselect_filter          ?= false
config [bool] config.libavutil.asubboost_filter              ?= false
config [bool] config.libavutil.asubcut_filter                ?= false
config [bool] config.libavutil.asupercut_filter              ?= false
config [bool] config.libavutil.asuperpass_filter             ?= false
config [bool] config.libavutil.asuperstop_filter             ?= false
config [bool] config.libavutil.atempo_filter                 ?= false
config [bool] config.libavutil.atilt_filter                  ?= false
config [bool] config.libavutil.atrim_filter                  ?= false
config [bool] config.libavutil.axcorrelate_filter            ?= false
config [bool] config.libavutil.azmq_filter                   ?= false
config [bool] config.libavutil.bandpass_filter               ?= false
config [bool] config.libavutil.bandreject_filter             ?= false
config [bool] config.libavutil.bass_filter                   ?= false
config [bool] config.libavutil.biquad_filter                 ?= false
config [bool] config.libavutil.bs2b_filter                   ?= false
config [bool] config.libavutil.channelmap_filter             ?= false
config [bool] config.libavutil.channelsplit_filter           ?= false
config [bool] config.libavutil.chorus_filter                 ?= false
config [bool] config.libavutil.compand_filter                ?= false
config [bool] config.libavutil.compensationdelay_filter      ?= false
config [bool] config.libavutil.crossfeed_filter              ?= false
config [bool] config.libavutil.crystalizer_filter            ?= false
config [bool] config.libavutil.dcshift_filter                ?= false
config [bool] config.libavutil.deesser_filter                ?= false
config [bool] config.libavutil.dialoguenhance_filter         ?= false
config [bool] config.libavutil.drmeter_filter                ?= false
config [bool] config.libavutil.dynaudnorm_filter             ?= false
config [bool] config.libavutil.earwax_filter                 ?= false
config [bool] config.libavutil.ebur128_filter                ?= false
config [bool] config.libavutil.equalizer_filter              ?= false
config [bool] config.libavutil.extrastereo_filter            ?= false
config [bool] config.libavutil.firequalizer_filter           ?= false
config [bool] config.libavutil.flanger_filter                ?= false
config [bool] config.libavutil.haas_filter                   ?= false
config [bool] config.libavutil.hdcd_filter                   ?= false
config [bool] config.libavutil.headphone_filter              ?= false
config [bool] config.libavutil.highpass_filter               ?= false
config [bool] config.libavutil.highshelf_filter              ?= false
config [bool] config.libavutil.join_filter                   ?= false
config [bool] config.libavutil.ladspa_filter                 ?= false
config [bool] config.libavutil.loudnorm_filter               ?= false
config [bool] config.libavutil.lowpass_filter                ?= false
config [bool] config.libavutil.lowshelf_filter               ?= false
config [bool] config.libavutil.lv2_filter                    ?= false
config [bool] config.libavutil.mcompand_filter               ?= false
config [bool] config.libavutil.pan_filter                    ?= false
config [bool] config.libavutil.replaygain_filter             ?= false
config [bool] config.libavutil.rubberband_filter             ?= false
config [bool] config.libavutil.sidechaincompress_filter      ?= false
config [bool] config.libavutil.sidechaingate_filter          ?= false
config [bool] config.libavutil.silencedetect_filter          ?= false
config [bool] config.libavutil.silenceremove_filter          ?= false
config [bool] config.libavutil.sofalizer_filter              ?= false
config [bool] config.libavutil.speechnorm_filter             ?= false
config [bool] config.libavutil.stereotools_filter            ?= false
config [bool] config.libavutil.stereowiden_filter            ?= false
config [bool] config.libavutil.superequalizer_filter         ?= false
config [bool] config.libavutil.surround_filter               ?= false
config [bool] config.libavutil.tiltshelf_filter              ?= false
config [bool] config.libavutil.treble_filter                 ?= false
config [bool] config.libavutil.tremolo_filter                ?= false
config [bool] config.libavutil.vibrato_filter                ?= false
config [bool] config.libavutil.virtualbass_filter            ?= false
config [bool] config.libavutil.volume_filter                 ?= false
config [bool] config.libavutil.volumedetect_filter           ?= false
config [bool] config.libavutil.aevalsrc_filter               ?= false
config [bool] config.libavutil.afdelaysrc_filter             ?= true
config [bool] config.libavutil.afireqsrc_filter              ?= true
config [bool] config.libavutil.afirsrc_filter                ?= true
config [bool] config.libavutil.anoisesrc_filter              ?= false
config [bool] config.libavutil.anullsrc_filter               ?= false
config [bool] config.libavutil.flite_filter                  ?= false
config [bool] config.libavutil.hilbert_filter                ?= false
config [bool] config.libavutil.sinc_filter                   ?= true
config [bool] config.libavutil.sine_filter                   ?= true
config [bool] config.libavutil.anullsink_filter              ?= false
config [bool] config.libavutil.addroi_filter                 ?= false
config [bool] config.libavutil.alphaextract_filter           ?= false
config [bool] config.libavutil.alphamerge_filter             ?= false
config [bool] config.libavutil.amplify_filter                ?= false
config [bool] config.libavutil.ass_filter                    ?= false
config [bool] config.libavutil.atadenoise_filter             ?= false
config [bool] config.libavutil.avgblur_filter                ?= false
config [bool] config.libavutil.avgblur_opencl_filter         ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.avgblur_vulkan_filter         ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.backgroundkey_filter          ?= false
config [bool] config.libavutil.bbox_filter                   ?= false
config [bool] config.libavutil.bench_filter                  ?= false
config [bool] config.libavutil.bilateral_filter              ?= false
config [bool] config.libavutil.bilateral_cuda_filter         ?=\
 $config.libavutil.cuda
config [bool] config.libavutil.bitplanenoise_filter          ?= false
config [bool] config.libavutil.blackdetect_filter            ?= false
config [bool] config.libavutil.blackframe_filter             ?= false
config [bool] config.libavutil.blend_filter                  ?= false
config [bool] config.libavutil.blend_vulkan_filter           ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.blockdetect_filter            ?= false
config [bool] config.libavutil.blurdetect_filter             ?= false
config [bool] config.libavutil.bm3d_filter                   ?= false
config [bool] config.libavutil.boxblur_filter                ?= false
config [bool] config.libavutil.boxblur_opencl_filter         ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.bwdif_filter                  ?= false
config [bool] config.libavutil.bwdif_cuda_filter             ?=\
 $config.libavutil.cuda
config [bool] config.libavutil.bwdif_vulkan_filter           ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.cas_filter                    ?= false
config [bool] config.libavutil.ccrepack_filter               ?= false
config [bool] config.libavutil.chromaber_vulkan_filter       ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.chromahold_filter             ?= false
config [bool] config.libavutil.chromakey_filter              ?= false
config [bool] config.libavutil.chromakey_cuda_filter         ?=\
 $config.libavutil.cuda
config [bool] config.libavutil.chromanr_filter               ?= false
config [bool] config.libavutil.chromashift_filter            ?= false
config [bool] config.libavutil.ciescope_filter               ?= false
config [bool] config.libavutil.codecview_filter              ?= false
config [bool] config.libavutil.colorbalance_filter           ?= false
config [bool] config.libavutil.colorchannelmixer_filter      ?= false
config [bool] config.libavutil.colorcontrast_filter          ?= false
config [bool] config.libavutil.colorcorrect_filter           ?= false
config [bool] config.libavutil.colorize_filter               ?= false
config [bool] config.libavutil.colorkey_filter               ?= false
config [bool] config.libavutil.colorkey_opencl_filter        ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.colorhold_filter              ?= false
config [bool] config.libavutil.colorlevels_filter            ?= false
config [bool] config.libavutil.colormap_filter               ?= false
config [bool] config.libavutil.colormatrix_filter            ?= false
config [bool] config.libavutil.colorspace_filter             ?= false
config [bool] config.libavutil.colorspace_cuda_filter        ?=\
 $config.libavutil.cuda
config [bool] config.libavutil.colortemperature_filter       ?= false
config [bool] config.libavutil.convolution_filter            ?= false
config [bool] config.libavutil.convolution_opencl_filter     ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.convolve_filter               ?= false
config [bool] config.libavutil.copy_filter                   ?= false
config [bool] config.libavutil.coreimage_filter              ?= false
config [bool] config.libavutil.corr_filter                   ?= false
config [bool] config.libavutil.cover_rect_filter             ?= false
config [bool] config.libavutil.crop_filter                   ?= false
config [bool] config.libavutil.cropdetect_filter             ?= false
config [bool] config.libavutil.cue_filter                    ?= false
config [bool] config.libavutil.curves_filter                 ?= false
config [bool] config.libavutil.datascope_filter              ?= false
config [bool] config.libavutil.dblur_filter                  ?= false
config [bool] config.libavutil.dctdnoiz_filter               ?= false
config [bool] config.libavutil.deband_filter                 ?= false
config [bool] config.libavutil.deblock_filter                ?= false
config [bool] config.libavutil.decimate_filter               ?= false
config [bool] config.libavutil.deconvolve_filter             ?= false
config [bool] config.libavutil.dedot_filter                  ?= false
config [bool] config.libavutil.deflate_filter                ?= true
config [bool] config.libavutil.deflicker_filter              ?= false
config [bool] config.libavutil.deinterlace_qsv_filter        ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.deinterlace_vaapi_filter      ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.dejudder_filter               ?= false
config [bool] config.libavutil.delogo_filter                 ?= false
config [bool] config.libavutil.denoise_vaapi_filter          ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.derain_filter                 ?= false
config [bool] config.libavutil.deshake_filter                ?= false
config [bool] config.libavutil.deshake_opencl_filter         ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.despill_filter                ?= false
config [bool] config.libavutil.detelecine_filter             ?= false
config [bool] config.libavutil.dilation_filter               ?= false
config [bool] config.libavutil.dilation_opencl_filter        ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.displace_filter               ?= false
config [bool] config.libavutil.dnn_classify_filter           ?= false
config [bool] config.libavutil.dnn_detect_filter             ?= false
config [bool] config.libavutil.dnn_processing_filter         ?= false
config [bool] config.libavutil.doubleweave_filter            ?= false
config [bool] config.libavutil.drawbox_filter                ?= false
config [bool] config.libavutil.drawgraph_filter              ?= false
config [bool] config.libavutil.drawgrid_filter               ?= false
config [bool] config.libavutil.drawtext_filter               ?= false
config [bool] config.libavutil.edgedetect_filter             ?= false
config [bool] config.libavutil.elbg_filter                   ?= false
config [bool] config.libavutil.entropy_filter                ?= false
config [bool] config.libavutil.epx_filter                    ?= false
config [bool] config.libavutil.eq_filter                     ?= false
config [bool] config.libavutil.erosion_filter                ?= false
config [bool] config.libavutil.erosion_opencl_filter         ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.estdif_filter                 ?= false
config [bool] config.libavutil.exposure_filter               ?= false
config [bool] config.libavutil.extractplanes_filter          ?= false
config [bool] config.libavutil.fade_filter                   ?= false
config [bool] config.libavutil.feedback_filter               ?= false
config [bool] config.libavutil.fftdnoiz_filter               ?= false
config [bool] config.libavutil.fftfilt_filter                ?= false
config [bool] config.libavutil.field_filter                  ?= false
config [bool] config.libavutil.fieldhint_filter              ?= false
config [bool] config.libavutil.fieldmatch_filter             ?= false
config [bool] config.libavutil.fieldorder_filter             ?= false
config [bool] config.libavutil.fillborders_filter            ?= false
config [bool] config.libavutil.find_rect_filter              ?= false
config [bool] config.libavutil.flip_vulkan_filter            ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.floodfill_filter              ?= false
config [bool] config.libavutil.format_filter                 ?= false
config [bool] config.libavutil.fps_filter                    ?= false
config [bool] config.libavutil.framepack_filter              ?= false
config [bool] config.libavutil.framerate_filter              ?= false
config [bool] config.libavutil.framestep_filter              ?= false
config [bool] config.libavutil.freezedetect_filter           ?= false
config [bool] config.libavutil.freezeframes_filter           ?= false
config [bool] config.libavutil.frei0r_filter                 ?= false
config [bool] config.libavutil.fspp_filter                   ?= false
config [bool] config.libavutil.fsync_filter                  ?= false
config [bool] config.libavutil.gblur_filter                  ?= false
config [bool] config.libavutil.gblur_vulkan_filter           ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.geq_filter                    ?= false
config [bool] config.libavutil.gradfun_filter                ?= false
config [bool] config.libavutil.graphmonitor_filter           ?= false
config [bool] config.libavutil.grayworld_filter              ?= false
config [bool] config.libavutil.greyedge_filter               ?= false
config [bool] config.libavutil.guided_filter                 ?= false
config [bool] config.libavutil.haldclut_filter               ?= false
config [bool] config.libavutil.hflip_filter                  ?= false
config [bool] config.libavutil.hflip_vulkan_filter           ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.histeq_filter                 ?= false
config [bool] config.libavutil.histogram_filter              ?= false
config [bool] config.libavutil.hqdn3d_filter                 ?= false
config [bool] config.libavutil.hqx_filter                    ?= true
config [bool] config.libavutil.hstack_filter                 ?= false
config [bool] config.libavutil.hsvhold_filter                ?= false
config [bool] config.libavutil.hsvkey_filter                 ?= false
config [bool] config.libavutil.hue_filter                    ?= false
config [bool] config.libavutil.huesaturation_filter          ?= false
config [bool] config.libavutil.hwdownload_filter             ?= false
config [bool] config.libavutil.hwmap_filter                  ?= false
config [bool] config.libavutil.hwupload_filter               ?= false
config [bool] config.libavutil.hwupload_cuda_filter          ?=\
 $config.libavutil.cuda
config [bool] config.libavutil.hysteresis_filter             ?= false
config [bool] config.libavutil.iccdetect_filter              ?= false
config [bool] config.libavutil.iccgen_filter                 ?= false
config [bool] config.libavutil.identity_filter               ?= false
config [bool] config.libavutil.idet_filter                   ?= false
config [bool] config.libavutil.il_filter                     ?= false
config [bool] config.libavutil.inflate_filter                ?= true
config [bool] config.libavutil.interlace_filter              ?= false
config [bool] config.libavutil.interleave_filter             ?= false
config [bool] config.libavutil.kerndeint_filter              ?= false
config [bool] config.libavutil.kirsch_filter                 ?= false
config [bool] config.libavutil.lagfun_filter                 ?= false
config [bool] config.libavutil.latency_filter                ?= false
config [bool] config.libavutil.lcevc_filter                  ?= false
config [bool] config.libavutil.lenscorrection_filter         ?= false
config [bool] config.libavutil.lensfun_filter                ?= false
config [bool] config.libavutil.libplacebo_filter             ?= false
config [bool] config.libavutil.libvmaf_filter                ?= false
config [bool] config.libavutil.libvmaf_cuda_filter           ?=\
 $config.libavutil.cuda
config [bool] config.libavutil.limitdiff_filter              ?= false
config [bool] config.libavutil.limiter_filter                ?= false
config [bool] config.libavutil.loop_filter                   ?= false
config [bool] config.libavutil.lumakey_filter                ?= false
config [bool] config.libavutil.lut_filter                    ?= false
config [bool] config.libavutil.lut1d_filter                  ?= false
config [bool] config.libavutil.lut2_filter                   ?= false
config [bool] config.libavutil.lut3d_filter                  ?= false
config [bool] config.libavutil.lutrgb_filter                 ?= false
config [bool] config.libavutil.lutyuv_filter                 ?= false
config [bool] config.libavutil.maskedclamp_filter            ?= false
config [bool] config.libavutil.maskedmax_filter              ?= false
config [bool] config.libavutil.maskedmerge_filter            ?= false
config [bool] config.libavutil.maskedmin_filter              ?= false
config [bool] config.libavutil.maskedthreshold_filter        ?= false
config [bool] config.libavutil.maskfun_filter                ?= false
config [bool] config.libavutil.mcdeint_filter                ?= false
config [bool] config.libavutil.median_filter                 ?= false
config [bool] config.libavutil.mergeplanes_filter            ?= false
config [bool] config.libavutil.mestimate_filter              ?= false
config [bool] config.libavutil.metadata_filter               ?= false
config [bool] config.libavutil.midequalizer_filter           ?= false
config [bool] config.libavutil.minterpolate_filter           ?= false
config [bool] config.libavutil.mix_filter                    ?= false
config [bool] config.libavutil.monochrome_filter             ?= false
config [bool] config.libavutil.morpho_filter                 ?= false
config [bool] config.libavutil.mpdecimate_filter             ?= false
config [bool] config.libavutil.msad_filter                   ?= false
config [bool] config.libavutil.multiply_filter               ?= false
config [bool] config.libavutil.negate_filter                 ?= false
config [bool] config.libavutil.nlmeans_filter                ?= false
config [bool] config.libavutil.nlmeans_opencl_filter         ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.nlmeans_vulkan_filter         ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.nnedi_filter                  ?= false
config [bool] config.libavutil.noformat_filter               ?= false
config [bool] config.libavutil.noise_filter                  ?= false
config [bool] config.libavutil.normalize_filter              ?= false
config [bool] config.libavutil.null_filter                   ?= true # leave\
 on, used by libavfilter test
config [bool] config.libavutil.ocr_filter                    ?= false
config [bool] config.libavutil.ocv_filter                    ?= false
config [bool] config.libavutil.oscilloscope_filter           ?= false
config [bool] config.libavutil.overlay_filter                ?= false
config [bool] config.libavutil.overlay_opencl_filter         ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.overlay_qsv_filter            ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.overlay_vaapi_filter          ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.overlay_vulkan_filter         ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.overlay_cuda_filter           ?=\
 $config.libavutil.cuda
config [bool] config.libavutil.owdenoise_filter              ?= false
config [bool] config.libavutil.pad_filter                    ?= false
config [bool] config.libavutil.pad_opencl_filter             ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.palettegen_filter             ?= false
config [bool] config.libavutil.paletteuse_filter             ?= false
config [bool] config.libavutil.perms_filter                  ?= false
config [bool] config.libavutil.perspective_filter            ?= false
config [bool] config.libavutil.phase_filter                  ?= false
config [bool] config.libavutil.photosensitivity_filter       ?= false
config [bool] config.libavutil.pixdesctest_filter            ?= true
config [bool] config.libavutil.pixelize_filter               ?= true
config [bool] config.libavutil.pixscope_filter               ?= true
config [bool] config.libavutil.pp_filter                     ?= false
config [bool] config.libavutil.pp7_filter                    ?= false
config [bool] config.libavutil.premultiply_filter            ?= false
config [bool] config.libavutil.prewitt_filter                ?= false
config [bool] config.libavutil.prewitt_opencl_filter         ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.procamp_vaapi_filter          ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.program_opencl_filter         ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.pseudocolor_filter            ?= false
config [bool] config.libavutil.psnr_filter                   ?= false
config [bool] config.libavutil.pullup_filter                 ?= false
config [bool] config.libavutil.qp_filter                     ?= false
config [bool] config.libavutil.qrencode_filter               ?= false
config [bool] config.libavutil.quirc_filter                  ?= false
config [bool] config.libavutil.random_filter                 ?= false
config [bool] config.libavutil.readeia608_filter             ?= false
config [bool] config.libavutil.readvitc_filter               ?= false
config [bool] config.libavutil.realtime_filter               ?= false
config [bool] config.libavutil.remap_filter                  ?= false
config [bool] config.libavutil.remap_opencl_filter           ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.removegrain_filter            ?= false
config [bool] config.libavutil.removelogo_filter             ?= false
config [bool] config.libavutil.repeatfields_filter           ?= false
config [bool] config.libavutil.reverse_filter                ?= false
config [bool] config.libavutil.rgbashift_filter              ?= false
config [bool] config.libavutil.roberts_filter                ?= false
config [bool] config.libavutil.roberts_opencl_filter         ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.rotate_filter                 ?= false
config [bool] config.libavutil.sab_filter                    ?= false
config [bool] config.libavutil.scale_filter                  ?= false
config [bool] config.libavutil.scale_cuda_filter             ?=\
 $config.libavutil.cuda
config [bool] config.libavutil.scale_npp_filter              ?= false
config [bool] config.libavutil.scale_qsv_filter              ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.scale_vaapi_filter            ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.scale_vt_filter               ?= false
config [bool] config.libavutil.scale_vulkan_filter           ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.scale2ref_filter              ?= false
config [bool] config.libavutil.scale2ref_npp_filter          ?= false
config [bool] config.libavutil.scdet_filter                  ?= false
config [bool] config.libavutil.scharr_filter                 ?= false
config [bool] config.libavutil.scroll_filter                 ?= false
config [bool] config.libavutil.segment_filter                ?= false
config [bool] config.libavutil.select_filter                 ?= false
config [bool] config.libavutil.selectivecolor_filter         ?= false
config [bool] config.libavutil.sendcmd_filter                ?= false
config [bool] config.libavutil.separatefields_filter         ?= false
config [bool] config.libavutil.setdar_filter                 ?= false
config [bool] config.libavutil.setfield_filter               ?= false
config [bool] config.libavutil.setparams_filter              ?= false
config [bool] config.libavutil.setpts_filter                 ?= false
config [bool] config.libavutil.setrange_filter               ?= false
config [bool] config.libavutil.setsar_filter                 ?= false
config [bool] config.libavutil.settb_filter                  ?= false
config [bool] config.libavutil.sharpen_npp_filter            ?= false
config [bool] config.libavutil.sharpness_vaapi_filter        ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.shear_filter                  ?= false
config [bool] config.libavutil.showinfo_filter               ?= false
config [bool] config.libavutil.showpalette_filter            ?= false
config [bool] config.libavutil.shuffleframes_filter          ?= false
config [bool] config.libavutil.shufflepixels_filter          ?= false
config [bool] config.libavutil.shuffleplanes_filter          ?= false
config [bool] config.libavutil.sidedata_filter               ?= false
config [bool] config.libavutil.signalstats_filter            ?= false
config [bool] config.libavutil.signature_filter              ?= false
config [bool] config.libavutil.siti_filter                   ?= false
config [bool] config.libavutil.smartblur_filter              ?= false
config [bool] config.libavutil.sobel_filter                  ?= false
config [bool] config.libavutil.sobel_opencl_filter           ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.split_filter                  ?= false
config [bool] config.libavutil.spp_filter                    ?= false
config [bool] config.libavutil.sr_filter                     ?= false
config [bool] config.libavutil.ssim_filter                   ?= false
config [bool] config.libavutil.ssim360_filter                ?= false
config [bool] config.libavutil.stereo3d_filter               ?= false
config [bool] config.libavutil.streamselect_filter           ?= false
config [bool] config.libavutil.subtitles_filter              ?= false
config [bool] config.libavutil.super2xsai_filter             ?= false
config [bool] config.libavutil.swaprect_filter               ?= false
config [bool] config.libavutil.swapuv_filter                 ?= false
config [bool] config.libavutil.tblend_filter                 ?= false
config [bool] config.libavutil.telecine_filter               ?= false
config [bool] config.libavutil.thistogram_filter             ?= false
config [bool] config.libavutil.threshold_filter              ?= false
config [bool] config.libavutil.thumbnail_filter              ?= false
config [bool] config.libavutil.thumbnail_cuda_filter         ?=\
 $config.libavutil.cuda
config [bool] config.libavutil.tile_filter                   ?= false
config [bool] config.libavutil.tiltandshift_filter           ?= false
config [bool] config.libavutil.tinterlace_filter             ?= false
config [bool] config.libavutil.tlut2_filter                  ?= false
config [bool] config.libavutil.tmedian_filter                ?= false
config [bool] config.libavutil.tmidequalizer_filter          ?= false
config [bool] config.libavutil.tmix_filter                   ?= false
config [bool] config.libavutil.tonemap_filter                ?=\
 $config.libavutil.have_compile_time_nan
config [bool] config.libavutil.tonemap_opencl_filter         ?=\
 ($config.libavutil.opencl && $config.libavutil.have_compile_time_nan)
config [bool] config.libavutil.tonemap_vaapi_filter          ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.tpad_filter                   ?= false
config [bool] config.libavutil.transpose_filter              ?= false
config [bool] config.libavutil.transpose_npp_filter          ?= false
config [bool] config.libavutil.transpose_opencl_filter       ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.transpose_vaapi_filter        ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.transpose_vt_filter           ?= false
config [bool] config.libavutil.transpose_vulkan_filter       ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.trim_filter                   ?= false
config [bool] config.libavutil.unpremultiply_filter          ?= false
config [bool] config.libavutil.unsharp_filter                ?= false
config [bool] config.libavutil.unsharp_opencl_filter         ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.untile_filter                 ?= false
config [bool] config.libavutil.uspp_filter                   ?= false
config [bool] config.libavutil.v360_filter                   ?= false
config [bool] config.libavutil.vaguedenoiser_filter          ?= false
config [bool] config.libavutil.varblur_filter                ?= false
config [bool] config.libavutil.vectorscope_filter            ?= false
config [bool] config.libavutil.vflip_filter                  ?= false
config [bool] config.libavutil.vflip_vulkan_filter           ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.vfrdet_filter                 ?= false
config [bool] config.libavutil.vibrance_filter               ?= false
config [bool] config.libavutil.vidstabdetect_filter          ?= false
config [bool] config.libavutil.vidstabtransform_filter       ?= false
config [bool] config.libavutil.vif_filter                    ?= false
config [bool] config.libavutil.vignette_filter               ?= false
config [bool] config.libavutil.vmafmotion_filter             ?= false
config [bool] config.libavutil.vpp_qsv_filter                ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.vstack_filter                 ?= false
config [bool] config.libavutil.w3fdif_filter                 ?= false
config [bool] config.libavutil.waveform_filter               ?= false
config [bool] config.libavutil.weave_filter                  ?= false
config [bool] config.libavutil.xbr_filter                    ?= false
config [bool] config.libavutil.xcorrelate_filter             ?= false
config [bool] config.libavutil.xfade_filter                  ?= false
config [bool] config.libavutil.xfade_opencl_filter           ?=\
 $config.libavutil.opencl
config [bool] config.libavutil.xfade_vulkan_filter           ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.xmedian_filter                ?= false
config [bool] config.libavutil.xpsnr_filter                  ?= false
config [bool] config.libavutil.xstack_filter                 ?= false
config [bool] config.libavutil.yadif_filter                  ?= false
config [bool] config.libavutil.yadif_cuda_filter             ?=\
 $config.libavutil.cuda
config [bool] config.libavutil.yadif_videotoolbox_filter     ?=\
 $config.libavutil.videotoolbox
config [bool] config.libavutil.yaepblur_filter               ?= false
config [bool] config.libavutil.zmq_filter                    ?= false
config [bool] config.libavutil.zoompan_filter                ?= false
config [bool] config.libavutil.zscale_filter                 ?=\
 ($config.libavutil.libzimg && $config.libavutil.have_compile_time_nan)
config [bool] config.libavutil.hstack_vaapi_filter           ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.vstack_vaapi_filter           ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.xstack_vaapi_filter           ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.hstack_qsv_filter             ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.vstack_qsv_filter             ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.xstack_qsv_filter             ?=\
 $config.libavutil.qsv
config [bool] config.libavutil.pad_vaapi_filter              ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.drawbox_vaapi_filter          ?=\
 $config.libavutil.vaapi
config [bool] config.libavutil.allrgb_filter                 ?= false
config [bool] config.libavutil.allyuv_filter                 ?= false
config [bool] config.libavutil.cellauto_filter               ?= false
config [bool] config.libavutil.color_filter                  ?= false
config [bool] config.libavutil.color_vulkan_filter           ?=\
 $config.libavutil.vulkan
config [bool] config.libavutil.colorchart_filter             ?= false
config [bool] config.libavutil.colorspectrum_filter          ?= false
config [bool] config.libavutil.coreimagesrc_filter           ?= false
config [bool] config.libavutil.ddagrab_filter                ?= false
config [bool] config.libavutil.frei0r_src_filter             ?= false
config [bool] config.libavutil.gradients_filter              ?= false
config [bool] config.libavutil.haldclutsrc_filter            ?= false
config [bool] config.libavutil.life_filter                   ?= false
config [bool] config.libavutil.mandelbrot_filter             ?= false
config [bool] config.libavutil.mptestsrc_filter              ?= false
config [bool] config.libavutil.nullsrc_filter                ?= false
config [bool] config.libavutil.openclsrc_filter              ?= false
config [bool] config.libavutil.qrencodesrc_filter            ?= false
config [bool] config.libavutil.pal75bars_filter              ?= false
config [bool] config.libavutil.pal100bars_filter             ?= false
config [bool] config.libavutil.perlin_filter                 ?= false
config [bool] config.libavutil.rgbtestsrc_filter             ?= false
config [bool] config.libavutil.sierpinski_filter             ?= false
config [bool] config.libavutil.smptebars_filter              ?= false
config [bool] config.libavutil.smptehdbars_filter            ?= false
config [bool] config.libavutil.testsrc_filter                ?= false
config [bool] config.libavutil.testsrc2_filter               ?= false
config [bool] config.libavutil.yuvtestsrc_filter             ?= false
config [bool] config.libavutil.zoneplate_filter              ?= false
config [bool] config.libavutil.nullsink_filter               ?= false
config [bool] config.libavutil.a3dscope_filter               ?= false
config [bool] config.libavutil.abitscope_filter              ?= false
config [bool] config.libavutil.adrawgraph_filter             ?= false
config [bool] config.libavutil.agraphmonitor_filter          ?= false
config [bool] config.libavutil.ahistogram_filter             ?= false
config [bool] config.libavutil.aphasemeter_filter            ?= false
config [bool] config.libavutil.avectorscope_filter           ?= false
config [bool] config.libavutil.concat_filter                 ?= false
config [bool] config.libavutil.showcqt_filter                ?= false
config [bool] config.libavutil.showcwt_filter                ?= false
config [bool] config.libavutil.showfreqs_filter              ?= false
config [bool] config.libavutil.showspatial_filter            ?= false
config [bool] config.libavutil.showspectrum_filter           ?= false
config [bool] config.libavutil.showspectrumpic_filter        ?= false
config [bool] config.libavutil.showvolume_filter             ?= false
config [bool] config.libavutil.showwaves_filter              ?= false
config [bool] config.libavutil.showwavespic_filter           ?= false
config [bool] config.libavutil.spectrumsynth_filter          ?= false
config [bool] config.libavutil.avsynctest_filter             ?= false
config [bool] config.libavutil.amovie_filter                 ?= false
config [bool] config.libavutil.movie_filter                  ?= false
config [bool] config.libavutil.aa_demuxer                    ?= true
config [bool] config.libavutil.aac_demuxer                   ?= true
config [bool] config.libavutil.aax_demuxer                   ?= true
config [bool] config.libavutil.ac3_demuxer                   ?= false
config [bool] config.libavutil.ac4_demuxer                   ?= false
config [bool] config.libavutil.ace_demuxer                   ?= true
config [bool] config.libavutil.acm_demuxer                   ?= true
config [bool] config.libavutil.act_demuxer                   ?= true
config [bool] config.libavutil.adf_demuxer                   ?= true
config [bool] config.libavutil.adp_demuxer                   ?= true
config [bool] config.libavutil.ads_demuxer                   ?= true
config [bool] config.libavutil.adx_demuxer                   ?= true
config [bool] config.libavutil.aea_demuxer                   ?= true
config [bool] config.libavutil.afc_demuxer                   ?= true
config [bool] config.libavutil.aiff_demuxer                  ?= true
config [bool] config.libavutil.aix_demuxer                   ?= true
config [bool] config.libavutil.alp_demuxer                   ?= true
config [bool] config.libavutil.amr_demuxer                   ?= true
config [bool] config.libavutil.amrnb_demuxer                 ?= true
config [bool] config.libavutil.amrwb_demuxer                 ?= true
config [bool] config.libavutil.anm_demuxer                   ?= true
config [bool] config.libavutil.apac_demuxer                  ?= true
config [bool] config.libavutil.apc_demuxer                   ?= true
config [bool] config.libavutil.ape_demuxer                   ?= true
config [bool] config.libavutil.apm_demuxer                   ?= true
config [bool] config.libavutil.apng_demuxer                  ?= true
config [bool] config.libavutil.aptx_demuxer                  ?= true
config [bool] config.libavutil.aptx_hd_demuxer               ?= false
config [bool] config.libavutil.aqtitle_demuxer               ?= true
config [bool] config.libavutil.argo_asf_demuxer              ?= true
config [bool] config.libavutil.argo_brp_demuxer              ?= true
config [bool] config.libavutil.argo_cvg_demuxer              ?= true
config [bool] config.libavutil.asf_demuxer                   ?= true
config [bool] config.libavutil.asf_o_demuxer                 ?= false
config [bool] config.libavutil.ass_demuxer                   ?= true
config [bool] config.libavutil.ast_demuxer                   ?= true
config [bool] config.libavutil.au_demuxer                    ?= true
config [bool] config.libavutil.av1_demuxer                   ?= true
config [bool] config.libavutil.avi_demuxer                   ?= true
config [bool] config.libavutil.avisynth_demuxer              ?= false
config [bool] config.libavutil.avr_demuxer                   ?= true
config [bool] config.libavutil.avs_demuxer                   ?= true
config [bool] config.libavutil.avs2_demuxer                  ?= true
config [bool] config.libavutil.avs3_demuxer                  ?= true
config [bool] config.libavutil.bethsoftvid_demuxer           ?= true
config [bool] config.libavutil.bfi_demuxer                   ?= true
config [bool] config.libavutil.bintext_demuxer               ?= true
config [bool] config.libavutil.bink_demuxer                  ?= true
config [bool] config.libavutil.binka_demuxer                 ?= true
config [bool] config.libavutil.bit_demuxer                   ?= true
config [bool] config.libavutil.bitpacked_demuxer             ?= true
config [bool] config.libavutil.bmv_demuxer                   ?= true
config [bool] config.libavutil.bfstm_demuxer                 ?= true
config [bool] config.libavutil.brstm_demuxer                 ?= true
config [bool] config.libavutil.boa_demuxer                   ?= true
config [bool] config.libavutil.bonk_demuxer                  ?= true
config [bool] config.libavutil.c93_demuxer                   ?= true
config [bool] config.libavutil.caf_demuxer                   ?= true
config [bool] config.libavutil.cavsvideo_demuxer             ?= true
config [bool] config.libavutil.cdg_demuxer                   ?= true
config [bool] config.libavutil.cdxl_demuxer                  ?= true
config [bool] config.libavutil.cine_demuxer                  ?= true
config [bool] config.libavutil.codec2_demuxer                ?= true
config [bool] config.libavutil.codec2raw_demuxer             ?= true
config [bool] config.libavutil.concat_demuxer                ?= true
config [bool] config.libavutil.dash_demuxer                  ?= false
config [bool] config.libavutil.data_demuxer                  ?= true
config [bool] config.libavutil.daud_demuxer                  ?= true
config [bool] config.libavutil.dcstr_demuxer                 ?= true
config [bool] config.libavutil.derf_demuxer                  ?= true
config [bool] config.libavutil.dfa_demuxer                   ?= true
config [bool] config.libavutil.dfpwm_demuxer                 ?= true
config [bool] config.libavutil.dhav_demuxer                  ?= true
config [bool] config.libavutil.dirac_demuxer                 ?= true
config [bool] config.libavutil.dnxhd_demuxer                 ?= true
config [bool] config.libavutil.dsf_demuxer                   ?= true
config [bool] config.libavutil.dsicin_demuxer                ?= true
config [bool] config.libavutil.dss_demuxer                   ?= true
config [bool] config.libavutil.dts_demuxer                   ?= true
config [bool] config.libavutil.dtshd_demuxer                 ?= true
config [bool] config.libavutil.dv_demuxer                    ?= true
config [bool] config.libavutil.dvbsub_demuxer                ?= false
config [bool] config.libavutil.dvbtxt_demuxer                ?= false
config [bool] config.libavutil.dvdvideo_demuxer              ?= false
config [bool] config.libavutil.dxa_demuxer                   ?= false
config [bool] config.libavutil.ea_demuxer                    ?= true
config [bool] config.libavutil.ea_cdata_demuxer              ?= false
config [bool] config.libavutil.eac3_demuxer                  ?= false
config [bool] config.libavutil.epaf_demuxer                  ?= true
config [bool] config.libavutil.evc_demuxer                   ?= true
config [bool] config.libavutil.ffmetadata_demuxer            ?= true
config [bool] config.libavutil.filmstrip_demuxer             ?= true
config [bool] config.libavutil.fits_demuxer                  ?= true
config [bool] config.libavutil.flac_demuxer                  ?= true
config [bool] config.libavutil.flic_demuxer                  ?= true
config [bool] config.libavutil.flv_demuxer                   ?= true
config [bool] config.libavutil.live_flv_demuxer              ?= false
config [bool] config.libavutil.fourxm_demuxer                ?= true
config [bool] config.libavutil.frm_demuxer                   ?= true
config [bool] config.libavutil.fsb_demuxer                   ?= true
config [bool] config.libavutil.fwse_demuxer                  ?= true
config [bool] config.libavutil.g722_demuxer                  ?= true
config [bool] config.libavutil.g723_1_demuxer                ?= false
config [bool] config.libavutil.g726_demuxer                  ?= true
config [bool] config.libavutil.g726le_demuxer                ?= true
config [bool] config.libavutil.g729_demuxer                  ?= true
config [bool] config.libavutil.gdv_demuxer                   ?= true
config [bool] config.libavutil.genh_demuxer                  ?= true
config [bool] config.libavutil.gif_demuxer                   ?= true
config [bool] config.libavutil.gsm_demuxer                   ?= true
config [bool] config.libavutil.gxf_demuxer                   ?= true
config [bool] config.libavutil.h261_demuxer                  ?= true
config [bool] config.libavutil.h263_demuxer                  ?= true
config [bool] config.libavutil.h264_demuxer                  ?= true
config [bool] config.libavutil.hca_demuxer                   ?= true
config [bool] config.libavutil.hcom_demuxer                  ?= true
config [bool] config.libavutil.hevc_demuxer                  ?= true
config [bool] config.libavutil.hls_demuxer                   ?= false
config [bool] config.libavutil.hnm_demuxer                   ?= true
config [bool] config.libavutil.iamf_demuxer                  ?= true
config [bool] config.libavutil.ico_demuxer                   ?= true
config [bool] config.libavutil.idcin_demuxer                 ?= true
config [bool] config.libavutil.idf_demuxer                   ?= true
config [bool] config.libavutil.iff_demuxer                   ?= true
config [bool] config.libavutil.ifv_demuxer                   ?= true
config [bool] config.libavutil.ilbc_demuxer                  ?= true
config [bool] config.libavutil.image2_demuxer                ?= true
config [bool] config.libavutil.image2pipe_demuxer            ?= true
config [bool] config.libavutil.image2_alias_pix_demuxer      ?= false
config [bool] config.libavutil.image2_brender_pix_demuxer    ?= false
config [bool] config.libavutil.imf_demuxer                   ?= false
config [bool] config.libavutil.ingenient_demuxer             ?= true
config [bool] config.libavutil.ipmovie_demuxer               ?= true
config [bool] config.libavutil.ipu_demuxer                   ?= true
config [bool] config.libavutil.ircam_demuxer                 ?= true
config [bool] config.libavutil.iss_demuxer                   ?= true
config [bool] config.libavutil.iv8_demuxer                   ?= true
config [bool] config.libavutil.ivf_demuxer                   ?= true
config [bool] config.libavutil.ivr_demuxer                   ?= true
config [bool] config.libavutil.jacosub_demuxer               ?= true
config [bool] config.libavutil.jv_demuxer                    ?= true
config [bool] config.libavutil.jpegxl_anim_demuxer           ?= false
config [bool] config.libavutil.kux_demuxer                   ?= true
config [bool] config.libavutil.kvag_demuxer                  ?= true
config [bool] config.libavutil.laf_demuxer                   ?= true
config [bool] config.libavutil.lc3_demuxer                   ?= true
config [bool] config.libavutil.lmlm4_demuxer                 ?= true
config [bool] config.libavutil.loas_demuxer                  ?= true
config [bool] config.libavutil.luodat_demuxer                ?= true
config [bool] config.libavutil.lrc_demuxer                   ?= true
config [bool] config.libavutil.lvf_demuxer                   ?= true
config [bool] config.libavutil.lxf_demuxer                   ?= true
config [bool] config.libavutil.m4v_demuxer                   ?= true
config [bool] config.libavutil.mca_demuxer                   ?= true
config [bool] config.libavutil.mcc_demuxer                   ?= true
config [bool] config.libavutil.matroska_demuxer              ?= true
config [bool] config.libavutil.mgsts_demuxer                 ?= true
config [bool] config.libavutil.microdvd_demuxer              ?= true
config [bool] config.libavutil.mjpeg_demuxer                 ?= true
config [bool] config.libavutil.mjpeg_2000_demuxer            ?= true
config [bool] config.libavutil.mlp_demuxer                   ?= true
config [bool] config.libavutil.mlv_demuxer                   ?= true
config [bool] config.libavutil.mm_demuxer                    ?= true
config [bool] config.libavutil.mmf_demuxer                   ?= true
config [bool] config.libavutil.mods_demuxer                  ?= true
config [bool] config.libavutil.moflex_demuxer                ?= true
config [bool] config.libavutil.mov_demuxer                   ?= true
config [bool] config.libavutil.mp3_demuxer                   ?= true
config [bool] config.libavutil.mpc_demuxer                   ?= true
config [bool] config.libavutil.mpc8_demuxer                  ?= true
config [bool] config.libavutil.mpegps_demuxer                ?= true
config [bool] config.libavutil.mpegts_demuxer                ?= true
config [bool] config.libavutil.mpegtsraw_demuxer             ?= true
config [bool] config.libavutil.mpegvideo_demuxer             ?= true
config [bool] config.libavutil.mpjpeg_demuxer                ?= true
config [bool] config.libavutil.mpl2_demuxer                  ?= true
config [bool] config.libavutil.mpsub_demuxer                 ?= true
config [bool] config.libavutil.msf_demuxer                   ?= false
config [bool] config.libavutil.msnwc_tcp_demuxer             ?= false
config [bool] config.libavutil.msp_demuxer                   ?= false
config [bool] config.libavutil.mtaf_demuxer                  ?= true
config [bool] config.libavutil.mtv_demuxer                   ?= true
config [bool] config.libavutil.musx_demuxer                  ?= true
config [bool] config.libavutil.mv_demuxer                    ?= true
config [bool] config.libavutil.mvi_demuxer                   ?= true
config [bool] config.libavutil.mxf_demuxer                   ?= true
config [bool] config.libavutil.mxg_demuxer                   ?= true
config [bool] config.libavutil.nc_demuxer                    ?= true
config [bool] config.libavutil.nistsphere_demuxer            ?= true
config [bool] config.libavutil.nsp_demuxer                   ?= true
config [bool] config.libavutil.nsv_demuxer                   ?= true
config [bool] config.libavutil.nut_demuxer                   ?= true
config [bool] config.libavutil.nuv_demuxer                   ?= true
config [bool] config.libavutil.obu_demuxer                   ?= true
config [bool] config.libavutil.ogg_demuxer                   ?= true
config [bool] config.libavutil.oma_demuxer                   ?= true
config [bool] config.libavutil.osq_demuxer                   ?= true
config [bool] config.libavutil.paf_demuxer                   ?= true
config [bool] config.libavutil.pcm_alaw_demuxer              ?= false
config [bool] config.libavutil.pcm_mulaw_demuxer             ?= false
config [bool] config.libavutil.pcm_vidc_demuxer              ?= false
config [bool] config.libavutil.pcm_f64be_demuxer             ?= false
config [bool] config.libavutil.pcm_f64le_demuxer             ?= false
config [bool] config.libavutil.pcm_f32be_demuxer             ?= false
config [bool] config.libavutil.pcm_f32le_demuxer             ?= false
config [bool] config.libavutil.pcm_s32be_demuxer             ?= false
config [bool] config.libavutil.pcm_s32le_demuxer             ?= false
config [bool] config.libavutil.pcm_s24be_demuxer             ?= false
config [bool] config.libavutil.pcm_s24le_demuxer             ?= false
config [bool] config.libavutil.pcm_s16be_demuxer             ?= false
config [bool] config.libavutil.pcm_s16le_demuxer             ?= false
config [bool] config.libavutil.pcm_s8_demuxer                ?= false
config [bool] config.libavutil.pcm_u32be_demuxer             ?= false
config [bool] config.libavutil.pcm_u32le_demuxer             ?= false
config [bool] config.libavutil.pcm_u24be_demuxer             ?= false
config [bool] config.libavutil.pcm_u24le_demuxer             ?= false
config [bool] config.libavutil.pcm_u16be_demuxer             ?= false
config [bool] config.libavutil.pcm_u16le_demuxer             ?= false
config [bool] config.libavutil.pcm_u8_demuxer                ?= false
config [bool] config.libavutil.pdv_demuxer                   ?= true
config [bool] config.libavutil.pjs_demuxer                   ?= true
config [bool] config.libavutil.pmp_demuxer                   ?= true
config [bool] config.libavutil.pp_bnk_demuxer                ?= false
config [bool] config.libavutil.pva_demuxer                   ?= false
config [bool] config.libavutil.pvf_demuxer                   ?= true
config [bool] config.libavutil.qcp_demuxer                   ?= true
config [bool] config.libavutil.qoa_demuxer                   ?= true
config [bool] config.libavutil.r3d_demuxer                   ?= true
config [bool] config.libavutil.rawvideo_demuxer              ?= true
config [bool] config.libavutil.rcwt_demuxer                  ?= true
config [bool] config.libavutil.realtext_demuxer              ?= true
config [bool] config.libavutil.redspark_demuxer              ?= true
config [bool] config.libavutil.rka_demuxer                   ?= true
config [bool] config.libavutil.rl2_demuxer                   ?= true
config [bool] config.libavutil.rm_demuxer                    ?= true
config [bool] config.libavutil.roq_demuxer                   ?= true
config [bool] config.libavutil.rpl_demuxer                   ?= true
config [bool] config.libavutil.rsd_demuxer                   ?= true
config [bool] config.libavutil.rso_demuxer                   ?= true
config [bool] config.libavutil.rtp_demuxer                   ?= true
config [bool] config.libavutil.rtsp_demuxer                  ?= true
config [bool] config.libavutil.s337m_demuxer                 ?= true
config [bool] config.libavutil.sami_demuxer                  ?= true
config [bool] config.libavutil.sap_demuxer                   ?= true
config [bool] config.libavutil.sbc_demuxer                   ?= true
config [bool] config.libavutil.sbg_demuxer                   ?= true
config [bool] config.libavutil.scc_demuxer                   ?= true
config [bool] config.libavutil.scd_demuxer                   ?= true
config [bool] config.libavutil.sdns_demuxer                  ?= true
config [bool] config.libavutil.sdp_demuxer                   ?= true
config [bool] config.libavutil.sdr2_demuxer                  ?= true
config [bool] config.libavutil.sds_demuxer                   ?= true
config [bool] config.libavutil.sdx_demuxer                   ?= true
config [bool] config.libavutil.segafilm_demuxer              ?= true
config [bool] config.libavutil.ser_demuxer                   ?= true
config [bool] config.libavutil.sga_demuxer                   ?= true
config [bool] config.libavutil.shorten_demuxer               ?= true
config [bool] config.libavutil.siff_demuxer                  ?= true
config [bool] config.libavutil.simbiosis_imx_demuxer         ?= false
config [bool] config.libavutil.sln_demuxer                   ?= true
config [bool] config.libavutil.smacker_demuxer               ?= true
config [bool] config.libavutil.smjpeg_demuxer                ?= true
config [bool] config.libavutil.smush_demuxer                 ?= true
config [bool] config.libavutil.sol_demuxer                   ?= true
config [bool] config.libavutil.sox_demuxer                   ?= true
config [bool] config.libavutil.spdif_demuxer                 ?= true
config [bool] config.libavutil.srt_demuxer                   ?= true
config [bool] config.libavutil.str_demuxer                   ?= true
config [bool] config.libavutil.stl_demuxer                   ?= true
config [bool] config.libavutil.subviewer1_demuxer            ?= true
config [bool] config.libavutil.subviewer_demuxer             ?= true
config [bool] config.libavutil.sup_demuxer                   ?= true
config [bool] config.libavutil.svag_demuxer                  ?= true
config [bool] config.libavutil.svs_demuxer                   ?= true
config [bool] config.libavutil.swf_demuxer                   ?= true
config [bool] config.libavutil.tak_demuxer                   ?= true
config [bool] config.libavutil.tedcaptions_demuxer           ?= true
config [bool] config.libavutil.thp_demuxer                   ?= true
config [bool] config.libavutil.threedostr_demuxer            ?= true
config [bool] config.libavutil.tiertexseq_demuxer            ?= true
config [bool] config.libavutil.tmv_demuxer                   ?= true
config [bool] config.libavutil.truehd_demuxer                ?= true
config [bool] config.libavutil.tta_demuxer                   ?= true
config [bool] config.libavutil.txd_demuxer                   ?= true
config [bool] config.libavutil.tty_demuxer                   ?= true
config [bool] config.libavutil.ty_demuxer                    ?= true
config [bool] config.libavutil.usm_demuxer                   ?= true
config [bool] config.libavutil.v210_demuxer                  ?= true
config [bool] config.libavutil.v210x_demuxer                 ?= true
config [bool] config.libavutil.vag_demuxer                   ?= true
config [bool] config.libavutil.vc1_demuxer                   ?= true
config [bool] config.libavutil.vc1t_demuxer                  ?= true
config [bool] config.libavutil.vividas_demuxer               ?= true
config [bool] config.libavutil.vivo_demuxer                  ?= true
config [bool] config.libavutil.vmd_demuxer                   ?= true
config [bool] config.libavutil.vobsub_demuxer                ?= true
config [bool] config.libavutil.voc_demuxer                   ?= true
config [bool] config.libavutil.vpk_demuxer                   ?= true
config [bool] config.libavutil.vplayer_demuxer               ?= true
config [bool] config.libavutil.vqf_demuxer                   ?= true
config [bool] config.libavutil.vvc_demuxer                   ?= true
config [bool] config.libavutil.w64_demuxer                   ?= true
config [bool] config.libavutil.wady_demuxer                  ?= true
config [bool] config.libavutil.wavarc_demuxer                ?= true
config [bool] config.libavutil.wav_demuxer                   ?= true
config [bool] config.libavutil.wc3_demuxer                   ?= true
config [bool] config.libavutil.webm_dash_manifest_demuxer    ?= false
config [bool] config.libavutil.webvtt_demuxer                ?= true
config [bool] config.libavutil.wsaud_demuxer                 ?= true
config [bool] config.libavutil.wsd_demuxer                   ?= true
config [bool] config.libavutil.wsvqa_demuxer                 ?= true
config [bool] config.libavutil.wtv_demuxer                   ?= true
config [bool] config.libavutil.wve_demuxer                   ?= true
config [bool] config.libavutil.wv_demuxer                    ?= true
config [bool] config.libavutil.xa_demuxer                    ?= true
config [bool] config.libavutil.xbin_demuxer                  ?= true
config [bool] config.libavutil.xmd_demuxer                   ?= true
config [bool] config.libavutil.xmv_demuxer                   ?= true
config [bool] config.libavutil.xvag_demuxer                  ?= true
config [bool] config.libavutil.xwma_demuxer                  ?= true
config [bool] config.libavutil.yop_demuxer                   ?= true
config [bool] config.libavutil.yuv4mpegpipe_demuxer          ?= true
config [bool] config.libavutil.image_bmp_pipe_demuxer        ?= false
config [bool] config.libavutil.image_cri_pipe_demuxer        ?= false
config [bool] config.libavutil.image_dds_pipe_demuxer        ?= false
config [bool] config.libavutil.image_dpx_pipe_demuxer        ?= false
config [bool] config.libavutil.image_exr_pipe_demuxer        ?= false
config [bool] config.libavutil.image_gem_pipe_demuxer        ?= false
config [bool] config.libavutil.image_gif_pipe_demuxer        ?= false
config [bool] config.libavutil.image_hdr_pipe_demuxer        ?= false
config [bool] config.libavutil.image_j2k_pipe_demuxer        ?= false
config [bool] config.libavutil.image_jpeg_pipe_demuxer       ?= false
config [bool] config.libavutil.image_jpegls_pipe_demuxer     ?= false
config [bool] config.libavutil.image_jpegxl_pipe_demuxer     ?= false
config [bool] config.libavutil.image_pam_pipe_demuxer        ?= false
config [bool] config.libavutil.image_pbm_pipe_demuxer        ?= false
config [bool] config.libavutil.image_pcx_pipe_demuxer        ?= false
config [bool] config.libavutil.image_pfm_pipe_demuxer        ?= false
config [bool] config.libavutil.image_pgmyuv_pipe_demuxer     ?= false
config [bool] config.libavutil.image_pgm_pipe_demuxer        ?= false
config [bool] config.libavutil.image_pgx_pipe_demuxer        ?= false
config [bool] config.libavutil.image_phm_pipe_demuxer        ?= false
config [bool] config.libavutil.image_photocd_pipe_demuxer    ?= false
config [bool] config.libavutil.image_pictor_pipe_demuxer     ?= false
config [bool] config.libavutil.image_png_pipe_demuxer        ?= false
config [bool] config.libavutil.image_ppm_pipe_demuxer        ?= false
config [bool] config.libavutil.image_psd_pipe_demuxer        ?= false
config [bool] config.libavutil.image_qdraw_pipe_demuxer      ?= false
config [bool] config.libavutil.image_qoi_pipe_demuxer        ?= false
config [bool] config.libavutil.image_sgi_pipe_demuxer        ?= false
config [bool] config.libavutil.image_svg_pipe_demuxer        ?= false
config [bool] config.libavutil.image_sunrast_pipe_demuxer    ?= false
config [bool] config.libavutil.image_tiff_pipe_demuxer       ?= false
config [bool] config.libavutil.image_vbn_pipe_demuxer        ?= false
config [bool] config.libavutil.image_webp_pipe_demuxer       ?= false
config [bool] config.libavutil.image_xbm_pipe_demuxer        ?= false
config [bool] config.libavutil.image_xpm_pipe_demuxer        ?= false
config [bool] config.libavutil.image_xwd_pipe_demuxer        ?= false
config [bool] config.libavutil.libgme_demuxer                ?= false
config [bool] config.libavutil.libmodplug_demuxer            ?= false
config [bool] config.libavutil.libopenmpt_demuxer            ?= false
config [bool] config.libavutil.vapoursynth_demuxer           ?= false
config [bool] config.libavutil.a64_muxer                     ?= true
config [bool] config.libavutil.ac3_muxer                     ?= false
config [bool] config.libavutil.ac4_muxer                     ?= false
config [bool] config.libavutil.adts_muxer                    ?= true
config [bool] config.libavutil.adx_muxer                     ?= true
config [bool] config.libavutil.aea_muxer                     ?= true
config [bool] config.libavutil.aiff_muxer                    ?= true
config [bool] config.libavutil.alp_muxer                     ?= true
config [bool] config.libavutil.amr_muxer                     ?= true
config [bool] config.libavutil.amv_muxer                     ?= true
config [bool] config.libavutil.apm_muxer                     ?= true
config [bool] config.libavutil.apng_muxer                    ?= true
config [bool] config.libavutil.aptx_muxer                    ?= true
config [bool] config.libavutil.aptx_hd_muxer                 ?= false
config [bool] config.libavutil.argo_asf_muxer                ?= true
config [bool] config.libavutil.argo_cvg_muxer                ?= true
config [bool] config.libavutil.asf_muxer                     ?= true
config [bool] config.libavutil.ass_muxer                     ?= true
config [bool] config.libavutil.ast_muxer                     ?= true
config [bool] config.libavutil.asf_stream_muxer              ?= false
config [bool] config.libavutil.au_muxer                      ?= true
config [bool] config.libavutil.avi_muxer                     ?= true
config [bool] config.libavutil.avif_muxer                    ?= true
config [bool] config.libavutil.avm2_muxer                    ?= true
config [bool] config.libavutil.avs2_muxer                    ?= true
config [bool] config.libavutil.avs3_muxer                    ?= true
config [bool] config.libavutil.bit_muxer                     ?= true
config [bool] config.libavutil.caf_muxer                     ?= true
config [bool] config.libavutil.cavsvideo_muxer               ?= true
config [bool] config.libavutil.codec2_muxer                  ?= true
config [bool] config.libavutil.codec2raw_muxer               ?= true
config [bool] config.libavutil.crc_muxer                     ?= true
config [bool] config.libavutil.dash_muxer                    ?= false
config [bool] config.libavutil.data_muxer                    ?= true
config [bool] config.libavutil.daud_muxer                    ?= true
config [bool] config.libavutil.dfpwm_muxer                   ?= true
config [bool] config.libavutil.dirac_muxer                   ?= true
config [bool] config.libavutil.dnxhd_muxer                   ?= true
config [bool] config.libavutil.dts_muxer                     ?= true
config [bool] config.libavutil.dv_muxer                      ?= true
config [bool] config.libavutil.eac3_muxer                    ?= false
config [bool] config.libavutil.evc_muxer                     ?= true
config [bool] config.libavutil.f4v_muxer                     ?= true
config [bool] config.libavutil.ffmetadata_muxer              ?= true
config [bool] config.libavutil.fifo_muxer                    ?= true
config [bool] config.libavutil.filmstrip_muxer               ?= true
config [bool] config.libavutil.fits_muxer                    ?= true
config [bool] config.libavutil.flac_muxer                    ?= true
config [bool] config.libavutil.flv_muxer                     ?= true
config [bool] config.libavutil.framecrc_muxer                ?= true
config [bool] config.libavutil.framehash_muxer               ?= true
config [bool] config.libavutil.framemd5_muxer                ?= true
config [bool] config.libavutil.g722_muxer                    ?= true
config [bool] config.libavutil.g723_1_muxer                  ?= false
config [bool] config.libavutil.g726_muxer                    ?= true
config [bool] config.libavutil.g726le_muxer                  ?= true
config [bool] config.libavutil.gif_muxer                     ?= true
config [bool] config.libavutil.gsm_muxer                     ?= true
config [bool] config.libavutil.gxf_muxer                     ?= true
config [bool] config.libavutil.h261_muxer                    ?= true
config [bool] config.libavutil.h263_muxer                    ?= true
config [bool] config.libavutil.h264_muxer                    ?= true
config [bool] config.libavutil.hash_muxer                    ?= true
config [bool] config.libavutil.hds_muxer                     ?= true
config [bool] config.libavutil.hevc_muxer                    ?= true
config [bool] config.libavutil.hls_muxer                     ?= false
config [bool] config.libavutil.iamf_muxer                    ?= true
config [bool] config.libavutil.ico_muxer                     ?= true
config [bool] config.libavutil.ilbc_muxer                    ?= true
config [bool] config.libavutil.image2_muxer                  ?= true
config [bool] config.libavutil.image2pipe_muxer              ?= true
config [bool] config.libavutil.ipod_muxer                    ?= true
config [bool] config.libavutil.ircam_muxer                   ?= true
config [bool] config.libavutil.ismv_muxer                    ?= true
config [bool] config.libavutil.ivf_muxer                     ?= true
config [bool] config.libavutil.jacosub_muxer                 ?= true
config [bool] config.libavutil.kvag_muxer                    ?= true
config [bool] config.libavutil.latm_muxer                    ?= true
config [bool] config.libavutil.lc3_muxer                     ?= true
config [bool] config.libavutil.lrc_muxer                     ?= true
config [bool] config.libavutil.m4v_muxer                     ?= true
config [bool] config.libavutil.md5_muxer                     ?= true
config [bool] config.libavutil.matroska_muxer                ?= true
config [bool] config.libavutil.matroska_audio_muxer          ?= false
config [bool] config.libavutil.microdvd_muxer                ?= true
config [bool] config.libavutil.mjpeg_muxer                   ?= true
config [bool] config.libavutil.mlp_muxer                     ?= true
config [bool] config.libavutil.mmf_muxer                     ?= true
config [bool] config.libavutil.mov_muxer                     ?= true
config [bool] config.libavutil.mp2_muxer                     ?= true
config [bool] config.libavutil.mp3_muxer                     ?= true
config [bool] config.libavutil.mp4_muxer                     ?= true
config [bool] config.libavutil.mpeg1system_muxer             ?= true
config [bool] config.libavutil.mpeg1vcd_muxer                ?= true
config [bool] config.libavutil.mpeg1video_muxer              ?= true
config [bool] config.libavutil.mpeg2dvd_muxer                ?= true
config [bool] config.libavutil.mpeg2svcd_muxer               ?= true
config [bool] config.libavutil.mpeg2video_muxer              ?= true
config [bool] config.libavutil.mpeg2vob_muxer                ?= true
config [bool] config.libavutil.mpegts_muxer                  ?= true
config [bool] config.libavutil.mpjpeg_muxer                  ?= true
config [bool] config.libavutil.mxf_muxer                     ?= true
config [bool] config.libavutil.mxf_d10_muxer                 ?= false
config [bool] config.libavutil.mxf_opatom_muxer              ?= false
config [bool] config.libavutil.null_muxer                    ?= true
config [bool] config.libavutil.nut_muxer                     ?= true
config [bool] config.libavutil.obu_muxer                     ?= true
config [bool] config.libavutil.oga_muxer                     ?= true
config [bool] config.libavutil.ogg_muxer                     ?= true
config [bool] config.libavutil.ogv_muxer                     ?= true
config [bool] config.libavutil.oma_muxer                     ?= true
config [bool] config.libavutil.opus_muxer                    ?= false
config [bool] config.libavutil.pcm_alaw_muxer                ?= false
config [bool] config.libavutil.pcm_mulaw_muxer               ?= false
config [bool] config.libavutil.pcm_vidc_muxer                ?= false
config [bool] config.libavutil.pcm_f64be_muxer               ?= false
config [bool] config.libavutil.pcm_f64le_muxer               ?= false
config [bool] config.libavutil.pcm_f32be_muxer               ?= false
config [bool] config.libavutil.pcm_f32le_muxer               ?= false
config [bool] config.libavutil.pcm_s32be_muxer               ?= false
config [bool] config.libavutil.pcm_s32le_muxer               ?= false
config [bool] config.libavutil.pcm_s24be_muxer               ?= false
config [bool] config.libavutil.pcm_s24le_muxer               ?= false
config [bool] config.libavutil.pcm_s16be_muxer               ?= false
config [bool] config.libavutil.pcm_s16le_muxer               ?= false
config [bool] config.libavutil.pcm_s8_muxer                  ?= false
config [bool] config.libavutil.pcm_u32be_muxer               ?= false
config [bool] config.libavutil.pcm_u32le_muxer               ?= false
config [bool] config.libavutil.pcm_u24be_muxer               ?= false
config [bool] config.libavutil.pcm_u24le_muxer               ?= false
config [bool] config.libavutil.pcm_u16be_muxer               ?= false
config [bool] config.libavutil.pcm_u16le_muxer               ?= false
config [bool] config.libavutil.pcm_u8_muxer                  ?= false
config [bool] config.libavutil.psp_muxer                     ?= true
config [bool] config.libavutil.rawvideo_muxer                ?= true
config [bool] config.libavutil.rcwt_muxer                    ?= true
config [bool] config.libavutil.rm_muxer                      ?= true
config [bool] config.libavutil.roq_muxer                     ?= true
config [bool] config.libavutil.rso_muxer                     ?= true
config [bool] config.libavutil.rtp_muxer                     ?= true
config [bool] config.libavutil.rtp_mpegts_muxer              ?= false
config [bool] config.libavutil.rtsp_muxer                    ?= true
config [bool] config.libavutil.sap_muxer                     ?= true
config [bool] config.libavutil.sbc_muxer                     ?= true
config [bool] config.libavutil.scc_muxer                     ?= true
config [bool] config.libavutil.segafilm_muxer                ?= true
config [bool] config.libavutil.segment_muxer                 ?= true
config [bool] config.libavutil.stream_segment_muxer          ?= false
config [bool] config.libavutil.smjpeg_muxer                  ?= true
config [bool] config.libavutil.smoothstreaming_muxer         ?= true
config [bool] config.libavutil.sox_muxer                     ?= true
config [bool] config.libavutil.spx_muxer                     ?= true
config [bool] config.libavutil.spdif_muxer                   ?= true
config [bool] config.libavutil.srt_muxer                     ?= true
config [bool] config.libavutil.streamhash_muxer              ?= true
config [bool] config.libavutil.sup_muxer                     ?= true
config [bool] config.libavutil.swf_muxer                     ?= true
config [bool] config.libavutil.tee_muxer                     ?= true
config [bool] config.libavutil.tg2_muxer                     ?= true
config [bool] config.libavutil.tgp_muxer                     ?= true
config [bool] config.libavutil.mkvtimestamp_v2_muxer         ?= false
config [bool] config.libavutil.truehd_muxer                  ?= true
config [bool] config.libavutil.tta_muxer                     ?= true
config [bool] config.libavutil.ttml_muxer                    ?= true
config [bool] config.libavutil.uncodedframecrc_muxer         ?= true
config [bool] config.libavutil.vc1_muxer                     ?= true
config [bool] config.libavutil.vc1t_muxer                    ?= true
config [bool] config.libavutil.voc_muxer                     ?= true
config [bool] config.libavutil.vvc_muxer                     ?= true
config [bool] config.libavutil.w64_muxer                     ?= true
config [bool] config.libavutil.wav_muxer                     ?= true
config [bool] config.libavutil.webm_muxer                    ?= true
config [bool] config.libavutil.webm_dash_manifest_muxer      ?= false
config [bool] config.libavutil.webm_chunk_muxer              ?= false
config [bool] config.libavutil.webp_muxer                    ?= false
config [bool] config.libavutil.webvtt_muxer                  ?= true
config [bool] config.libavutil.wsaud_muxer                   ?= true
config [bool] config.libavutil.wtv_muxer                     ?= true
config [bool] config.libavutil.wv_muxer                      ?= true
config [bool] config.libavutil.yuv4mpegpipe_muxer            ?= true
config [bool] config.libavutil.chromaprint_muxer             ?= false
config [bool] config.libavutil.android_content_protocol      ?= false
config [bool] config.libavutil.async_protocol                ?= false
config [bool] config.libavutil.bluray_protocol               ?= false
config [bool] config.libavutil.cache_protocol                ?= false
config [bool] config.libavutil.concat_protocol               ?= false
config [bool] config.libavutil.concatf_protocol              ?= false
config [bool] config.libavutil.crypto_protocol               ?= false
config [bool] config.libavutil.data_protocol                 ?= true
config [bool] config.libavutil.fd_protocol                   ?= true
config [bool] config.libavutil.ffrtmpcrypt_protocol          ?= false
config [bool] config.libavutil.ffrtmphttp_protocol           ?= false
config [bool] config.libavutil.file_protocol                 ?= true
config [bool] config.libavutil.ftp_protocol                  ?= true
config [bool] config.libavutil.gopher_protocol               ?= false
config [bool] config.libavutil.gophers_protocol              ?= false
config [bool] config.libavutil.hls_protocol                  ?= false
config [bool] config.libavutil.http_protocol                 ?= true
config [bool] config.libavutil.httpproxy_protocol            ?= true
config [bool] config.libavutil.https_protocol                ?= true
config [bool] config.libavutil.icecast_protocol              ?= false
config [bool] config.libavutil.mmsh_protocol                 ?= false
config [bool] config.libavutil.mmst_protocol                 ?= false
config [bool] config.libavutil.md5_protocol                  ?= true
config [bool] config.libavutil.pipe_protocol                 ?= true
config [bool] config.libavutil.prompeg_protocol              ?= false
config [bool] config.libavutil.rtmp_protocol                 ?= false
config [bool] config.libavutil.rtmpe_protocol                ?= false
config [bool] config.libavutil.rtmps_protocol                ?= false
config [bool] config.libavutil.rtmpt_protocol                ?= false
config [bool] config.libavutil.rtmpte_protocol               ?= false
config [bool] config.libavutil.rtmpts_protocol               ?= false
config [bool] config.libavutil.rtp_protocol                  ?= true
config [bool] config.libavutil.sctp_protocol                 ?= false
config [bool] config.libavutil.srtp_protocol                 ?= true
config [bool] config.libavutil.subfile_protocol              ?= false
config [bool] config.libavutil.tee_protocol                  ?= false
config [bool] config.libavutil.tcp_protocol                  ?= false
config [bool] config.libavutil.tls_protocol                  ?= false
config [bool] config.libavutil.udp_protocol                  ?= true
config [bool] config.libavutil.udplite_protocol              ?= true
config [bool] config.libavutil.unix_protocol                 ?= false
config [bool] config.libavutil.libamqp_protocol              ?= false
config [bool] config.libavutil.librist_protocol              ?= false
config [bool] config.libavutil.librtmp_protocol              ?= false
config [bool] config.libavutil.librtmpe_protocol             ?= false
config [bool] config.libavutil.librtmps_protocol             ?= false
config [bool] config.libavutil.librtmpt_protocol             ?= false
config [bool] config.libavutil.librtmpte_protocol            ?= false
config [bool] config.libavutil.libsrt_protocol               ?= false
config [bool] config.libavutil.libssh_protocol               ?= false
config [bool] config.libavutil.libsmbclient_protocol         ?= false
config [bool] config.libavutil.libzmq_protocol               ?= false
config [bool] config.libavutil.ipfs_gateway_protocol         ?= false
config [bool] config.libavutil.ipns_gateway_protocol         ?= false

if ($build.mode != 'skeleton')
{
  source build/common-configs.build
  source build/conditional-src.build
}

\
location: FFmpeg/libavutil-7.0.2+2.tar.gz
sha256sum: 59bbb42d9a1aaa9b45c12f9fdb0e44e250e79dc953668558f449837ca2742952
:
name: libchaiscript
version: 6.1.0
type: lib,binless
language: c++
project: chaiscript
summary: ChaiScript is a header-only C++ embedded scripting language loosely\
 based on ECMA script.
license: BSD-3-Clause
description:
\
<a href="https://www.patreon.com/bePatron?u=2977989&redirect_uri=https%3A%2F%\
2Fwww.patreon.com%2Flefticus">
    <img height="40" width="204" src="https://s3-us-west-1.amazonaws.com/widg\
et-images/become-patron-widget-medium%402x.png">
</a>


Master Status: [![Linux Build Status](https://travis-ci.org/ChaiScript/ChaiSc\
ript.png?branch=master)](https://travis-ci.org/ChaiScript/ChaiScript)\
 [![Windows Build status](https://ci.appveyor.com/api/projects/status/6u3r4s8\
1kkjqmsqw?svg=true)](https://ci.appveyor.com/project/lefticus/chaiscript)\
 [![codecov.io](http://codecov.io/github/ChaiScript/ChaiScript/coverage.svg?b\
ranch=master)](http://codecov.io/github/ChaiScript/ChaiScript?branch=master)

Develop Status: [![Linux Build Status](https://travis-ci.org/ChaiScript/ChaiS\
cript.png?branch=develop)](https://travis-ci.org/ChaiScript/ChaiScript)\
 [![Windows Build status](https://ci.appveyor.com/api/projects/status/6u3r4s8\
1kkjqmsqw/branch/develop?svg=true)](https://ci.appveyor.com/project/lefticus/\
chaiscript/branch/develop) [![codecov.io](http://codecov.io/github/ChaiScript\
/ChaiScript/coverage.svg?branch=develop)](http://codecov.io/github/ChaiScript\
/ChaiScript?branch=develop)

<a href="https://scan.coverity.com/projects/5297">
  <img alt="Coverity Scan Build Status"
       src="https://img.shields.io/coverity/scan/5297.svg"/>
</a>

ChaiScript

http://www.chaiscript.com

(c) 2009-2012 Jonathan Turner
(c) 2009-2017 Jason Turner

Release under the BSD license, see "license.txt" for details.


Introduction
============

[![Gitter](https://badges.gitter.im/JoinChat.svg)](https://gitter.im/ChaiScri\
pt/ChaiScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_con\
tent=badge)

ChaiScript is one of the only embedded scripting language designed from the 
ground up to directly target C++ and take advantage of modern C++ development 
techniques, working with the developer like he expects it to work.  Being a 
native C++ application, it has some advantages over existing embedded\
 scripting 
languages:

1. It uses a header-only approach, which makes it easy to integrate with 
   existing projects.
2. It maintains type safety between your C++ application and the user scripts.
3. It supports a variety of C++ techniques including callbacks, overloaded 
   functions, class methods, and stl containers.


Requirements
============

ChaiScript requires a C++14 compiler to build with support for variadic 
templates.  It has been tested with gcc 4.9 and clang 3.6 (with libcxx). 
For more information see the build 
[dashboard](http://chaiscript.com/ChaiScript-BuildResults/index.html).

Usage
=====

* Add the ChaiScript include directory to your project's header search path
* Add `#include <chaiscript/chaiscript.hpp>` to your source file
* Instantiate the ChaiScript engine in your application.  For example, create\
 a 
  new engine with the name `chai` like so: `chaiscript::ChaiScript chai`
* The default behavior is to load the ChaiScript standard library from a 
  loadable module. A second option is to compile the library into your code,
  see below for an example.

Once instantiated, the engine is ready to start running ChaiScript source. \
 You
have two main options for processing ChaiScript source: a line at a time\
 using 
`chai.eval(string)` and a file at a time using `chai.eval_file(fname)`

To make functions in your C++ code visible to scripts, they must be\
 registered 
with the scripting engine.  To do so, call add:

    chai.add(chaiscript::fun(&my_function), "my_function_name");

Once registered the function will be visible to scripts as "my_function_name"

Examples
========

ChaiScript is similar to ECMAScript (aka JavaScript(tm)), but with some 
modifications to make it easier to use.  For usage examples see the "samples" 
directory, and for more in-depth look at the language, the unit tests in the 
"unittests" directory cover the most ground.

For examples of how to register parts of your C++ application, see 
"example.cpp" in the "samples" directory. Example.cpp is verbose and shows\
 every 
possible way of working with the library. For further documentation generate 
the doxygen documentation in the build folder or see the website 
http://www.chaiscript.com.


The shortest complete example possible follows:

```C++
/// main.cpp

#include <chaiscript/chaiscript.hpp>

double function(int i, double j)
{
  return i * j;
}

int main()
{
  chaiscript::ChaiScript chai;
  chai.add(chaiscript::fun(&function), "function");

  double d = chai.eval<double>("function(3, 4.75);");
}
```

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Packages for ChaiScript Library and Interpreter

[ChaiScript](https://chaiscript.com/index.html) is a header-only C++ embedded\
 scripting language loosely based on ECMA script. It is designed for ease of\
 use and tight integration with C++.

[![Official](https://img.shields.io/website/https/chaiscript.com/index.html.s\
vg?down_message=offline&label=Official&style=for-the-badge&up_color=blue&up_m\
essage=online)](https://chaiscript.com/index.html)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/c\
haiscript.svg?down_message=offline&label=build2&style=for-the-badge&up_color=\
blue&up_message=online)](https://github.com/build2-packaging/chaiscript)
[![cppget.org](https://img.shields.io/website/https/cppget.org/chaiscript.svg\
?down_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_m\
essage=online)](https://cppget.org/chaiscript)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/ch\
aiscript.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=\
for-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/c\
haiscript)

## Usage
The [original ChaiScript repository](https://github.com/ChaiScript/ChaiScript\
) has been split into multiple build2 packages to allow for greater\
 flexibility.
The `libchaiscript` package is used to get access to the ChaiScript\
 header-only library.
The package `chaiscript` makes ChaiScript's own interpreter `chai` available\
 to be used.
`chaiscript-stdlib` exports the compiled and dynamically loadable standard\
 library module for the basic ChaiScript engine.
Typically, you will not need to use this one.

Make sure to add the or alpha or stable section of the `cppget.org`\
 repository to your project's `repositories.manifest` to be able to fetch the\
 packages.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the `cppget.org` repository is not an option then add this Git repository\
 itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/chaiscript.git

Add the respective dependencies in your project's `manifest` file to make the\
 packages available for import.
Hereby, all packages should use the same version constraint.

    depends: libchaiscript ^ 6.1.0
    # or
    depends: { libchaiscript chaiscript chaiscript-stdlib } ^ 6.1.0

The header-only C++ library to use ChaiScript as an embedded language can be\
 imported by the following declaration in a `buildfile`.

    import chaiscript = libchaiscript%lib{chaiscript}

Using the `chai` interpreter for ChaiScript scripts, as a REPL, or as\
 build-time dependency with immediate and standard importation is supported.
Because it is not able to change the code of `chai`, there is no way for now\
 to provide any metadata in the executable.

    import chai = chaiscript%exe{chai}
    # or
    import! chai = chaiscript%exe{chai}

To import the dynamically loadable module which provides the standard library\
 for a ChaiScript instance, we need to rely on metadata.
A dynamic module should not be linked to your executable but instead loaded\
 at runtime.
Hence, to use it properly for running ChaiScript scripts for tests or other\
 things, you would need the module as a prerequisite but only use its\
 directory as input.
This can be accomplished by immediate importation with metadata support.

    import! [metadata, rule_hint=cxx.link] \\
        stdlib_module = chaiscript-stdlib%libs{chaiscript_stdlib}
    stdlib_dir = [dir_path] $($stdlib_module: chaiscript_stdlib.dir)

## Configuration

<!-- ### Installation of the Standard Library Module
To be able to automatically find the standard library, its installation\
 directory should also follow the patterns given by the implementation of\
 ChaiScript itself where it seems to be basically hardcoded.
To not run into problems with the `pkg-config` files and other methods to\
 reimport the `chaiscript_stdlib` module, we leave this part up to\
 configuration.
The following option is the recommended way of configuring the install\
 command inside the `config.build` file that lies in the `build` directory of\
 your project's configuration.

    config.install.lib = exec_root/lib/chaiscript/
 -->
### Multithread Support
Multithread support is enabled by default and may be turned off by using the\
 following configuration variable.
On Unix-based targets, `pthread` will be linked when enabled.

    config [bool] config.libchaiscript.multithread_support_enabled ?= true

### Dynamic Module Loading
The support to dynamically load ChaiScript modules is enabled by default and\
 may be turned off by using the following configuration variable.

    config [bool] config.libchaiscript.dynload_enabled ?= true

### Use of GNU `readline`
For now, the use of the GNU `readline` library for the ChaiScript interpreter\
 `chai` is disabled by default to allow for out-of-the-box CI builds.
<!-- This is mainly the case to remove system dependencies for CI. -->
If `readline` is available on the system, we recommend to enable it.

    config [bool] config.chaiscript.use_readline ?= false


## Issues and Notes
- Supported Platforms:
    + Linux: GCC, Clang but not with`libc++`
    + Windows: MSVC, GCC, and Clang
    + MacOS: `chaiscript-stdlib` is not supported
<!-- - The installation path of `chaiscript_stdlib` is basically hardcoded.\
 Look into `libchaiscript/chaiscript_stdlib/buildfile` for some notes what\
 could be changed. -->
- ChaiScript is not made for C++20 and higher language standards. As the\
 library is header-only, we do not restrict the language standard of the\
 library package `libchaiscript` but instead keep it to be `cxx.std =\
 latest`. Especially when using Clang, this may result in compilation errors\
 in a project that uses ChaiScript, such as it has been with its own samples\
 and tests. For now, the workaround is to force the C++17 standard with\
 `cxx.std = 17`. If this is not an option, this package will probably not\
 work with your project.
- Using Clang on Windows with MSVC, the object copy count test given in the\
 `compiled_tests.cpp` file fails due to the wrong number of destructor and\
 move calls. This is most likely an implementation issue of ChaiScript and,\
 looking into the up-to-date `develop` branch, fixed in the prerelease of\
 version `7.0.0`.
- This package does not build or execute the `fuzzer` test.
- This package does not build or execute the performance tests because\
 `valgrind` would be needed.
- Not all unit tests based on ChaiScript scripts are sucessfull when using\
 Clang with `libc++`. This seems to be an implementation issue of the\
 ChaiScript library itself.
- To fix the strange inclusion scheme of the statically generated libraries\
 `parser` and `stdlib`, their content actually needed to be copied and\
 adjusted.
- If there would ever be a new version, check against new script files for\
 testing and adjust all the symbolic links.

## Contributing
Thanks in advance for your help and contribution to keep this package\
 up-to-date.
For now, please, file an issue on [GitHub](https://github.com/build2-packagin\
g/chaiscript/issues) for everything that is not described below.

### Recommend Updating Version
Please, file an issue on [GitHub](https://github.com/build2-packaging/chaiscr\
ipt/issues) with the new recommended version.

### Update Version by Pull Request
1. Fork the repository on [GitHub](https://github.com/build2-packaging/chaisc\
ript) and clone it to your local machine.
2. Run `git submodule init` and `git submodule update` to get the current\
 upstream directory.
3. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
4. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
5. Test if the packages compile and execute examples and tools.
6. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
7. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
8. Run `bdep ci` and test for errors.
9. If everything works fine, make a pull request on GitHub and write down the\
 `bdep ci` link to your CI tests.
10. After a successful pull request, we will run the appropriate commands to\
 publish a new package version.

### Update Version Directly if You Have Permissions
1. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
2. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
3. Test if the packages compile and execute examples and tools.
4. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
5. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
6. Run `bdep ci` and test for errors and warnings.
7. When successful, run `bdep release --tag --push` to push new tag version\
 to repository.
8. Run `bdep publish` to publish the package to [cppget.org](https://cppget.o\
rg).

\
package-description-type: text/markdown;variant=GFM
changes:
\
Notes:
=======
Current Version: 6.1.0

### Changes since 6.0.0

 * Add namespacing support #290 @stephenberry
 * Add utf parsing support
 * cheatsheet.md updates
 * `add_class` utility support for scoped enums #306 @StanEpp
 * Parser optimizations #300 @niXman
 * Various JSON fixes #377 #400 #409 #371 @totalgee @dinghram @arcoRocks
 * Various cleanups, bugfixes and warning fixes and minor performance\
 improvements
 * Support for C++17 compilers!
 * Support for UTF8 BOM #439 @AlekMosingiewicz @MarioLiebisch


### Changes since 5.8.6

*6.0.0 is a massive rework compared to 5.x. It now requires a C++14 enabled\
 compiler*

#### Compiler Requirements

* MSVC 2015 or greater
* g++ 4.9 or greater
* clang 3.6 or greater

#### Breaking Changes

* Instantiating a ChaiScript object now, by default, builds the stdlib in
  * This was done to address the most common support issues of loading stdlib\
 dynamically at runtime
  * If you want the old behavior, use include/chaiscript/chaiscript_basic.hpp
* Headers have been reorganized to fully separate stdlib/parser/engine from\
 each other (some faster builds)
* Bootstrap functions no longer return a reference to the module added to\
 (compile time savings)
* It's now no longer possible modify AST_Nodes (compile time, runtime\
 efficiency)
* Function annotations no longer exist (simplifies code, reduces compile\
 time, compile size)

#### New Features Added

* Modular optimization system; this can be accessed via the ChaiScript_Basic\
 interface
* Execution tracing capability; also accessed via ChaiScript_Basic interface
* range-based for loops `for( id : container ) { }` (much better performance\
 than other loop types)
* If-init expressions (ala C++17)
* Support for passing r-value references to functions
* Support for containing unique_ptr
* Add helpers for exposing enum classes to ChaiScript
* Allow typed ChaiScript defined functions to perform conversions on call #303

#### Improvements

* Compile time improvements
* Compile size improvements
* Significant runtime improvements (see "Modular optimization system")
* Significant parser improvements, both with parse-time and parser\
 initialization time (Thanks @niXman)
* Fix type conversion to bool in conditionals

#### Improvements Still Need To Be Made

* File location tracking has been rewritten; this currently means error\
 location reporting is not as good as it was
* Tracing capability needs to be tested and vetted

### Changes since 5.8.5
* Optimize away `return` statements in lambdas also
* Allow conversions to bool in conditionals
* Don't allow `class` statements inside of scopes
* Properly error when a dynamic object non-function member is called

### Changes since 5.8.4
* Fix order of operations for prefix operators
* Make sure atomics are initialized properly
* Remove parsing of unused prefix `&` operator

### Changes since 5.8.3
* Fix case with some numeric conversions mixed with numerics that do not need\
 conversion

### Changes since 5.8.2
* Add support for reference of pointer return types

### Changes since 5.8.1
* Allow casting to non-const & std::shared_ptr<T>


### Changes since 5.8.0
* Fix parsing of floats to be locale independent #250
* Various warning fixes on various platforms


### Changes since 5.7.1
* Make all parser iterator operations range checked
* Parse in-string eval statements once, not once for each execution
* Fix parsing of operators (ie 1<-1 now parses)
* Fix variable scoping for functors
* Exception reduction
* Various object lifetime fixes
* Add JSON support for load / save #207
* Numeric overload resolution fixes #209 
* Fix long long #208 
* Add octal escapes in strings #211
* Fixed sizing of binary literals #213
* Added support for != with bool values #217
* Various value assignment vector fixes 
* Fixed broken hex escape sequences from @ChristianKaeser
* Multiply defined symbols fixes #232 @RaptorFactor
* Add add_class<Enum> helper #233  @vrennert
* Cheatsheet fixes #235 @mlamby
* Fix parsing of strings inside of in-string eval statements
* Allow lower-case global keyword
* Enable thread-local on MSVC (should be significant performance boost)


### Changes since 5.7.0
* Build time reduction
* Build size reduction
* Performance increases
* Fixed ~20 crash-bugs found with fuzzy testing #194
  * Let unhandled exceptions propogate to user
  * Report eval_error when break statement is not in loop
  * Fix handling of 0 length scripts closes #193
  * Don't crash on arity mismatch - Specifically affects the case where no\
 overloads exist for a given function
  * Fix error printing for `bind` calls
  * Handle unexpected continue statement
  * Check arity during bind
  * Don't allow arith conversion on variadic function
  * Correct `bind` parameter match count
  * Add in expected Boxed_Value exception cases
  * Check access to AST, don't allow `;` in func def
  * Don't attempt arithmetic unary & call
  * Don't crash on 0 param call to `bind`
  * Catch errors during member function dispatch
  * Properly handle type of const bool &
* Automatic deduction of lambda type signatures
* Work with non-polymorphic parent/child conversions
* Move to codecov for coverage reporting
* Add `.at` method for Map objects
* Various corrections for support of move-only objects


### Changes since 5.6.0

* Significant code cleanups and reduction
* Smaller builds
* Faster compiles
* Less runtime memory usage
* ~2x faster runtimes
* biicode support
* method_missing feature added #164 @arBmind
* Generic objects with dynamic properties support
* Add ability to call functions contained in properties
* Add lambda captures
* Create [cheatsheet.md](cheatsheet.md) for all-in-one reference of features
* Fix support for libc++
* Eliminate clone of return value stored locally
* Eliminate 'return' statements when last line of function
* Reduce number of runtime exceptions occuring
* Reduce copies / moves of return values. 
* make `use` statement return value of last statement in file
* Add ability to access fixed array sizes
* Add support for scientific notation floating point literals #174  @totalgee


### Changes since 5.5.1
* Throw exception on integer divide by 0
* Add optional type specification to function declarations
   
  ```
  def func(int i, j, double k) {
    // i must be an int.
    // j can be anything
    // k must be a double
    // normal conversion rules still apply
  }
   ```
* Many minor fixes for compiler warnings
* Add support for `std::future` and `std::async`
  ```
  var f := async(someFunction);
  var f2 := async(someFunction2);

  // someFunction and someFunction2 are running in parallel now
  f.get();
  f2.get();
  ```
* Fully support r-value returns, supporting move-only objects and reducing\
 object copies


### Changes since 5.5.0
* 30% performance increase
* Fix handling of object stack, resulting in greatly reduced memory usage
* Code cleanups

### Changes since 5.4.0
* 2x performance increase
* Significant code cleanups
* Throw exception if user attempts to call function on null object
* Allow user defined type conversions
* Fix object lifetime for nested function calls made at the global scope
* Fix returning of boolean values from function calls


### Changes since 5.3.1
* Decreased compile time and build size
* Make "reflection" module built in (losing some of the time / build size\
 gains)
* Add new "class" syntax for ChaiScript defined methods and attributes see:\
 [unittests/class.chai](unittests/class.chai) for examples
* Minor performance enhancements
* major to_string performance enhancements
* Provide API for retrieving registered type name #124
* Added strong reference to container to range object #132


### Changes since 5.3.0
* Add automatic conversion of arithmetic return types, following the same
  rules as conversion of arithmetic types when passing parameters
* Add automatic casting up the inheritence hierarchy when possible.
* Enable travis.ci testing
* Allow users to add globals from within script
* Various static analysis fixes
* Code modernization to C++11
* Unofficial support for Haiku added
* Fix #121 - Inability to compile on cygwin
* Formatting fixes and spelling corrections
* Apply "include what you use" https://code.google.com/p/include-what-you-use/
* Apply clang-modernize
* Various threading fixes
* Performance improvements

### Changes since 5.2.0
* Official support for MSVC with C++11. All major platforms and compilers are\
 now support for C++11 release

### Changes since 4.2.0
* Enhanced unit tests
* Add `continue` statement, fix various use cases for `for`  loops
* Fix use of suffixed numbers in vector initialization
* Code cleanups
* Eliminate global data, which makes code more portable and thread safe
* Fix issue #79
* Merge pretty_print fixes from @mgee #82
* Compiler warning fixes for latest compiler releases
* Fix threading problems
* Fix linking error on MacOS Mavericks #88
* Allow non-const globals
* Make sure user cannot name a variable with `::` in it #91
* Fix various string / map / vector `size` and `count` calls for compilers\
 which have weird overloads for them. #90 #93 #95
* Make module search path relative to the currently running executable
* Build and work with wstring windows builds
* fix for some new line cases in the middle of a vector initialization from\
 jespada

### Changes since 5.1.0
* Add support for automatic conversion of arithmetic types when possible
  and when no ambiguous method dispatch exists.

### Changes since 5.0.0
* Fix sizing of numeric constants to match that of the C++ standard
* Add support for u,ll,l,f suffixes for numeric constants
* Siginificant improvement in error reporting

### Changes since 4.0.0
* Dropped boost in favor of C++11
* Separated out stdlib to make more options for compile time improvements

### Changes since 3.1.0
* svenstaro: Unused variables and CMake consistency fixes
* Added support for returning pointers from functions (#13)
* Compile with -pedantic (#9)
* Fix issues with multiple ChaiScript object types having the same attribute\
 name (#15)
* Prevent variable redeclaration in same scope (#22)
* mgee: Boxed_Number improvements (#27)
* Support switch statements (#34)
* Fix uint16 comparions (#26)
* Add ability to add const_var globals in Module objects (#14)
* Add support for ternary operators ?:
* Add headers to CMakeLists so they show up in IDEs
* Add ability to get vector of defined objects and vector of defined functions
* Fix memory leak in cyclical references
* Clean up static analysis issues discovered
* Fix vector construction to be consistent with map construction
* Increased unit tests to 161
* Performance enhancements

### Changes since 3.0.0
* Numeric operations performance increased approximately 10x
* Looping operations performance increased up to 2x
* Engine start up time decreased
* Several parsing bugs related to index operators fixed
* Added full support for all C algebraic types: double, long double, float,\
 int, long, char,
  uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, int32_t, int64_t
* Enhanced support for capturing of exceptions thrown from ChaiScript in C++

### Changes since 2.3.3
* Code simplifications
* Fully integrate documentation with source code in doxygen style comments
* Unit tests increased from 114 to 137
* Automatic conversion between boost::function objects and ChaiScript\
 functions 
* Many bug fixes
* Minor performance improvements
* Namespace reorganization to make end user code more accessible
* clang support
* VisualStudio 2010 Support
* Support for C++ base classes and automatic upcasting 
* Remove __ reserved identifiers
* Better code organization to reduce #ifdefs 
* clanmills: command line options for chai eval
* clanmills: parser cleanups and code reduction
* Function introspection and reflection 
* Correct function dispatch order to account for base classes and provide a\
 defined order of dispatch 
* Predictable object lifetime that emulates C++ stack lifetime
* emarcotte: pkgconfig support
* standardize on method/member naming and indentation
* 64bit Visual Studio support
* Better support for const objects
* Drastic reduction of runtime exceptions - making debug builds orders of\
 magnitude faster
* Support for platforms with no loadable module support
* Add helper macro for registering class 

\
changes-type: text/markdown;variant=GFM
url: https://chaiscript.com/index.html
doc-url: https://chaiscript.com/docs.html
src-url: https://github.com/ChaiScript/ChaiScript
package-url: https://github.com/build2-packaging/chaiscript/
package-email: packaging@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
requires: c++17
tests: libchaiscript-tests == 6.1.0
examples: libchaiscript-samples == 6.1.0
builds: default
builds: -( +windows &gcc &!optimized ); Unoptimized compilation with MinGW on\
 Windows takes an eternity to finish.
bootstrap-build:
\
project = libchaiscript

using version
using config
using test
using install
using dist

\
root-build:
\
# Configuration
#
config [bool] config.libchaiscript.multithread_support_enabled ?= true
config [bool] config.libchaiscript.dynload_enabled ?= true
config [bool] config.libchaiscript.use_std_make_shared ?= false

# ChaiScript does not officially support C++20 and higher.
# Using the latest C++ standard may result in warnings and errors.
# On the other hand, compilers may not fully provide C++17 support.
# To allow for the full range of compiler configurations,
# we will still use the latest available standard.
#
cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# ChaiScript is configurable from the outside by macros.
# Hence, we assume headers to be not importable.
#
hxx{*}: cxx.importable = false

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: chaiscript/libchaiscript-6.1.0.tar.gz
sha256sum: 0c2517705ced4d2a09467d2bf2b152e89f72c985ed6cfeaa1c95d6b4dba7d92a
:
name: libchaiscript-samples
version: 6.1.0
type: exe
language: c++
project: chaiscript
summary: Examples for 'libchaiscript'
license: BSD-3-Clause
description:
\
<a href="https://www.patreon.com/bePatron?u=2977989&redirect_uri=https%3A%2F%\
2Fwww.patreon.com%2Flefticus">
    <img height="40" width="204" src="https://s3-us-west-1.amazonaws.com/widg\
et-images/become-patron-widget-medium%402x.png">
</a>


Master Status: [![Linux Build Status](https://travis-ci.org/ChaiScript/ChaiSc\
ript.png?branch=master)](https://travis-ci.org/ChaiScript/ChaiScript)\
 [![Windows Build status](https://ci.appveyor.com/api/projects/status/6u3r4s8\
1kkjqmsqw?svg=true)](https://ci.appveyor.com/project/lefticus/chaiscript)\
 [![codecov.io](http://codecov.io/github/ChaiScript/ChaiScript/coverage.svg?b\
ranch=master)](http://codecov.io/github/ChaiScript/ChaiScript?branch=master)

Develop Status: [![Linux Build Status](https://travis-ci.org/ChaiScript/ChaiS\
cript.png?branch=develop)](https://travis-ci.org/ChaiScript/ChaiScript)\
 [![Windows Build status](https://ci.appveyor.com/api/projects/status/6u3r4s8\
1kkjqmsqw/branch/develop?svg=true)](https://ci.appveyor.com/project/lefticus/\
chaiscript/branch/develop) [![codecov.io](http://codecov.io/github/ChaiScript\
/ChaiScript/coverage.svg?branch=develop)](http://codecov.io/github/ChaiScript\
/ChaiScript?branch=develop)

<a href="https://scan.coverity.com/projects/5297">
  <img alt="Coverity Scan Build Status"
       src="https://img.shields.io/coverity/scan/5297.svg"/>
</a>

ChaiScript

http://www.chaiscript.com

(c) 2009-2012 Jonathan Turner
(c) 2009-2017 Jason Turner

Release under the BSD license, see "license.txt" for details.


Introduction
============

[![Gitter](https://badges.gitter.im/JoinChat.svg)](https://gitter.im/ChaiScri\
pt/ChaiScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_con\
tent=badge)

ChaiScript is one of the only embedded scripting language designed from the 
ground up to directly target C++ and take advantage of modern C++ development 
techniques, working with the developer like he expects it to work.  Being a 
native C++ application, it has some advantages over existing embedded\
 scripting 
languages:

1. It uses a header-only approach, which makes it easy to integrate with 
   existing projects.
2. It maintains type safety between your C++ application and the user scripts.
3. It supports a variety of C++ techniques including callbacks, overloaded 
   functions, class methods, and stl containers.


Requirements
============

ChaiScript requires a C++14 compiler to build with support for variadic 
templates.  It has been tested with gcc 4.9 and clang 3.6 (with libcxx). 
For more information see the build 
[dashboard](http://chaiscript.com/ChaiScript-BuildResults/index.html).

Usage
=====

* Add the ChaiScript include directory to your project's header search path
* Add `#include <chaiscript/chaiscript.hpp>` to your source file
* Instantiate the ChaiScript engine in your application.  For example, create\
 a 
  new engine with the name `chai` like so: `chaiscript::ChaiScript chai`
* The default behavior is to load the ChaiScript standard library from a 
  loadable module. A second option is to compile the library into your code,
  see below for an example.

Once instantiated, the engine is ready to start running ChaiScript source. \
 You
have two main options for processing ChaiScript source: a line at a time\
 using 
`chai.eval(string)` and a file at a time using `chai.eval_file(fname)`

To make functions in your C++ code visible to scripts, they must be\
 registered 
with the scripting engine.  To do so, call add:

    chai.add(chaiscript::fun(&my_function), "my_function_name");

Once registered the function will be visible to scripts as "my_function_name"

Examples
========

ChaiScript is similar to ECMAScript (aka JavaScript(tm)), but with some 
modifications to make it easier to use.  For usage examples see the "samples" 
directory, and for more in-depth look at the language, the unit tests in the 
"unittests" directory cover the most ground.

For examples of how to register parts of your C++ application, see 
"example.cpp" in the "samples" directory. Example.cpp is verbose and shows\
 every 
possible way of working with the library. For further documentation generate 
the doxygen documentation in the build folder or see the website 
http://www.chaiscript.com.


The shortest complete example possible follows:

```C++
/// main.cpp

#include <chaiscript/chaiscript.hpp>

double function(int i, double j)
{
  return i * j;
}

int main()
{
  chaiscript::ChaiScript chai;
  chai.add(chaiscript::fun(&function), "function");

  double d = chai.eval<double>("function(3, 4.75);");
}
```

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Packages for ChaiScript Library and Interpreter

[ChaiScript](https://chaiscript.com/index.html) is a header-only C++ embedded\
 scripting language loosely based on ECMA script. It is designed for ease of\
 use and tight integration with C++.

[![Official](https://img.shields.io/website/https/chaiscript.com/index.html.s\
vg?down_message=offline&label=Official&style=for-the-badge&up_color=blue&up_m\
essage=online)](https://chaiscript.com/index.html)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/c\
haiscript.svg?down_message=offline&label=build2&style=for-the-badge&up_color=\
blue&up_message=online)](https://github.com/build2-packaging/chaiscript)
[![cppget.org](https://img.shields.io/website/https/cppget.org/chaiscript.svg\
?down_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_m\
essage=online)](https://cppget.org/chaiscript)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/ch\
aiscript.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=\
for-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/c\
haiscript)

## Usage
The [original ChaiScript repository](https://github.com/ChaiScript/ChaiScript\
) has been split into multiple build2 packages to allow for greater\
 flexibility.
The `libchaiscript` package is used to get access to the ChaiScript\
 header-only library.
The package `chaiscript` makes ChaiScript's own interpreter `chai` available\
 to be used.
`chaiscript-stdlib` exports the compiled and dynamically loadable standard\
 library module for the basic ChaiScript engine.
Typically, you will not need to use this one.

Make sure to add the or alpha or stable section of the `cppget.org`\
 repository to your project's `repositories.manifest` to be able to fetch the\
 packages.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the `cppget.org` repository is not an option then add this Git repository\
 itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/chaiscript.git

Add the respective dependencies in your project's `manifest` file to make the\
 packages available for import.
Hereby, all packages should use the same version constraint.

    depends: libchaiscript ^ 6.1.0
    # or
    depends: { libchaiscript chaiscript chaiscript-stdlib } ^ 6.1.0

The header-only C++ library to use ChaiScript as an embedded language can be\
 imported by the following declaration in a `buildfile`.

    import chaiscript = libchaiscript%lib{chaiscript}

Using the `chai` interpreter for ChaiScript scripts, as a REPL, or as\
 build-time dependency with immediate and standard importation is supported.
Because it is not able to change the code of `chai`, there is no way for now\
 to provide any metadata in the executable.

    import chai = chaiscript%exe{chai}
    # or
    import! chai = chaiscript%exe{chai}

To import the dynamically loadable module which provides the standard library\
 for a ChaiScript instance, we need to rely on metadata.
A dynamic module should not be linked to your executable but instead loaded\
 at runtime.
Hence, to use it properly for running ChaiScript scripts for tests or other\
 things, you would need the module as a prerequisite but only use its\
 directory as input.
This can be accomplished by immediate importation with metadata support.

    import! [metadata, rule_hint=cxx.link] \\
        stdlib_module = chaiscript-stdlib%libs{chaiscript_stdlib}
    stdlib_dir = [dir_path] $($stdlib_module: chaiscript_stdlib.dir)

## Configuration

<!-- ### Installation of the Standard Library Module
To be able to automatically find the standard library, its installation\
 directory should also follow the patterns given by the implementation of\
 ChaiScript itself where it seems to be basically hardcoded.
To not run into problems with the `pkg-config` files and other methods to\
 reimport the `chaiscript_stdlib` module, we leave this part up to\
 configuration.
The following option is the recommended way of configuring the install\
 command inside the `config.build` file that lies in the `build` directory of\
 your project's configuration.

    config.install.lib = exec_root/lib/chaiscript/
 -->
### Multithread Support
Multithread support is enabled by default and may be turned off by using the\
 following configuration variable.
On Unix-based targets, `pthread` will be linked when enabled.

    config [bool] config.libchaiscript.multithread_support_enabled ?= true

### Dynamic Module Loading
The support to dynamically load ChaiScript modules is enabled by default and\
 may be turned off by using the following configuration variable.

    config [bool] config.libchaiscript.dynload_enabled ?= true

### Use of GNU `readline`
For now, the use of the GNU `readline` library for the ChaiScript interpreter\
 `chai` is disabled by default to allow for out-of-the-box CI builds.
<!-- This is mainly the case to remove system dependencies for CI. -->
If `readline` is available on the system, we recommend to enable it.

    config [bool] config.chaiscript.use_readline ?= false


## Issues and Notes
- Supported Platforms:
    + Linux: GCC, Clang but not with`libc++`
    + Windows: MSVC, GCC, and Clang
    + MacOS: `chaiscript-stdlib` is not supported
<!-- - The installation path of `chaiscript_stdlib` is basically hardcoded.\
 Look into `libchaiscript/chaiscript_stdlib/buildfile` for some notes what\
 could be changed. -->
- ChaiScript is not made for C++20 and higher language standards. As the\
 library is header-only, we do not restrict the language standard of the\
 library package `libchaiscript` but instead keep it to be `cxx.std =\
 latest`. Especially when using Clang, this may result in compilation errors\
 in a project that uses ChaiScript, such as it has been with its own samples\
 and tests. For now, the workaround is to force the C++17 standard with\
 `cxx.std = 17`. If this is not an option, this package will probably not\
 work with your project.
- Using Clang on Windows with MSVC, the object copy count test given in the\
 `compiled_tests.cpp` file fails due to the wrong number of destructor and\
 move calls. This is most likely an implementation issue of ChaiScript and,\
 looking into the up-to-date `develop` branch, fixed in the prerelease of\
 version `7.0.0`.
- This package does not build or execute the `fuzzer` test.
- This package does not build or execute the performance tests because\
 `valgrind` would be needed.
- Not all unit tests based on ChaiScript scripts are sucessfull when using\
 Clang with `libc++`. This seems to be an implementation issue of the\
 ChaiScript library itself.
- To fix the strange inclusion scheme of the statically generated libraries\
 `parser` and `stdlib`, their content actually needed to be copied and\
 adjusted.
- If there would ever be a new version, check against new script files for\
 testing and adjust all the symbolic links.

## Contributing
Thanks in advance for your help and contribution to keep this package\
 up-to-date.
For now, please, file an issue on [GitHub](https://github.com/build2-packagin\
g/chaiscript/issues) for everything that is not described below.

### Recommend Updating Version
Please, file an issue on [GitHub](https://github.com/build2-packaging/chaiscr\
ipt/issues) with the new recommended version.

### Update Version by Pull Request
1. Fork the repository on [GitHub](https://github.com/build2-packaging/chaisc\
ript) and clone it to your local machine.
2. Run `git submodule init` and `git submodule update` to get the current\
 upstream directory.
3. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
4. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
5. Test if the packages compile and execute examples and tools.
6. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
7. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
8. Run `bdep ci` and test for errors.
9. If everything works fine, make a pull request on GitHub and write down the\
 `bdep ci` link to your CI tests.
10. After a successful pull request, we will run the appropriate commands to\
 publish a new package version.

### Update Version Directly if You Have Permissions
1. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
2. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
3. Test if the packages compile and execute examples and tools.
4. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
5. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
6. Run `bdep ci` and test for errors and warnings.
7. When successful, run `bdep release --tag --push` to push new tag version\
 to repository.
8. Run `bdep publish` to publish the package to [cppget.org](https://cppget.o\
rg).

\
package-description-type: text/markdown;variant=GFM
changes:
\
Notes:
=======
Current Version: 6.1.0

### Changes since 6.0.0

 * Add namespacing support #290 @stephenberry
 * Add utf parsing support
 * cheatsheet.md updates
 * `add_class` utility support for scoped enums #306 @StanEpp
 * Parser optimizations #300 @niXman
 * Various JSON fixes #377 #400 #409 #371 @totalgee @dinghram @arcoRocks
 * Various cleanups, bugfixes and warning fixes and minor performance\
 improvements
 * Support for C++17 compilers!
 * Support for UTF8 BOM #439 @AlekMosingiewicz @MarioLiebisch


### Changes since 5.8.6

*6.0.0 is a massive rework compared to 5.x. It now requires a C++14 enabled\
 compiler*

#### Compiler Requirements

* MSVC 2015 or greater
* g++ 4.9 or greater
* clang 3.6 or greater

#### Breaking Changes

* Instantiating a ChaiScript object now, by default, builds the stdlib in
  * This was done to address the most common support issues of loading stdlib\
 dynamically at runtime
  * If you want the old behavior, use include/chaiscript/chaiscript_basic.hpp
* Headers have been reorganized to fully separate stdlib/parser/engine from\
 each other (some faster builds)
* Bootstrap functions no longer return a reference to the module added to\
 (compile time savings)
* It's now no longer possible modify AST_Nodes (compile time, runtime\
 efficiency)
* Function annotations no longer exist (simplifies code, reduces compile\
 time, compile size)

#### New Features Added

* Modular optimization system; this can be accessed via the ChaiScript_Basic\
 interface
* Execution tracing capability; also accessed via ChaiScript_Basic interface
* range-based for loops `for( id : container ) { }` (much better performance\
 than other loop types)
* If-init expressions (ala C++17)
* Support for passing r-value references to functions
* Support for containing unique_ptr
* Add helpers for exposing enum classes to ChaiScript
* Allow typed ChaiScript defined functions to perform conversions on call #303

#### Improvements

* Compile time improvements
* Compile size improvements
* Significant runtime improvements (see "Modular optimization system")
* Significant parser improvements, both with parse-time and parser\
 initialization time (Thanks @niXman)
* Fix type conversion to bool in conditionals

#### Improvements Still Need To Be Made

* File location tracking has been rewritten; this currently means error\
 location reporting is not as good as it was
* Tracing capability needs to be tested and vetted

### Changes since 5.8.5
* Optimize away `return` statements in lambdas also
* Allow conversions to bool in conditionals
* Don't allow `class` statements inside of scopes
* Properly error when a dynamic object non-function member is called

### Changes since 5.8.4
* Fix order of operations for prefix operators
* Make sure atomics are initialized properly
* Remove parsing of unused prefix `&` operator

### Changes since 5.8.3
* Fix case with some numeric conversions mixed with numerics that do not need\
 conversion

### Changes since 5.8.2
* Add support for reference of pointer return types

### Changes since 5.8.1
* Allow casting to non-const & std::shared_ptr<T>


### Changes since 5.8.0
* Fix parsing of floats to be locale independent #250
* Various warning fixes on various platforms


### Changes since 5.7.1
* Make all parser iterator operations range checked
* Parse in-string eval statements once, not once for each execution
* Fix parsing of operators (ie 1<-1 now parses)
* Fix variable scoping for functors
* Exception reduction
* Various object lifetime fixes
* Add JSON support for load / save #207
* Numeric overload resolution fixes #209 
* Fix long long #208 
* Add octal escapes in strings #211
* Fixed sizing of binary literals #213
* Added support for != with bool values #217
* Various value assignment vector fixes 
* Fixed broken hex escape sequences from @ChristianKaeser
* Multiply defined symbols fixes #232 @RaptorFactor
* Add add_class<Enum> helper #233  @vrennert
* Cheatsheet fixes #235 @mlamby
* Fix parsing of strings inside of in-string eval statements
* Allow lower-case global keyword
* Enable thread-local on MSVC (should be significant performance boost)


### Changes since 5.7.0
* Build time reduction
* Build size reduction
* Performance increases
* Fixed ~20 crash-bugs found with fuzzy testing #194
  * Let unhandled exceptions propogate to user
  * Report eval_error when break statement is not in loop
  * Fix handling of 0 length scripts closes #193
  * Don't crash on arity mismatch - Specifically affects the case where no\
 overloads exist for a given function
  * Fix error printing for `bind` calls
  * Handle unexpected continue statement
  * Check arity during bind
  * Don't allow arith conversion on variadic function
  * Correct `bind` parameter match count
  * Add in expected Boxed_Value exception cases
  * Check access to AST, don't allow `;` in func def
  * Don't attempt arithmetic unary & call
  * Don't crash on 0 param call to `bind`
  * Catch errors during member function dispatch
  * Properly handle type of const bool &
* Automatic deduction of lambda type signatures
* Work with non-polymorphic parent/child conversions
* Move to codecov for coverage reporting
* Add `.at` method for Map objects
* Various corrections for support of move-only objects


### Changes since 5.6.0

* Significant code cleanups and reduction
* Smaller builds
* Faster compiles
* Less runtime memory usage
* ~2x faster runtimes
* biicode support
* method_missing feature added #164 @arBmind
* Generic objects with dynamic properties support
* Add ability to call functions contained in properties
* Add lambda captures
* Create [cheatsheet.md](cheatsheet.md) for all-in-one reference of features
* Fix support for libc++
* Eliminate clone of return value stored locally
* Eliminate 'return' statements when last line of function
* Reduce number of runtime exceptions occuring
* Reduce copies / moves of return values. 
* make `use` statement return value of last statement in file
* Add ability to access fixed array sizes
* Add support for scientific notation floating point literals #174  @totalgee


### Changes since 5.5.1
* Throw exception on integer divide by 0
* Add optional type specification to function declarations
   
  ```
  def func(int i, j, double k) {
    // i must be an int.
    // j can be anything
    // k must be a double
    // normal conversion rules still apply
  }
   ```
* Many minor fixes for compiler warnings
* Add support for `std::future` and `std::async`
  ```
  var f := async(someFunction);
  var f2 := async(someFunction2);

  // someFunction and someFunction2 are running in parallel now
  f.get();
  f2.get();
  ```
* Fully support r-value returns, supporting move-only objects and reducing\
 object copies


### Changes since 5.5.0
* 30% performance increase
* Fix handling of object stack, resulting in greatly reduced memory usage
* Code cleanups

### Changes since 5.4.0
* 2x performance increase
* Significant code cleanups
* Throw exception if user attempts to call function on null object
* Allow user defined type conversions
* Fix object lifetime for nested function calls made at the global scope
* Fix returning of boolean values from function calls


### Changes since 5.3.1
* Decreased compile time and build size
* Make "reflection" module built in (losing some of the time / build size\
 gains)
* Add new "class" syntax for ChaiScript defined methods and attributes see:\
 [unittests/class.chai](unittests/class.chai) for examples
* Minor performance enhancements
* major to_string performance enhancements
* Provide API for retrieving registered type name #124
* Added strong reference to container to range object #132


### Changes since 5.3.0
* Add automatic conversion of arithmetic return types, following the same
  rules as conversion of arithmetic types when passing parameters
* Add automatic casting up the inheritence hierarchy when possible.
* Enable travis.ci testing
* Allow users to add globals from within script
* Various static analysis fixes
* Code modernization to C++11
* Unofficial support for Haiku added
* Fix #121 - Inability to compile on cygwin
* Formatting fixes and spelling corrections
* Apply "include what you use" https://code.google.com/p/include-what-you-use/
* Apply clang-modernize
* Various threading fixes
* Performance improvements

### Changes since 5.2.0
* Official support for MSVC with C++11. All major platforms and compilers are\
 now support for C++11 release

### Changes since 4.2.0
* Enhanced unit tests
* Add `continue` statement, fix various use cases for `for`  loops
* Fix use of suffixed numbers in vector initialization
* Code cleanups
* Eliminate global data, which makes code more portable and thread safe
* Fix issue #79
* Merge pretty_print fixes from @mgee #82
* Compiler warning fixes for latest compiler releases
* Fix threading problems
* Fix linking error on MacOS Mavericks #88
* Allow non-const globals
* Make sure user cannot name a variable with `::` in it #91
* Fix various string / map / vector `size` and `count` calls for compilers\
 which have weird overloads for them. #90 #93 #95
* Make module search path relative to the currently running executable
* Build and work with wstring windows builds
* fix for some new line cases in the middle of a vector initialization from\
 jespada

### Changes since 5.1.0
* Add support for automatic conversion of arithmetic types when possible
  and when no ambiguous method dispatch exists.

### Changes since 5.0.0
* Fix sizing of numeric constants to match that of the C++ standard
* Add support for u,ll,l,f suffixes for numeric constants
* Siginificant improvement in error reporting

### Changes since 4.0.0
* Dropped boost in favor of C++11
* Separated out stdlib to make more options for compile time improvements

### Changes since 3.1.0
* svenstaro: Unused variables and CMake consistency fixes
* Added support for returning pointers from functions (#13)
* Compile with -pedantic (#9)
* Fix issues with multiple ChaiScript object types having the same attribute\
 name (#15)
* Prevent variable redeclaration in same scope (#22)
* mgee: Boxed_Number improvements (#27)
* Support switch statements (#34)
* Fix uint16 comparions (#26)
* Add ability to add const_var globals in Module objects (#14)
* Add support for ternary operators ?:
* Add headers to CMakeLists so they show up in IDEs
* Add ability to get vector of defined objects and vector of defined functions
* Fix memory leak in cyclical references
* Clean up static analysis issues discovered
* Fix vector construction to be consistent with map construction
* Increased unit tests to 161
* Performance enhancements

### Changes since 3.0.0
* Numeric operations performance increased approximately 10x
* Looping operations performance increased up to 2x
* Engine start up time decreased
* Several parsing bugs related to index operators fixed
* Added full support for all C algebraic types: double, long double, float,\
 int, long, char,
  uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, int32_t, int64_t
* Enhanced support for capturing of exceptions thrown from ChaiScript in C++

### Changes since 2.3.3
* Code simplifications
* Fully integrate documentation with source code in doxygen style comments
* Unit tests increased from 114 to 137
* Automatic conversion between boost::function objects and ChaiScript\
 functions 
* Many bug fixes
* Minor performance improvements
* Namespace reorganization to make end user code more accessible
* clang support
* VisualStudio 2010 Support
* Support for C++ base classes and automatic upcasting 
* Remove __ reserved identifiers
* Better code organization to reduce #ifdefs 
* clanmills: command line options for chai eval
* clanmills: parser cleanups and code reduction
* Function introspection and reflection 
* Correct function dispatch order to account for base classes and provide a\
 defined order of dispatch 
* Predictable object lifetime that emulates C++ stack lifetime
* emarcotte: pkgconfig support
* standardize on method/member naming and indentation
* 64bit Visual Studio support
* Better support for const objects
* Drastic reduction of runtime exceptions - making debug builds orders of\
 magnitude faster
* Support for platforms with no loadable module support
* Add helper macro for registering class 

\
changes-type: text/markdown;variant=GFM
url: https://chaiscript.com/index.html
doc-url: https://chaiscript.com/docs.html
src-url: https://github.com/ChaiScript/ChaiScript
package-url: https://github.com/build2-packaging/chaiscript/
package-email: packaging@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
bootstrap-build:
\
project = libchaiscript-samples

using version
using config
using test

# The samples do not need to be installed.
#
# using install

using dist

\
root-build:
\
# ChaiScript does not officially support C++20 and higher.
# Test may fail to compile when setting C++ standard to 'latest'.
#
cxx.std = 17

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# ChaiScript library will be imported by default.
#
import libs = libchaiscript%lib{chaiscript}

\
location: chaiscript/libchaiscript-samples-6.1.0.tar.gz
sha256sum: b14b968133719ac2cb3bb5d26155183e3f85b8e1d6f83346fe74af8380fcbf47
:
name: libchaiscript-tests
version: 6.1.0
type: exe
language: c++
project: chaiscript
summary: Tests for 'libchaiscript'
license: BSD-3-Clause
description:
\
<a href="https://www.patreon.com/bePatron?u=2977989&redirect_uri=https%3A%2F%\
2Fwww.patreon.com%2Flefticus">
    <img height="40" width="204" src="https://s3-us-west-1.amazonaws.com/widg\
et-images/become-patron-widget-medium%402x.png">
</a>


Master Status: [![Linux Build Status](https://travis-ci.org/ChaiScript/ChaiSc\
ript.png?branch=master)](https://travis-ci.org/ChaiScript/ChaiScript)\
 [![Windows Build status](https://ci.appveyor.com/api/projects/status/6u3r4s8\
1kkjqmsqw?svg=true)](https://ci.appveyor.com/project/lefticus/chaiscript)\
 [![codecov.io](http://codecov.io/github/ChaiScript/ChaiScript/coverage.svg?b\
ranch=master)](http://codecov.io/github/ChaiScript/ChaiScript?branch=master)

Develop Status: [![Linux Build Status](https://travis-ci.org/ChaiScript/ChaiS\
cript.png?branch=develop)](https://travis-ci.org/ChaiScript/ChaiScript)\
 [![Windows Build status](https://ci.appveyor.com/api/projects/status/6u3r4s8\
1kkjqmsqw/branch/develop?svg=true)](https://ci.appveyor.com/project/lefticus/\
chaiscript/branch/develop) [![codecov.io](http://codecov.io/github/ChaiScript\
/ChaiScript/coverage.svg?branch=develop)](http://codecov.io/github/ChaiScript\
/ChaiScript?branch=develop)

<a href="https://scan.coverity.com/projects/5297">
  <img alt="Coverity Scan Build Status"
       src="https://img.shields.io/coverity/scan/5297.svg"/>
</a>

ChaiScript

http://www.chaiscript.com

(c) 2009-2012 Jonathan Turner
(c) 2009-2017 Jason Turner

Release under the BSD license, see "license.txt" for details.


Introduction
============

[![Gitter](https://badges.gitter.im/JoinChat.svg)](https://gitter.im/ChaiScri\
pt/ChaiScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_con\
tent=badge)

ChaiScript is one of the only embedded scripting language designed from the 
ground up to directly target C++ and take advantage of modern C++ development 
techniques, working with the developer like he expects it to work.  Being a 
native C++ application, it has some advantages over existing embedded\
 scripting 
languages:

1. It uses a header-only approach, which makes it easy to integrate with 
   existing projects.
2. It maintains type safety between your C++ application and the user scripts.
3. It supports a variety of C++ techniques including callbacks, overloaded 
   functions, class methods, and stl containers.


Requirements
============

ChaiScript requires a C++14 compiler to build with support for variadic 
templates.  It has been tested with gcc 4.9 and clang 3.6 (with libcxx). 
For more information see the build 
[dashboard](http://chaiscript.com/ChaiScript-BuildResults/index.html).

Usage
=====

* Add the ChaiScript include directory to your project's header search path
* Add `#include <chaiscript/chaiscript.hpp>` to your source file
* Instantiate the ChaiScript engine in your application.  For example, create\
 a 
  new engine with the name `chai` like so: `chaiscript::ChaiScript chai`
* The default behavior is to load the ChaiScript standard library from a 
  loadable module. A second option is to compile the library into your code,
  see below for an example.

Once instantiated, the engine is ready to start running ChaiScript source. \
 You
have two main options for processing ChaiScript source: a line at a time\
 using 
`chai.eval(string)` and a file at a time using `chai.eval_file(fname)`

To make functions in your C++ code visible to scripts, they must be\
 registered 
with the scripting engine.  To do so, call add:

    chai.add(chaiscript::fun(&my_function), "my_function_name");

Once registered the function will be visible to scripts as "my_function_name"

Examples
========

ChaiScript is similar to ECMAScript (aka JavaScript(tm)), but with some 
modifications to make it easier to use.  For usage examples see the "samples" 
directory, and for more in-depth look at the language, the unit tests in the 
"unittests" directory cover the most ground.

For examples of how to register parts of your C++ application, see 
"example.cpp" in the "samples" directory. Example.cpp is verbose and shows\
 every 
possible way of working with the library. For further documentation generate 
the doxygen documentation in the build folder or see the website 
http://www.chaiscript.com.


The shortest complete example possible follows:

```C++
/// main.cpp

#include <chaiscript/chaiscript.hpp>

double function(int i, double j)
{
  return i * j;
}

int main()
{
  chaiscript::ChaiScript chai;
  chai.add(chaiscript::fun(&function), "function");

  double d = chai.eval<double>("function(3, 4.75);");
}
```

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Packages for ChaiScript Library and Interpreter

[ChaiScript](https://chaiscript.com/index.html) is a header-only C++ embedded\
 scripting language loosely based on ECMA script. It is designed for ease of\
 use and tight integration with C++.

[![Official](https://img.shields.io/website/https/chaiscript.com/index.html.s\
vg?down_message=offline&label=Official&style=for-the-badge&up_color=blue&up_m\
essage=online)](https://chaiscript.com/index.html)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/c\
haiscript.svg?down_message=offline&label=build2&style=for-the-badge&up_color=\
blue&up_message=online)](https://github.com/build2-packaging/chaiscript)
[![cppget.org](https://img.shields.io/website/https/cppget.org/chaiscript.svg\
?down_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_m\
essage=online)](https://cppget.org/chaiscript)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/ch\
aiscript.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=\
for-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/c\
haiscript)

## Usage
The [original ChaiScript repository](https://github.com/ChaiScript/ChaiScript\
) has been split into multiple build2 packages to allow for greater\
 flexibility.
The `libchaiscript` package is used to get access to the ChaiScript\
 header-only library.
The package `chaiscript` makes ChaiScript's own interpreter `chai` available\
 to be used.
`chaiscript-stdlib` exports the compiled and dynamically loadable standard\
 library module for the basic ChaiScript engine.
Typically, you will not need to use this one.

Make sure to add the or alpha or stable section of the `cppget.org`\
 repository to your project's `repositories.manifest` to be able to fetch the\
 packages.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the `cppget.org` repository is not an option then add this Git repository\
 itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/chaiscript.git

Add the respective dependencies in your project's `manifest` file to make the\
 packages available for import.
Hereby, all packages should use the same version constraint.

    depends: libchaiscript ^ 6.1.0
    # or
    depends: { libchaiscript chaiscript chaiscript-stdlib } ^ 6.1.0

The header-only C++ library to use ChaiScript as an embedded language can be\
 imported by the following declaration in a `buildfile`.

    import chaiscript = libchaiscript%lib{chaiscript}

Using the `chai` interpreter for ChaiScript scripts, as a REPL, or as\
 build-time dependency with immediate and standard importation is supported.
Because it is not able to change the code of `chai`, there is no way for now\
 to provide any metadata in the executable.

    import chai = chaiscript%exe{chai}
    # or
    import! chai = chaiscript%exe{chai}

To import the dynamically loadable module which provides the standard library\
 for a ChaiScript instance, we need to rely on metadata.
A dynamic module should not be linked to your executable but instead loaded\
 at runtime.
Hence, to use it properly for running ChaiScript scripts for tests or other\
 things, you would need the module as a prerequisite but only use its\
 directory as input.
This can be accomplished by immediate importation with metadata support.

    import! [metadata, rule_hint=cxx.link] \\
        stdlib_module = chaiscript-stdlib%libs{chaiscript_stdlib}
    stdlib_dir = [dir_path] $($stdlib_module: chaiscript_stdlib.dir)

## Configuration

<!-- ### Installation of the Standard Library Module
To be able to automatically find the standard library, its installation\
 directory should also follow the patterns given by the implementation of\
 ChaiScript itself where it seems to be basically hardcoded.
To not run into problems with the `pkg-config` files and other methods to\
 reimport the `chaiscript_stdlib` module, we leave this part up to\
 configuration.
The following option is the recommended way of configuring the install\
 command inside the `config.build` file that lies in the `build` directory of\
 your project's configuration.

    config.install.lib = exec_root/lib/chaiscript/
 -->
### Multithread Support
Multithread support is enabled by default and may be turned off by using the\
 following configuration variable.
On Unix-based targets, `pthread` will be linked when enabled.

    config [bool] config.libchaiscript.multithread_support_enabled ?= true

### Dynamic Module Loading
The support to dynamically load ChaiScript modules is enabled by default and\
 may be turned off by using the following configuration variable.

    config [bool] config.libchaiscript.dynload_enabled ?= true

### Use of GNU `readline`
For now, the use of the GNU `readline` library for the ChaiScript interpreter\
 `chai` is disabled by default to allow for out-of-the-box CI builds.
<!-- This is mainly the case to remove system dependencies for CI. -->
If `readline` is available on the system, we recommend to enable it.

    config [bool] config.chaiscript.use_readline ?= false


## Issues and Notes
- Supported Platforms:
    + Linux: GCC, Clang but not with`libc++`
    + Windows: MSVC, GCC, and Clang
    + MacOS: `chaiscript-stdlib` is not supported
<!-- - The installation path of `chaiscript_stdlib` is basically hardcoded.\
 Look into `libchaiscript/chaiscript_stdlib/buildfile` for some notes what\
 could be changed. -->
- ChaiScript is not made for C++20 and higher language standards. As the\
 library is header-only, we do not restrict the language standard of the\
 library package `libchaiscript` but instead keep it to be `cxx.std =\
 latest`. Especially when using Clang, this may result in compilation errors\
 in a project that uses ChaiScript, such as it has been with its own samples\
 and tests. For now, the workaround is to force the C++17 standard with\
 `cxx.std = 17`. If this is not an option, this package will probably not\
 work with your project.
- Using Clang on Windows with MSVC, the object copy count test given in the\
 `compiled_tests.cpp` file fails due to the wrong number of destructor and\
 move calls. This is most likely an implementation issue of ChaiScript and,\
 looking into the up-to-date `develop` branch, fixed in the prerelease of\
 version `7.0.0`.
- This package does not build or execute the `fuzzer` test.
- This package does not build or execute the performance tests because\
 `valgrind` would be needed.
- Not all unit tests based on ChaiScript scripts are sucessfull when using\
 Clang with `libc++`. This seems to be an implementation issue of the\
 ChaiScript library itself.
- To fix the strange inclusion scheme of the statically generated libraries\
 `parser` and `stdlib`, their content actually needed to be copied and\
 adjusted.
- If there would ever be a new version, check against new script files for\
 testing and adjust all the symbolic links.

## Contributing
Thanks in advance for your help and contribution to keep this package\
 up-to-date.
For now, please, file an issue on [GitHub](https://github.com/build2-packagin\
g/chaiscript/issues) for everything that is not described below.

### Recommend Updating Version
Please, file an issue on [GitHub](https://github.com/build2-packaging/chaiscr\
ipt/issues) with the new recommended version.

### Update Version by Pull Request
1. Fork the repository on [GitHub](https://github.com/build2-packaging/chaisc\
ript) and clone it to your local machine.
2. Run `git submodule init` and `git submodule update` to get the current\
 upstream directory.
3. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
4. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
5. Test if the packages compile and execute examples and tools.
6. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
7. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
8. Run `bdep ci` and test for errors.
9. If everything works fine, make a pull request on GitHub and write down the\
 `bdep ci` link to your CI tests.
10. After a successful pull request, we will run the appropriate commands to\
 publish a new package version.

### Update Version Directly if You Have Permissions
1. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
2. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
3. Test if the packages compile and execute examples and tools.
4. Update library version in all `manifest` files if it has changed or add\
 package update by using `+n` for the `n`-th update.
5. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
6. Run `bdep ci` and test for errors and warnings.
7. When successful, run `bdep release --tag --push` to push new tag version\
 to repository.
8. Run `bdep publish` to publish the package to [cppget.org](https://cppget.o\
rg).

\
package-description-type: text/markdown;variant=GFM
changes:
\
Notes:
=======
Current Version: 6.1.0

### Changes since 6.0.0

 * Add namespacing support #290 @stephenberry
 * Add utf parsing support
 * cheatsheet.md updates
 * `add_class` utility support for scoped enums #306 @StanEpp
 * Parser optimizations #300 @niXman
 * Various JSON fixes #377 #400 #409 #371 @totalgee @dinghram @arcoRocks
 * Various cleanups, bugfixes and warning fixes and minor performance\
 improvements
 * Support for C++17 compilers!
 * Support for UTF8 BOM #439 @AlekMosingiewicz @MarioLiebisch


### Changes since 5.8.6

*6.0.0 is a massive rework compared to 5.x. It now requires a C++14 enabled\
 compiler*

#### Compiler Requirements

* MSVC 2015 or greater
* g++ 4.9 or greater
* clang 3.6 or greater

#### Breaking Changes

* Instantiating a ChaiScript object now, by default, builds the stdlib in
  * This was done to address the most common support issues of loading stdlib\
 dynamically at runtime
  * If you want the old behavior, use include/chaiscript/chaiscript_basic.hpp
* Headers have been reorganized to fully separate stdlib/parser/engine from\
 each other (some faster builds)
* Bootstrap functions no longer return a reference to the module added to\
 (compile time savings)
* It's now no longer possible modify AST_Nodes (compile time, runtime\
 efficiency)
* Function annotations no longer exist (simplifies code, reduces compile\
 time, compile size)

#### New Features Added

* Modular optimization system; this can be accessed via the ChaiScript_Basic\
 interface
* Execution tracing capability; also accessed via ChaiScript_Basic interface
* range-based for loops `for( id : container ) { }` (much better performance\
 than other loop types)
* If-init expressions (ala C++17)
* Support for passing r-value references to functions
* Support for containing unique_ptr
* Add helpers for exposing enum classes to ChaiScript
* Allow typed ChaiScript defined functions to perform conversions on call #303

#### Improvements

* Compile time improvements
* Compile size improvements
* Significant runtime improvements (see "Modular optimization system")
* Significant parser improvements, both with parse-time and parser\
 initialization time (Thanks @niXman)
* Fix type conversion to bool in conditionals

#### Improvements Still Need To Be Made

* File location tracking has been rewritten; this currently means error\
 location reporting is not as good as it was
* Tracing capability needs to be tested and vetted

### Changes since 5.8.5
* Optimize away `return` statements in lambdas also
* Allow conversions to bool in conditionals
* Don't allow `class` statements inside of scopes
* Properly error when a dynamic object non-function member is called

### Changes since 5.8.4
* Fix order of operations for prefix operators
* Make sure atomics are initialized properly
* Remove parsing of unused prefix `&` operator

### Changes since 5.8.3
* Fix case with some numeric conversions mixed with numerics that do not need\
 conversion

### Changes since 5.8.2
* Add support for reference of pointer return types

### Changes since 5.8.1
* Allow casting to non-const & std::shared_ptr<T>


### Changes since 5.8.0
* Fix parsing of floats to be locale independent #250
* Various warning fixes on various platforms


### Changes since 5.7.1
* Make all parser iterator operations range checked
* Parse in-string eval statements once, not once for each execution
* Fix parsing of operators (ie 1<-1 now parses)
* Fix variable scoping for functors
* Exception reduction
* Various object lifetime fixes
* Add JSON support for load / save #207
* Numeric overload resolution fixes #209 
* Fix long long #208 
* Add octal escapes in strings #211
* Fixed sizing of binary literals #213
* Added support for != with bool values #217
* Various value assignment vector fixes 
* Fixed broken hex escape sequences from @ChristianKaeser
* Multiply defined symbols fixes #232 @RaptorFactor
* Add add_class<Enum> helper #233  @vrennert
* Cheatsheet fixes #235 @mlamby
* Fix parsing of strings inside of in-string eval statements
* Allow lower-case global keyword
* Enable thread-local on MSVC (should be significant performance boost)


### Changes since 5.7.0
* Build time reduction
* Build size reduction
* Performance increases
* Fixed ~20 crash-bugs found with fuzzy testing #194
  * Let unhandled exceptions propogate to user
  * Report eval_error when break statement is not in loop
  * Fix handling of 0 length scripts closes #193
  * Don't crash on arity mismatch - Specifically affects the case where no\
 overloads exist for a given function
  * Fix error printing for `bind` calls
  * Handle unexpected continue statement
  * Check arity during bind
  * Don't allow arith conversion on variadic function
  * Correct `bind` parameter match count
  * Add in expected Boxed_Value exception cases
  * Check access to AST, don't allow `;` in func def
  * Don't attempt arithmetic unary & call
  * Don't crash on 0 param call to `bind`
  * Catch errors during member function dispatch
  * Properly handle type of const bool &
* Automatic deduction of lambda type signatures
* Work with non-polymorphic parent/child conversions
* Move to codecov for coverage reporting
* Add `.at` method for Map objects
* Various corrections for support of move-only objects


### Changes since 5.6.0

* Significant code cleanups and reduction
* Smaller builds
* Faster compiles
* Less runtime memory usage
* ~2x faster runtimes
* biicode support
* method_missing feature added #164 @arBmind
* Generic objects with dynamic properties support
* Add ability to call functions contained in properties
* Add lambda captures
* Create [cheatsheet.md](cheatsheet.md) for all-in-one reference of features
* Fix support for libc++
* Eliminate clone of return value stored locally
* Eliminate 'return' statements when last line of function
* Reduce number of runtime exceptions occuring
* Reduce copies / moves of return values. 
* make `use` statement return value of last statement in file
* Add ability to access fixed array sizes
* Add support for scientific notation floating point literals #174  @totalgee


### Changes since 5.5.1
* Throw exception on integer divide by 0
* Add optional type specification to function declarations
   
  ```
  def func(int i, j, double k) {
    // i must be an int.
    // j can be anything
    // k must be a double
    // normal conversion rules still apply
  }
   ```
* Many minor fixes for compiler warnings
* Add support for `std::future` and `std::async`
  ```
  var f := async(someFunction);
  var f2 := async(someFunction2);

  // someFunction and someFunction2 are running in parallel now
  f.get();
  f2.get();
  ```
* Fully support r-value returns, supporting move-only objects and reducing\
 object copies


### Changes since 5.5.0
* 30% performance increase
* Fix handling of object stack, resulting in greatly reduced memory usage
* Code cleanups

### Changes since 5.4.0
* 2x performance increase
* Significant code cleanups
* Throw exception if user attempts to call function on null object
* Allow user defined type conversions
* Fix object lifetime for nested function calls made at the global scope
* Fix returning of boolean values from function calls


### Changes since 5.3.1
* Decreased compile time and build size
* Make "reflection" module built in (losing some of the time / build size\
 gains)
* Add new "class" syntax for ChaiScript defined methods and attributes see:\
 [unittests/class.chai](unittests/class.chai) for examples
* Minor performance enhancements
* major to_string performance enhancements
* Provide API for retrieving registered type name #124
* Added strong reference to container to range object #132


### Changes since 5.3.0
* Add automatic conversion of arithmetic return types, following the same
  rules as conversion of arithmetic types when passing parameters
* Add automatic casting up the inheritence hierarchy when possible.
* Enable travis.ci testing
* Allow users to add globals from within script
* Various static analysis fixes
* Code modernization to C++11
* Unofficial support for Haiku added
* Fix #121 - Inability to compile on cygwin
* Formatting fixes and spelling corrections
* Apply "include what you use" https://code.google.com/p/include-what-you-use/
* Apply clang-modernize
* Various threading fixes
* Performance improvements

### Changes since 5.2.0
* Official support for MSVC with C++11. All major platforms and compilers are\
 now support for C++11 release

### Changes since 4.2.0
* Enhanced unit tests
* Add `continue` statement, fix various use cases for `for`  loops
* Fix use of suffixed numbers in vector initialization
* Code cleanups
* Eliminate global data, which makes code more portable and thread safe
* Fix issue #79
* Merge pretty_print fixes from @mgee #82
* Compiler warning fixes for latest compiler releases
* Fix threading problems
* Fix linking error on MacOS Mavericks #88
* Allow non-const globals
* Make sure user cannot name a variable with `::` in it #91
* Fix various string / map / vector `size` and `count` calls for compilers\
 which have weird overloads for them. #90 #93 #95
* Make module search path relative to the currently running executable
* Build and work with wstring windows builds
* fix for some new line cases in the middle of a vector initialization from\
 jespada

### Changes since 5.1.0
* Add support for automatic conversion of arithmetic types when possible
  and when no ambiguous method dispatch exists.

### Changes since 5.0.0
* Fix sizing of numeric constants to match that of the C++ standard
* Add support for u,ll,l,f suffixes for numeric constants
* Siginificant improvement in error reporting

### Changes since 4.0.0
* Dropped boost in favor of C++11
* Separated out stdlib to make more options for compile time improvements

### Changes since 3.1.0
* svenstaro: Unused variables and CMake consistency fixes
* Added support for returning pointers from functions (#13)
* Compile with -pedantic (#9)
* Fix issues with multiple ChaiScript object types having the same attribute\
 name (#15)
* Prevent variable redeclaration in same scope (#22)
* mgee: Boxed_Number improvements (#27)
* Support switch statements (#34)
* Fix uint16 comparions (#26)
* Add ability to add const_var globals in Module objects (#14)
* Add support for ternary operators ?:
* Add headers to CMakeLists so they show up in IDEs
* Add ability to get vector of defined objects and vector of defined functions
* Fix memory leak in cyclical references
* Clean up static analysis issues discovered
* Fix vector construction to be consistent with map construction
* Increased unit tests to 161
* Performance enhancements

### Changes since 3.0.0
* Numeric operations performance increased approximately 10x
* Looping operations performance increased up to 2x
* Engine start up time decreased
* Several parsing bugs related to index operators fixed
* Added full support for all C algebraic types: double, long double, float,\
 int, long, char,
  uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, int32_t, int64_t
* Enhanced support for capturing of exceptions thrown from ChaiScript in C++

### Changes since 2.3.3
* Code simplifications
* Fully integrate documentation with source code in doxygen style comments
* Unit tests increased from 114 to 137
* Automatic conversion between boost::function objects and ChaiScript\
 functions 
* Many bug fixes
* Minor performance improvements
* Namespace reorganization to make end user code more accessible
* clang support
* VisualStudio 2010 Support
* Support for C++ base classes and automatic upcasting 
* Remove __ reserved identifiers
* Better code organization to reduce #ifdefs 
* clanmills: command line options for chai eval
* clanmills: parser cleanups and code reduction
* Function introspection and reflection 
* Correct function dispatch order to account for base classes and provide a\
 defined order of dispatch 
* Predictable object lifetime that emulates C++ stack lifetime
* emarcotte: pkgconfig support
* standardize on method/member naming and indentation
* 64bit Visual Studio support
* Better support for const objects
* Drastic reduction of runtime exceptions - making debug builds orders of\
 magnitude faster
* Support for platforms with no loadable module support
* Add helper macro for registering class 

\
changes-type: text/markdown;variant=GFM
url: https://chaiscript.com/index.html
doc-url: https://chaiscript.com/docs.html
src-url: https://github.com/ChaiScript/ChaiScript
package-url: https://github.com/build2-packaging/chaiscript/
package-email: packaging@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: catch2 ^2.13.0
bootstrap-build:
\
project = libchaiscript-tests

using version
using config
using test

# The samples do not need to be installed.
#
# using install

using dist

\
root-build:
\
# ChaiScript does not officially support C++20 and higher.
# Test may fail to compile when setting C++ standard to 'latest'.
#
cxx.std = 17

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# Every executable in this directory is a test.
#
exe{*}: test = true

# ChaiScript library will be imported by default.
#
import chaiscript = libchaiscript%lib{chaiscript}

# Type Definition for ChaiScript Scripts and Inclusion Files
#
define chai: file
chai{*}: extension = chai
define inc: file
inc{*}: extension = inc

\
location: chaiscript/libchaiscript-tests-6.1.0.tar.gz
sha256sum: 63341add8953c537a74743cb596421dbc93df4cf70ea6721bca819aa978ed60a
:
name: libcublas
version: 12.8.0+5
upstream-version: 12.8.3
type: lib,binless
language: c
project: nvidia-cuda-toolkit
summary: GPU-accelerated library for AI and HPC applications
license: other: CUDA Toolkit
description:
\
# libcublas - A C library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

NVIDIA cuBLAS is a GPU-accelerated library for accelerating AI and HPC\
 applications.
It includes several API extensions for providing drop-in industry standard\
 BLAS APIs
and GEMM APIs with support for fusions that are highly optimized for NVIDIA\
 GPUs.
The cuBLAS library also contains extensions for batched operations, execution\
 across
multiple GPUs, and mixed- and low-precision execution with additional tuning\
 for the
best performance.

## Usage

To start using `libcublas` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libcublas ^12.8.0
```

Then import the library in your `buildfile`:

```
import libs = libcublas%libs{cublas}
```


## Importable targets

This package provides the following importable targets:

```
libs{cublas}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/cuda/redist/redistrib_12.8\
.0.json
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: cuda-cudart ^12.0.0
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = libcublas

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-cuda-toolkit/libcublas-12.8.0+5.tar.gz
sha256sum: f0ee2ab9e621c75fd3fdefa13334eee7374b843b46aa049249fed3854ce8abf0
:
name: libcublas
version: 13.0.2+2
upstream-version: 13.1.0
type: lib,binless
language: c
project: nvidia-cuda-toolkit
summary: GPU-accelerated library for AI and HPC applications
license: other: CUDA Toolkit
description:
\
# libcublas - A C library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

NVIDIA cuBLAS is a GPU-accelerated library for accelerating AI and HPC\
 applications.
It includes several API extensions for providing drop-in industry standard\
 BLAS APIs
and GEMM APIs with support for fusions that are highly optimized for NVIDIA\
 GPUs.
The cuBLAS library also contains extensions for batched operations, execution\
 across
multiple GPUs, and mixed- and low-precision execution with additional tuning\
 for the
best performance.

## Usage

To start using `libcublas` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libcublas ^13.0.1
```

Then import the library in your `buildfile`:

```
import libs = libcublas%libs{cublas}
```


## Importable targets

This package provides the following importable targets:

```
libs{cublas}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/cuda/redist/redistrib_13.0\
.2.json
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: cuda-cudart ^13.0.0
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = libcublas

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

legal{*}: backlink = false

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-cuda-toolkit/libcublas-13.0.2+2.tar.gz
sha256sum: 0ba6079dfbc27bc3504cc15b81592c6d5b25249fead15dc6c68ffc1b6e97979c
:
name: libfineftp-server
version: 1.5.0
project: fineftp-server
summary: FineFTP is a minimal FTP server library for Windows and Unix flavors.
license: MIT
description:
\
[![Windows](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/\
build-windows.yml/badge.svg)](https://github.com/eclipse-ecal/fineftp-server/\
actions/workflows/build-windows.yml) [![Ubuntu](https://github.com/eclipse-ec\
al/fineftp-server/actions/workflows/build-ubuntu.yml/badge.svg)](https://gith\
ub.com/eclipse-ecal/fineftp-server/actions/workflows/build-ubuntu.yml)\
 [![macOS](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/b\
uild-macos.yml/badge.svg)](https://github.com/eclipse-ecal/fineftp-server/act\
ions/workflows/build-macos.yml)

# fineFTP Server

FineFTP is a minimal FTP server library for Windows and Unix flavors. The\
 project is CMake based and only depends on asio, which is integrated as git\
 submodule. No boost is required.

You can easily embed this library into your own project in order to create an\
 embedded FTP Server. It was developed and tested on Windows 10 (Visual\
 Studio 2015 and newer, MinGW) and Ubuntu 18.04 - 22.04 (gcc 7.4.0 - 11.2.0).\
 It should also run fine on macOS.

## Features

- FTP Passive mode (the only mode you need nowadays)
- Listing directories
- Uploading and downloading files
- Creating and removing files and directories
- User authentication (and anonymous user without authentication)
- Individual local home path for each user
- Access control on a per-user-basis
- UTF8 support (On Windows MSVC only)

*fineFTP does not support any kind of encryption. You should only use fineFTP\
 in trusted networks.*

## Example

Using fineFTP in your application is simple. Just create an FtpServer object,\
 add one or multiple users and start the server.

```cpp
#include <fineftp/server.h>
#include <thread>
 
int main() {
  // Create an FTP Server on port 2121. We use 2121 instead of the default\
 port
  // 21, as your application would need root privileges to open port 21.
  fineftp::FtpServer ftp_server(2121);
 
  // Add the well known anonymous user. Clients can log in using username
  // "anonymous" or "ftp" with any password. The user will be able to access
  // your C:\ drive and upload, download, create or delete files. On Linux\
 just
  // replace "C:\\" with any valid path. FineFTP is designed to be\
 cross-platform.
  ftp_server.addUserAnonymous("C:\\", fineftp::Permission::All);
  
  // Start the FTP Server with a thread-pool size of 4.
  ftp_server.start(4);
 
  // Prevent the application from exiting immediately
  for (;;) std::this_thread::sleep_for(std::chrono::milliseconds(100));
  return 0;
}
```

## How to checkout and build

There is an example project provided that will create an FTP Server at `C:\`\
 (Windows) or `/` (Unix).

1. Install cmake and git / git-for-windows

2. Checkout this repo and the asio submodule
	```console
	git clone https://github.com/eclipse-ecal/fineftp-server.git
	cd fineftp-server
	git submodule init
	git submodule update
	```

3. CMake the project *(Building as debug will add some debug output that is\
 helpful so see if everything is working)*
	```console
	mkdir _build
	cd _build
	cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=_install
	```

4. Build the project
	- Linux: `make`
	- Windows: Open `_build\fineftp.sln` with Visual Studio and build the\
 example project

5. Start `fineftp_example` / `fineftp_example.exe` and connect with your\
 favorite FTP Client (e.g. FileZilla) on port 2121 *(This port is used so you\
 don't need root privileges to start the FTP server)*

## CMake Options

You can set the following CMake Options to control how fineFTP Server is\
 built:

**Option**                       | **Type** | **Default** | **Explanation**  \
                                                                             \
                  |
|--------------------------------|----------|-------------|------------------\
-----------------------------------------------------------------------------\
------------------|
| `FINEFTP_SERVER_BUILD_SAMPLES` | `BOOL` | `ON` | Build the fineFTP Server\
 sample project.                                                             \
            |
| `FINEFTP_SERVER_BUILD_TESTS` | `BOOL` | `OFF` | Build the the\
 fineftp-server tests. Requires C++17. For executing the tests, `curl` must\
 be available from the `PATH`. |
| `FINEFTP_SERVER_USE_BUILTIN_ASIO`| `BOOL`| `ON` | Use the builtin asio\
 submodule. If set to `OFF`, asio must be available from somewhere else (e.g.\
 system libs). |
| `FINEFTP_SERVER_USE_BUILTIN_GTEST`| `BOOL`| `ON` <br>_(when building\
 tests)_ | Use the builtin GoogleTest submodule. Only needed if\
 `FINEFTP_SERVER_BUILD_TESTS` is `ON`. If set to `OFF`, GoogleTest must be\
 available from somewhere else (e.g. system libs). |
| `BUILD_SHARED_LIBS` | `BOOL` |             | Not a fineFTP Server option,\
 but use this to control whether you want to have a static or shared library.\
               |

## How to integrate in your project

### Option 1: Integrate as binaries

1. Download the latest release from the releases page or compile the binaries\
 yourself.

2. Add the fineFTP Server directory to your `CMAKE_PREFIX_PATH`:

    ```shell
    cmake your_command_line -DCMAKE_PREFIX_PATH=path/to/fineftp/install/dir
    ```

### Option 2: Integrate as source

1. Make the fineFTP Server directory available in your project. You can\
 either add it as a git submodule, or use CMake FetchContent to download it.

2. Add it to your CMake Project:

    - **Either** by adding the top-level CMakeLists.txt to your project

        ```cmake
        add_subdirectory(path/to/fineftp-server)
        ```

        This which will inherit some behavior:

        - You can use the CMake options described below
        - You will get the asio version shipped with fineFTP
        - The debug / minsize / relwithdebinfo postfix will be set\
 automatically


    - **Or** if you want to get a very clean version, which doesn't set any\
 unnecessary options, include the `fineftp-server/server` subdirectory:

        ```cmake
        add_subdirectory(path/to/fineftp-server/server)
        ```

      You have to provide the required asio target on your own.

### Link against fineFTP Server

```cmake
find_package(fineftp REQUIRED)
target_link_libraries(your_target PRIVATE fineftp::server)
```

## Contribute

Awesome, you want to contribute to FineFTP? Here is how you can do that!

- Leave us a star ⭐️ (That's GitHub money!)
- Create an issue and write about a feature you would like or a bug you have\
 found (maybe we will find some spare time to implement it 😉)
- Fork this repository, implement the feature yourself and create a pull\
 request

\
description-type: text/markdown;variant=GFM
package-description:
\
# fineFTP Server

This project builds and defines the build2 package for the [fineFTP\
 Server](https://github.com/eclipse-ecal/fineftp-server) library.

The packaging code is licensed under the MIT License, the upstream artifacts\
 are licensed under the terms and conditions of fineFTP Server.

## Usage

You can simply add this package as dependency to your project by specifying\
 it in your `manifest`:

```
depends: libfineftp-server ^1.3.4
```

Then just pick the targets that you need:

```
import libs  = libfineftp-server%lib{fineftp-server}
```

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/eclipse-ecal/fineftp-server
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: libasio ^1.28.0
bootstrap-build:
\
project = libfineftp-server

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: fineftp-server/libfineftp-server-1.5.0.tar.gz
sha256sum: 24d891d9048f3f6edc55555b1b40f841cf8e0c96cc16b9ba16159584dd0a1b78
:
name: libfineftp-server
version: 1.5.1
project: fineftp-server
summary: FineFTP is a minimal FTP server library for Windows and Unix flavors.
license: MIT
description:
\
[![Windows](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/\
build-windows.yml/badge.svg)](https://github.com/eclipse-ecal/fineftp-server/\
actions/workflows/build-windows.yml) [![Ubuntu](https://github.com/eclipse-ec\
al/fineftp-server/actions/workflows/build-ubuntu.yml/badge.svg)](https://gith\
ub.com/eclipse-ecal/fineftp-server/actions/workflows/build-ubuntu.yml)\
 [![macOS](https://github.com/eclipse-ecal/fineftp-server/actions/workflows/b\
uild-macos.yml/badge.svg)](https://github.com/eclipse-ecal/fineftp-server/act\
ions/workflows/build-macos.yml)

# fineFTP Server

FineFTP is a minimal FTP server library for Windows and Unix flavors. The\
 project is CMake based and only depends on asio, which is integrated as git\
 submodule. No boost is required.

You can easily embed this library into your own project in order to create an\
 embedded FTP Server. It was developed and tested on Windows 10 (Visual\
 Studio 2015 and newer, MinGW) and Ubuntu 18.04 - 22.04 (gcc 7.4.0 - 11.2.0).\
 It should also run fine on macOS.

## Features

- FTP Passive mode (the only mode you need nowadays)
- Listing directories
- Uploading and downloading files
- Creating and removing files and directories
- User authentication (and anonymous user without authentication)
- Individual local home path for each user
- Access control on a per-user-basis
- UTF8 support (On Windows MSVC only)

*fineFTP does not support any kind of encryption. You should only use fineFTP\
 in trusted networks.*

## Example

Using fineFTP in your application is simple. Just create an FtpServer object,\
 add one or multiple users and start the server.

```cpp
#include <fineftp/server.h>
#include <thread>
 
int main() {
  // Create an FTP Server on port 2121. We use 2121 instead of the default\
 port
  // 21, as your application would need root privileges to open port 21.
  fineftp::FtpServer ftp_server(2121);
 
  // Add the well known anonymous user. Clients can log in using username
  // "anonymous" or "ftp" with any password. The user will be able to access
  // your C:\ drive and upload, download, create or delete files. On Linux\
 just
  // replace "C:\\" with any valid path. FineFTP is designed to be\
 cross-platform.
  ftp_server.addUserAnonymous("C:\\", fineftp::Permission::All);
  
  // Start the FTP Server with a thread-pool size of 4.
  ftp_server.start(4);
 
  // Prevent the application from exiting immediately
  for (;;) std::this_thread::sleep_for(std::chrono::milliseconds(100));
  return 0;
}
```

## How to checkout and build

There is an example project provided that will create an FTP Server at `C:\`\
 (Windows) or `/` (Unix).

1. Install cmake and git / git-for-windows

2. Checkout this repo and the asio submodule
	```console
	git clone https://github.com/eclipse-ecal/fineftp-server.git
	cd fineftp-server
	git submodule init
	git submodule update
	```

3. CMake the project *(Building as debug will add some debug output that is\
 helpful so see if everything is working)*
	```console
	mkdir _build
	cd _build
	cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=_install
	```

4. Build the project
	- Linux: `make`
	- Windows: Open `_build\fineftp.sln` with Visual Studio and build the\
 example project

5. Start `fineftp_example` / `fineftp_example.exe` and connect with your\
 favorite FTP Client (e.g. FileZilla) on port 2121 *(This port is used so you\
 don't need root privileges to start the FTP server)*

## CMake Options

You can set the following CMake Options to control how fineFTP Server is\
 built:

**Option**                       | **Type** | **Default** | **Explanation**  \
                                                                             \
                  |
|--------------------------------|----------|-------------|------------------\
-----------------------------------------------------------------------------\
------------------|
| `FINEFTP_SERVER_BUILD_SAMPLES` | `BOOL` | `ON` | Build the fineFTP Server\
 sample project.                                                             \
            |
| `FINEFTP_SERVER_BUILD_TESTS` | `BOOL` | `OFF` | Build the the\
 fineftp-server tests. Requires C++17. For executing the tests, `curl` must\
 be available from the `PATH`. |
| `FINEFTP_SERVER_USE_BUILTIN_ASIO`| `BOOL`| `ON` | Use the builtin asio\
 submodule. If set to `OFF`, asio must be available from somewhere else (e.g.\
 system libs). |
| `FINEFTP_SERVER_USE_BUILTIN_GTEST`| `BOOL`| `ON` <br>_(when building\
 tests)_ | Use the builtin GoogleTest submodule. Only needed if\
 `FINEFTP_SERVER_BUILD_TESTS` is `ON`. If set to `OFF`, GoogleTest must be\
 available from somewhere else (e.g. system libs). |
| `BUILD_SHARED_LIBS` | `BOOL` |             | Not a fineFTP Server option,\
 but use this to control whether you want to have a static or shared library.\
               |

## How to integrate in your project

### Option 1: Integrate as binaries

1. Download the latest release from the releases page or compile the binaries\
 yourself.

2. Add the fineFTP Server directory to your `CMAKE_PREFIX_PATH`:

    ```shell
    cmake your_command_line -DCMAKE_PREFIX_PATH=path/to/fineftp/install/dir
    ```

### Option 2: Integrate as source

1. Make the fineFTP Server directory available in your project. You can\
 either add it as a git submodule, or use CMake FetchContent to download it.

2. Add it to your CMake Project:

    - **Either** by adding the top-level CMakeLists.txt to your project

        ```cmake
        add_subdirectory(path/to/fineftp-server)
        ```

        This which will inherit some behavior:

        - You can use the CMake options described below
        - You will get the asio version shipped with fineFTP
        - The debug / minsize / relwithdebinfo postfix will be set\
 automatically


    - **Or** if you want to get a very clean version, which doesn't set any\
 unnecessary options, include the `fineftp-server/server` subdirectory:

        ```cmake
        add_subdirectory(path/to/fineftp-server/server)
        ```

      You have to provide the required asio target on your own.

### Link against fineFTP Server

```cmake
find_package(fineftp REQUIRED)
target_link_libraries(your_target PRIVATE fineftp::server)
```

## Contribute

Awesome, you want to contribute to FineFTP? Here is how you can do that!

- Leave us a star ⭐️ (That's GitHub money!)
- Create an issue and write about a feature you would like or a bug you have\
 found (maybe we will find some spare time to implement it 😉)
- Fork this repository, implement the feature yourself and create a pull\
 request

\
description-type: text/markdown;variant=GFM
package-description:
\
# fineFTP Server

This project builds and defines the build2 package for the [fineFTP\
 Server](https://github.com/eclipse-ecal/fineftp-server) library.

The packaging code is licensed under the MIT License, the upstream artifacts\
 are licensed under the terms and conditions of fineFTP Server.

## Usage

You can simply add this package as dependency to your project by specifying\
 it in your `manifest`:

```
depends: libfineftp-server ^1.3.4
```

Then just pick the targets that you need:

```
import libs  = libfineftp-server%lib{fineftp-server}
```

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/eclipse-ecal/fineftp-server
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: libasio ^1.28.0
bootstrap-build:
\
project = libfineftp-server

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: fineftp-server/libfineftp-server-1.5.1.tar.gz
sha256sum: 0a419f8dfced6bcc4efad594d1bf295250862e9f3d792cf6ba901350f8a86304
:
name: libftxui
version: 6.1.9
project: FTXUI
summary: Functional Terminal (X) User interface - A simple C++ library for\
 terminal based user interfaces!
license: MIT
topics: C++
description:
\
<p align="center">
  <img src="https://github.com/ArthurSonzogni/FTXUI/assets/4759106/6925b6da-0\
a7e-49d9-883c-c890e1f36007" alt="Demo image"></img>
  <br/>
  <a href="#"><img src="https://img.shields.io/badge/c++-%2300599C.svg?style=\
flat&logo=c%2B%2B&logoColor=white"></img></a>
  <a href="http://opensource.org/licenses/MIT"><img src="https://img.shields.\
io/github/license/arthursonzogni/FTXUI?color=black"></img></a>
  <a href="#"><img src="https://img.shields.io/github/stars/ArthurSonzogni/FT\
XUI"></img></a>
  <a href="#"><img src="https://img.shields.io/github/forks/ArthurSonzogni/FT\
XUI"></img></a>
  <a href="#"><img src="https://img.shields.io/github/repo-size/ArthurSonzogn\
i/FTXUI"></img></a>
  <a href="https://github.com/ArthurSonzogni/FTXUI/graphs/contributors"><img\
 src="https://img.shields.io/github/contributors/arthursonzogni/FTXUI?color=b\
lue"></img></a>
  <br/>
  <a href="https://github.com/ArthurSonzogni/FTXUI/issues"><img\
 src="https://img.shields.io/github/issues/ArthurSonzogni/FTXUI"></img></a>
  <a href="https://repology.org/project/ftxui/versions"><img\
 src="https://repology.org/badge/latest-versions/ftxui.svg" alt="latest\
 packaged version(s)"></a>
  <a href="https://codecov.io/gh/ArthurSonzogni/FTXUI">
    <img src="https://codecov.io/gh/ArthurSonzogni/FTXUI/branch/master/graph/\
badge.svg?token=C41FdRpNVA"/>
  </a>

  
  <br/>
  <a href="https://arthursonzogni.github.io/FTXUI/">Documentation</a> ·
  <a href="https://github.com/ArthurSonzogni/FTXUI/issues">Report a Bug</a> ·
  <a href="https://arthursonzogni.github.io/FTXUI/examples.html">Examples</a>\
 .
  <a href="https://github.com/ArthurSonzogni/FTXUI/issues">Request\
 Feature</a> ·
  <a href="https://github.com/ArthurSonzogni/FTXUI/pulls">Send a Pull\
 Request</a>

</p>

# FTXUI

<i>Functional Terminal (X) User interface</i>

A simple cross-platform C++ library for terminal based user interfaces!

## Feature
 * Functional style. Inspired by
   [1](https://hackernoon.com/building-reactive-terminal-interfaces-in-c-d392\
ce34e649?gi=d9fb9ce35901)
   and [React](https://reactjs.org/)
 * Simple and elegant syntax (in my opinion)
 * Keyboard & mouse navigation.
 * Support for [UTF8](https://en.wikipedia.org/wiki/UTF-8) and [fullwidth\
 chars](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) (→\
 测试)
 * Support for animations. [Demo 1](https://arthursonzogni.github.io/FTXUI/ex\
amples/?file=component/menu_underline_animated_gallery), [Demo\
 2](https://arthursonzogni.github.io/FTXUI/examples/?file=component/button_st\
yle)
 * Support for drawing. [Demo](https://arthursonzogni.github.io/FTXUI/example\
s/?file=component/canvas_animated)
 * No dependencies
 * **Cross platform**: Linux/MacOS (main target), WebAssembly, Windows\
 (Thanks to contributors!).
 * Learn by [examples](#documentation), and [tutorials](#documentation)
 * Multiple packages: CMake [FetchContent]([https://bewagner.net/programming/\
2020/05/02/cmake-fetchcontent/](https://cmake.org/cmake/help/latest/module/Fe\
tchContent.html)) (preferred),Bazel, vcpkg, pkgbuild, conan.
 * Good practices: documentation, tests, fuzzers, performance tests,\
 automated CI, automated packaging, etc...

## Documentation

- [Starter example project](https://github.com/ArthurSonzogni/ftxui-starter)
- [Documentation](https://arthursonzogni.github.io/FTXUI/)
- [Examples (WebAssembly)](https://arthursonzogni.github.io/FTXUI/examples/)
- [Build using CMake](https://arthursonzogni.github.io/FTXUI/#build-cmake)

## Example
~~~cpp
    vbox({
      hbox({
        text("one") | border,
        text("two") | border | flex,
        text("three") | border | flex,
      }),

      gauge(0.25) | color(Color::Red),
      gauge(0.50) | color(Color::White),
      gauge(0.75) | color(Color::Blue),
    });
~~~

![image](https://github.com/ArthurSonzogni/FTXUI/assets/4759106/569bf043-4e85\
-4245-aad5-2324572135c4)

## Short gallery

#### DOM

This module defines a hierarchical set of Element. An Element manages layout\
 and can be responsive to the terminal dimensions.

They are declared in [<ftxui/dom/elements.hpp>](https://arthursonzogni.github\
.io/FTXUI/elements_8hpp_source.html
)
  
<details><summary>Layout</summary>

Element can be arranged together:
  - horizontally with `hbox`
  - vertically with `vbox`
  - inside a grid with `gridbox`
  - wrap along one direction using the `flexbox`.
  
Element can become flexible using the the `flex` decorator.
  
[Example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2vbox_hbox_8cp\
p-example.html) using `hbox`, `vbox` and `filler`.

![image](https://user-images.githubusercontent.com/4759106/147242524-7103b5d9\
-1a92-4e2d-ac70-b3d6740061e3.png)
  
  
[Example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2gridbox_8cpp-\
example.html) using gridbox:

![image](https://user-images.githubusercontent.com/4759106/147242972-0db1f2e9\
-0790-496f-86e6-ed2c604f7a73.png)

[Example](https://github.com/ArthurSonzogni/FTXUI/blob/master/examples/dom/hf\
low.cpp) using flexbox:

![image](https://user-images.githubusercontent.com/4759106/147243064-780ac7cc\
-605b-475f-94b8-cf7c4aed03a5.png)

[See](https://arthursonzogni.github.io/FTXUI/examples_2dom_2hflow_8cpp-exampl\
e.html) also this [demo](https://arthursonzogni.github.io/FTXUI/examples/?fil\
e=component/flexbox).

</details>

<details><summary>Style</summary>

An element can be decorated using the functions:
  - `bold`
  - `italic`
  - `dim`
  - `inverted`
  - `underlined`
  - `underlinedDouble`
  - `blink`
  - `strikethrough`
  - `color`
  - `bgcolor`
  - `hyperlink`

[Example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2style_gallery\
_8cpp-example.html)

![image](https://user-images.githubusercontent.com/4759106/147244118-380bf834\
-9e33-40df-9ff0-07c10f2598ef.png)
  
FTXUI supports the pipe operator. It means: `decorator1(decorator2(element))`\
 and `element | decorator1 | decorator2` can be used.
  
</details>

<details><summary>Colors</summary>

FTXUI support every color palette:

Color [gallery](https://arthursonzogni.github.io/FTXUI/examples_2dom_2color_g\
allery_8cpp-example.html):
![image](https://user-images.githubusercontent.com/4759106/147248595-04c7245a\
-5b85-4544-809d-a5984fc6f9e7.png)

</details>
  
<details><summary>Border and separator</summary>

Use decorator border and element separator() to subdivide your UI:
  
```cpp
auto document = vbox({
    text("top"),
    separator(),
    text("bottom"),
}) | border;

```

[Demo](https://arthursonzogni.github.io/FTXUI/examples_2dom_2separator_8cpp-e\
xample.html):
  
![image](https://user-images.githubusercontent.com/4759106/147244514-4135f24b\
-fb8e-4067-8896-bc53545583f7.png)
  
</details>

<details><summary>Text and paragraph</summary>

A simple piece of text is represented using `text("content")`.

To support text wrapping following spaces the following functions are\
 provided:
```cpp
Element paragraph(std::string text);
Element paragraphAlignLeft(std::string text);
Element paragraphAlignRight(std::string text);
Element paragraphAlignCenter(std::string text);
Element paragraphAlignJustify(std::string text);
```
  
[Paragraph example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2par\
agraph_8cpp-example.html)
  
![ezgif com-gif-maker (4)](https://user-images.githubusercontent.com/4759106/\
147251370-983a06e7-6f41-4113-92b8-942f43d34d06.gif)

</details>

<details><summary>Table</summary>

A class to easily style a table of data.

[Example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2table_8cpp-ex\
ample.html):
  
![image](https://user-images.githubusercontent.com/4759106/147250766-77d8ec9e\
-cf2b-486d-9866-1fd9f1bd2e6b.png)

</details>

<details><summary>Canvas</summary>

Drawing can be made on a Canvas, using braille, block, or simple characters:
  
Simple [example](https://github.com/ArthurSonzogni/FTXUI/blob/master/examples\
/dom/canvas.cpp):
  
![image](https://user-images.githubusercontent.com/4759106/147245843-76cc62fb\
-ccb4-421b-aacf-939f9afb42fe.png)

Complex [examples](https://github.com/ArthurSonzogni/FTXUI/blob/master/exampl\
es/component/canvas_animated.cpp):
  
![ezgif com-gif-maker (3)](https://user-images.githubusercontent.com/4759106/\
147250538-783a8246-98e0-4a25-b032-3bd3710549d1.gif)  
</details>

#### Component

ftxui/component produces dynamic UI, reactive to the user's input. It defines\
 a set of ftxui::Component. A component reacts to Events (keyboard, mouse,\
 resize, ...) and Renders as an Element (see previous section).

Prebuilt components are declared in [<ftxui/component/component.hpp>](https:/\
/arthursonzogni.github.io/FTXUI/component_8hpp_source.html)

<details><summary>Gallery</summary>

[Gallery](https://arthursonzogni.github.io/FTXUI/examples_2component_2gallery\
_8cpp-example.html) of multiple components. ([demo](https://arthursonzogni.gi\
thub.io/FTXUI/examples/?file=component/gallery))

![image](https://user-images.githubusercontent.com/4759106/147247330-b60beb9f\
-e665-48b4-81c0-4b01ee95bc66.png)

</details>

<details><summary>Radiobox</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2radiobo\
x_8cpp-example.html):
  
![image](https://user-images.githubusercontent.com/4759106/147246401-809d14a5\
-6621-4e36-8dd9-a2d75ef2a94e.png)

</details>

<details><summary>Checkbox</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2checkbo\
x_8cpp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147246646-b86926a9\
-1ef9-4efb-af98-48a9b62acd81.png)

</details>

<details><summary>Input</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2input_8\
cpp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147247671-f1d6f606\
-1845-4e94-a4a0-d4273e9ae6bd.png)

</details>

<details><summary>Toggle</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2toggle_\
8cpp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147249383-e2201cf1\
-b7b8-4a5a-916f-d761e3e7ae40.png)

</details>


<details><summary>Slider</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2slider_\
8cpp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147249265-7e2cad75\
-082c-436e-affe-44a550c480ab.png)

</details>


<details><summary>Menu</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2menu_8c\
pp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147247822-0035fd6f\
-bb13-4b3a-b057-77eb9291582f.png)

</details>


<details><summary>ResizableSplit</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2resizab\
le_split_8cpp-example.html):

![ezgif com-gif-maker](https://user-images.githubusercontent.com/4759106/1472\
48372-c55512fe-9b96-4b08-a1df-d05cf2cae431.gif)  
</details>


<details><summary>Dropdown</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2dropdow\
n_8cpp-example.html):

![youtube-video-gif (3)](https://user-images.githubusercontent.com/4759106/14\
7246982-1e821751-531c-4e1f-bc37-2fa290e143cd.gif)

</details>

<details><summary>Tab</summary>

[Vertical](https://arthursonzogni.github.io/FTXUI/examples_2component_2tab_ve\
rtical_8cpp-example.html):
  
![ezgif com-gif-maker (1)](https://user-images.githubusercontent.com/4759106/\
147250144-22ff044a-4773-4ff7-a49c-12ba4034acb4.gif)

[Horizontal](https://arthursonzogni.github.io/FTXUI/examples_2component_2tab_\
horizontal_8cpp-example.html):
  
  ![ezgif com-gif-maker (2)](https://user-images.githubusercontent.com/475910\
6/147250217-fe447e0f-7a99-4e08-948a-995087d9b40e.gif)

  

</details>

## Libraries for FTXUI
- *Want to share a useful Component for FTXUI? Feel free to add yours here*
- [ftxui-grid-container](https://github.com/mingsheng13/grid-container-ftxui)
- [ftxui-ip-input](https://github.com/mingsheng13/ip-input-ftxui)
- [ftxui-image-view](https://github.com/ljrrjl/ftxui-image-view.git): For\
 Image Display.


## Project using FTXUI

Feel free to add your projects here:
- [json-tui](https://github.com/ArthurSonzogni/json-tui)
- [git-tui](https://github.com/ArthurSonzogni/git-tui)
- [ostree-tui](https://github.com/AP-Sensing/ostree-tui)
- [rgb-tui](https://github.com/ArthurSonzogni/rgb-tui)
- [chrome-log-beautifier](https://github.com/ArthurSonzogni/chrome-log-beauti\
fier)
- [x86-64 CPU Architecture Simulation](https://github.com/AnisBdz/CPU)
- [ltuiny](https://github.com/adrianoviana87/ltuiny)
- [i3-termdialogs](https://github.com/mibli/i3-termdialogs)
- [simpPRU](https://github.com/VedantParanjape/simpPRU)
- [Pigeon ROS TUI](https://github.com/PigeonSensei/Pigeon_ros_tui)
- [hastur](https://github.com/robinlinden/hastur)
- [CryptoCalculator](https://github.com/brevis/CryptoCalculator)
- [todoman](https://github.com/aaleino/todoman)
- [TimeAccumulator](https://github.com/asari555/TimeAccumulator)
- [vantage](https://github.com/gokulmaxi/vantage)
- [tabdeeli](https://github.com/typon/tabdeeli)
- [tiles](https://github.com/tusharpm/tiles)
- [cachyos-cli-installer](https://github.com/cachyos/new-cli-installer)
- [beagle-config](https://github.com/SAtacker/beagle-config)
- [turing_cmd](https://github.com/DanArmor/turing_cmd)
- [StartUp](https://github.com/StubbornVegeta/StartUp)
- [eCAL monitor](https://github.com/eclipse-ecal/ecal)
- [Path Finder](https://github.com/Ruebled/Path_Finder)
- [rw-tui](https://github.com/LeeKyuHyuk/rw-tui)
- [resource-monitor](https://github.com/catalincd/resource-monitor)
- [ftxuiFileReader](https://github.com/J0sephDavis/ftxuiFileReader)
- [ftxui_CPUMeter](https://github.com/tzzzzzzzx/ftxui_CPUMeter)
- [Captain's log](https://github.com/nikoladucak/caps-log)
- [FTowerX](https://github.com/MhmRhm/FTowerX)
- [Caravan](https://github.com/r3w0p/caravan)
- [Step-Writer](https://github.com/BrianAnakPintar/step-writer)
- [XJ music](https://github.com/xjmusic/xjmusic)
- [UDP chat](https://github.com/Sergeydigl3/udp-chat-tui)
- [2048-cpp](https://github.com/Chessom/2048-cpp)
- [Memory game](https://github.com/mikolajlubiak/memory)
- [Terminal Animation](https://github.com/mikolajlubiak/terminal_animation)
- [pciex](https://github.com/s0nx/pciex)
- [Fallout terminal hacking](https://github.com/gshigin/yet-another-fallout-t\
erminal-hacking-game)
- [Lazylist](https://github.com/zhuyongqi9/lazylist)
- [TUISIC](https://github.com/Dark-Kernel/tuisic)
- [inLimbo](https://github.com/nots1dd/inLimbo)
- [BestEdrOfTheMarket](https://github.com/Xacone/BestEdrOfTheMarket)
- [terminal-rain](https://github.com/Oakamoore/terminal-rain)
- [keywords](https://github.com/Oakamoore/keywords) ([Play web version\
 :heart:](https://oakamoore.itch.io/keywords))
- [FTB - tertminal file browser](https://github.com/Cyxuan0311/FTB)
- [SHOOT!](https://github.com/ShingZhanho/ENGG1340-Project-25Spring)

### [cpp-best-practices/game_jam](https://github.com/cpp-best-practices/game_\
jam)

Several games using the FTXUI have been made during the Game Jam:
- [TermBreaker](https://github.com/ArthurSonzogni/termBreaker) [**[Play web\
 version]**](https://arthursonzogni.com/TermBreaker/)
- [Minesweeper Marathon](https://github.com/cpp-best-practices/game_jam/blob/\
main/Jam1_April_2022/minesweeper_marathon.md) [**[Play web\
 version]**](https://barlasgarden.com/minesweeper/index.html)
- [Grand Rounds](https://github.com/cpp-best-practices/game_jam/blob/main/Jam\
1_April_2022/grandrounds.md)
- [LightsRound](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1\
_April_2022/LightsRound.v.0.1.0.md)
- [DanteO](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_Apri\
l_2022/danteo.md)
- [Sumo](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_April_\
2022/sumo.md)
- [Drag Me aROUND](https://github.com/cpp-best-practices/game_jam/blob/main/J\
am1_April_2022/drag_me_around.md)
- [DisarmSelfDestruct](https://github.com/cpp-best-practices/game_jam/blob/ma\
in/Jam1_April_2022/DisarmSelfDestruct.md)
- [TheWorld](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_Ap\
ril_2022/TheWorld.md)
- [smoothlife](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_\
April_2022/smoothlife.md)
- [Consu](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_April\
_2022/consu.md)

## Utilization

It is **highly** recommended to use CMake FetchContent to depend on FTXUI so\
 you may specify which commit you would like to depend on.
```cmake
include(FetchContent)

FetchContent_Declare(ftxui
  GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
  GIT_TAG v6.1.9
)

FetchContent_GetProperties(ftxui)
if(NOT ftxui_POPULATED)
  FetchContent_Populate(ftxui)
  add_subdirectory(${ftxui_SOURCE_DIR} ${ftxui_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
```

If you don't, FTXUI may be used from the following packages:
- [bazel](...)
- [vcpkg](https://vcpkgx.com/details.html?package=ftxui)
- [Arch Linux PKGBUILD](https://aur.archlinux.org/packages/ftxui-git/).
- [conan.io](https://conan.io/center/ftxui)
- [openSUSE](https://build.opensuse.org/package/show/devel:libraries:c_c++/ft\
xui)
- 
[![Packaging status](https://repology.org/badge/vertical-allrepos/libftxui.sv\
g)](https://repology.org/project/libftxui/versions)

If you choose to build and link FTXUI yourself, `ftxui-component` must be\
 first in the linking order relative to the other FTXUI libraries, i.e.
```bash
g++ . . . -lftxui-component -lftxui-dom -lftxui-screen . . .
```

## Contributors

<a href="https://github.com/ArthurSonzogni/FTXUI/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=ArthurSonzogni/FTXUI" />
</a>

\
description-type: text/markdown;variant=GFM
url: https://arthursonzogni.github.io/FTXUI/
doc-url: https://arthursonzogni.github.io/FTXUI/
src-url: https://github.com/ArthurSonzogni/FTXUI
package-url: https://github.com/build2-packaging/FTXUI
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.15.0
depends: * bpkg >= 0.15.0
tests: libftxui-tests == 6.1.9
examples: libftxui-examples == 6.1.9
builds: default
bootstrap-build:
\
project = libftxui

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
test.target = $cxx.target

config [bool] config.libftxui.use_ms_terminal_fallback ?= true

# This library officially only support static builds,
# but we will prevent them only on Windows.
if($cxx.target.class == 'windows')
{
    bin.lib = static
}

\
location: FTXUI/libftxui-6.1.9.tar.gz
sha256sum: dac73616f57d39eda870c7d4f8c333883654477f9c69e1161469afee2ef96004
:
name: libftxui-examples
version: 6.1.9
project: FTXUI
summary: Examples for the FTXUI library.
license: MIT
topics: C++
description:
\
<p align="center">
  <img src="https://github.com/ArthurSonzogni/FTXUI/assets/4759106/6925b6da-0\
a7e-49d9-883c-c890e1f36007" alt="Demo image"></img>
  <br/>
  <a href="#"><img src="https://img.shields.io/badge/c++-%2300599C.svg?style=\
flat&logo=c%2B%2B&logoColor=white"></img></a>
  <a href="http://opensource.org/licenses/MIT"><img src="https://img.shields.\
io/github/license/arthursonzogni/FTXUI?color=black"></img></a>
  <a href="#"><img src="https://img.shields.io/github/stars/ArthurSonzogni/FT\
XUI"></img></a>
  <a href="#"><img src="https://img.shields.io/github/forks/ArthurSonzogni/FT\
XUI"></img></a>
  <a href="#"><img src="https://img.shields.io/github/repo-size/ArthurSonzogn\
i/FTXUI"></img></a>
  <a href="https://github.com/ArthurSonzogni/FTXUI/graphs/contributors"><img\
 src="https://img.shields.io/github/contributors/arthursonzogni/FTXUI?color=b\
lue"></img></a>
  <br/>
  <a href="https://github.com/ArthurSonzogni/FTXUI/issues"><img\
 src="https://img.shields.io/github/issues/ArthurSonzogni/FTXUI"></img></a>
  <a href="https://repology.org/project/ftxui/versions"><img\
 src="https://repology.org/badge/latest-versions/ftxui.svg" alt="latest\
 packaged version(s)"></a>
  <a href="https://codecov.io/gh/ArthurSonzogni/FTXUI">
    <img src="https://codecov.io/gh/ArthurSonzogni/FTXUI/branch/master/graph/\
badge.svg?token=C41FdRpNVA"/>
  </a>

  
  <br/>
  <a href="https://arthursonzogni.github.io/FTXUI/">Documentation</a> ·
  <a href="https://github.com/ArthurSonzogni/FTXUI/issues">Report a Bug</a> ·
  <a href="https://arthursonzogni.github.io/FTXUI/examples.html">Examples</a>\
 .
  <a href="https://github.com/ArthurSonzogni/FTXUI/issues">Request\
 Feature</a> ·
  <a href="https://github.com/ArthurSonzogni/FTXUI/pulls">Send a Pull\
 Request</a>

</p>

# FTXUI

<i>Functional Terminal (X) User interface</i>

A simple cross-platform C++ library for terminal based user interfaces!

## Feature
 * Functional style. Inspired by
   [1](https://hackernoon.com/building-reactive-terminal-interfaces-in-c-d392\
ce34e649?gi=d9fb9ce35901)
   and [React](https://reactjs.org/)
 * Simple and elegant syntax (in my opinion)
 * Keyboard & mouse navigation.
 * Support for [UTF8](https://en.wikipedia.org/wiki/UTF-8) and [fullwidth\
 chars](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) (→\
 测试)
 * Support for animations. [Demo 1](https://arthursonzogni.github.io/FTXUI/ex\
amples/?file=component/menu_underline_animated_gallery), [Demo\
 2](https://arthursonzogni.github.io/FTXUI/examples/?file=component/button_st\
yle)
 * Support for drawing. [Demo](https://arthursonzogni.github.io/FTXUI/example\
s/?file=component/canvas_animated)
 * No dependencies
 * **Cross platform**: Linux/MacOS (main target), WebAssembly, Windows\
 (Thanks to contributors!).
 * Learn by [examples](#documentation), and [tutorials](#documentation)
 * Multiple packages: CMake [FetchContent]([https://bewagner.net/programming/\
2020/05/02/cmake-fetchcontent/](https://cmake.org/cmake/help/latest/module/Fe\
tchContent.html)) (preferred),Bazel, vcpkg, pkgbuild, conan.
 * Good practices: documentation, tests, fuzzers, performance tests,\
 automated CI, automated packaging, etc...

## Documentation

- [Starter example project](https://github.com/ArthurSonzogni/ftxui-starter)
- [Documentation](https://arthursonzogni.github.io/FTXUI/)
- [Examples (WebAssembly)](https://arthursonzogni.github.io/FTXUI/examples/)
- [Build using CMake](https://arthursonzogni.github.io/FTXUI/#build-cmake)

## Example
~~~cpp
    vbox({
      hbox({
        text("one") | border,
        text("two") | border | flex,
        text("three") | border | flex,
      }),

      gauge(0.25) | color(Color::Red),
      gauge(0.50) | color(Color::White),
      gauge(0.75) | color(Color::Blue),
    });
~~~

![image](https://github.com/ArthurSonzogni/FTXUI/assets/4759106/569bf043-4e85\
-4245-aad5-2324572135c4)

## Short gallery

#### DOM

This module defines a hierarchical set of Element. An Element manages layout\
 and can be responsive to the terminal dimensions.

They are declared in [<ftxui/dom/elements.hpp>](https://arthursonzogni.github\
.io/FTXUI/elements_8hpp_source.html
)
  
<details><summary>Layout</summary>

Element can be arranged together:
  - horizontally with `hbox`
  - vertically with `vbox`
  - inside a grid with `gridbox`
  - wrap along one direction using the `flexbox`.
  
Element can become flexible using the the `flex` decorator.
  
[Example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2vbox_hbox_8cp\
p-example.html) using `hbox`, `vbox` and `filler`.

![image](https://user-images.githubusercontent.com/4759106/147242524-7103b5d9\
-1a92-4e2d-ac70-b3d6740061e3.png)
  
  
[Example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2gridbox_8cpp-\
example.html) using gridbox:

![image](https://user-images.githubusercontent.com/4759106/147242972-0db1f2e9\
-0790-496f-86e6-ed2c604f7a73.png)

[Example](https://github.com/ArthurSonzogni/FTXUI/blob/master/examples/dom/hf\
low.cpp) using flexbox:

![image](https://user-images.githubusercontent.com/4759106/147243064-780ac7cc\
-605b-475f-94b8-cf7c4aed03a5.png)

[See](https://arthursonzogni.github.io/FTXUI/examples_2dom_2hflow_8cpp-exampl\
e.html) also this [demo](https://arthursonzogni.github.io/FTXUI/examples/?fil\
e=component/flexbox).

</details>

<details><summary>Style</summary>

An element can be decorated using the functions:
  - `bold`
  - `italic`
  - `dim`
  - `inverted`
  - `underlined`
  - `underlinedDouble`
  - `blink`
  - `strikethrough`
  - `color`
  - `bgcolor`
  - `hyperlink`

[Example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2style_gallery\
_8cpp-example.html)

![image](https://user-images.githubusercontent.com/4759106/147244118-380bf834\
-9e33-40df-9ff0-07c10f2598ef.png)
  
FTXUI supports the pipe operator. It means: `decorator1(decorator2(element))`\
 and `element | decorator1 | decorator2` can be used.
  
</details>

<details><summary>Colors</summary>

FTXUI support every color palette:

Color [gallery](https://arthursonzogni.github.io/FTXUI/examples_2dom_2color_g\
allery_8cpp-example.html):
![image](https://user-images.githubusercontent.com/4759106/147248595-04c7245a\
-5b85-4544-809d-a5984fc6f9e7.png)

</details>
  
<details><summary>Border and separator</summary>

Use decorator border and element separator() to subdivide your UI:
  
```cpp
auto document = vbox({
    text("top"),
    separator(),
    text("bottom"),
}) | border;

```

[Demo](https://arthursonzogni.github.io/FTXUI/examples_2dom_2separator_8cpp-e\
xample.html):
  
![image](https://user-images.githubusercontent.com/4759106/147244514-4135f24b\
-fb8e-4067-8896-bc53545583f7.png)
  
</details>

<details><summary>Text and paragraph</summary>

A simple piece of text is represented using `text("content")`.

To support text wrapping following spaces the following functions are\
 provided:
```cpp
Element paragraph(std::string text);
Element paragraphAlignLeft(std::string text);
Element paragraphAlignRight(std::string text);
Element paragraphAlignCenter(std::string text);
Element paragraphAlignJustify(std::string text);
```
  
[Paragraph example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2par\
agraph_8cpp-example.html)
  
![ezgif com-gif-maker (4)](https://user-images.githubusercontent.com/4759106/\
147251370-983a06e7-6f41-4113-92b8-942f43d34d06.gif)

</details>

<details><summary>Table</summary>

A class to easily style a table of data.

[Example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2table_8cpp-ex\
ample.html):
  
![image](https://user-images.githubusercontent.com/4759106/147250766-77d8ec9e\
-cf2b-486d-9866-1fd9f1bd2e6b.png)

</details>

<details><summary>Canvas</summary>

Drawing can be made on a Canvas, using braille, block, or simple characters:
  
Simple [example](https://github.com/ArthurSonzogni/FTXUI/blob/master/examples\
/dom/canvas.cpp):
  
![image](https://user-images.githubusercontent.com/4759106/147245843-76cc62fb\
-ccb4-421b-aacf-939f9afb42fe.png)

Complex [examples](https://github.com/ArthurSonzogni/FTXUI/blob/master/exampl\
es/component/canvas_animated.cpp):
  
![ezgif com-gif-maker (3)](https://user-images.githubusercontent.com/4759106/\
147250538-783a8246-98e0-4a25-b032-3bd3710549d1.gif)  
</details>

#### Component

ftxui/component produces dynamic UI, reactive to the user's input. It defines\
 a set of ftxui::Component. A component reacts to Events (keyboard, mouse,\
 resize, ...) and Renders as an Element (see previous section).

Prebuilt components are declared in [<ftxui/component/component.hpp>](https:/\
/arthursonzogni.github.io/FTXUI/component_8hpp_source.html)

<details><summary>Gallery</summary>

[Gallery](https://arthursonzogni.github.io/FTXUI/examples_2component_2gallery\
_8cpp-example.html) of multiple components. ([demo](https://arthursonzogni.gi\
thub.io/FTXUI/examples/?file=component/gallery))

![image](https://user-images.githubusercontent.com/4759106/147247330-b60beb9f\
-e665-48b4-81c0-4b01ee95bc66.png)

</details>

<details><summary>Radiobox</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2radiobo\
x_8cpp-example.html):
  
![image](https://user-images.githubusercontent.com/4759106/147246401-809d14a5\
-6621-4e36-8dd9-a2d75ef2a94e.png)

</details>

<details><summary>Checkbox</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2checkbo\
x_8cpp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147246646-b86926a9\
-1ef9-4efb-af98-48a9b62acd81.png)

</details>

<details><summary>Input</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2input_8\
cpp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147247671-f1d6f606\
-1845-4e94-a4a0-d4273e9ae6bd.png)

</details>

<details><summary>Toggle</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2toggle_\
8cpp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147249383-e2201cf1\
-b7b8-4a5a-916f-d761e3e7ae40.png)

</details>


<details><summary>Slider</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2slider_\
8cpp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147249265-7e2cad75\
-082c-436e-affe-44a550c480ab.png)

</details>


<details><summary>Menu</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2menu_8c\
pp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147247822-0035fd6f\
-bb13-4b3a-b057-77eb9291582f.png)

</details>


<details><summary>ResizableSplit</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2resizab\
le_split_8cpp-example.html):

![ezgif com-gif-maker](https://user-images.githubusercontent.com/4759106/1472\
48372-c55512fe-9b96-4b08-a1df-d05cf2cae431.gif)  
</details>


<details><summary>Dropdown</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2dropdow\
n_8cpp-example.html):

![youtube-video-gif (3)](https://user-images.githubusercontent.com/4759106/14\
7246982-1e821751-531c-4e1f-bc37-2fa290e143cd.gif)

</details>

<details><summary>Tab</summary>

[Vertical](https://arthursonzogni.github.io/FTXUI/examples_2component_2tab_ve\
rtical_8cpp-example.html):
  
![ezgif com-gif-maker (1)](https://user-images.githubusercontent.com/4759106/\
147250144-22ff044a-4773-4ff7-a49c-12ba4034acb4.gif)

[Horizontal](https://arthursonzogni.github.io/FTXUI/examples_2component_2tab_\
horizontal_8cpp-example.html):
  
  ![ezgif com-gif-maker (2)](https://user-images.githubusercontent.com/475910\
6/147250217-fe447e0f-7a99-4e08-948a-995087d9b40e.gif)

  

</details>

## Libraries for FTXUI
- *Want to share a useful Component for FTXUI? Feel free to add yours here*
- [ftxui-grid-container](https://github.com/mingsheng13/grid-container-ftxui)
- [ftxui-ip-input](https://github.com/mingsheng13/ip-input-ftxui)
- [ftxui-image-view](https://github.com/ljrrjl/ftxui-image-view.git): For\
 Image Display.


## Project using FTXUI

Feel free to add your projects here:
- [json-tui](https://github.com/ArthurSonzogni/json-tui)
- [git-tui](https://github.com/ArthurSonzogni/git-tui)
- [ostree-tui](https://github.com/AP-Sensing/ostree-tui)
- [rgb-tui](https://github.com/ArthurSonzogni/rgb-tui)
- [chrome-log-beautifier](https://github.com/ArthurSonzogni/chrome-log-beauti\
fier)
- [x86-64 CPU Architecture Simulation](https://github.com/AnisBdz/CPU)
- [ltuiny](https://github.com/adrianoviana87/ltuiny)
- [i3-termdialogs](https://github.com/mibli/i3-termdialogs)
- [simpPRU](https://github.com/VedantParanjape/simpPRU)
- [Pigeon ROS TUI](https://github.com/PigeonSensei/Pigeon_ros_tui)
- [hastur](https://github.com/robinlinden/hastur)
- [CryptoCalculator](https://github.com/brevis/CryptoCalculator)
- [todoman](https://github.com/aaleino/todoman)
- [TimeAccumulator](https://github.com/asari555/TimeAccumulator)
- [vantage](https://github.com/gokulmaxi/vantage)
- [tabdeeli](https://github.com/typon/tabdeeli)
- [tiles](https://github.com/tusharpm/tiles)
- [cachyos-cli-installer](https://github.com/cachyos/new-cli-installer)
- [beagle-config](https://github.com/SAtacker/beagle-config)
- [turing_cmd](https://github.com/DanArmor/turing_cmd)
- [StartUp](https://github.com/StubbornVegeta/StartUp)
- [eCAL monitor](https://github.com/eclipse-ecal/ecal)
- [Path Finder](https://github.com/Ruebled/Path_Finder)
- [rw-tui](https://github.com/LeeKyuHyuk/rw-tui)
- [resource-monitor](https://github.com/catalincd/resource-monitor)
- [ftxuiFileReader](https://github.com/J0sephDavis/ftxuiFileReader)
- [ftxui_CPUMeter](https://github.com/tzzzzzzzx/ftxui_CPUMeter)
- [Captain's log](https://github.com/nikoladucak/caps-log)
- [FTowerX](https://github.com/MhmRhm/FTowerX)
- [Caravan](https://github.com/r3w0p/caravan)
- [Step-Writer](https://github.com/BrianAnakPintar/step-writer)
- [XJ music](https://github.com/xjmusic/xjmusic)
- [UDP chat](https://github.com/Sergeydigl3/udp-chat-tui)
- [2048-cpp](https://github.com/Chessom/2048-cpp)
- [Memory game](https://github.com/mikolajlubiak/memory)
- [Terminal Animation](https://github.com/mikolajlubiak/terminal_animation)
- [pciex](https://github.com/s0nx/pciex)
- [Fallout terminal hacking](https://github.com/gshigin/yet-another-fallout-t\
erminal-hacking-game)
- [Lazylist](https://github.com/zhuyongqi9/lazylist)
- [TUISIC](https://github.com/Dark-Kernel/tuisic)
- [inLimbo](https://github.com/nots1dd/inLimbo)
- [BestEdrOfTheMarket](https://github.com/Xacone/BestEdrOfTheMarket)
- [terminal-rain](https://github.com/Oakamoore/terminal-rain)
- [keywords](https://github.com/Oakamoore/keywords) ([Play web version\
 :heart:](https://oakamoore.itch.io/keywords))
- [FTB - tertminal file browser](https://github.com/Cyxuan0311/FTB)
- [SHOOT!](https://github.com/ShingZhanho/ENGG1340-Project-25Spring)

### [cpp-best-practices/game_jam](https://github.com/cpp-best-practices/game_\
jam)

Several games using the FTXUI have been made during the Game Jam:
- [TermBreaker](https://github.com/ArthurSonzogni/termBreaker) [**[Play web\
 version]**](https://arthursonzogni.com/TermBreaker/)
- [Minesweeper Marathon](https://github.com/cpp-best-practices/game_jam/blob/\
main/Jam1_April_2022/minesweeper_marathon.md) [**[Play web\
 version]**](https://barlasgarden.com/minesweeper/index.html)
- [Grand Rounds](https://github.com/cpp-best-practices/game_jam/blob/main/Jam\
1_April_2022/grandrounds.md)
- [LightsRound](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1\
_April_2022/LightsRound.v.0.1.0.md)
- [DanteO](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_Apri\
l_2022/danteo.md)
- [Sumo](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_April_\
2022/sumo.md)
- [Drag Me aROUND](https://github.com/cpp-best-practices/game_jam/blob/main/J\
am1_April_2022/drag_me_around.md)
- [DisarmSelfDestruct](https://github.com/cpp-best-practices/game_jam/blob/ma\
in/Jam1_April_2022/DisarmSelfDestruct.md)
- [TheWorld](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_Ap\
ril_2022/TheWorld.md)
- [smoothlife](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_\
April_2022/smoothlife.md)
- [Consu](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_April\
_2022/consu.md)

## Utilization

It is **highly** recommended to use CMake FetchContent to depend on FTXUI so\
 you may specify which commit you would like to depend on.
```cmake
include(FetchContent)

FetchContent_Declare(ftxui
  GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
  GIT_TAG v6.1.9
)

FetchContent_GetProperties(ftxui)
if(NOT ftxui_POPULATED)
  FetchContent_Populate(ftxui)
  add_subdirectory(${ftxui_SOURCE_DIR} ${ftxui_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
```

If you don't, FTXUI may be used from the following packages:
- [bazel](...)
- [vcpkg](https://vcpkgx.com/details.html?package=ftxui)
- [Arch Linux PKGBUILD](https://aur.archlinux.org/packages/ftxui-git/).
- [conan.io](https://conan.io/center/ftxui)
- [openSUSE](https://build.opensuse.org/package/show/devel:libraries:c_c++/ft\
xui)
- 
[![Packaging status](https://repology.org/badge/vertical-allrepos/libftxui.sv\
g)](https://repology.org/project/libftxui/versions)

If you choose to build and link FTXUI yourself, `ftxui-component` must be\
 first in the linking order relative to the other FTXUI libraries, i.e.
```bash
g++ . . . -lftxui-component -lftxui-dom -lftxui-screen . . .
```

## Contributors

<a href="https://github.com/ArthurSonzogni/FTXUI/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=ArthurSonzogni/FTXUI" />
</a>

\
description-type: text/markdown;variant=GFM
url: https://arthursonzogni.github.io/FTXUI/
doc-url: https://arthursonzogni.github.io/FTXUI/
src-url: https://github.com/ArthurSonzogni/FTXUI
package-url: https://github.com/build2-packaging/FTXUI
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.15.0
depends: * bpkg >= 0.15.0
builds: default
bootstrap-build:
\
project = libftxui-examples

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
cxx{*}: extension = cpp
ixx{*}: extension = ipp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
test.target = $cxx.target

\
location: FTXUI/libftxui-examples-6.1.9.tar.gz
sha256sum: 6ecccee87f0f385b4d8ef36e0fbbde9b25b5599327f577c5a3b8434ebbedb76b
:
name: libftxui-tests
version: 6.1.9
project: FTXUI
summary: Tests for the FTXUI library.
license: MIT
topics: C++
description:
\
<p align="center">
  <img src="https://github.com/ArthurSonzogni/FTXUI/assets/4759106/6925b6da-0\
a7e-49d9-883c-c890e1f36007" alt="Demo image"></img>
  <br/>
  <a href="#"><img src="https://img.shields.io/badge/c++-%2300599C.svg?style=\
flat&logo=c%2B%2B&logoColor=white"></img></a>
  <a href="http://opensource.org/licenses/MIT"><img src="https://img.shields.\
io/github/license/arthursonzogni/FTXUI?color=black"></img></a>
  <a href="#"><img src="https://img.shields.io/github/stars/ArthurSonzogni/FT\
XUI"></img></a>
  <a href="#"><img src="https://img.shields.io/github/forks/ArthurSonzogni/FT\
XUI"></img></a>
  <a href="#"><img src="https://img.shields.io/github/repo-size/ArthurSonzogn\
i/FTXUI"></img></a>
  <a href="https://github.com/ArthurSonzogni/FTXUI/graphs/contributors"><img\
 src="https://img.shields.io/github/contributors/arthursonzogni/FTXUI?color=b\
lue"></img></a>
  <br/>
  <a href="https://github.com/ArthurSonzogni/FTXUI/issues"><img\
 src="https://img.shields.io/github/issues/ArthurSonzogni/FTXUI"></img></a>
  <a href="https://repology.org/project/ftxui/versions"><img\
 src="https://repology.org/badge/latest-versions/ftxui.svg" alt="latest\
 packaged version(s)"></a>
  <a href="https://codecov.io/gh/ArthurSonzogni/FTXUI">
    <img src="https://codecov.io/gh/ArthurSonzogni/FTXUI/branch/master/graph/\
badge.svg?token=C41FdRpNVA"/>
  </a>

  
  <br/>
  <a href="https://arthursonzogni.github.io/FTXUI/">Documentation</a> ·
  <a href="https://github.com/ArthurSonzogni/FTXUI/issues">Report a Bug</a> ·
  <a href="https://arthursonzogni.github.io/FTXUI/examples.html">Examples</a>\
 .
  <a href="https://github.com/ArthurSonzogni/FTXUI/issues">Request\
 Feature</a> ·
  <a href="https://github.com/ArthurSonzogni/FTXUI/pulls">Send a Pull\
 Request</a>

</p>

# FTXUI

<i>Functional Terminal (X) User interface</i>

A simple cross-platform C++ library for terminal based user interfaces!

## Feature
 * Functional style. Inspired by
   [1](https://hackernoon.com/building-reactive-terminal-interfaces-in-c-d392\
ce34e649?gi=d9fb9ce35901)
   and [React](https://reactjs.org/)
 * Simple and elegant syntax (in my opinion)
 * Keyboard & mouse navigation.
 * Support for [UTF8](https://en.wikipedia.org/wiki/UTF-8) and [fullwidth\
 chars](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) (→\
 测试)
 * Support for animations. [Demo 1](https://arthursonzogni.github.io/FTXUI/ex\
amples/?file=component/menu_underline_animated_gallery), [Demo\
 2](https://arthursonzogni.github.io/FTXUI/examples/?file=component/button_st\
yle)
 * Support for drawing. [Demo](https://arthursonzogni.github.io/FTXUI/example\
s/?file=component/canvas_animated)
 * No dependencies
 * **Cross platform**: Linux/MacOS (main target), WebAssembly, Windows\
 (Thanks to contributors!).
 * Learn by [examples](#documentation), and [tutorials](#documentation)
 * Multiple packages: CMake [FetchContent]([https://bewagner.net/programming/\
2020/05/02/cmake-fetchcontent/](https://cmake.org/cmake/help/latest/module/Fe\
tchContent.html)) (preferred),Bazel, vcpkg, pkgbuild, conan.
 * Good practices: documentation, tests, fuzzers, performance tests,\
 automated CI, automated packaging, etc...

## Documentation

- [Starter example project](https://github.com/ArthurSonzogni/ftxui-starter)
- [Documentation](https://arthursonzogni.github.io/FTXUI/)
- [Examples (WebAssembly)](https://arthursonzogni.github.io/FTXUI/examples/)
- [Build using CMake](https://arthursonzogni.github.io/FTXUI/#build-cmake)

## Example
~~~cpp
    vbox({
      hbox({
        text("one") | border,
        text("two") | border | flex,
        text("three") | border | flex,
      }),

      gauge(0.25) | color(Color::Red),
      gauge(0.50) | color(Color::White),
      gauge(0.75) | color(Color::Blue),
    });
~~~

![image](https://github.com/ArthurSonzogni/FTXUI/assets/4759106/569bf043-4e85\
-4245-aad5-2324572135c4)

## Short gallery

#### DOM

This module defines a hierarchical set of Element. An Element manages layout\
 and can be responsive to the terminal dimensions.

They are declared in [<ftxui/dom/elements.hpp>](https://arthursonzogni.github\
.io/FTXUI/elements_8hpp_source.html
)
  
<details><summary>Layout</summary>

Element can be arranged together:
  - horizontally with `hbox`
  - vertically with `vbox`
  - inside a grid with `gridbox`
  - wrap along one direction using the `flexbox`.
  
Element can become flexible using the the `flex` decorator.
  
[Example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2vbox_hbox_8cp\
p-example.html) using `hbox`, `vbox` and `filler`.

![image](https://user-images.githubusercontent.com/4759106/147242524-7103b5d9\
-1a92-4e2d-ac70-b3d6740061e3.png)
  
  
[Example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2gridbox_8cpp-\
example.html) using gridbox:

![image](https://user-images.githubusercontent.com/4759106/147242972-0db1f2e9\
-0790-496f-86e6-ed2c604f7a73.png)

[Example](https://github.com/ArthurSonzogni/FTXUI/blob/master/examples/dom/hf\
low.cpp) using flexbox:

![image](https://user-images.githubusercontent.com/4759106/147243064-780ac7cc\
-605b-475f-94b8-cf7c4aed03a5.png)

[See](https://arthursonzogni.github.io/FTXUI/examples_2dom_2hflow_8cpp-exampl\
e.html) also this [demo](https://arthursonzogni.github.io/FTXUI/examples/?fil\
e=component/flexbox).

</details>

<details><summary>Style</summary>

An element can be decorated using the functions:
  - `bold`
  - `italic`
  - `dim`
  - `inverted`
  - `underlined`
  - `underlinedDouble`
  - `blink`
  - `strikethrough`
  - `color`
  - `bgcolor`
  - `hyperlink`

[Example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2style_gallery\
_8cpp-example.html)

![image](https://user-images.githubusercontent.com/4759106/147244118-380bf834\
-9e33-40df-9ff0-07c10f2598ef.png)
  
FTXUI supports the pipe operator. It means: `decorator1(decorator2(element))`\
 and `element | decorator1 | decorator2` can be used.
  
</details>

<details><summary>Colors</summary>

FTXUI support every color palette:

Color [gallery](https://arthursonzogni.github.io/FTXUI/examples_2dom_2color_g\
allery_8cpp-example.html):
![image](https://user-images.githubusercontent.com/4759106/147248595-04c7245a\
-5b85-4544-809d-a5984fc6f9e7.png)

</details>
  
<details><summary>Border and separator</summary>

Use decorator border and element separator() to subdivide your UI:
  
```cpp
auto document = vbox({
    text("top"),
    separator(),
    text("bottom"),
}) | border;

```

[Demo](https://arthursonzogni.github.io/FTXUI/examples_2dom_2separator_8cpp-e\
xample.html):
  
![image](https://user-images.githubusercontent.com/4759106/147244514-4135f24b\
-fb8e-4067-8896-bc53545583f7.png)
  
</details>

<details><summary>Text and paragraph</summary>

A simple piece of text is represented using `text("content")`.

To support text wrapping following spaces the following functions are\
 provided:
```cpp
Element paragraph(std::string text);
Element paragraphAlignLeft(std::string text);
Element paragraphAlignRight(std::string text);
Element paragraphAlignCenter(std::string text);
Element paragraphAlignJustify(std::string text);
```
  
[Paragraph example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2par\
agraph_8cpp-example.html)
  
![ezgif com-gif-maker (4)](https://user-images.githubusercontent.com/4759106/\
147251370-983a06e7-6f41-4113-92b8-942f43d34d06.gif)

</details>

<details><summary>Table</summary>

A class to easily style a table of data.

[Example](https://arthursonzogni.github.io/FTXUI/examples_2dom_2table_8cpp-ex\
ample.html):
  
![image](https://user-images.githubusercontent.com/4759106/147250766-77d8ec9e\
-cf2b-486d-9866-1fd9f1bd2e6b.png)

</details>

<details><summary>Canvas</summary>

Drawing can be made on a Canvas, using braille, block, or simple characters:
  
Simple [example](https://github.com/ArthurSonzogni/FTXUI/blob/master/examples\
/dom/canvas.cpp):
  
![image](https://user-images.githubusercontent.com/4759106/147245843-76cc62fb\
-ccb4-421b-aacf-939f9afb42fe.png)

Complex [examples](https://github.com/ArthurSonzogni/FTXUI/blob/master/exampl\
es/component/canvas_animated.cpp):
  
![ezgif com-gif-maker (3)](https://user-images.githubusercontent.com/4759106/\
147250538-783a8246-98e0-4a25-b032-3bd3710549d1.gif)  
</details>

#### Component

ftxui/component produces dynamic UI, reactive to the user's input. It defines\
 a set of ftxui::Component. A component reacts to Events (keyboard, mouse,\
 resize, ...) and Renders as an Element (see previous section).

Prebuilt components are declared in [<ftxui/component/component.hpp>](https:/\
/arthursonzogni.github.io/FTXUI/component_8hpp_source.html)

<details><summary>Gallery</summary>

[Gallery](https://arthursonzogni.github.io/FTXUI/examples_2component_2gallery\
_8cpp-example.html) of multiple components. ([demo](https://arthursonzogni.gi\
thub.io/FTXUI/examples/?file=component/gallery))

![image](https://user-images.githubusercontent.com/4759106/147247330-b60beb9f\
-e665-48b4-81c0-4b01ee95bc66.png)

</details>

<details><summary>Radiobox</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2radiobo\
x_8cpp-example.html):
  
![image](https://user-images.githubusercontent.com/4759106/147246401-809d14a5\
-6621-4e36-8dd9-a2d75ef2a94e.png)

</details>

<details><summary>Checkbox</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2checkbo\
x_8cpp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147246646-b86926a9\
-1ef9-4efb-af98-48a9b62acd81.png)

</details>

<details><summary>Input</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2input_8\
cpp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147247671-f1d6f606\
-1845-4e94-a4a0-d4273e9ae6bd.png)

</details>

<details><summary>Toggle</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2toggle_\
8cpp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147249383-e2201cf1\
-b7b8-4a5a-916f-d761e3e7ae40.png)

</details>


<details><summary>Slider</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2slider_\
8cpp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147249265-7e2cad75\
-082c-436e-affe-44a550c480ab.png)

</details>


<details><summary>Menu</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2menu_8c\
pp-example.html):

![image](https://user-images.githubusercontent.com/4759106/147247822-0035fd6f\
-bb13-4b3a-b057-77eb9291582f.png)

</details>


<details><summary>ResizableSplit</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2resizab\
le_split_8cpp-example.html):

![ezgif com-gif-maker](https://user-images.githubusercontent.com/4759106/1472\
48372-c55512fe-9b96-4b08-a1df-d05cf2cae431.gif)  
</details>


<details><summary>Dropdown</summary>

[Example](https://arthursonzogni.github.io/FTXUI/examples_2component_2dropdow\
n_8cpp-example.html):

![youtube-video-gif (3)](https://user-images.githubusercontent.com/4759106/14\
7246982-1e821751-531c-4e1f-bc37-2fa290e143cd.gif)

</details>

<details><summary>Tab</summary>

[Vertical](https://arthursonzogni.github.io/FTXUI/examples_2component_2tab_ve\
rtical_8cpp-example.html):
  
![ezgif com-gif-maker (1)](https://user-images.githubusercontent.com/4759106/\
147250144-22ff044a-4773-4ff7-a49c-12ba4034acb4.gif)

[Horizontal](https://arthursonzogni.github.io/FTXUI/examples_2component_2tab_\
horizontal_8cpp-example.html):
  
  ![ezgif com-gif-maker (2)](https://user-images.githubusercontent.com/475910\
6/147250217-fe447e0f-7a99-4e08-948a-995087d9b40e.gif)

  

</details>

## Libraries for FTXUI
- *Want to share a useful Component for FTXUI? Feel free to add yours here*
- [ftxui-grid-container](https://github.com/mingsheng13/grid-container-ftxui)
- [ftxui-ip-input](https://github.com/mingsheng13/ip-input-ftxui)
- [ftxui-image-view](https://github.com/ljrrjl/ftxui-image-view.git): For\
 Image Display.


## Project using FTXUI

Feel free to add your projects here:
- [json-tui](https://github.com/ArthurSonzogni/json-tui)
- [git-tui](https://github.com/ArthurSonzogni/git-tui)
- [ostree-tui](https://github.com/AP-Sensing/ostree-tui)
- [rgb-tui](https://github.com/ArthurSonzogni/rgb-tui)
- [chrome-log-beautifier](https://github.com/ArthurSonzogni/chrome-log-beauti\
fier)
- [x86-64 CPU Architecture Simulation](https://github.com/AnisBdz/CPU)
- [ltuiny](https://github.com/adrianoviana87/ltuiny)
- [i3-termdialogs](https://github.com/mibli/i3-termdialogs)
- [simpPRU](https://github.com/VedantParanjape/simpPRU)
- [Pigeon ROS TUI](https://github.com/PigeonSensei/Pigeon_ros_tui)
- [hastur](https://github.com/robinlinden/hastur)
- [CryptoCalculator](https://github.com/brevis/CryptoCalculator)
- [todoman](https://github.com/aaleino/todoman)
- [TimeAccumulator](https://github.com/asari555/TimeAccumulator)
- [vantage](https://github.com/gokulmaxi/vantage)
- [tabdeeli](https://github.com/typon/tabdeeli)
- [tiles](https://github.com/tusharpm/tiles)
- [cachyos-cli-installer](https://github.com/cachyos/new-cli-installer)
- [beagle-config](https://github.com/SAtacker/beagle-config)
- [turing_cmd](https://github.com/DanArmor/turing_cmd)
- [StartUp](https://github.com/StubbornVegeta/StartUp)
- [eCAL monitor](https://github.com/eclipse-ecal/ecal)
- [Path Finder](https://github.com/Ruebled/Path_Finder)
- [rw-tui](https://github.com/LeeKyuHyuk/rw-tui)
- [resource-monitor](https://github.com/catalincd/resource-monitor)
- [ftxuiFileReader](https://github.com/J0sephDavis/ftxuiFileReader)
- [ftxui_CPUMeter](https://github.com/tzzzzzzzx/ftxui_CPUMeter)
- [Captain's log](https://github.com/nikoladucak/caps-log)
- [FTowerX](https://github.com/MhmRhm/FTowerX)
- [Caravan](https://github.com/r3w0p/caravan)
- [Step-Writer](https://github.com/BrianAnakPintar/step-writer)
- [XJ music](https://github.com/xjmusic/xjmusic)
- [UDP chat](https://github.com/Sergeydigl3/udp-chat-tui)
- [2048-cpp](https://github.com/Chessom/2048-cpp)
- [Memory game](https://github.com/mikolajlubiak/memory)
- [Terminal Animation](https://github.com/mikolajlubiak/terminal_animation)
- [pciex](https://github.com/s0nx/pciex)
- [Fallout terminal hacking](https://github.com/gshigin/yet-another-fallout-t\
erminal-hacking-game)
- [Lazylist](https://github.com/zhuyongqi9/lazylist)
- [TUISIC](https://github.com/Dark-Kernel/tuisic)
- [inLimbo](https://github.com/nots1dd/inLimbo)
- [BestEdrOfTheMarket](https://github.com/Xacone/BestEdrOfTheMarket)
- [terminal-rain](https://github.com/Oakamoore/terminal-rain)
- [keywords](https://github.com/Oakamoore/keywords) ([Play web version\
 :heart:](https://oakamoore.itch.io/keywords))
- [FTB - tertminal file browser](https://github.com/Cyxuan0311/FTB)
- [SHOOT!](https://github.com/ShingZhanho/ENGG1340-Project-25Spring)

### [cpp-best-practices/game_jam](https://github.com/cpp-best-practices/game_\
jam)

Several games using the FTXUI have been made during the Game Jam:
- [TermBreaker](https://github.com/ArthurSonzogni/termBreaker) [**[Play web\
 version]**](https://arthursonzogni.com/TermBreaker/)
- [Minesweeper Marathon](https://github.com/cpp-best-practices/game_jam/blob/\
main/Jam1_April_2022/minesweeper_marathon.md) [**[Play web\
 version]**](https://barlasgarden.com/minesweeper/index.html)
- [Grand Rounds](https://github.com/cpp-best-practices/game_jam/blob/main/Jam\
1_April_2022/grandrounds.md)
- [LightsRound](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1\
_April_2022/LightsRound.v.0.1.0.md)
- [DanteO](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_Apri\
l_2022/danteo.md)
- [Sumo](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_April_\
2022/sumo.md)
- [Drag Me aROUND](https://github.com/cpp-best-practices/game_jam/blob/main/J\
am1_April_2022/drag_me_around.md)
- [DisarmSelfDestruct](https://github.com/cpp-best-practices/game_jam/blob/ma\
in/Jam1_April_2022/DisarmSelfDestruct.md)
- [TheWorld](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_Ap\
ril_2022/TheWorld.md)
- [smoothlife](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_\
April_2022/smoothlife.md)
- [Consu](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_April\
_2022/consu.md)

## Utilization

It is **highly** recommended to use CMake FetchContent to depend on FTXUI so\
 you may specify which commit you would like to depend on.
```cmake
include(FetchContent)

FetchContent_Declare(ftxui
  GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
  GIT_TAG v6.1.9
)

FetchContent_GetProperties(ftxui)
if(NOT ftxui_POPULATED)
  FetchContent_Populate(ftxui)
  add_subdirectory(${ftxui_SOURCE_DIR} ${ftxui_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
```

If you don't, FTXUI may be used from the following packages:
- [bazel](...)
- [vcpkg](https://vcpkgx.com/details.html?package=ftxui)
- [Arch Linux PKGBUILD](https://aur.archlinux.org/packages/ftxui-git/).
- [conan.io](https://conan.io/center/ftxui)
- [openSUSE](https://build.opensuse.org/package/show/devel:libraries:c_c++/ft\
xui)
- 
[![Packaging status](https://repology.org/badge/vertical-allrepos/libftxui.sv\
g)](https://repology.org/project/libftxui/versions)

If you choose to build and link FTXUI yourself, `ftxui-component` must be\
 first in the linking order relative to the other FTXUI libraries, i.e.
```bash
g++ . . . -lftxui-component -lftxui-dom -lftxui-screen . . .
```

## Contributors

<a href="https://github.com/ArthurSonzogni/FTXUI/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=ArthurSonzogni/FTXUI" />
</a>

\
description-type: text/markdown;variant=GFM
url: https://arthursonzogni.github.io/FTXUI/
doc-url: https://arthursonzogni.github.io/FTXUI/
src-url: https://github.com/ArthurSonzogni/FTXUI
package-url: https://github.com/build2-packaging/FTXUI
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.15.0
depends: * bpkg >= 0.15.0
depends: gtest ^1.11.0
builds: default
*-build-config: config.test.timeout=30; Don't block CI on deadlocks
bootstrap-build:
\
project = libftxui-tests

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
cxx{*}: extension = cpp
ixx{*}: extension = ipp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
test.target = $cxx.target

exe{*}: test = true

\
location: FTXUI/libftxui-tests-6.1.9.tar.gz
sha256sum: 6ccb4e10e7a31dd4bf2a60f338167767d1434718b776937558c7a01845236151
:
name: libglaze
version: 2.9.5
type: lib,binless
language: c++
project: glaze
summary: JSON and interface library for C++
license: MIT; MIT License.
topics: json, json rpc 2.0, csv, beve, serialization
description:
\
# Glaze
One of the fastest JSON libraries in the world. Glaze reads and writes from\
 object memory, simplifying interfaces and offering incredible performance.

> [!IMPORTANT]
>
> Version 2.8.0 adds write error handling which matches the read API. [See\
 v2.8.0 Release notes](https://github.com/stephenberry/glaze/releases/tag/v2.\
8.0)

Glaze also supports:

- [BEVE](https://github.com/beve-org/beve) (binary efficient versatile\
 encoding)
- [CSV](./docs/csv.md) (comma separated value)

## With compile time reflection for MSVC, Clang, and GCC!

- Read/write aggregate initializable structs without writing any metadata or\
 macros!
- See [example on Compiler Explorer](https://gcc.godbolt.org/z/85zKG3a4n)

## Highlights

- Pure, compile time reflection for structs
- Standard C++ library support
- Header only
- Direct to memory serialization/deserialization
- Compile time maps with constant time lookups and perfect hashing
- Powerful wrappers to modify read/write behavior ([Wrappers](./docs/wrappers\
.md))
- Use your own custom read/write functions ([Custom Read/Write](#custom-readw\
rite))
- [Handle unknown keys](./docs/unknown-keys.md) in a fast and flexible manner
- Direct memory access through [JSON pointer syntax](./docs/json-pointer-synt\
ax.md)
- [Binary data](./docs/binary.md) through the same API for maximum performance
- No exceptions (compiles with `-fno-exceptions`)
  - If you desire helpers that throw for cleaner syntax see [Glaze\
 Exceptions](./docs/exceptions.md)
- No runtime type information necessary (compiles with `-fno-rtti`)
- Rapid error handling with short circuiting
- [JSON-RPC 2.0 support](./docs/rpc/json-rpc.md)
- [JSON Schema generation](./docs/json-schema.md)
- Extremely portable, uses carefully optimized SWAR (SIMD Within A Register)\
 for broad compatibility
- [Partial Read](./docs/partial-read.md) and [Partial Write](./docs/partial-w\
rite.md) support
- [CSV Reading/Writing](./docs/csv.md)
- [Much more!](#more-features)

See [DOCS](https://github.com/stephenberry/glaze/tree/main/docs) for more\
 documentation.

## Performance

| Library                                                      | Roundtrip\
 Time (s) | Write (MB/s) | Read (MB/s) |
| ------------------------------------------------------------ |\
 ------------------ | ------------ | ----------- |
| [**Glaze**](https://github.com/stephenberry/glaze)           | **1.20**    \
       | **1064**     | **1175**    |
| [**simdjson (on demand)**](https://github.com/simdjson/simdjson) | **N/A** \
           | **N/A**      | **1201**    |
| [**yyjson**](https://github.com/ibireme/yyjson)              | **1.23**    \
       | **996**      | **1108**    |
| [**daw_json_link**](https://github.com/beached/daw_json_link) | **2.90**   \
        | **370**      | **554**     |
| [**RapidJSON**](https://github.com/Tencent/rapidjson)        | **3.63**    \
       | **295**      | **447**     |
| [**Boost.JSON (direct)**](https://boost.org/libs/json)       | **4.66**    \
       | **203**      | **437**     |
| [**json_struct**](https://github.com/jorgen/json_struct)     | **5.47**    \
       | **184**      | **331**     |
| [**nlohmann**](https://github.com/nlohmann/json)             | **15.00**   \
       | **86**       | **82**      |

[Performance test code available here](https://github.com/stephenberry/json_p\
erformance)

*Performance caveats: [simdjson](https://github.com/simdjson/simdjson) and\
 [yyjson](https://github.com/ibireme/yyjson) are great, but they experience\
 major performance losses when the data is not in the expected sequence or\
 any keys are missing (the problem grows as the file size increases, as they\
 must re-iterate through the document).*

*Also, [simdjson](https://github.com/simdjson/simdjson) and\
 [yyjson](https://github.com/ibireme/yyjson) do not support automatic escaped\
 string handling, so if any of the currently non-escaped strings in this\
 benchmark were to contain an escape, the escapes would not be handled.*

[ABC Test](https://github.com/stephenberry/json_performance) shows how\
 simdjson has poor performance when keys are not in the expected sequence:

| Library                                                      | Read (MB/s) |
| ------------------------------------------------------------ | ----------- |
| [**Glaze**](https://github.com/stephenberry/glaze)           | **1426**    |
| [**simdjson (on demand)**](https://github.com/simdjson/simdjson) | **108** \
    |

## Binary Performance

Tagged binary specification: [BEVE](https://github.com/stephenberry/beve)

| Metric                | Roundtrip Time (s) | Write (MB/s) | Read (MB/s) |
| --------------------- | ------------------ | ------------ | ----------- |
| Raw performance       | **0.44**           | **3168**     | **2350**    |
| Equivalent JSON data* | **0.44**           | **3474**     | **2577**    |

JSON size: 670 bytes

BEVE size: 611 bytes

*BEVE packs more efficiently than JSON, so transporting the same data is even\
 faster.

## Example

Your struct will automatically get reflected! No metadata is required by the\
 user.

```c++
struct my_struct
{
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
  std::array<uint64_t, 3> arr = { 1, 2, 3 };
  std::map<std::string, int> map{{"one", 1}, {"two", 2}};
};
```

**JSON** (prettified)

```json
{
   "i": 287,
   "d": 3.14,
   "hello": "Hello World",
   "arr": [
      1,
      2,
      3
   ],
   "map": {
      "one": 1,
      "two": 2
   }
}
```

**Write JSON**

```c++
my_struct s{};
std::string buffer = glz::write_json(s).value_or("error");
```

or

```c++
my_struct s{};
std::string buffer{};
auto ec = glz::write_json(s, buffer);
if (ec) {
  // handle error
}
```

**Read JSON**

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
,"map":{"one":1,"two":2}})";
auto s = glz::read_json<my_struct>(buffer);
if (s) // check std::expected
{
  s.value(); // s.value() is a my_struct populated from buffer
}
```

or

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
,"map":{"one":1,"two":2}})";
my_struct s{};
auto ec = glz::read_json(s, buffer); // populates s from buffer
if (ec) {
  // handle error
}
```

### Read/Write From File

```c++
auto ec = glz::read_file_json(obj, "./obj.json", std::string{});
auto ec = glz::write_file_json(obj, "./obj.json", std::string{});
```

> [!IMPORTANT]
>
> The file name (2nd argument), must be null terminated.

## Compiler/System Support

- Requires C++20
- Only tested on 64bit systems, but should run on 32bit systems
- Only supports little-endian systems

[Actions](https://github.com/stephenberry/glaze/actions) build and test with\
 [Clang](https://clang.llvm.org) (15+), [MSVC](https://visualstudio.microsoft\
.com/vs/features/cplusplus/) (2022), and [GCC](https://gcc.gnu.org) (12+) on\
 apple, windows, and linux.

![clang build](https://github.com/stephenberry/glaze/actions/workflows/clang.\
yml/badge.svg) ![gcc build](https://github.com/stephenberry/glaze/actions/wor\
kflows/gcc.yml/badge.svg) ![msvc build](https://github.com/stephenberry/glaze\
/actions/workflows/msvc.yml/badge.svg) 

> Glaze seeks to maintain compatibility with the latest three versions of GCC\
 and Clang, as well as the latest version of MSVC and Apple Clang.

## How To Use Glaze

### [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.ht\
ml)
```cmake
include(FetchContent)

FetchContent_Declare(
  glaze
  GIT_REPOSITORY https://github.com/stephenberry/glaze.git
  GIT_TAG main
  GIT_SHALLOW TRUE
)

FetchContent_MakeAvailable(glaze)

target_link_libraries(${PROJECT_NAME} PRIVATE glaze::glaze)
```

### [Conan](https://conan.io)

- Included in [Conan Center](https://conan.io/center/) ![Conan\
 Center](https://img.shields.io/conan/v/glaze)

```
find_package(glaze REQUIRED)

target_link_libraries(main PRIVATE glaze::glaze)
```

### [build2](https://build2.org)

- Available on [cppget](https://cppget.org/libglaze)

```
import libs = libglaze%lib{glaze}
```

### Arch Linux

- AUR packages: [glaze](https://aur.archlinux.org/packages/glaze) and\
 [glaze-git](https://aur.archlinux.org/packages/glaze-git)

### See this [Example Repository](https://github.com/stephenberry/glaze_examp\
le) for how to use Glaze in a new project

---

## See [FAQ](./docs/FAQ.md) for Frequently Asked Questions

# Explicit Metadata

If you want to specialize your reflection then you can optionally write the\
 code below:

> This metadata is also necessary for non-aggregate initializable structs.

```c++
template <>
struct glz::meta<my_struct> {
   using T = my_struct;
   static constexpr auto value = object(
      &T::i,
      &T::d,
      &T::hello,
      &T::arr,
      &T::map
   );
};
```

## Local Glaze Meta

Glaze also supports metadata provided within its associated class:

```c++
struct my_struct
{
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
  std::array<uint64_t, 3> arr = { 1, 2, 3 };
  std::map<std::string, int> map{{"one", 1}, {"two", 2}};
  
  struct glaze {
     using T = my_struct;
     static constexpr auto value = glz::object(
        &T::i,
        &T::d,
        &T::hello,
        &T::arr,
        &T::map
     );
  };
};
```

## Custom Key Names or Unnamed Types

When you define Glaze metadata, objects will automatically reflect the\
 non-static names of your member object pointers. However, if you want custom\
 names or you register lambda functions or wrappers that do not provide names\
 for your fields, you can optionally add field names in your metadata.

Example of custom names:

```c++
template <>
struct glz::meta<my_struct> {
   using T = my_struct;
   static constexpr auto value = object(
      "integer", &T::i,
      "double", &T::d,
      "string", &T::hello,
      "array", &T::arr,
      "my map", &T::map
   );
};
```

> Each of these strings is optional and can be removed for individual fields\
 if you want the name to be reflected.
>
> Names are required for:
>
> - static constexpr member variables
> - Wrappers
> - Lambda functions

## Custom Read/Write

Custom reading and writing can be achieved through the powerful\
 `to_json`/`from_json` specialization approach, which is described here:\
 [custom-serialization.md](https://github.com/stephenberry/glaze/blob/main/do\
cs/custom-serialization.md). However, this only works for user defined types.

For common use cases or cases where a specific member variable should have\
 special reading and writing, you can use `glz::custom` to register\
 read/write member functions, std::functions, or lambda functions.

See an example:

```c++
struct custom_encoding
{
   uint64_t x{};
   std::string y{};
   std::array<uint32_t, 3> z{};
   
   void read_x(const std::string& s) {
      x = std::stoi(s);
   }
   
   uint64_t write_x() {
      return x;
   }
   
   void read_y(const std::string& s) {
      y = "hello" + s;
   }
   
   auto& write_z() {
      z[0] = 5;
      return z;
   }
};

template <>
struct glz::meta<custom_encoding>
{
   using T = custom_encoding;
   static constexpr auto value = object("x", custom<&T::read_x, &T::write_x>,\
 //
                                        "y", custom<&T::read_y, &T::y>, //
                                        "z", custom<&T::z, &T::write_z>);
};

suite custom_encoding_test = [] {
   "custom_reading"_test = [] {
      custom_encoding obj{};
      std::string s = R"({"x":"3","y":"world","z":[1,2,3]})";
      expect(!glz::read_json(obj, s));
      expect(obj.x == 3);
      expect(obj.y == "helloworld");
      expect(obj.z == std::array<uint32_t, 3>{1, 2, 3});
   };
   
   "custom_writing"_test = [] {
      custom_encoding obj{};
      std::string s = R"({"x":"3","y":"world","z":[1,2,3]})";
      expect(!glz::read_json(obj, s));
      std::string out{};
      expect(not glz::write_json(obj, out));
      expect(out == R"({"x":3,"y":"helloworld","z":[5,2,3]})");
   };
};
```

## Object Mapping

When using member pointers (e.g. `&T::a`) the C++ class structures must match\
 the JSON interface. It may be desirable to map C++ classes with differing\
 layouts to the same object interface. This is accomplished through\
 registering lambda functions instead of member pointers.

```c++
template <>
struct glz::meta<Thing> {
   static constexpr auto value = object(
      "i", [](auto&& self) -> auto& { return self.subclass.i; }
   );
};
```

The value `self` passed to the lambda function will be a `Thing` object, and\
 the lambda function allows us to make the subclass invisible to the object\
 interface.

Lambda functions by default copy returns, therefore the `auto&` return type\
 is typically required in order for glaze to write to memory.

> Note that remapping can also be achieved through pointers/references, as\
 glaze treats values, pointers, and references in the same manner when\
 writing/reading.

## Value Types

A class can be treated as an underlying value as follows:

```c++
struct S {
  int x{};
};

template <>
struct glz::meta<S> {
  static constexpr auto value{ &S::x };
};
```

or using a lambda:

```c++
template <>
struct glz::meta<S> {
  static constexpr auto value = [](auto& self) -> auto& { return self.x; };
};
```

# Error Handling

Glaze is safe to use with untrusted messages. Errors are returned as error\
 codes, typically within a `glz::expected`, which behaves just like a\
 `std::expected`.

> Glaze works to short circuit error handling, which means the parsing exits\
 very rapidly if an error is encountered.

To generate more helpful error messages, call `format_error`:

```c++
auto pe = glz::read_json(obj, buffer);
if (pe) {
  std::string descriptive_error = glz::format_error(pe, buffer);
}
```

This test case:

```json
{"Hello":"World"x, "color": "red"}
```

Produces this error:

```
1:17: expected_comma
   {"Hello":"World"x, "color": "red"}
                   ^
```

Denoting that x is invalid here.

# Type Support

## Array Types

Array types logically convert to JSON array values. Concepts are used to\
 allow various containers and even user containers if they match standard\
 library interfaces.

- `glz::array` (compile time mixed types)
- `std::tuple` (compile time mixed types)
- `std::array`
- `std::vector`
- `std::deque`
- `std::list`
- `std::forward_list`
- `std::span`
- `std::set`
- `std::unordered_set`

## Object Types

Object types logically convert to JSON object values, such as maps. Like\
 JSON, Glaze treats object definitions as unordered maps. Therefore the order\
 of an object layout does not have to match the same binary sequence in C++.

- `glz::object` (compile time mixed types)
- `std::map`
- `std::unordered_map`
- `std::pair` (enables dynamic keys in stack storage)

> `std::pair` is handled as an object with a single key and value, but when\
 `std::pair` is used in an array, Glaze concatenates the pairs into a single\
 object. `std::vector<std::pair<...>>` will serialize as a single  object. If\
 you don't want this behavior set the compile time option `.concatenate =\
 false`.

## Variants

- `std::variant`

See [Variant Handling](./docs/variant-handling.md) for more information.

## Nullable Types

- `std::unique_ptr`
- `std::shared_ptr`
- `std::optional`

Nullable types may be allocated by valid input or nullified by the `null`\
 keyword.

```c++
std::unique_ptr<int> ptr{};
std::string buffer{};
expect(not glz::write_json(ptr, buffer));
expect(buffer == "null");

expect(not glz::read_json(ptr, "5"));
expect(*ptr == 5);
buffer.clear();
expect(not glz::write_json(ptr, buffer));
expect(buffer == "5");

expect(not glz::read_json(ptr, "null"));
expect(!bool(ptr));
```

## Enums

By default enums will be written and read in integer form. No `glz::meta` is\
 necessary if this is the desired behavior.

However, if you prefer to use enums as strings in JSON, they can be\
 registered in the `glz::meta` as follows:

```c++
enum class Color { Red, Green, Blue };

template <>
struct glz::meta<Color> {
   using enum Color;
   static constexpr auto value = enumerate(Red,
                                           Green,
                                           Blue
   );
};
```

In use:

```c++
Color color = Color::Red;
std::string buffer{};
glz::write_json(color, buffer);
expect(buffer == "\"Red\"");
```

# JSON With Comments (JSONC)

Comments are supported with the specification defined here:\
 [JSONC](https://github.com/stephenberry/JSONC)

Read support for comments is provided with `glz::read_jsonc` or\
 `glz::read<glz::opts{.comments = true}>(...)`.

Comments may be included in the `glz::meta` description for your types. These\
 comments can be written out to provide a description of your JSON interface.\
 Calling `write_jsonc` as opposed to `write_json` will write out any comments\
 included in the `meta` description.

```c++
struct thing {
  double x{5.0};
  int y{7};
};

template <>
struct glz::meta<thing> {
   using T = thing;
   static constexpr auto value = object(
      &T::x, "x is a double"_c,
      &T::y, "y is an int"_c
   );
};
```

Prettified output:

```json
{
  "x": 5 /*x is a double*/,
  "y": 7 /*y is an int*/
}
```

> The `_c` is necessary if member object pointer names are reflected. You can\
 also write `comment("x is a double")`

# Prettify JSON

Formatted JSON can be written out directly via a compile time option:

```c++
auto ec = glz::write<glz::opts{.prettify = true}>(obj, buffer);
```

Or, JSON text can be formatted with the `glz::prettify_json` function:

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
})");
auto beautiful = glz::prettify_json(buffer);
```

`beautiful` is now:

```json
{
   "i": 287,
   "d": 3.14,
   "hello": "Hello World",
   "arr": [
      1,
      2,
      3
   ]
}
```

# Minify JSON

To write minified JSON:

```c++
auto ec = glz::write_json(obj, buffer); // default is minified
```

To minify JSON text call:

```c++
std::string minified = glz::minify_json(buffer);
```

## Minified JSON Reading

If you wish require minified JSON or know your input will always be minified,\
 then you can gain a little more performance by using the compile time option\
 `.minified = true`.

```c++
auto ec = glz::read<glz::opts{.minified = true}>(obj, buffer);
```

## Boolean Flags

Glaze supports registering a set of boolean flags that behave as an array of\
 string options:

```c++
struct flags_t {
   bool x{ true };
   bool y{};
   bool z{ true };
};

template <>
struct glz::meta<flags_t> {
   using T = flags_t;
   static constexpr auto value = flags("x", &T::x, "y", &T::y, "z", &T::z);
};
```

Example:

```c++
flags_t s{};
expect(glz::write_json(s) == R"(["x","z"])");
```

Only `"x"` and `"z"` are written out, because they are true. Reading in the\
 buffer will set the appropriate booleans.

> When writing BEVE, `flags` only use one bit per boolean (byte aligned).

## Logging JSON

Sometimes you just want to write out JSON structures on the fly as\
 efficiently as possible. Glaze provides tuple-like structures that allow you\
 to stack allocate structures to write out JSON with high speed. These\
 structures are named `glz::obj` for objects and `glz::arr` for arrays.

Below is an example of building an object, which also contains an array, and\
 writing it out.

```c++
auto obj = glz::obj{"pi", 3.14, "happy", true, "name", "Stephen", "arr",\
 glz::arr{"Hello", "World", 2}};

std::string s{};
expect(not glz::write_json(obj, s));
expect(s == R"({"pi":3.14,"happy":true,"name":"Stephen","arr":["Hello","World\
",2]})");
```

> This approach is significantly faster than `glz::json_t` for generic JSON.\
 But, may not be suitable for all contexts.

## Merge

`glz::merge` allows the user to merge multiple JSON object types into a\
 single object.

```c++
glz::obj o{"pi", 3.141};
std::map<std::string_view, int> map = {{"a", 1}, {"b", 2}, {"c", 3}};
auto merged = glz::merge{o, map};
std::string s{};
glz::write_json(merged, s); // will write out a single, merged object
// s is now: {"pi":3.141,"a":0,"b":2,"c":3}
```

> `glz::merge` stores references to lvalues to avoid copies

## Generic JSON

See [Generic JSON](./docs/generic-json.md) for `glz::json_t`.

```c++
glz::json_t json{};
std::string buffer = R"([5,"Hello World",{"pi":3.14}])";
glz::read_json(json, buffer);
assert(json[2]["pi"].get<double>() == 3.14);
```

## Raw Buffer Performance

Glaze is just about as fast writing to a `std::string` as it is writing to a\
 raw char buffer. If you have sufficiently allocated space in your buffer you\
 can write to the raw buffer, as shown below, but it is not recommended.

```
glz::read_json(obj, buffer);
const auto n = glz::write_json(obj, buffer.data()).value_or(0);
buffer.resize(n);
```

## Compile Time Options

The `glz::opts` struct defines compile time optional settings for\
 reading/writing.

Instead of calling `glz::read_json(...)`, you can call `glz::read<glz::opts{}\
>(...)` and customize the options.

For example: `glz::read<glz::opts{.error_on_unknown_keys = false}>(...)` will\
 turn off erroring on unknown keys and simple skip the items.

`glz::opts` can also switch between formats:

- `glz::read<glz::opts{.format = glz::binary}>(...)` -> `glz::read_binary(...\
)`
- `glz::read<glz::opts{.format = glz::json}>(...)` -> `glz::read_json(...)`

## Available Compile Time Options

The struct below shows the available options and the default behavior.

```c++
struct opts {
  uint32_t format = json;
  bool comments = false; // Write out or support reading in JSONC style\
 comments
  bool error_on_unknown_keys = true; // Error when an unknown key is\
 encountered
  bool skip_null_members = true; // Skip writing out params in an object if\
 the value is null
  bool use_hash_comparison = true; // Will replace some string equality\
 checks with hash checks
  bool prettify = false; // Write out prettified JSON
  bool minified = false; // Require minified input for JSON, which results in\
 faster read performance
  char indentation_char = ' '; // Prettified JSON indentation char
  uint8_t indentation_width = 3; // Prettified JSON indentation size
  bool new_lines_in_arrays = true; // Whether prettified arrays should have\
 new lines for each element
  bool shrink_to_fit = false; // Shrinks dynamic containers to new size to\
 save memory
  bool write_type_info = true; // Write type info for meta objects in variants
  bool force_conformance = false; // Do not allow invalid json normally\
 accepted such as nan, inf.
  bool error_on_missing_keys = false; // Require all non nullable keys to be\
 present in the object. Use
                                      // skip_null_members = false to require\
 nullable members

  bool error_on_const_read =
     false; // Error if attempt is made to read into a const value, by\
 default the value is skipped without error

  uint32_t layout = rowwise; // CSV row wise output/input

  // The maximum precision type used for writing floats, higher precision\
 floats will be cast down to this precision
  float_precision float_max_write_precision{};

  bool bools_as_numbers = false; // Read and write booleans with 1's and 0's

  bool quoted_num = false; // treat numbers as quoted or array-like types as\
 having quoted numbers
  bool number = false; // read numbers as strings and write these string as\
 numbers
  bool raw = false; // write out string like values without quotes
  bool raw_string = false; // do not decode/encode escaped characters for\
 strings (improves read/write performance)
  bool structs_as_arrays = false; // Handle structs (reading/writing) without\
 keys, which applies to reflectable and

  bool partial_read =
     false; // Reads into only existing fields and elements and then exits\
 without parsing the rest of the input

  // glaze_object_t concepts
  bool partial_read_nested = false; // Advance the partially read struct to\
 the end of the struct
  bool concatenate = true; // Concatenates ranges of std::pair into single\
 objects when writing

  bool hide_non_invocable =
     true; // Hides non-invocable members from the cli_menu (may be applied\
 elsewhere in the future)
};
```

> Many of these compile time options have wrappers to apply the option to\
 only a single field. See [Wrappers](./docs/wrappers.md) for more details.

## Skip

It can be useful to acknowledge a keys existence in an object to prevent\
 errors, and yet the value may not be needed or exist in C++. These cases are\
 handled by registering a `glz::skip` type with the meta data.

```c++
struct S {
  int i{};
};

template <>
struct glz::meta<S> {
  static constexpr auto value = object("key_to_skip", skip{}, &S::i);
};
```

```c++
std::string buffer = R"({"key_to_skip": [1,2,3], "i": 7})";
S s{};
glz::read_json(s, buffer);
// The value [1,2,3] will be skipped
expect(s.i == 7); // only the value i will be read into
```

## Hide

Glaze is designed to help with building generic APIs. Sometimes a value needs\
 to be exposed to the API, but it is not desirable to read in or write out\
 the value in JSON. This is the use case for `glz::hide`.

`glz::hide` hides the value from JSON output while still allowing API (and\
 JSON pointer) access.

```c++
struct hide_struct {
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
};

template <>
struct glz::meta<hide_struct> {
   using T = hide_struct;
   static constexpr auto value = object(&T::i,  //
                                        &T::d, //
                                        "hello", hide{&T::hello});
};
```

```c++
hide_struct s{};
auto b = glz::write_json(s);
expect(b == R"({"i":287,"d":3.14})"); // notice that "hello" is hidden from\
 the output
```

## Quoted Numbers

You can parse quoted JSON numbers directly to types like `double`, `int`,\
 etc. by utilizing the `glz::quoted` wrapper.

```c++
struct A {
   double x;
   std::vector<uint32_t> y;
};

template <>
struct glz::meta<A> {
   static constexpr auto value = object("x", glz::quoted_num<&A::x>, "y",\
 glz::quoted_num<&A::y>;
};
```

```json
{
  "x": "3.14",
  "y": ["1", "2", "3"]
}
```

The quoted JSON numbers will be parsed directly into the `double` and\
 `std::vector<uint32_t>`. The `glz::quoted` function works for nested objects\
 and arrays as well.

## JSON Lines (NDJSON) Support

Glaze supports [JSON Lines](https://jsonlines.org) (or Newline Delimited\
 JSON) for array-like types (e.g. `std::vector` and `std::tuple`).

```c++
std::vector<std::string> x = { "Hello", "World", "Ice", "Cream" };
std::string s = glz::write_ndjson(x).value_or("error");
auto ec = glz::read_ndjson(x, s);
```

# More Features

### [Data Recorder](./docs/recorder.md)

### [Command Line Interface Menu](./docs/cli-menu.md)

### [JSON Include System](./docs/json-include.md)

### [JSON Pointer Syntax](./docs/json-pointer-syntax.md)

### [JSON-RPC 2.0](./docs/rpc/json-rpc.md)

### [JSON Schema](./docs/json-schema.md)

### [Shared Library API](./docs/glaze-interfaces.md)

### [Tagged Binary Messages](./docs/binary.md)

### [Thread Pool](./docs/thread-pool.md)

### [Time Trace Profiling](./docs/time-trace.md)

- Output performance profiles to JSON and visualize using [Perfetto](https://\
ui.perfetto.dev)

### [Wrappers](./docs/wrappers.md)

# Extensions

See the `ext` directory for extensions.

- [Eigen](https://gitlab.com/libeigen/eigen)
- [JSON-RPC 2.0](./docs/rpc/json-rpc.md)
- [Command Line Interface Menu (cli_menu)](./docs/cli-menu.md)

# License

Glaze is distributed under the MIT license with an exception for embedded\
 forms:

> --- Optional exception to the license ---
>
> As an exception, if, as a result of your compiling your source code,\
 portions of this Software are embedded into a machine-executable object form\
 of such source code, you may redistribute such embedded portions in such\
 object form without including the copyright and permission notices.

\
description-type: text/markdown;variant=GFM
package-description:
\
# libglaze - In memory, JSON and interface library for C++

This is a `build2` package for the [`glaze`](https://github.com/stephenberry/\
glaze)
C++ library. It provides an in memory, JSON and interface library for C++.


## Usage

To start using `libglaze` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libglaze ^2.5.3
```

Then import the library in your `buildfile`:

```
import libs = libglaze%lib{glaze}
```

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/stephenberry/glaze
package-url: https://github.com/build2-packaging/glaze
email: stephenberry.developer@gmail.com
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: libasio ^1.29.0 ? ($config.libglaze.repe_rpc)
tests: libglaze-tests == 2.9.5
bootstrap-build:
\
project = libglaze

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

config [bool] config.libglaze.repe_rpc ?= true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: glaze/libglaze-2.9.5.tar.gz
sha256sum: d2194450c3b0e5c3d6597d749c1328c3dc5999c46204bedc8a14084040a5c584
:
name: libglaze
version: 4.0.0
type: lib,binless
language: c++
project: glaze
summary: JSON and interface library for C++
license: MIT; MIT License.
topics: json, json rpc 2.0, csv, beve, serialization
description:
\
# Glaze
One of the fastest JSON libraries in the world. Glaze reads and writes from\
 object memory, simplifying interfaces and offering incredible performance.

Glaze also supports:

- [BEVE](https://github.com/beve-org/beve) (binary efficient versatile\
 encoding)
- [CSV](./docs/csv.md) (comma separated value)

## With compile time reflection for MSVC, Clang, and GCC!

- Read/write aggregate initializable structs without writing any metadata or\
 macros!
- See [example on Compiler Explorer](https://gcc.godbolt.org/z/T4To5fKfz)

## Highlights

- Pure, compile time reflection for structs
  - Powerful meta specialization system for custom names and behavior

- JSON [RFC 8259](https://datatracker.ietf.org/doc/html/rfc8259) compliance\
 with UTF-8 validation
- Standard C++ library support
- Header only
- Direct to memory serialization/deserialization
- Compile time maps with constant time lookups and perfect hashing
- Powerful wrappers to modify read/write behavior ([Wrappers](./docs/wrappers\
.md))
- Use your own custom read/write functions ([Custom Read/Write](#custom-readw\
rite))
- [Handle unknown keys](./docs/unknown-keys.md) in a fast and flexible manner
- Direct memory access through [JSON pointer syntax](./docs/json-pointer-synt\
ax.md)
- [Binary data](./docs/binary.md) through the same API for maximum performance
- No exceptions (compiles with `-fno-exceptions`)
  - If you desire helpers that throw for cleaner syntax see [Glaze\
 Exceptions](./docs/exceptions.md)
- No runtime type information necessary (compiles with `-fno-rtti`)
- Rapid error handling with short circuiting
- [JSON-RPC 2.0 support](./docs/rpc/json-rpc.md)
- [JSON Schema generation](./docs/json-schema.md)
- Extremely portable, uses carefully optimized SWAR (SIMD Within A Register)\
 for broad compatibility
- [Partial Read](./docs/partial-read.md) and [Partial Write](./docs/partial-w\
rite.md) support
- [CSV Reading/Writing](./docs/csv.md)
- [Much more!](#more-features)

See [DOCS](https://github.com/stephenberry/glaze/tree/main/docs) for more\
 documentation.

## Performance

| Library                                                      | Roundtrip\
 Time (s) | Write (MB/s) | Read (MB/s) |
| ------------------------------------------------------------ |\
 ------------------ | ------------ | ----------- |
| [**Glaze**](https://github.com/stephenberry/glaze)           | **1.04**    \
       | **1366**     | **1224**    |
| [**simdjson (on demand)**](https://github.com/simdjson/simdjson) | **N/A** \
           | **N/A**      | **1198**    |
| [**yyjson**](https://github.com/ibireme/yyjson)              | **1.23**    \
       | **1005**     | **1107**    |
| [**daw_json_link**](https://github.com/beached/daw_json_link) | **2.93**   \
        | **365**      | **553**     |
| [**RapidJSON**](https://github.com/Tencent/rapidjson)        | **3.65**    \
       | **290**      | **450**     |
| [**Boost.JSON (direct)**](https://boost.org/libs/json)       | **4.76**    \
       | **199**      | **447**     |
| [**json_struct**](https://github.com/jorgen/json_struct)     | **5.50**    \
       | **182**      | **326**     |
| [**nlohmann**](https://github.com/nlohmann/json)             | **15.71**   \
       | **84**       | **80**      |

[Performance test code available here](https://github.com/stephenberry/json_p\
erformance)

*Performance caveats: [simdjson](https://github.com/simdjson/simdjson) and\
 [yyjson](https://github.com/ibireme/yyjson) are great, but they experience\
 major performance losses when the data is not in the expected sequence or\
 any keys are missing (the problem grows as the file size increases, as they\
 must re-iterate through the document).*

*Also, [simdjson](https://github.com/simdjson/simdjson) and\
 [yyjson](https://github.com/ibireme/yyjson) do not support automatic escaped\
 string handling, so if any of the currently non-escaped strings in this\
 benchmark were to contain an escape, the escapes would not be handled.*

[ABC Test](https://github.com/stephenberry/json_performance) shows how\
 simdjson has poor performance when keys are not in the expected sequence:

| Library                                                      | Read (MB/s) |
| ------------------------------------------------------------ | ----------- |
| [**Glaze**](https://github.com/stephenberry/glaze)           | **678**     |
| [**simdjson (on demand)**](https://github.com/simdjson/simdjson) | **93**  \
    |

## Binary Performance

Tagged binary specification: [BEVE](https://github.com/stephenberry/beve)

| Metric                | Roundtrip Time (s) | Write (MB/s) | Read (MB/s) |
| --------------------- | ------------------ | ------------ | ----------- |
| Raw performance       | **0.42**           | **3235**     | **2468**    |
| Equivalent JSON data* | **0.42**           | **3547**     | **2706**    |

JSON size: 670 bytes

BEVE size: 611 bytes

*BEVE packs more efficiently than JSON, so transporting the same data is even\
 faster.

## Example

Your struct will automatically get reflected! No metadata is required by the\
 user.

```c++
struct my_struct
{
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
  std::array<uint64_t, 3> arr = { 1, 2, 3 };
  std::map<std::string, int> map{{"one", 1}, {"two", 2}};
};
```

**JSON** (prettified)

```json
{
   "i": 287,
   "d": 3.14,
   "hello": "Hello World",
   "arr": [
      1,
      2,
      3
   ],
   "map": {
      "one": 1,
      "two": 2
   }
}
```

**Write JSON**

```c++
my_struct s{};
std::string buffer = glz::write_json(s).value_or("error");
```

or

```c++
my_struct s{};
std::string buffer{};
auto ec = glz::write_json(s, buffer);
if (ec) {
  // handle error
}
```

**Read JSON**

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
,"map":{"one":1,"two":2}})";
auto s = glz::read_json<my_struct>(buffer);
if (s) // check std::expected
{
  s.value(); // s.value() is a my_struct populated from buffer
}
```

or

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
,"map":{"one":1,"two":2}})";
my_struct s{};
auto ec = glz::read_json(s, buffer); // populates s from buffer
if (ec) {
  // handle error
}
```

### Read/Write From File

```c++
auto ec = glz::read_file_json(obj, "./obj.json", std::string{});
auto ec = glz::write_file_json(obj, "./obj.json", std::string{});
```

> [!IMPORTANT]
>
> The file name (2nd argument), must be null terminated.

## Compiler/System Support

- Requires C++23
- Tested for both 64bit and 32bit
- Only supports little-endian systems

[Actions](https://github.com/stephenberry/glaze/actions) build and test with\
 [Clang](https://clang.llvm.org) (15+), [MSVC](https://visualstudio.microsoft\
.com/vs/features/cplusplus/) (2022), and [GCC](https://gcc.gnu.org) (12+) on\
 apple, windows, and linux.

![clang build](https://github.com/stephenberry/glaze/actions/workflows/clang.\
yml/badge.svg) ![gcc build](https://github.com/stephenberry/glaze/actions/wor\
kflows/gcc.yml/badge.svg) ![msvc build](https://github.com/stephenberry/glaze\
/actions/workflows/msvc.yml/badge.svg) 

> Glaze seeks to maintain compatibility with the latest three versions of GCC\
 and Clang, as well as the latest version of MSVC and Apple Clang.

### MSVC Compiler Flags

Glaze requires a C++ standard conformant pre-processor, which requires the\
 `/Zc:preprocessor` flag when building with MSVC.

### SIMD CMake Options

The CMake has the option `glaze_ENABLE_AVX2`. This will attempt to use `AVX2`\
 SIMD instructions in some cases to improve performance, as long as the\
 system you are configuring on supports it. Set this option to `OFF` to\
 disable the AVX2 instruction set, such as if you are cross-compiling for\
 Arm. If you aren't using CMake the macro `GLZ_USE_AVX2` enables the feature\
 if defined.

## How To Use Glaze

### [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.ht\
ml)
```cmake
include(FetchContent)

FetchContent_Declare(
  glaze
  GIT_REPOSITORY https://github.com/stephenberry/glaze.git
  GIT_TAG main
  GIT_SHALLOW TRUE
)

FetchContent_MakeAvailable(glaze)

target_link_libraries(${PROJECT_NAME} PRIVATE glaze::glaze)
```

### [Conan](https://conan.io)

- Included in [Conan Center](https://conan.io/center/) ![Conan\
 Center](https://img.shields.io/conan/v/glaze)

```
find_package(glaze REQUIRED)

target_link_libraries(main PRIVATE glaze::glaze)
```

### [build2](https://build2.org)

- Available on [cppget](https://cppget.org/libglaze)

```
import libs = libglaze%lib{glaze}
```

### Arch Linux

- AUR packages: [glaze](https://aur.archlinux.org/packages/glaze) and\
 [glaze-git](https://aur.archlinux.org/packages/glaze-git)

### See this [Example Repository](https://github.com/stephenberry/glaze_examp\
le) for how to use Glaze in a new project

---

## See [FAQ](./docs/FAQ.md) for Frequently Asked Questions

# Explicit Metadata

If you want to specialize your reflection then you can optionally write the\
 code below:

> This metadata is also necessary for non-aggregate initializable structs.

```c++
template <>
struct glz::meta<my_struct> {
   using T = my_struct;
   static constexpr auto value = object(
      &T::i,
      &T::d,
      &T::hello,
      &T::arr,
      &T::map
   );
};
```

## Local Glaze Meta

<details><summary>Glaze also supports metadata within its associated\
 class:</summary>

```c++
struct my_struct
{
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
  std::array<uint64_t, 3> arr = { 1, 2, 3 };
  std::map<std::string, int> map{{"one", 1}, {"two", 2}};
  
  struct glaze {
     using T = my_struct;
     static constexpr auto value = glz::object(
        &T::i,
        &T::d,
        &T::hello,
        &T::arr,
        &T::map
     );
  };
};
```

</details>

## Custom Key Names or Unnamed Types

When you define Glaze metadata, objects will automatically reflect the\
 non-static names of your member object pointers. However, if you want custom\
 names or you register lambda functions or wrappers that do not provide names\
 for your fields, you can optionally add field names in your metadata.

Example of custom names:

```c++
template <>
struct glz::meta<my_struct> {
   using T = my_struct;
   static constexpr auto value = object(
      "integer", &T::i,
      "double", &T::d,
      "string", &T::hello,
      "array", &T::arr,
      "my map", &T::map
   );
};
```

> Each of these strings is optional and can be removed for individual fields\
 if you want the name to be reflected.
>
> Names are required for:
>
> - static constexpr member variables
> - [Wrappers](./docs/wrappers.md)
> - Lambda functions

# Reflection API

Glaze provides a compile time reflection API that can be modified via\
 `glz::meta` specializations. This reflection API uses pure reflection unless\
 a `glz::meta` specialization is provided, in which case the default behavior\
 is overridden by the developer.

```c++
static_assert(glz::reflect<my_struct>::size == 5); // Number of fields
static_assert(glz::reflect<my_struct>::keys[0] == "i"); // Access keys
```

> [!WARNING]
>
> The `glz::reflect` fields described above have been formalized and are\
 unlikely to change. Other fields within the `glz::reflect` struct may evolve\
 as we continue to formalize the spec. Therefore, breaking changes may occur\
 for undocumented fields in the future.

# Custom Read/Write

Custom reading and writing can be achieved through the powerful `to`/`from`\
 specialization approach, which is described here: [custom-serialization.md](\
https://github.com/stephenberry/glaze/blob/main/docs/custom-serialization.md)\
. However, this only works for user defined types.

For common use cases or cases where a specific member variable should have\
 special reading and writing, you can use `glz::custom` to register\
 read/write member functions, std::functions, or lambda functions.

<details><summary>See example:</summary>

```c++
struct custom_encoding
{
   uint64_t x{};
   std::string y{};
   std::array<uint32_t, 3> z{};
   
   void read_x(const std::string& s) {
      x = std::stoi(s);
   }
   
   uint64_t write_x() {
      return x;
   }
   
   void read_y(const std::string& s) {
      y = "hello" + s;
   }
   
   auto& write_z() {
      z[0] = 5;
      return z;
   }
};

template <>
struct glz::meta<custom_encoding>
{
   using T = custom_encoding;
   static constexpr auto value = object("x", custom<&T::read_x, &T::write_x>,\
 //
                                        "y", custom<&T::read_y, &T::y>, //
                                        "z", custom<&T::z, &T::write_z>);
};

suite custom_encoding_test = [] {
   "custom_reading"_test = [] {
      custom_encoding obj{};
      std::string s = R"({"x":"3","y":"world","z":[1,2,3]})";
      expect(!glz::read_json(obj, s));
      expect(obj.x == 3);
      expect(obj.y == "helloworld");
      expect(obj.z == std::array<uint32_t, 3>{1, 2, 3});
   };
   
   "custom_writing"_test = [] {
      custom_encoding obj{};
      std::string s = R"({"x":"3","y":"world","z":[1,2,3]})";
      expect(!glz::read_json(obj, s));
      std::string out{};
      expect(not glz::write_json(obj, out));
      expect(out == R"({"x":3,"y":"helloworld","z":[5,2,3]})");
   };
};
```

</details>

# Object Mapping

When using member pointers (e.g. `&T::a`) the C++ class structures must match\
 the JSON interface. It may be desirable to map C++ classes with differing\
 layouts to the same object interface. This is accomplished through\
 registering lambda functions instead of member pointers.

```c++
template <>
struct glz::meta<Thing> {
   static constexpr auto value = object(
      "i", [](auto&& self) -> auto& { return self.subclass.i; }
   );
};
```

The value `self` passed to the lambda function will be a `Thing` object, and\
 the lambda function allows us to make the subclass invisible to the object\
 interface.

Lambda functions by default copy returns, therefore the `auto&` return type\
 is typically required in order for glaze to write to memory.

> Note that remapping can also be achieved through pointers/references, as\
 glaze treats values, pointers, and references in the same manner when\
 writing/reading.

# Value Types

A class can be treated as an underlying value as follows:

```c++
struct S {
  int x{};
};

template <>
struct glz::meta<S> {
  static constexpr auto value{ &S::x };
};
```

or using a lambda:

```c++
template <>
struct glz::meta<S> {
  static constexpr auto value = [](auto& self) -> auto& { return self.x; };
};
```

# Error Handling

Glaze is safe to use with untrusted messages. Errors are returned as error\
 codes, typically within a `glz::expected`, which behaves just like a\
 `std::expected`.

> Glaze works to short circuit error handling, which means the parsing exits\
 very rapidly if an error is encountered.

To generate more helpful error messages, call `format_error`:

```c++
auto pe = glz::read_json(obj, buffer);
if (pe) {
  std::string descriptive_error = glz::format_error(pe, buffer);
}
```

This test case:

```json
{"Hello":"World"x, "color": "red"}
```

Produces this error:

```
1:17: expected_comma
   {"Hello":"World"x, "color": "red"}
                   ^
```

Denoting that x is invalid here.

# Input Buffer (Null) Termination

A non-const `std::string` is recommended for input buffers, as this allows\
 Glaze to improve performance with temporary padding and the buffer will be\
 null terminated.

## JSON

By default the option `null_terminated` is set to `true` and null-terminated\
 buffers must be used when parsing JSON. The option can be turned off with a\
 small loss in performance, which allows non-null terminated buffers:

```c++
constexpr glz::opts options{.null_terminated = false};
auto ec = glz::read<options>(value, buffer); // read in a non-null terminated\
 buffer
```

## BEVE

Null-termination is not required when parsing BEVE (binary). It makes no\
 difference in performance.

## CSV

> [!WARNING]
>
> Currently, `null_terminated = false` is not valid for CSV parsing and\
 buffers must be null terminated.


# Type Support

## Array Types

Array types logically convert to JSON array values. Concepts are used to\
 allow various containers and even user containers if they match standard\
 library interfaces.

- `glz::array` (compile time mixed types)
- `std::tuple` (compile time mixed types)
- `std::array`
- `std::vector`
- `std::deque`
- `std::list`
- `std::forward_list`
- `std::span`
- `std::set`
- `std::unordered_set`

## Object Types

Object types logically convert to JSON object values, such as maps. Like\
 JSON, Glaze treats object definitions as unordered maps. Therefore the order\
 of an object layout does not have to match the same binary sequence in C++.

- `glz::object` (compile time mixed types)
- `std::map`
- `std::unordered_map`
- `std::pair` (enables dynamic keys in stack storage)

> `std::pair` is handled as an object with a single key and value, but when\
 `std::pair` is used in an array, Glaze concatenates the pairs into a single\
 object. `std::vector<std::pair<...>>` will serialize as a single  object. If\
 you don't want this behavior set the compile time option `.concatenate =\
 false`.

## Variants

- `std::variant`

See [Variant Handling](./docs/variant-handling.md) for more information.

## Nullable Types

- `std::unique_ptr`
- `std::shared_ptr`
- `std::optional`

Nullable types may be allocated by valid input or nullified by the `null`\
 keyword.

```c++
std::unique_ptr<int> ptr{};
std::string buffer{};
expect(not glz::write_json(ptr, buffer));
expect(buffer == "null");

expect(not glz::read_json(ptr, "5"));
expect(*ptr == 5);
buffer.clear();
expect(not glz::write_json(ptr, buffer));
expect(buffer == "5");

expect(not glz::read_json(ptr, "null"));
expect(!bool(ptr));
```

## Enums

By default enums will be written and read in integer form. No `glz::meta` is\
 necessary if this is the desired behavior.

However, if you prefer to use enums as strings in JSON, they can be\
 registered in the `glz::meta` as follows:

```c++
enum class Color { Red, Green, Blue };

template <>
struct glz::meta<Color> {
   using enum Color;
   static constexpr auto value = enumerate(Red,
                                           Green,
                                           Blue
   );
};
```

In use:

```c++
Color color = Color::Red;
std::string buffer{};
glz::write_json(color, buffer);
expect(buffer == "\"Red\"");
```

# JSON With Comments (JSONC)

Comments are supported with the specification defined here:\
 [JSONC](https://github.com/stephenberry/JSONC)

Read support for comments is provided with `glz::read_jsonc` or\
 `glz::read<glz::opts{.comments = true}>(...)`.

# Prettify JSON

Formatted JSON can be written out directly via a compile time option:

```c++
auto ec = glz::write<glz::opts{.prettify = true}>(obj, buffer);
```

Or, JSON text can be formatted with the `glz::prettify_json` function:

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
})");
auto beautiful = glz::prettify_json(buffer);
```

`beautiful` is now:

```json
{
   "i": 287,
   "d": 3.14,
   "hello": "Hello World",
   "arr": [
      1,
      2,
      3
   ]
}
```

# Minify JSON

To write minified JSON:

```c++
auto ec = glz::write_json(obj, buffer); // default is minified
```

To minify JSON text call:

```c++
std::string minified = glz::minify_json(buffer);
```

## Minified JSON Reading

If you wish require minified JSON or know your input will always be minified,\
 then you can gain a little more performance by using the compile time option\
 `.minified = true`.

```c++
auto ec = glz::read<glz::opts{.minified = true}>(obj, buffer);
```

## Boolean Flags

Glaze supports registering a set of boolean flags that behave as an array of\
 string options:

```c++
struct flags_t {
   bool x{ true };
   bool y{};
   bool z{ true };
};

template <>
struct glz::meta<flags_t> {
   using T = flags_t;
   static constexpr auto value = flags("x", &T::x, "y", &T::y, "z", &T::z);
};
```

Example:

```c++
flags_t s{};
expect(glz::write_json(s) == R"(["x","z"])");
```

Only `"x"` and `"z"` are written out, because they are true. Reading in the\
 buffer will set the appropriate booleans.

> When writing BEVE, `flags` only use one bit per boolean (byte aligned).

## Logging JSON

Sometimes you just want to write out JSON structures on the fly as\
 efficiently as possible. Glaze provides tuple-like structures that allow you\
 to stack allocate structures to write out JSON with high speed. These\
 structures are named `glz::obj` for objects and `glz::arr` for arrays.

Below is an example of building an object, which also contains an array, and\
 writing it out.

```c++
auto obj = glz::obj{"pi", 3.14, "happy", true, "name", "Stephen", "arr",\
 glz::arr{"Hello", "World", 2}};

std::string s{};
expect(not glz::write_json(obj, s));
expect(s == R"({"pi":3.14,"happy":true,"name":"Stephen","arr":["Hello","World\
",2]})");
```

> This approach is significantly faster than `glz::json_t` for generic JSON.\
 But, may not be suitable for all contexts.

## Merge

`glz::merge` allows the user to merge multiple JSON object types into a\
 single object.

```c++
glz::obj o{"pi", 3.141};
std::map<std::string_view, int> map = {{"a", 1}, {"b", 2}, {"c", 3}};
auto merged = glz::merge{o, map};
std::string s{};
glz::write_json(merged, s); // will write out a single, merged object
// s is now: {"pi":3.141,"a":0,"b":2,"c":3}
```

> `glz::merge` stores references to lvalues to avoid copies

## Generic JSON

See [Generic JSON](./docs/generic-json.md) for `glz::json_t`.

```c++
glz::json_t json{};
std::string buffer = R"([5,"Hello World",{"pi":3.14}])";
glz::read_json(json, buffer);
assert(json[2]["pi"].get<double>() == 3.14);
```

## Raw Buffer Performance

Glaze is just about as fast writing to a `std::string` as it is writing to a\
 raw char buffer. If you have sufficiently allocated space in your buffer you\
 can write to the raw buffer, as shown below, but it is not recommended.

```
glz::read_json(obj, buffer);
const auto n = glz::write_json(obj, buffer.data()).value_or(0);
buffer.resize(n);
```

## Compile Time Options

The `glz::opts` struct defines compile time optional settings for\
 reading/writing.

Instead of calling `glz::read_json(...)`, you can call `glz::read<glz::opts{}\
>(...)` and customize the options.

For example: `glz::read<glz::opts{.error_on_unknown_keys = false}>(...)` will\
 turn off erroring on unknown keys and simple skip the items.

`glz::opts` can also switch between formats:

- `glz::read<glz::opts{.format = glz::BEVE}>(...)` -> `glz::read_beve(...)`
- `glz::read<glz::opts{.format = glz::JSON}>(...)` -> `glz::read_json(...)`

## Available Compile Time Options

The struct below shows the available options and the default behavior.

```c++
struct opts {
  uint32_t format = json;
  bool comments = false; // Support reading in JSONC style comments
  bool error_on_unknown_keys = true; // Error when an unknown key is\
 encountered
  bool skip_null_members = true; // Skip writing out params in an object if\
 the value is null
  bool use_hash_comparison = true; // Will replace some string equality\
 checks with hash checks
  bool prettify = false; // Write out prettified JSON
  bool minified = false; // Require minified input for JSON, which results in\
 faster read performance
  char indentation_char = ' '; // Prettified JSON indentation char
  uint8_t indentation_width = 3; // Prettified JSON indentation size
  bool new_lines_in_arrays = true; // Whether prettified arrays should have\
 new lines for each element
  bool shrink_to_fit = false; // Shrinks dynamic containers to new size to\
 save memory
  bool write_type_info = true; // Write type info for meta objects in variants
  bool error_on_missing_keys = false; // Require all non nullable keys to be\
 present in the object. Use
                                        // skip_null_members = false to\
 require nullable members
  bool error_on_const_read =
     false; // Error if attempt is made to read into a const value, by\
 default the value is skipped without error
  bool validate_skipped = false; // If full validation should be performed on\
 skipped values
  bool validate_trailing_whitespace =
     false; // If, after parsing a value, we want to validate the trailing\
 whitespace

  uint8_t layout = rowwise; // CSV row wise output/input

  // The maximum precision type used for writing floats, higher precision\
 floats will be cast down to this precision
  float_precision float_max_write_precision{};

  bool bools_as_numbers = false; // Read and write booleans with 1's and 0's

  bool escaped_unicode_key_conversion =
     false; // JSON does not require escaped unicode keys to match with\
 unescaped UTF-8
  // This enables automatic escaped unicode unescaping and matching for keys\
 in glz::object, but it comes at a
  // performance cost.

  bool quoted_num = false; // treat numbers as quoted or array-like types as\
 having quoted numbers
  bool number = false; // read numbers as strings and write these string as\
 numbers
  bool raw = false; // write out string like values without quotes
  bool raw_string =
     false; // do not decode/encode escaped characters for strings (improves\
 read/write performance)
  bool structs_as_arrays = false; // Handle structs (reading/writing) without\
 keys, which applies
  bool allow_conversions = true; // Whether conversions between convertible\
 types are
  // allowed in binary, e.g. double -> float

  bool partial_read =
     false; // Reads into only existing fields and elements and then exits\
 without parsing the rest of the input

  // glaze_object_t concepts
  bool partial_read_nested = false; // Advance the partially read struct to\
 the end of the struct
  bool concatenate = true; // Concatenates ranges of std::pair into single\
 objects when writing

  bool hide_non_invocable =
     true; // Hides non-invocable members from the cli_menu (may be applied\
 elsewhere in the future)
};
```

> Many of these compile time options have wrappers to apply the option to\
 only a single field. See [Wrappers](./docs/wrappers.md) for more details.

## JSON Conformance

By default Glaze is strictly conformant with the latest JSON standard except\
 in two cases with associated options:

- `validate_skipped`
  This option does full JSON validation for skipped values when parsing. This\
 is not set by default because values are typically skipped when the user is\
 unconcerned with them, and Glaze still validates for major issues. But, this\
 makes skipping faster by not caring if the skipped values are exactly JSON\
 conformant. For example, by default Glaze will ensure skipped numbers have\
 all valid numerical characters, but it will not validate for issues like\
 leading zeros in skipped numbers unless `validate_skipped` is on. Wherever\
 Glaze parses a value to be used it is fully validated.
- `validate_trailing_whitespace`
  This option validates the trailing whitespace in a parsed document. Because\
 Glaze parses C++ structs, there is typically no need to continue parsing\
 after the object of interest has been read. Turn on this option if you want\
 to ensure that the rest of the document has valid whitespace, otherwise\
 Glaze will just ignore the content after the content of interest has been\
 parsed.

> [!NOTE]
>
> Glaze does not automatically unicode escape control characters (e.g.\
 `"\x1f"` to `"\u001f"`), as this poses a risk of embedding null characters\
 and other invisible characters in strings. A compile time option will be\
 added to enable these conversions (open issue: [unicode escaped\
 write](https://github.com/stephenberry/glaze/issues/812)), but it will not\
 be the default behavior.

## Skip

It can be useful to acknowledge a keys existence in an object to prevent\
 errors, and yet the value may not be needed or exist in C++. These cases are\
 handled by registering a `glz::skip` type with the meta data.

<details><summary>See example:</summary>

```c++
struct S {
  int i{};
};

template <>
struct glz::meta<S> {
  static constexpr auto value = object("key_to_skip", skip{}, &S::i);
};
```

```c++
std::string buffer = R"({"key_to_skip": [1,2,3], "i": 7})";
S s{};
glz::read_json(s, buffer);
// The value [1,2,3] will be skipped
expect(s.i == 7); // only the value i will be read into
```

</details>

## Hide

Glaze is designed to help with building generic APIs. Sometimes a value needs\
 to be exposed to the API, but it is not desirable to read in or write out\
 the value in JSON. This is the use case for `glz::hide`.

`glz::hide` hides the value from JSON output while still allowing API (and\
 JSON pointer) access.

<details><summary>See example:</summary>

```c++
struct hide_struct {
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
};

template <>
struct glz::meta<hide_struct> {
   using T = hide_struct;
   static constexpr auto value = object(&T::i,  //
                                        &T::d, //
                                        "hello", hide{&T::hello});
};
```

```c++
hide_struct s{};
auto b = glz::write_json(s);
expect(b == R"({"i":287,"d":3.14})"); // notice that "hello" is hidden from\
 the output
```

</details>

## Quoted Numbers

You can parse quoted JSON numbers directly to types like `double`, `int`,\
 etc. by utilizing the `glz::quoted` wrapper.

```c++
struct A {
   double x;
   std::vector<uint32_t> y;
};

template <>
struct glz::meta<A> {
   static constexpr auto value = object("x", glz::quoted_num<&A::x>, "y",\
 glz::quoted_num<&A::y>;
};
```

```json
{
  "x": "3.14",
  "y": ["1", "2", "3"]
}
```

The quoted JSON numbers will be parsed directly into the `double` and\
 `std::vector<uint32_t>`. The `glz::quoted` function works for nested objects\
 and arrays as well.

## JSON Lines (NDJSON) Support

Glaze supports [JSON Lines](https://jsonlines.org) (or Newline Delimited\
 JSON) for array-like types (e.g. `std::vector` and `std::tuple`).

```c++
std::vector<std::string> x = { "Hello", "World", "Ice", "Cream" };
std::string s = glz::write_ndjson(x).value_or("error");
auto ec = glz::read_ndjson(x, s);
```

# More Features

### [Data Recorder](./docs/recorder.md)

### [Command Line Interface Menu](./docs/cli-menu.md)

### [JSON Include System](./docs/json-include.md)

### [JSON Pointer Syntax](./docs/json-pointer-syntax.md)

### [JSON-RPC 2.0](./docs/rpc/json-rpc.md)

### [JSON Schema](./docs/json-schema.md)

### [Shared Library API](./docs/glaze-interfaces.md)

### [Tagged Binary Messages](./docs/binary.md)

### [Thread Pool](./docs/thread-pool.md)

### [Time Trace Profiling](./docs/time-trace.md)

- Output performance profiles to JSON and visualize using [Perfetto](https://\
ui.perfetto.dev)

### [Wrappers](./docs/wrappers.md)

# Extensions

See the `ext` directory for extensions.

- [Eigen](https://gitlab.com/libeigen/eigen)
- [JSON-RPC 2.0](./docs/rpc/json-rpc.md)
- [Command Line Interface Menu (cli_menu)](./docs/cli-menu.md)

# License

Glaze is distributed under the MIT license with an exception for embedded\
 forms:

> --- Optional exception to the license ---
>
> As an exception, if, as a result of your compiling your source code,\
 portions of this Software are embedded into a machine-executable object form\
 of such source code, you may redistribute such embedded portions in such\
 object form without including the copyright and permission notices.

\
description-type: text/markdown;variant=GFM
package-description:
\
# libglaze - In memory, JSON and interface library for C++

This is a `build2` package for the [`glaze`](https://github.com/stephenberry/\
glaze)
C++ library. It provides an in memory, JSON and interface library for C++.


## Usage

To start using `libglaze` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libglaze ^2.5.3
```

Then import the library in your `buildfile`:

```
import libs = libglaze%lib{glaze}
```

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/stephenberry/glaze
package-url: https://github.com/build2-packaging/glaze
email: stephenberry.developer@gmail.com
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: libasio ^1.29.0 ? ($config.libglaze.repe_rpc)
requires: c++23
tests: libglaze-tests == 4.0.0
bootstrap-build:
\
project = libglaze

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

config [bool] config.libglaze.repe_rpc ?= true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: glaze/libglaze-4.0.0.tar.gz
sha256sum: ead0ab52baab0b25baa55a5b9f90a19b522e2cb45a350353a1c000269ec2b8e5
:
name: libglaze
version: 4.0.1
type: lib,binless
language: c++
project: glaze
summary: JSON and interface library for C++
license: MIT; MIT License.
topics: json, json rpc 2.0, csv, beve, serialization
description:
\
# Glaze
One of the fastest JSON libraries in the world. Glaze reads and writes from\
 object memory, simplifying interfaces and offering incredible performance.

Glaze also supports:

- [BEVE](https://github.com/beve-org/beve) (binary efficient versatile\
 encoding)
- [CSV](./docs/csv.md) (comma separated value)

## With compile time reflection for MSVC, Clang, and GCC!

- Read/write aggregate initializable structs without writing any metadata or\
 macros!
- See [example on Compiler Explorer](https://gcc.godbolt.org/z/T4To5fKfz)

## Highlights

- Pure, compile time reflection for structs
  - Powerful meta specialization system for custom names and behavior

- JSON [RFC 8259](https://datatracker.ietf.org/doc/html/rfc8259) compliance\
 with UTF-8 validation
- Standard C++ library support
- Header only
- Direct to memory serialization/deserialization
- Compile time maps with constant time lookups and perfect hashing
- Powerful wrappers to modify read/write behavior ([Wrappers](./docs/wrappers\
.md))
- Use your own custom read/write functions ([Custom Read/Write](#custom-readw\
rite))
- [Handle unknown keys](./docs/unknown-keys.md) in a fast and flexible manner
- Direct memory access through [JSON pointer syntax](./docs/json-pointer-synt\
ax.md)
- [Binary data](./docs/binary.md) through the same API for maximum performance
- No exceptions (compiles with `-fno-exceptions`)
  - If you desire helpers that throw for cleaner syntax see [Glaze\
 Exceptions](./docs/exceptions.md)
- No runtime type information necessary (compiles with `-fno-rtti`)
- Rapid error handling with short circuiting
- [JSON-RPC 2.0 support](./docs/rpc/json-rpc.md)
- [JSON Schema generation](./docs/json-schema.md)
- Extremely portable, uses carefully optimized SWAR (SIMD Within A Register)\
 for broad compatibility
- [Partial Read](./docs/partial-read.md) and [Partial Write](./docs/partial-w\
rite.md) support
- [CSV Reading/Writing](./docs/csv.md)
- [Much more!](#more-features)

See [DOCS](https://github.com/stephenberry/glaze/tree/main/docs) for more\
 documentation.

## Performance

| Library                                                      | Roundtrip\
 Time (s) | Write (MB/s) | Read (MB/s) |
| ------------------------------------------------------------ |\
 ------------------ | ------------ | ----------- |
| [**Glaze**](https://github.com/stephenberry/glaze)           | **1.04**    \
       | **1366**     | **1224**    |
| [**simdjson (on demand)**](https://github.com/simdjson/simdjson) | **N/A** \
           | **N/A**      | **1198**    |
| [**yyjson**](https://github.com/ibireme/yyjson)              | **1.23**    \
       | **1005**     | **1107**    |
| [**daw_json_link**](https://github.com/beached/daw_json_link) | **2.93**   \
        | **365**      | **553**     |
| [**RapidJSON**](https://github.com/Tencent/rapidjson)        | **3.65**    \
       | **290**      | **450**     |
| [**Boost.JSON (direct)**](https://boost.org/libs/json)       | **4.76**    \
       | **199**      | **447**     |
| [**json_struct**](https://github.com/jorgen/json_struct)     | **5.50**    \
       | **182**      | **326**     |
| [**nlohmann**](https://github.com/nlohmann/json)             | **15.71**   \
       | **84**       | **80**      |

[Performance test code available here](https://github.com/stephenberry/json_p\
erformance)

*Performance caveats: [simdjson](https://github.com/simdjson/simdjson) and\
 [yyjson](https://github.com/ibireme/yyjson) are great, but they experience\
 major performance losses when the data is not in the expected sequence or\
 any keys are missing (the problem grows as the file size increases, as they\
 must re-iterate through the document).*

*Also, [simdjson](https://github.com/simdjson/simdjson) and\
 [yyjson](https://github.com/ibireme/yyjson) do not support automatic escaped\
 string handling, so if any of the currently non-escaped strings in this\
 benchmark were to contain an escape, the escapes would not be handled.*

[ABC Test](https://github.com/stephenberry/json_performance) shows how\
 simdjson has poor performance when keys are not in the expected sequence:

| Library                                                      | Read (MB/s) |
| ------------------------------------------------------------ | ----------- |
| [**Glaze**](https://github.com/stephenberry/glaze)           | **678**     |
| [**simdjson (on demand)**](https://github.com/simdjson/simdjson) | **93**  \
    |

## Binary Performance

Tagged binary specification: [BEVE](https://github.com/stephenberry/beve)

| Metric                | Roundtrip Time (s) | Write (MB/s) | Read (MB/s) |
| --------------------- | ------------------ | ------------ | ----------- |
| Raw performance       | **0.42**           | **3235**     | **2468**    |
| Equivalent JSON data* | **0.42**           | **3547**     | **2706**    |

JSON size: 670 bytes

BEVE size: 611 bytes

*BEVE packs more efficiently than JSON, so transporting the same data is even\
 faster.

## Example

Your struct will automatically get reflected! No metadata is required by the\
 user.

```c++
struct my_struct
{
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
  std::array<uint64_t, 3> arr = { 1, 2, 3 };
  std::map<std::string, int> map{{"one", 1}, {"two", 2}};
};
```

**JSON** (prettified)

```json
{
   "i": 287,
   "d": 3.14,
   "hello": "Hello World",
   "arr": [
      1,
      2,
      3
   ],
   "map": {
      "one": 1,
      "two": 2
   }
}
```

**Write JSON**

```c++
my_struct s{};
std::string buffer = glz::write_json(s).value_or("error");
```

or

```c++
my_struct s{};
std::string buffer{};
auto ec = glz::write_json(s, buffer);
if (ec) {
  // handle error
}
```

**Read JSON**

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
,"map":{"one":1,"two":2}})";
auto s = glz::read_json<my_struct>(buffer);
if (s) // check std::expected
{
  s.value(); // s.value() is a my_struct populated from buffer
}
```

or

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
,"map":{"one":1,"two":2}})";
my_struct s{};
auto ec = glz::read_json(s, buffer); // populates s from buffer
if (ec) {
  // handle error
}
```

### Read/Write From File

```c++
auto ec = glz::read_file_json(obj, "./obj.json", std::string{});
auto ec = glz::write_file_json(obj, "./obj.json", std::string{});
```

> [!IMPORTANT]
>
> The file name (2nd argument), must be null terminated.

## Compiler/System Support

- Requires C++23
- Tested for both 64bit and 32bit
- Only supports little-endian systems

[Actions](https://github.com/stephenberry/glaze/actions) build and test with\
 [Clang](https://clang.llvm.org) (15+), [MSVC](https://visualstudio.microsoft\
.com/vs/features/cplusplus/) (2022), and [GCC](https://gcc.gnu.org) (12+) on\
 apple, windows, and linux.

![clang build](https://github.com/stephenberry/glaze/actions/workflows/clang.\
yml/badge.svg) ![gcc build](https://github.com/stephenberry/glaze/actions/wor\
kflows/gcc.yml/badge.svg) ![msvc build](https://github.com/stephenberry/glaze\
/actions/workflows/msvc.yml/badge.svg) 

> Glaze seeks to maintain compatibility with the latest three versions of GCC\
 and Clang, as well as the latest version of MSVC and Apple Clang.

### MSVC Compiler Flags

Glaze requires a C++ standard conformant pre-processor, which requires the\
 `/Zc:preprocessor` flag when building with MSVC.

### SIMD CMake Options

The CMake has the option `glaze_ENABLE_AVX2`. This will attempt to use `AVX2`\
 SIMD instructions in some cases to improve performance, as long as the\
 system you are configuring on supports it. Set this option to `OFF` to\
 disable the AVX2 instruction set, such as if you are cross-compiling for\
 Arm. If you aren't using CMake the macro `GLZ_USE_AVX2` enables the feature\
 if defined.

## How To Use Glaze

### [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.ht\
ml)
```cmake
include(FetchContent)

FetchContent_Declare(
  glaze
  GIT_REPOSITORY https://github.com/stephenberry/glaze.git
  GIT_TAG main
  GIT_SHALLOW TRUE
)

FetchContent_MakeAvailable(glaze)

target_link_libraries(${PROJECT_NAME} PRIVATE glaze::glaze)
```

### [Conan](https://conan.io)

- Included in [Conan Center](https://conan.io/center/) ![Conan\
 Center](https://img.shields.io/conan/v/glaze)

```
find_package(glaze REQUIRED)

target_link_libraries(main PRIVATE glaze::glaze)
```

### [build2](https://build2.org)

- Available on [cppget](https://cppget.org/libglaze)

```
import libs = libglaze%lib{glaze}
```

### Arch Linux

- AUR packages: [glaze](https://aur.archlinux.org/packages/glaze) and\
 [glaze-git](https://aur.archlinux.org/packages/glaze-git)

### See this [Example Repository](https://github.com/stephenberry/glaze_examp\
le) for how to use Glaze in a new project

---

## See [FAQ](./docs/FAQ.md) for Frequently Asked Questions

# Explicit Metadata

If you want to specialize your reflection then you can optionally write the\
 code below:

> This metadata is also necessary for non-aggregate initializable structs.

```c++
template <>
struct glz::meta<my_struct> {
   using T = my_struct;
   static constexpr auto value = object(
      &T::i,
      &T::d,
      &T::hello,
      &T::arr,
      &T::map
   );
};
```

## Local Glaze Meta

<details><summary>Glaze also supports metadata within its associated\
 class:</summary>

```c++
struct my_struct
{
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
  std::array<uint64_t, 3> arr = { 1, 2, 3 };
  std::map<std::string, int> map{{"one", 1}, {"two", 2}};
  
  struct glaze {
     using T = my_struct;
     static constexpr auto value = glz::object(
        &T::i,
        &T::d,
        &T::hello,
        &T::arr,
        &T::map
     );
  };
};
```

</details>

## Custom Key Names or Unnamed Types

When you define Glaze metadata, objects will automatically reflect the\
 non-static names of your member object pointers. However, if you want custom\
 names or you register lambda functions or wrappers that do not provide names\
 for your fields, you can optionally add field names in your metadata.

Example of custom names:

```c++
template <>
struct glz::meta<my_struct> {
   using T = my_struct;
   static constexpr auto value = object(
      "integer", &T::i,
      "double", &T::d,
      "string", &T::hello,
      "array", &T::arr,
      "my map", &T::map
   );
};
```

> Each of these strings is optional and can be removed for individual fields\
 if you want the name to be reflected.
>
> Names are required for:
>
> - static constexpr member variables
> - [Wrappers](./docs/wrappers.md)
> - Lambda functions

# Reflection API

Glaze provides a compile time reflection API that can be modified via\
 `glz::meta` specializations. This reflection API uses pure reflection unless\
 a `glz::meta` specialization is provided, in which case the default behavior\
 is overridden by the developer.

```c++
static_assert(glz::reflect<my_struct>::size == 5); // Number of fields
static_assert(glz::reflect<my_struct>::keys[0] == "i"); // Access keys
```

> [!WARNING]
>
> The `glz::reflect` fields described above have been formalized and are\
 unlikely to change. Other fields within the `glz::reflect` struct may evolve\
 as we continue to formalize the spec. Therefore, breaking changes may occur\
 for undocumented fields in the future.

# Custom Read/Write

Custom reading and writing can be achieved through the powerful `to`/`from`\
 specialization approach, which is described here: [custom-serialization.md](\
https://github.com/stephenberry/glaze/blob/main/docs/custom-serialization.md)\
. However, this only works for user defined types.

For common use cases or cases where a specific member variable should have\
 special reading and writing, you can use `glz::custom` to register\
 read/write member functions, std::functions, or lambda functions.

<details><summary>See example:</summary>

```c++
struct custom_encoding
{
   uint64_t x{};
   std::string y{};
   std::array<uint32_t, 3> z{};
   
   void read_x(const std::string& s) {
      x = std::stoi(s);
   }
   
   uint64_t write_x() {
      return x;
   }
   
   void read_y(const std::string& s) {
      y = "hello" + s;
   }
   
   auto& write_z() {
      z[0] = 5;
      return z;
   }
};

template <>
struct glz::meta<custom_encoding>
{
   using T = custom_encoding;
   static constexpr auto value = object("x", custom<&T::read_x, &T::write_x>,\
 //
                                        "y", custom<&T::read_y, &T::y>, //
                                        "z", custom<&T::z, &T::write_z>);
};

suite custom_encoding_test = [] {
   "custom_reading"_test = [] {
      custom_encoding obj{};
      std::string s = R"({"x":"3","y":"world","z":[1,2,3]})";
      expect(!glz::read_json(obj, s));
      expect(obj.x == 3);
      expect(obj.y == "helloworld");
      expect(obj.z == std::array<uint32_t, 3>{1, 2, 3});
   };
   
   "custom_writing"_test = [] {
      custom_encoding obj{};
      std::string s = R"({"x":"3","y":"world","z":[1,2,3]})";
      expect(!glz::read_json(obj, s));
      std::string out{};
      expect(not glz::write_json(obj, out));
      expect(out == R"({"x":3,"y":"helloworld","z":[5,2,3]})");
   };
};
```

</details>

# Object Mapping

When using member pointers (e.g. `&T::a`) the C++ class structures must match\
 the JSON interface. It may be desirable to map C++ classes with differing\
 layouts to the same object interface. This is accomplished through\
 registering lambda functions instead of member pointers.

```c++
template <>
struct glz::meta<Thing> {
   static constexpr auto value = object(
      "i", [](auto&& self) -> auto& { return self.subclass.i; }
   );
};
```

The value `self` passed to the lambda function will be a `Thing` object, and\
 the lambda function allows us to make the subclass invisible to the object\
 interface.

Lambda functions by default copy returns, therefore the `auto&` return type\
 is typically required in order for glaze to write to memory.

> Note that remapping can also be achieved through pointers/references, as\
 glaze treats values, pointers, and references in the same manner when\
 writing/reading.

# Value Types

A class can be treated as an underlying value as follows:

```c++
struct S {
  int x{};
};

template <>
struct glz::meta<S> {
  static constexpr auto value{ &S::x };
};
```

or using a lambda:

```c++
template <>
struct glz::meta<S> {
  static constexpr auto value = [](auto& self) -> auto& { return self.x; };
};
```

# Error Handling

Glaze is safe to use with untrusted messages. Errors are returned as error\
 codes, typically within a `glz::expected`, which behaves just like a\
 `std::expected`.

> Glaze works to short circuit error handling, which means the parsing exits\
 very rapidly if an error is encountered.

To generate more helpful error messages, call `format_error`:

```c++
auto pe = glz::read_json(obj, buffer);
if (pe) {
  std::string descriptive_error = glz::format_error(pe, buffer);
}
```

This test case:

```json
{"Hello":"World"x, "color": "red"}
```

Produces this error:

```
1:17: expected_comma
   {"Hello":"World"x, "color": "red"}
                   ^
```

Denoting that x is invalid here.

# Input Buffer (Null) Termination

A non-const `std::string` is recommended for input buffers, as this allows\
 Glaze to improve performance with temporary padding and the buffer will be\
 null terminated.

## JSON

By default the option `null_terminated` is set to `true` and null-terminated\
 buffers must be used when parsing JSON. The option can be turned off with a\
 small loss in performance, which allows non-null terminated buffers:

```c++
constexpr glz::opts options{.null_terminated = false};
auto ec = glz::read<options>(value, buffer); // read in a non-null terminated\
 buffer
```

## BEVE

Null-termination is not required when parsing BEVE (binary). It makes no\
 difference in performance.

## CSV

> [!WARNING]
>
> Currently, `null_terminated = false` is not valid for CSV parsing and\
 buffers must be null terminated.


# Type Support

## Array Types

Array types logically convert to JSON array values. Concepts are used to\
 allow various containers and even user containers if they match standard\
 library interfaces.

- `glz::array` (compile time mixed types)
- `std::tuple` (compile time mixed types)
- `std::array`
- `std::vector`
- `std::deque`
- `std::list`
- `std::forward_list`
- `std::span`
- `std::set`
- `std::unordered_set`

## Object Types

Object types logically convert to JSON object values, such as maps. Like\
 JSON, Glaze treats object definitions as unordered maps. Therefore the order\
 of an object layout does not have to match the same binary sequence in C++.

- `glz::object` (compile time mixed types)
- `std::map`
- `std::unordered_map`
- `std::pair` (enables dynamic keys in stack storage)

> `std::pair` is handled as an object with a single key and value, but when\
 `std::pair` is used in an array, Glaze concatenates the pairs into a single\
 object. `std::vector<std::pair<...>>` will serialize as a single  object. If\
 you don't want this behavior set the compile time option `.concatenate =\
 false`.

## Variants

- `std::variant`

See [Variant Handling](./docs/variant-handling.md) for more information.

## Nullable Types

- `std::unique_ptr`
- `std::shared_ptr`
- `std::optional`

Nullable types may be allocated by valid input or nullified by the `null`\
 keyword.

```c++
std::unique_ptr<int> ptr{};
std::string buffer{};
expect(not glz::write_json(ptr, buffer));
expect(buffer == "null");

expect(not glz::read_json(ptr, "5"));
expect(*ptr == 5);
buffer.clear();
expect(not glz::write_json(ptr, buffer));
expect(buffer == "5");

expect(not glz::read_json(ptr, "null"));
expect(!bool(ptr));
```

## Enums

By default enums will be written and read in integer form. No `glz::meta` is\
 necessary if this is the desired behavior.

However, if you prefer to use enums as strings in JSON, they can be\
 registered in the `glz::meta` as follows:

```c++
enum class Color { Red, Green, Blue };

template <>
struct glz::meta<Color> {
   using enum Color;
   static constexpr auto value = enumerate(Red,
                                           Green,
                                           Blue
   );
};
```

In use:

```c++
Color color = Color::Red;
std::string buffer{};
glz::write_json(color, buffer);
expect(buffer == "\"Red\"");
```

# JSON With Comments (JSONC)

Comments are supported with the specification defined here:\
 [JSONC](https://github.com/stephenberry/JSONC)

Read support for comments is provided with `glz::read_jsonc` or\
 `glz::read<glz::opts{.comments = true}>(...)`.

# Prettify JSON

Formatted JSON can be written out directly via a compile time option:

```c++
auto ec = glz::write<glz::opts{.prettify = true}>(obj, buffer);
```

Or, JSON text can be formatted with the `glz::prettify_json` function:

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
})");
auto beautiful = glz::prettify_json(buffer);
```

`beautiful` is now:

```json
{
   "i": 287,
   "d": 3.14,
   "hello": "Hello World",
   "arr": [
      1,
      2,
      3
   ]
}
```

# Minify JSON

To write minified JSON:

```c++
auto ec = glz::write_json(obj, buffer); // default is minified
```

To minify JSON text call:

```c++
std::string minified = glz::minify_json(buffer);
```

## Minified JSON Reading

If you wish require minified JSON or know your input will always be minified,\
 then you can gain a little more performance by using the compile time option\
 `.minified = true`.

```c++
auto ec = glz::read<glz::opts{.minified = true}>(obj, buffer);
```

## Boolean Flags

Glaze supports registering a set of boolean flags that behave as an array of\
 string options:

```c++
struct flags_t {
   bool x{ true };
   bool y{};
   bool z{ true };
};

template <>
struct glz::meta<flags_t> {
   using T = flags_t;
   static constexpr auto value = flags("x", &T::x, "y", &T::y, "z", &T::z);
};
```

Example:

```c++
flags_t s{};
expect(glz::write_json(s) == R"(["x","z"])");
```

Only `"x"` and `"z"` are written out, because they are true. Reading in the\
 buffer will set the appropriate booleans.

> When writing BEVE, `flags` only use one bit per boolean (byte aligned).

## Logging JSON

Sometimes you just want to write out JSON structures on the fly as\
 efficiently as possible. Glaze provides tuple-like structures that allow you\
 to stack allocate structures to write out JSON with high speed. These\
 structures are named `glz::obj` for objects and `glz::arr` for arrays.

Below is an example of building an object, which also contains an array, and\
 writing it out.

```c++
auto obj = glz::obj{"pi", 3.14, "happy", true, "name", "Stephen", "arr",\
 glz::arr{"Hello", "World", 2}};

std::string s{};
expect(not glz::write_json(obj, s));
expect(s == R"({"pi":3.14,"happy":true,"name":"Stephen","arr":["Hello","World\
",2]})");
```

> This approach is significantly faster than `glz::json_t` for generic JSON.\
 But, may not be suitable for all contexts.

## Merge

`glz::merge` allows the user to merge multiple JSON object types into a\
 single object.

```c++
glz::obj o{"pi", 3.141};
std::map<std::string_view, int> map = {{"a", 1}, {"b", 2}, {"c", 3}};
auto merged = glz::merge{o, map};
std::string s{};
glz::write_json(merged, s); // will write out a single, merged object
// s is now: {"pi":3.141,"a":0,"b":2,"c":3}
```

> `glz::merge` stores references to lvalues to avoid copies

## Generic JSON

See [Generic JSON](./docs/generic-json.md) for `glz::json_t`.

```c++
glz::json_t json{};
std::string buffer = R"([5,"Hello World",{"pi":3.14}])";
glz::read_json(json, buffer);
assert(json[2]["pi"].get<double>() == 3.14);
```

## Raw Buffer Performance

Glaze is just about as fast writing to a `std::string` as it is writing to a\
 raw char buffer. If you have sufficiently allocated space in your buffer you\
 can write to the raw buffer, as shown below, but it is not recommended.

```
glz::read_json(obj, buffer);
const auto n = glz::write_json(obj, buffer.data()).value_or(0);
buffer.resize(n);
```

## Compile Time Options

The `glz::opts` struct defines compile time optional settings for\
 reading/writing.

Instead of calling `glz::read_json(...)`, you can call `glz::read<glz::opts{}\
>(...)` and customize the options.

For example: `glz::read<glz::opts{.error_on_unknown_keys = false}>(...)` will\
 turn off erroring on unknown keys and simple skip the items.

`glz::opts` can also switch between formats:

- `glz::read<glz::opts{.format = glz::BEVE}>(...)` -> `glz::read_beve(...)`
- `glz::read<glz::opts{.format = glz::JSON}>(...)` -> `glz::read_json(...)`

## Available Compile Time Options

The struct below shows the available options and the default behavior.

```c++
struct opts {
  uint32_t format = json;
  bool comments = false; // Support reading in JSONC style comments
  bool error_on_unknown_keys = true; // Error when an unknown key is\
 encountered
  bool skip_null_members = true; // Skip writing out params in an object if\
 the value is null
  bool use_hash_comparison = true; // Will replace some string equality\
 checks with hash checks
  bool prettify = false; // Write out prettified JSON
  bool minified = false; // Require minified input for JSON, which results in\
 faster read performance
  char indentation_char = ' '; // Prettified JSON indentation char
  uint8_t indentation_width = 3; // Prettified JSON indentation size
  bool new_lines_in_arrays = true; // Whether prettified arrays should have\
 new lines for each element
  bool shrink_to_fit = false; // Shrinks dynamic containers to new size to\
 save memory
  bool write_type_info = true; // Write type info for meta objects in variants
  bool error_on_missing_keys = false; // Require all non nullable keys to be\
 present in the object. Use
                                        // skip_null_members = false to\
 require nullable members
  bool error_on_const_read =
     false; // Error if attempt is made to read into a const value, by\
 default the value is skipped without error
  bool validate_skipped = false; // If full validation should be performed on\
 skipped values
  bool validate_trailing_whitespace =
     false; // If, after parsing a value, we want to validate the trailing\
 whitespace

  uint8_t layout = rowwise; // CSV row wise output/input

  // The maximum precision type used for writing floats, higher precision\
 floats will be cast down to this precision
  float_precision float_max_write_precision{};

  bool bools_as_numbers = false; // Read and write booleans with 1's and 0's

  bool escaped_unicode_key_conversion =
     false; // JSON does not require escaped unicode keys to match with\
 unescaped UTF-8
  // This enables automatic escaped unicode unescaping and matching for keys\
 in glz::object, but it comes at a
  // performance cost.

  bool quoted_num = false; // treat numbers as quoted or array-like types as\
 having quoted numbers
  bool number = false; // read numbers as strings and write these string as\
 numbers
  bool raw = false; // write out string like values without quotes
  bool raw_string =
     false; // do not decode/encode escaped characters for strings (improves\
 read/write performance)
  bool structs_as_arrays = false; // Handle structs (reading/writing) without\
 keys, which applies
  bool allow_conversions = true; // Whether conversions between convertible\
 types are
  // allowed in binary, e.g. double -> float

  bool partial_read =
     false; // Reads into only existing fields and elements and then exits\
 without parsing the rest of the input

  // glaze_object_t concepts
  bool partial_read_nested = false; // Advance the partially read struct to\
 the end of the struct
  bool concatenate = true; // Concatenates ranges of std::pair into single\
 objects when writing

  bool hide_non_invocable =
     true; // Hides non-invocable members from the cli_menu (may be applied\
 elsewhere in the future)
};
```

> Many of these compile time options have wrappers to apply the option to\
 only a single field. See [Wrappers](./docs/wrappers.md) for more details.

## JSON Conformance

By default Glaze is strictly conformant with the latest JSON standard except\
 in two cases with associated options:

- `validate_skipped`
  This option does full JSON validation for skipped values when parsing. This\
 is not set by default because values are typically skipped when the user is\
 unconcerned with them, and Glaze still validates for major issues. But, this\
 makes skipping faster by not caring if the skipped values are exactly JSON\
 conformant. For example, by default Glaze will ensure skipped numbers have\
 all valid numerical characters, but it will not validate for issues like\
 leading zeros in skipped numbers unless `validate_skipped` is on. Wherever\
 Glaze parses a value to be used it is fully validated.
- `validate_trailing_whitespace`
  This option validates the trailing whitespace in a parsed document. Because\
 Glaze parses C++ structs, there is typically no need to continue parsing\
 after the object of interest has been read. Turn on this option if you want\
 to ensure that the rest of the document has valid whitespace, otherwise\
 Glaze will just ignore the content after the content of interest has been\
 parsed.

> [!NOTE]
>
> Glaze does not automatically unicode escape control characters (e.g.\
 `"\x1f"` to `"\u001f"`), as this poses a risk of embedding null characters\
 and other invisible characters in strings. A compile time option will be\
 added to enable these conversions (open issue: [unicode escaped\
 write](https://github.com/stephenberry/glaze/issues/812)), but it will not\
 be the default behavior.

## Skip

It can be useful to acknowledge a keys existence in an object to prevent\
 errors, and yet the value may not be needed or exist in C++. These cases are\
 handled by registering a `glz::skip` type with the meta data.

<details><summary>See example:</summary>

```c++
struct S {
  int i{};
};

template <>
struct glz::meta<S> {
  static constexpr auto value = object("key_to_skip", skip{}, &S::i);
};
```

```c++
std::string buffer = R"({"key_to_skip": [1,2,3], "i": 7})";
S s{};
glz::read_json(s, buffer);
// The value [1,2,3] will be skipped
expect(s.i == 7); // only the value i will be read into
```

</details>

## Hide

Glaze is designed to help with building generic APIs. Sometimes a value needs\
 to be exposed to the API, but it is not desirable to read in or write out\
 the value in JSON. This is the use case for `glz::hide`.

`glz::hide` hides the value from JSON output while still allowing API (and\
 JSON pointer) access.

<details><summary>See example:</summary>

```c++
struct hide_struct {
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
};

template <>
struct glz::meta<hide_struct> {
   using T = hide_struct;
   static constexpr auto value = object(&T::i,  //
                                        &T::d, //
                                        "hello", hide{&T::hello});
};
```

```c++
hide_struct s{};
auto b = glz::write_json(s);
expect(b == R"({"i":287,"d":3.14})"); // notice that "hello" is hidden from\
 the output
```

</details>

## Quoted Numbers

You can parse quoted JSON numbers directly to types like `double`, `int`,\
 etc. by utilizing the `glz::quoted` wrapper.

```c++
struct A {
   double x;
   std::vector<uint32_t> y;
};

template <>
struct glz::meta<A> {
   static constexpr auto value = object("x", glz::quoted_num<&A::x>, "y",\
 glz::quoted_num<&A::y>;
};
```

```json
{
  "x": "3.14",
  "y": ["1", "2", "3"]
}
```

The quoted JSON numbers will be parsed directly into the `double` and\
 `std::vector<uint32_t>`. The `glz::quoted` function works for nested objects\
 and arrays as well.

## JSON Lines (NDJSON) Support

Glaze supports [JSON Lines](https://jsonlines.org) (or Newline Delimited\
 JSON) for array-like types (e.g. `std::vector` and `std::tuple`).

```c++
std::vector<std::string> x = { "Hello", "World", "Ice", "Cream" };
std::string s = glz::write_ndjson(x).value_or("error");
auto ec = glz::read_ndjson(x, s);
```

# More Features

### [Data Recorder](./docs/recorder.md)

### [Command Line Interface Menu](./docs/cli-menu.md)

### [JSON Include System](./docs/json-include.md)

### [JSON Pointer Syntax](./docs/json-pointer-syntax.md)

### [JSON-RPC 2.0](./docs/rpc/json-rpc.md)

### [JSON Schema](./docs/json-schema.md)

### [Shared Library API](./docs/glaze-interfaces.md)

### [Tagged Binary Messages](./docs/binary.md)

### [Thread Pool](./docs/thread-pool.md)

### [Time Trace Profiling](./docs/time-trace.md)

- Output performance profiles to JSON and visualize using [Perfetto](https://\
ui.perfetto.dev)

### [Wrappers](./docs/wrappers.md)

# Extensions

See the `ext` directory for extensions.

- [Eigen](https://gitlab.com/libeigen/eigen)
- [JSON-RPC 2.0](./docs/rpc/json-rpc.md)
- [Command Line Interface Menu (cli_menu)](./docs/cli-menu.md)

# License

Glaze is distributed under the MIT license with an exception for embedded\
 forms:

> --- Optional exception to the license ---
>
> As an exception, if, as a result of your compiling your source code,\
 portions of this Software are embedded into a machine-executable object form\
 of such source code, you may redistribute such embedded portions in such\
 object form without including the copyright and permission notices.

\
description-type: text/markdown;variant=GFM
package-description:
\
# libglaze - In memory, JSON and interface library for C++

This is a `build2` package for the [`glaze`](https://github.com/stephenberry/\
glaze)
C++ library. It provides an in memory, JSON and interface library for C++.


## Usage

To start using `libglaze` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libglaze ^2.5.3
```

Then import the library in your `buildfile`:

```
import libs = libglaze%lib{glaze}
```

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/stephenberry/glaze
package-url: https://github.com/build2-packaging/glaze
email: stephenberry.developer@gmail.com
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: libasio ^1.29.0 ? ($config.libglaze.repe_rpc)
requires: c++23
tests: libglaze-tests == 4.0.1
bootstrap-build:
\
project = libglaze

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

config [bool] config.libglaze.repe_rpc ?= true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: glaze/libglaze-4.0.1.tar.gz
sha256sum: 0edf454554c54561bd27c714ca096274e90dc445f9ba01dac167b1a12f0fb661
:
name: libglaze
version: 6.5.1
type: lib,binless
language: c++
project: glaze
summary: JSON and interface library for C++
license: MIT; MIT License.
topics: json, json rpc 2.0, csv, beve, serialization
description:
\
# Glaze
One of the fastest JSON libraries in the world. Glaze reads and writes from\
 object memory, simplifying interfaces and offering incredible performance.

Glaze also supports:

- [BEVE](https://github.com/beve-org/beve) (Binary Efficient Versatile\
 Encoding)
- [CBOR](https://stephenberry.github.io/glaze/cbor/) (Concise Binary Object\
 Representation)
- [CSV](https://stephenberry.github.io/glaze/csv/) (Comma Separated Value)
- [MessagePack](https://stephenberry.github.io/glaze/msgpack/)
- [Stencil/Mustache](https://stephenberry.github.io/glaze/stencil-mustache/)\
 (string interpolation)
- [TOML](https://stephenberry.github.io/glaze/toml/) (Tom's Obvious, Minimal\
 Language)
- [EETF](https://stephenberry.github.io/glaze/EETF/erlang-external-term-forma\
t/) (Erlang External Term Format) [optionally included]
- [And Many More Features](https://stephenberry.github.io/glaze/)

> [!NOTE]
>
> Glaze is getting HTTP support with REST servers, clients, websockets, and\
 more. The networking side of Glaze is under active development, and while it\
 is usable and feedback is desired, the API is likely to be changing and\
 improving.

> [!TIP]
>
> **New: Streaming I/O Support** - Glaze now supports streaming serialization\
 and deserialization for processing large files with bounded memory usage.\
 Write JSON/BEVE directly to output streams with automatic flushing, or read\
 from input streams with automatic refilling. See [Streaming\
 I/O](https://stephenberry.github.io/glaze/streaming/) for details.

## With compile time reflection for MSVC, Clang, and GCC!

- Read/write aggregate initializable structs without writing any metadata or\
 macros!
- See [example on Compiler Explorer](https://gcc.godbolt.org/z/T4To5fKfz)

## [📖 Documentation](https://stephenberry.github.io/glaze/)

See this README, the [Glaze Documentation Page](https://stephenberry.github.i\
o/glaze/), or [docs folder](https://github.com/stephenberry/glaze/tree/main/d\
ocs) for documentation.

## Highlights

- Pure, compile time reflection for structs
  - Powerful meta specialization system for custom names and behavior
- JSON [RFC 8259](https://datatracker.ietf.org/doc/html/rfc8259) compliance\
 with UTF-8 validation
- Standard C++ library support
- Header only
- Direct to memory serialization/deserialization
- Compile time maps with constant time lookups and perfect hashing
- Powerful wrappers to modify read/write behavior ([Wrappers](https://stephen\
berry.github.io/glaze/wrappers/))
- Use your own custom read/write functions ([Custom Read/Write](#custom-readw\
rite))
- [Handle unknown keys](https://stephenberry.github.io/glaze/unknown-keys/)\
 in a fast and flexible manner
- Direct memory access through [JSON pointer syntax](https://stephenberry.git\
hub.io/glaze/json-pointer-syntax/)
- [JMESPath](https://stephenberry.github.io/glaze/JMESPath/) querying
- No exceptions (compiles with `-fno-exceptions`)
  - If you desire helpers that throw for cleaner syntax see [Glaze\
 Exceptions](https://stephenberry.github.io/glaze/exceptions/)
- No runtime type information necessary (compiles with `-fno-rtti`)
- [JSON Schema generation](https://stephenberry.github.io/glaze/json-schema/)
- [Partial Read](https://stephenberry.github.io/glaze/partial-read/) and\
 [Partial Write](https://stephenberry.github.io/glaze/partial-write/) support
- [Streaming I/O](https://stephenberry.github.io/glaze/streaming/) for\
 reading/writing large files with bounded memory
- [Much more!](#more-features)

## Performance

| Library                                                      | Roundtrip\
 Time (s) | Write (MB/s) | Read (MB/s) |
| ------------------------------------------------------------ |\
 ------------------ | ------------ | ----------- |
| [**Glaze**](https://github.com/stephenberry/glaze)           | **1.01**    \
       | **1396**     | **1200**    |
| [**simdjson (on demand)**](https://github.com/simdjson/simdjson) | **N/A** \
           | **N/A**      | **1163**    |
| [**yyjson**](https://github.com/ibireme/yyjson)              | **1.22**    \
       | **1023**     | **1106**    |
| [**reflect_cpp**](https://github.com/getml/reflect-cpp)      | **3.15**    \
       | **488**      | **365**     |
| [**daw_json_link**](https://github.com/beached/daw_json_link) | **3.29**   \
        | **334**      | **479**     |
| [**RapidJSON**](https://github.com/Tencent/rapidjson)        | **3.76**    \
       | **289**      | **416**     |
| [**json_struct**](https://github.com/jorgen/json_struct)     | **5.87**    \
       | **178**      | **316**     |
| [**Boost.JSON**](https://boost.org/libs/json)                | **5.38**    \
       | **198**      | **308**     |
| [**nlohmann**](https://github.com/nlohmann/json)             | **15.44**   \
       | **86**       | **81**      |

[Performance test code available here](https://github.com/stephenberry/json_p\
erformance)

*Performance caveats: [simdjson](https://github.com/simdjson/simdjson) and\
 [yyjson](https://github.com/ibireme/yyjson) are great, but they experience\
 major performance losses when the data is not in the expected sequence or\
 any keys are missing (the problem grows as the file size increases, as they\
 must re-iterate through the document).*

*Also, [simdjson](https://github.com/simdjson/simdjson) and\
 [yyjson](https://github.com/ibireme/yyjson) do not support automatic escaped\
 string handling, so if any of the currently non-escaped strings in this\
 benchmark were to contain an escape, the escapes would not be handled.*

[ABC Test](https://github.com/stephenberry/json_performance) shows how\
 simdjson has poor performance when keys are not in the expected sequence:

| Library                                                      | Read (MB/s) |
| ------------------------------------------------------------ | ----------- |
| [**Glaze**](https://github.com/stephenberry/glaze)           | **1219**    |
| [**simdjson (on demand)**](https://github.com/simdjson/simdjson) | **89**  \
    |

## Binary Performance

Tagged binary specification: [BEVE](https://github.com/stephenberry/beve)

| Metric                | Roundtrip Time (s) | Write (MB/s) | Read (MB/s) |
| --------------------- | ------------------ | ------------ | ----------- |
| Raw performance       | **0.42**           | **3235**     | **2468**    |
| Equivalent JSON data* | **0.42**           | **3547**     | **2706**    |

JSON size: 670 bytes

BEVE size: 611 bytes

*BEVE packs more efficiently than JSON, so transporting the same data is even\
 faster.

## Examples

> [!TIP]
>
> See the [example_json](https://github.com/stephenberry/glaze/blob/main/test\
s/example_json/example_json.cpp) unit test for basic examples of how to use\
 Glaze. See [json_test](https://github.com/stephenberry/glaze/blob/main/tests\
/json_test/json_test.cpp) for an extensive test of features.

Your struct will automatically get reflected! No metadata is required by the\
 user.

```c++
struct my_struct
{
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
  std::array<uint64_t, 3> arr = { 1, 2, 3 };
  std::map<std::string, int> map{{"one", 1}, {"two", 2}};
};
```

**JSON** (prettified)

```json
{
   "i": 287,
   "d": 3.14,
   "hello": "Hello World",
   "arr": [
      1,
      2,
      3
   ],
   "map": {
      "one": 1,
      "two": 2
   }
}
```

**Write JSON**

```c++
my_struct s{};
std::string buffer = glz::write_json(s).value_or("error");
```

or

```c++
my_struct s{};
std::string buffer{};
auto ec = glz::write_json(s, buffer);
if (ec) {
  // handle error
}
```

**Read JSON**

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
,"map":{"one":1,"two":2}})";
auto s = glz::read_json<my_struct>(buffer);
if (s) // check std::expected
{
  s.value(); // s.value() is a my_struct populated from buffer
}
```

or

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
,"map":{"one":1,"two":2}})";
my_struct s{};
auto ec = glz::read_json(s, buffer); // populates s from buffer
if (ec) {
  // handle error
}
```

### Read/Write From File

```c++
auto ec = glz::read_file_json(obj, "./obj.json", std::string{});
auto ec = glz::write_file_json(obj, "./obj.json", std::string{});
```

> [!IMPORTANT]
>
> The file name (2nd argument), must be null terminated.

### Writing to Streams

For streaming to `std::ostream` destinations (files, network, etc.) with\
 bounded memory:

```c++
#include "glaze/core/ostream_buffer.hpp"

std::ofstream file("output.json");
glz::basic_ostream_buffer<std::ofstream> buffer(file);  // Concrete type for\
 performance
auto ec = glz::write_json(obj, buffer);
```

The buffer flushes incrementally during serialization, enabling arbitrarily\
 large outputs with fixed memory. See [Streaming I/O](https://stephenberry.gi\
thub.io/glaze/streaming/) for details on buffer types and stream concepts.

### Reading from Streams

For streaming from `std::istream` sources (files, network, etc.) with bounded\
 memory:

```c++
#include "glaze/core/istream_buffer.hpp"

std::ifstream file("input.json");
glz::basic_istream_buffer<std::ifstream> buffer(file);
my_struct obj;
auto ec = glz::read_json(obj, buffer);
```

The buffer refills automatically during parsing, enabling reading of\
 arbitrarily large inputs with fixed memory. See [Streaming\
 I/O](https://stephenberry.github.io/glaze/streaming/) for NDJSON processing\
 and other streaming patterns.

## Compiler/System Support

- Requires C++23
- Tested for both 64bit and 32bit
- Supports both little-endian and big-endian systems

[Actions](https://github.com/stephenberry/glaze/actions) build and test with\
 [Clang](https://clang.llvm.org) (18+), [MSVC](https://visualstudio.microsoft\
.com/vs/features/cplusplus/) (2022), and [GCC](https://gcc.gnu.org) (13+) on\
 apple, windows, and linux. Big-endian is tested via QEMU emulation on s390x.

![clang build](https://github.com/stephenberry/glaze/actions/workflows/clang.\
yml/badge.svg) ![gcc build](https://github.com/stephenberry/glaze/actions/wor\
kflows/gcc.yml/badge.svg) ![msvc build](https://github.com/stephenberry/glaze\
/actions/workflows/msvc.yml/badge.svg) 

> Glaze seeks to maintain compatibility with the latest three versions of GCC\
 and Clang, as well as the latest version of MSVC and Apple Clang (Xcode).\
 And, we aim to only drop old versions with major releases.

### MSVC Compiler Flags

Glaze requires a C++ standard conformant pre-processor, which requires the\
 `/Zc:preprocessor` flag when building with MSVC.

### SIMD CMake Options

The CMake has the option `glaze_ENABLE_AVX2`. This will attempt to use `AVX2`\
 SIMD instructions in some cases to improve performance, as long as the\
 system you are configuring on supports it. Set this option to `OFF` to\
 disable the AVX2 instruction set, such as if you are cross-compiling for\
 Arm. If you aren't using CMake the macro `GLZ_USE_AVX2` enables the feature\
 if defined.

### Disable Forced Inlining

For faster compilation at the cost of peak performance, use\
 `glaze_DISABLE_ALWAYS_INLINE`:

```cmake
set(glaze_DISABLE_ALWAYS_INLINE ON)
```

> **Note:** This primarily reduces compilation time, not binary size. For\
 binary size reduction, use the `linear_search` option. See [Optimizing\
 Performance](https://stephenberry.github.io/glaze/optimizing-performance/)\
 for more details.

## How To Use Glaze

### [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.ht\
ml)
```cmake
include(FetchContent)

FetchContent_Declare(
  glaze
  GIT_REPOSITORY https://github.com/stephenberry/glaze.git
  GIT_TAG main
  GIT_SHALLOW TRUE
)

FetchContent_MakeAvailable(glaze)

target_link_libraries(${PROJECT_NAME} PRIVATE glaze::glaze)
```

### [Conan](https://conan.io)

- Included in [Conan Center](https://conan.io/center/) ![Conan\
 Center](https://img.shields.io/conan/v/glaze)

```
find_package(glaze REQUIRED)

target_link_libraries(main PRIVATE glaze::glaze)
```

### [build2](https://build2.org)

- Available on [cppget](https://cppget.org/libglaze)

```
import libs = libglaze%lib{glaze}
```

### Arch Linux

- [Official Arch repository](https://archlinux.org/packages/extra/any/glaze/)
- AUR git package: [glaze-git](https://aur.archlinux.org/packages/glaze-git)

### See this [Example Repository](https://github.com/stephenberry/glaze_examp\
le) for how to use Glaze in a new project

---

## See [FAQ](https://stephenberry.github.io/glaze/FAQ/) for Frequently Asked\
 Questions

# Explicit Metadata

If you want to specialize your reflection then you can **optionally** write\
 the code below:

> This metadata is also necessary for non-aggregate initializable structs.

```c++
template <>
struct glz::meta<my_struct> {
   using T = my_struct;
   static constexpr auto value = object(
      &T::i,
      &T::d,
      &T::hello,
      &T::arr,
      &T::map
   );
};
```

## Local Glaze Meta

<details><summary>Glaze also supports metadata within its associated\
 class:</summary>

```c++
struct my_struct
{
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
  std::array<uint64_t, 3> arr = { 1, 2, 3 };
  std::map<std::string, int> map{{"one", 1}, {"two", 2}};
  
  struct glaze {
     using T = my_struct;
     static constexpr auto value = glz::object(
        &T::i,
        &T::d,
        &T::hello,
        &T::arr,
        &T::map
     );
  };
};
```

</details>

## Custom Key Names or Unnamed Types

When you define Glaze metadata, objects will automatically reflect the\
 non-static names of your member object pointers. However, if you want custom\
 names or you register lambda functions or wrappers that do not provide names\
 for your fields, you can optionally add field names in your metadata.

Example of custom names:

```c++
template <>
struct glz::meta<my_struct> {
   using T = my_struct;
   static constexpr auto value = object(
      "integer", &T::i,
      "double", &T::d,
      "string", &T::hello,
      "array", &T::arr,
      "my map", &T::map
   );
};
```

> Each of these strings is optional and can be removed for individual fields\
 if you want the name to be reflected.
>
> Names are required for:
>
> - static constexpr member variables
> - [Wrappers](https://stephenberry.github.io/glaze/wrappers/)
> - Lambda functions

### Extending pure reflection with `modify`

If you only need to tweak a couple of fields, you can layer those changes on\
 top of the automatically reflected members with `glz::meta<T>::modify`:

```c++
struct server_status
{
   std::string name;
   std::string region;
   uint64_t active_sessions{};
   std::optional<std::string> maintenance;
   double cpu_percent{};
};

template <> struct glz::meta<server_status>
{
   static constexpr auto modify = glz::object(
      "maintenance_alias", [](auto& self) -> auto& { return self.maintenance;\
 },
      "cpuPercent", &server_status::cpu_percent
   );
};
```

Serialising

```c++
server_status status{
   .name = "edge-01",
   .region = "us-east",
   .active_sessions = 2412,
   .maintenance = std::string{"scheduled"},
   .cpu_percent = 73.5,
};
```

produces

```json
{
  "name": "edge-01",
  "region": "us-east",
  "active_sessions": 2412,
  "maintenance": "scheduled",
  "cpu_percent": 73.5,
  "maintenance_alias": "scheduled",
  "cpuPercent": 73.5
}
```

All the untouched members (`name`, `region`, `active_sessions`,\
 `maintenance`, `cpu_percent`) still come from pure reflection, so adding or\
 removing members later keeps working automatically. Only the extra keys\
 provided in `modify` are layered on top.

# Reflection API

Glaze provides a compile time reflection API that can be modified via\
 `glz::meta` specializations. This reflection API uses pure reflection unless\
 a `glz::meta` specialization is provided, in which case the default behavior\
 is overridden by the developer.

```c++
static_assert(glz::reflect<my_struct>::size == 5); // Number of fields
static_assert(glz::reflect<my_struct>::keys[0] == "i"); // Access keys
```

> [!WARNING]
>
> The `glz::reflect` fields described above have been formalized and are\
 unlikely to change. Other fields may evolve as we continue to formalize the\
 spec.

## glz::for_each_field

```c++
struct test_type {
   int32_t int1{};
   int64_t int2{};
};

test_type var{42, 43};

glz::for_each_field(var, [](auto& field) {
    field += 1;
});

expect(var.int1 == 43);
expect(var.int2 == 44);
```

# Custom Read/Write

Custom reading and writing can be achieved through the powerful `to`/`from`\
 specialization approach, which is described here: [custom-serialization.md](\
https://github.com/stephenberry/glaze/blob/main/docs/custom-serialization.md)\
. However, this only works for user defined types.

For common use cases or cases where a specific member variable should have\
 special reading and writing, you can use [glz::custom](https://github.com/st\
ephenberry/glaze/blob/main/docs/wrappers.md#custom) to register read/write\
 member functions, std::functions, or lambda functions.

<details><summary>See example:</summary>

```c++
struct custom_encoding
{
   uint64_t x{};
   std::string y{};
   std::array<uint32_t, 3> z{};
   
   void read_x(const std::string& s) {
      x = std::stoi(s);
   }
   
   uint64_t write_x() {
      return x;
   }
   
   void read_y(const std::string& s) {
      y = "hello" + s;
   }
   
   auto& write_z() {
      z[0] = 5;
      return z;
   }
};

template <>
struct glz::meta<custom_encoding>
{
   using T = custom_encoding;
   static constexpr auto value = object("x", custom<&T::read_x, &T::write_x>,\
 //
                                        "y", custom<&T::read_y, &T::y>, //
                                        "z", custom<&T::z, &T::write_z>);
};

suite custom_encoding_test = [] {
   "custom_reading"_test = [] {
      custom_encoding obj{};
      std::string s = R"({"x":"3","y":"world","z":[1,2,3]})";
      expect(!glz::read_json(obj, s));
      expect(obj.x == 3);
      expect(obj.y == "helloworld");
      expect(obj.z == std::array<uint32_t, 3>{1, 2, 3});
   };
   
   "custom_writing"_test = [] {
      custom_encoding obj{};
      std::string s = R"({"x":"3","y":"world","z":[1,2,3]})";
      expect(!glz::read_json(obj, s));
      std::string out{};
      expect(not glz::write_json(obj, out));
      expect(out == R"({"x":3,"y":"helloworld","z":[5,2,3]})");
   };
};
```

</details>

<details><summary>Another example with constexpr lambdas:</summary>

```c++
struct custom_buffer_input
{
   std::string str{};
};

template <>
struct glz::meta<custom_buffer_input>
{
   static constexpr auto read_x = [](custom_buffer_input& s, const\
 std::string& input) { s.str = input; };
   static constexpr auto write_x = [](auto& s) -> auto& { return s.str; };
   static constexpr auto value = glz::object("str", glz::custom<read_x,\
 write_x>);
};

suite custom_lambdas_test = [] {
   "custom_buffer_input"_test = [] {
      std::string s = R"({"str":"Hello!"})";
      custom_buffer_input obj{};
      expect(!glz::read_json(obj, s));
      expect(obj.str == "Hello!");
      s.clear();
      expect(!glz::write_json(obj, s));
      expect(s == R"({"str":"Hello!"})");
      expect(obj.str == "Hello!");
   };
};
```

</details>

### Error handling with `glz::custom`

Developers can throw errors, but for builds that disable exceptions or if it\
 is desirable to integrate error handling within Glaze's `context`, the last\
 argument of custom lambdas may be a `glz::context&`. This enables custom\
 error handling that integrates well with the rest of Glaze.

<details><summary>See example:</summary>

```c++
struct age_custom_error_obj
{
   int age{};
};

template <>
struct glz::meta<age_custom_error_obj>
{
   using T = age_custom_error_obj;
   static constexpr auto read_x = [](T& s, int age, glz::context& ctx) {
      if (age < 21) {
         ctx.error = glz::error_code::constraint_violated;
         ctx.custom_error_message = "age too young";
      }
      else {
         s.age = age;
      }
   };
   static constexpr auto value = object("age", glz::custom<read_x, &T::age>);
};
```

In use:
```c++
age_custom_error_obj obj{};
std::string s = R"({"age":18})";
auto ec = glz::read_json(obj, s);
auto err_msg = glz::format_error(ec, s);
std::cout << err_msg << '\n';
```

Console output:
```
1:10: constraint_violated
   {"age":18}
            ^ age too young
```

</details>

# Object Mapping

When using member pointers (e.g. `&T::a`) the C++ class structures must match\
 the JSON interface. It may be desirable to map C++ classes with differing\
 layouts to the same object interface. This is accomplished through\
 registering lambda functions instead of member pointers.

```c++
template <>
struct glz::meta<Thing> {
   static constexpr auto value = object(
      "i", [](auto&& self) -> auto& { return self.subclass.i; }
   );
};
```

The value `self` passed to the lambda function will be a `Thing` object, and\
 the lambda function allows us to make the subclass invisible to the object\
 interface.

Lambda functions by default copy returns, therefore the `auto&` return type\
 is typically required in order for glaze to write to memory.

> Note that remapping can also be achieved through pointers/references, as\
 glaze treats values, pointers, and references in the same manner when\
 writing/reading.

# Value Types

A class can be treated as an underlying value as follows:

```c++
struct S {
  int x{};
};

template <>
struct glz::meta<S> {
  static constexpr auto value{ &S::x };
};
```

or using a lambda:

```c++
template <>
struct glz::meta<S> {
  static constexpr auto value = [](auto& self) -> auto& { return self.x; };
};
```

# Read Constraints

Glaze provides a wrapper to enable complex reading constraints for struct\
 members: `glz::read_constraint`.

<details><summary>See example:</summary>

```c++
struct constrained_object
{
   int age{};
   std::string name{};
};

template <>
struct glz::meta<constrained_object>
{
   using T = constrained_object;
   static constexpr auto limit_age = [](const T&, int age) {
      return (age >= 0 && age <= 120);
   };
   
   static constexpr auto limit_name = [](const T&, const std::string& name) {
      return name.size() <= 8;
   };
   
   static constexpr auto value = object("age", read_constraint<&T::age,\
 limit_age, "Age out of range">, //
                                        "name", read_constraint<&T::name,\
 limit_name, "Name is too long">);
};
```

For invalid input such as `{"age": -1, "name": "Victor"}`, Glaze will outut\
 the following formatted error message:

```
1:11: constraint_violated
   {"age": -1, "name": "Victor"}
             ^ Age out of range
```

- Member functions can also be registered as the constraint. 
- The first field of the constraint lambda is the parent object, allowing\
 complex constraints to be written by the user.

</details>

# Reading/Writing Private Fields

Serialize and deserialize private fields by making a `glz::meta<T>` and\
 adding `friend struct glz::meta<T>;` to your class.

<details><summary>See example:</summary>

```c++
class private_fields_t
{
private:
   double cash = 22.0;
   std::string currency = "$";

   friend struct glz::meta<private_fields_t>;
};

template <>
struct glz::meta<private_fields_t>
{
   using T = private_fields_t;
   static constexpr auto value = object(&T::cash, &T::currency);
};

suite private_fields_tests = []
{
   "private fields"_test = [] {
      private_fields_t obj{};
      std::string buffer{};
      expect(not glz::write_json(obj, buffer));
      expect(buffer == R"({"cash":22,"currency":"$"})");
      
      buffer = R"({"cash":2200.0, "currency":"¢"})";
      expect(not glz::read_json(obj, buffer));
      buffer.clear();
      expect(not glz::write_json(obj, buffer));
      expect(buffer == R"({"cash":2200,"currency":"¢"})");
   };
};
```

</details>

# Error Handling

Glaze is safe to use with untrusted messages. Errors are returned as error\
 codes, typically within a `glz::expected`, which behaves just like a\
 `std::expected`.

> Glaze works to short circuit error handling, which means the parsing exits\
 very rapidly if an error is encountered.

To generate more helpful error messages, call `format_error`:

```c++
auto pe = glz::read_json(obj, buffer);
if (pe) {
  std::string descriptive_error = glz::format_error(pe, buffer);
}
```

This test case:

```json
{"Hello":"World"x, "color": "red"}
```

Produces this error:

```
1:17: expected_comma
   {"Hello":"World"x, "color": "red"}
                   ^
```

Denoting that x is invalid here.

## Bytes Consumed on Read

The `error_ctx` type returned by read operations includes a `count` field\
 that indicates the byte position in the input buffer:

```c++
std::string buffer = R"({"x":1,"y":2})";
my_struct obj{};
auto ec = glz::read_json(obj, buffer);
if (!ec) {
   // Success: ec.count contains bytes consumed
   size_t bytes_consumed = ec.count;
   // bytes_consumed == 13 (entire JSON object)
}
```

This is useful for:
- **Streaming**: Reading multiple JSON values from a single buffer
- **Partial parsing**: Knowing where parsing stopped with `partial_read`\
 option
- **Error diagnostics**: On failure, `count` indicates where the error\
 occurred

# Input Buffer (Null) Termination

A non-const `std::string` is recommended for input buffers, as this allows\
 Glaze to improve performance with temporary padding and the buffer will be\
 null terminated.

## JSON

By default the option `null_terminated` is set to `true` and null-terminated\
 buffers must be used when parsing JSON. The option can be turned off with a\
 small loss in performance, which allows non-null terminated buffers:

```c++
constexpr glz::opts options{.null_terminated = false};
auto ec = glz::read<options>(value, buffer); // read in a non-null terminated\
 buffer
```

## BEVE

Null-termination is not required for BEVE. It makes no difference in\
 performance.

## CBOR

Null-termination is not required for CBOR. It makes no difference in\
 performance.

## CSV

Null-termination is not required for CSV. It makes no difference in\
 performance.


# Type Support

## Array Types

Array types logically convert to JSON array values. Concepts are used to\
 allow various containers and even user containers if they match standard\
 library interfaces.

- `glz::array` (compile time mixed types)
- `std::tuple` (compile time mixed types)
- `std::array`
- `std::vector`
- `std::deque`
- `std::list`
- `std::forward_list`
- `std::span`
- `std::set`
- `std::unordered_set`

## Object Types

Object types logically convert to JSON object values, such as maps. Like\
 JSON, Glaze treats object definitions as unordered maps. Therefore the order\
 of an object layout does not have to match the same binary sequence in C++.

- `glz::object` (compile time mixed types)
- `std::map`
- `std::unordered_map`
- `std::pair` (enables dynamic keys in stack storage)

> `std::pair` is handled as an object with a single key and value, but when\
 `std::pair` is used in an array, Glaze concatenates the pairs into a single\
 object. `std::vector<std::pair<...>>` will serialize as a single  object. If\
 you don't want this behavior set the compile time option `.concatenate =\
 false`.

## Variants

- `std::variant`

See [Variant Handling](https://stephenberry.github.io/glaze/variant-handling/\
) for more information.

## Nullable Types

- `std::unique_ptr`
- `std::shared_ptr`
- `std::optional`

Nullable types may be allocated by valid input or nullified by the `null`\
 keyword.

```c++
std::unique_ptr<int> ptr{};
std::string buffer{};
expect(not glz::write_json(ptr, buffer));
expect(buffer == "null");

expect(not glz::read_json(ptr, "5"));
expect(*ptr == 5);
buffer.clear();
expect(not glz::write_json(ptr, buffer));
expect(buffer == "5");

expect(not glz::read_json(ptr, "null"));
expect(!bool(ptr));
```

## Enums

By default enums will be written and read in integer form. No `glz::meta` is\
 necessary if this is the desired behavior.

However, if you prefer to use enums as strings in JSON, they can be\
 registered in the `glz::meta` as follows:

```c++
enum class Color { Red, Green, Blue };

template <>
struct glz::meta<Color> {
   using enum Color;
   static constexpr auto value = enumerate(Red,
                                           Green,
                                           Blue
   );
};
```

In use:

```c++
Color color = Color::Red;
std::string buffer{};
glz::write_json(color, buffer);
expect(buffer == "\"Red\"");
```

> [!TIP]
>
> For automatic enum-to-string serialization without writing metadata,\
 consider using [simple_enum](https://github.com/arturbac/simple_enum), which\
 provides Glaze integration.

# JSON With Comments (JSONC)

Comments are supported with the specification defined here:\
 [JSONC](https://github.com/stephenberry/JSONC)

Read support for comments is provided with `glz::read_jsonc` or\
 `glz::read<glz::opts{.comments = true}>(...)`.

# Prettify JSON

Formatted JSON can be written out directly via a compile time option:

```c++
auto ec = glz::write<glz::opts{.prettify = true}>(obj, buffer);
```

Or, JSON text can be formatted with the `glz::prettify_json` function:

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
})");
auto beautiful = glz::prettify_json(buffer);
```

`beautiful` is now:

```json
{
   "i": 287,
   "d": 3.14,
   "hello": "Hello World",
   "arr": [
      1,
      2,
      3
   ]
}
```

# Minify JSON

To write minified JSON:

```c++
auto ec = glz::write_json(obj, buffer); // default is minified
```

To minify JSON text call:

```c++
std::string minified = glz::minify_json(buffer);
```

## Minified JSON Reading

If you wish require minified JSON or know your input will always be minified,\
 then you can gain a little more performance by using the compile time option\
 `.minified = true`.

```c++
auto ec = glz::read<glz::opts{.minified = true}>(obj, buffer);
```

## Boolean Flags

Glaze supports registering a set of boolean flags that behave as an array of\
 string options:

```c++
struct flags_t {
   bool x{ true };
   bool y{};
   bool z{ true };
};

template <>
struct glz::meta<flags_t> {
   using T = flags_t;
   static constexpr auto value = flags("x", &T::x, "y", &T::y, "z", &T::z);
};
```

Example:

```c++
flags_t s{};
expect(glz::write_json(s) == R"(["x","z"])");
```

Only `"x"` and `"z"` are written out, because they are true. Reading in the\
 buffer will set the appropriate booleans.

> When writing BEVE, `flags` only use one bit per boolean (byte aligned).

## Logging JSON

Sometimes you just want to write out JSON structures on the fly as\
 efficiently as possible. Glaze provides tuple-like structures that allow you\
 to stack allocate structures to write out JSON with high speed. These\
 structures are named `glz::obj` for objects and `glz::arr` for arrays.

Below is an example of building an object, which also contains an array, and\
 writing it out.

```c++
auto obj = glz::obj{"pi", 3.14, "happy", true, "name", "Stephen", "arr",\
 glz::arr{"Hello", "World", 2}};

std::string s{};
expect(not glz::write_json(obj, s));
expect(s == R"({"pi":3.14,"happy":true,"name":"Stephen","arr":["Hello","World\
",2]})");
```

> This approach is significantly faster than `glz::generic` for generic JSON.\
 But, may not be suitable for all contexts.

## Merge

`glz::merge` allows the user to merge multiple JSON object types into a\
 single object.

```c++
glz::obj o{"pi", 3.141};
std::map<std::string_view, int> map = {{"a", 1}, {"b", 2}, {"c", 3}};
auto merged = glz::merge{o, map};
std::string s{};
glz::write_json(merged, s); // will write out a single, merged object
// s is now: {"pi":3.141,"a":0,"b":2,"c":3}
```

> `glz::merge` stores references to lvalues to avoid copies

## Generic JSON

See [Generic JSON](https://stephenberry.github.io/glaze/generic-json/) for\
 `glz::generic`.

```c++
glz::generic json{};
std::string buffer = R"([5,"Hello World",{"pi":3.14}])";
glz::read_json(json, buffer);
assert(json[2]["pi"].get<double>() == 3.14);
```

## Raw Buffer Performance

Glaze is just about as fast writing to a `std::string` as it is writing to a\
 raw char buffer. If you have sufficiently allocated space in your buffer you\
 can write to the raw buffer, as shown below, but it is not recommended.

```c++
glz::read_json(obj, buffer);
const auto result = glz::write_json(obj, buffer.data());
if (!result) {
   buffer.resize(result.count);
}
```

### Writing to Fixed-Size Buffers

All write functions return `glz::error_ctx`, which provides both error\
 information and the byte count:

```c++
std::array<char, 1024> buffer;
auto ec = glz::write_json(my_obj, buffer);
if (ec) {
   if (ec.ec == glz::error_code::buffer_overflow) {
      // Buffer was too small
      std::cerr << "Overflow after " << ec.count << " bytes\n";
   }
   return;
}
// Success: ec.count contains bytes written
std::string_view json(buffer.data(), ec.count);
```

The `error_ctx` type provides:
- `if (ec)` - true when there is an error (matches `std::error_code`\
 semantics)
- `ec.count` - bytes processed (always populated, even on error)
- `ec.ec` - the error code
- `glz::format_error(ec, buffer)` - formatted error message

## Compile Time Options

The `glz::opts` struct defines the default compile time options for\
 reading/writing.

Instead of calling `glz::read_json(...)`, you can call `glz::read<glz::opts{}\
>(...)` and customize the options.

For example: `glz::read<glz::opts{.error_on_unknown_keys = false}>(...)` will\
 turn off erroring on unknown keys and simple skip the items.

`glz::opts` can also switch between formats:

- `glz::read<glz::opts{.format = glz::BEVE}>(...)` -> `glz::read_beve(...)`
- `glz::read<glz::opts{.format = glz::JSON}>(...)` -> `glz::read_json(...)`

> [!IMPORTANT]
>
> See [Options](https://stephenberry.github.io/glaze/options/) for a\
 **comprehensive reference table** of all compile time options, including\
 inheritable options that can be added to custom option structs.

### Common Compile Time Options

The `glz::opts` struct provides default options. Here are the most commonly\
 used:

| Option | Default | Description |
|--------|---------|-------------|
| `format` | `JSON` | Format selector (`JSON`, `BEVE`, `CSV`, `TOML`) |
| `null_terminated` | `true` | Whether input buffer is null terminated |
| `error_on_unknown_keys` | `true` | Error on unknown JSON keys |
| `skip_null_members` | `true` | Skip null values when writing |
| `prettify` | `false` | Output formatted JSON |
| `minified` | `false` | Require minified input (faster parsing) |
| `error_on_missing_keys` | `false` | Require all keys to be present |
| `partial_read` | `false` | Exit after reading deepest object |

**Inheritable options** (not in `glz::opts` by default) can be added via\
 custom structs:

```c++
struct my_opts : glz::opts {
   bool validate_skipped = true;        // Full validation on skipped values
   bool append_arrays = true;           // Append to arrays instead of replace
};

constexpr my_opts opts{};
auto ec = glz::read<opts>(obj, buffer);
```

> See [Options](https://stephenberry.github.io/glaze/options/) for the\
 complete list with detailed descriptions, and [Wrappers](https://stephenberr\
y.github.io/glaze/wrappers/) for per-field options.

## JSON Conformance

By default Glaze is strictly conformant with the latest JSON standard except\
 in two cases with associated options:

- `validate_skipped`
  This option does full JSON validation for skipped values when parsing. This\
 is not set by default because values are typically skipped when the user is\
 unconcerned with them, and Glaze still validates for major issues. But, this\
 makes skipping faster by not caring if the skipped values are exactly JSON\
 conformant. For example, by default Glaze will ensure skipped numbers have\
 all valid numerical characters, but it will not validate for issues like\
 leading zeros in skipped numbers unless `validate_skipped` is on. Wherever\
 Glaze parses a value to be used it is fully validated.
- `validate_trailing_whitespace`
  This option validates the trailing whitespace in a parsed document. Because\
 Glaze parses C++ structs, there is typically no need to continue parsing\
 after the object of interest has been read. Turn on this option if you want\
 to ensure that the rest of the document has valid whitespace, otherwise\
 Glaze will just ignore the content after the content of interest has been\
 parsed.

> [!NOTE]
>
> By default, Glaze does not unicode escape control characters (e.g. `"\x1f"`\
 to `"\u001f"`), as this poses a risk of embedding null characters and other\
 invisible characters in strings. The compile time option `escape_control_cha\
racters` is available for those who desire to write out control characters as\
 escaped unicode in strings.
>
> ```c++
> // Example options for enabling escape_control_characters
> struct options : glz::opts {
>    bool escape_control_characters = true;
> };
> ```

## Skip

It can be useful to acknowledge a keys existence in an object to prevent\
 errors, and yet the value may not be needed or exist in C++. These cases are\
 handled by registering a `glz::skip` type with the meta data.

<details><summary>See example:</summary>

```c++
struct S {
  int i{};
};

template <>
struct glz::meta<S> {
  static constexpr auto value = object("key_to_skip", skip{}, &S::i);
};
```

```c++
std::string buffer = R"({"key_to_skip": [1,2,3], "i": 7})";
S s{};
glz::read_json(s, buffer);
// The value [1,2,3] will be skipped
expect(s.i == 7); // only the value i will be read into
```

</details>

## Hide

Glaze is designed to help with building generic APIs. Sometimes a value needs\
 to be exposed to the API, but it is not desirable to read in or write out\
 the value in JSON. This is the use case for `glz::hide`.

`glz::hide` hides the value from JSON output while still allowing API (and\
 JSON pointer) access.

<details><summary>See example:</summary>

```c++
struct hide_struct {
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
};

template <>
struct glz::meta<hide_struct> {
   using T = hide_struct;
   static constexpr auto value = object(&T::i,  //
                                        &T::d, //
                                        "hello", hide{&T::hello});
};
```

```c++
hide_struct s{};
auto b = glz::write_json(s);
expect(b == R"({"i":287,"d":3.14})"); // notice that "hello" is hidden from\
 the output
```

</details>

## Quoted Numbers

You can parse quoted JSON numbers directly to types like `double`, `int`,\
 etc. by utilizing the `glz::quoted` wrapper.

```c++
struct A {
   double x;
   std::vector<uint32_t> y;
};

template <>
struct glz::meta<A> {
   static constexpr auto value = object("x", glz::quoted_num<&A::x>, "y",\
 glz::quoted_num<&A::y>;
};
```

```json
{
  "x": "3.14",
  "y": ["1", "2", "3"]
}
```

The quoted JSON numbers will be parsed directly into the `double` and\
 `std::vector<uint32_t>`. The `glz::quoted` function works for nested objects\
 and arrays as well.

## JSON Lines (NDJSON) Support

Glaze supports [JSON Lines](https://jsonlines.org) (or Newline Delimited\
 JSON) for array-like types (e.g. `std::vector` and `std::tuple`).

```c++
std::vector<std::string> x = { "Hello", "World", "Ice", "Cream" };
std::string s = glz::write_ndjson(x).value_or("error");
auto ec = glz::read_ndjson(x, s);
```

# More Features

### [Data Recorder](https://stephenberry.github.io/glaze/recorder/)

### [Command Line Interface Menu](https://stephenberry.github.io/glaze/cli-me\
nu/)

### [JMESPath](https://stephenberry.github.io/glaze/JMESPath/)

- Querying JSON

### [JSON Include System](https://stephenberry.github.io/glaze/json-include/)

### [JSON Pointer Syntax](https://stephenberry.github.io/glaze/json-pointer-s\
yntax/)

### [JSON-RPC 2.0](https://stephenberry.github.io/glaze/rpc/json-rpc/)

### [JSON Schema](https://stephenberry.github.io/glaze/json-schema/)

### [Shared Library API](https://stephenberry.github.io/glaze/glaze-interface\
s/)

### [Streaming I/O](https://stephenberry.github.io/glaze/streaming/)

### [Tagged Binary Messages](https://stephenberry.github.io/glaze/binary/)

### [Thread Pool](https://stephenberry.github.io/glaze/thread-pool/)

### [Time Trace Profiling](https://stephenberry.github.io/glaze/time-trace/)

- Output performance profiles to JSON and visualize using [Perfetto](https://\
ui.perfetto.dev)

### [Wrappers](https://stephenberry.github.io/glaze/wrappers/)

# Extensions

See the `ext` directory for extensions.

- [Eigen](https://gitlab.com/libeigen/eigen)
- [JSON-RPC 2.0](https://stephenberry.github.io/glaze/rpc/json-rpc/)
- [Command Line Interface Menu (cli_menu)](https://stephenberry.github.io/gla\
ze/cli-menu/)

# License

Glaze is distributed under the MIT license with an exception for embedded\
 forms:

> --- Optional exception to the license ---
>
> As an exception, if, as a result of your compiling your source code,\
 portions of this Software are embedded into a machine-executable object form\
 of such source code, you may redistribute such embedded portions in such\
 object form without including the copyright and permission notices.

\
description-type: text/markdown;variant=GFM
package-description:
\
# libglaze - In memory, JSON and interface library for C++

This is a `build2` package for the [`glaze`](https://github.com/stephenberry/\
glaze)
C++ library. It provides an in memory, JSON and interface library for C++.


## Usage

To start using `libglaze` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libglaze ^2.5.3
```

Then import the library in your `buildfile`:

```
import libs = libglaze%lib{glaze}
```

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/stephenberry/glaze
package-url: https://github.com/build2-packaging/glaze
email: stephenberry.developer@gmail.com
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libasio ^1.29.0 ? ($config.libglaze.repe_rpc)
requires: c++23
tests: libglaze-tests == 6.5.1
builds: default experimental; Only modern compilers are supported.
builds: &( +gcc-13+ +clang-18+ +msvc-17+ ); Requires newer features &\
 bug-fixes.
builds: +( +macos &clang-16+ ); Homebrew GCC is not supported.
bootstrap-build:
\
project = libglaze

using version
using config
using test
using install
using dist

\
root-build:
\
using cxx.guess

cxx.internal.scope = current

cxx.std = ($cxx.id == 'msvc' ? experimental : latest)

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

config [bool] config.libglaze.repe_rpc ?= true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: glaze/libglaze-6.5.1.tar.gz
sha256sum: a83d02a493112641e5c4435425aba50d2656c738c8e34462302831234ec0f37c
:
name: libglaze
version: 7.2.3
type: lib,binless
language: c++
project: glaze
summary: JSON and interface library for C++
license: MIT; MIT License.
topics: json, json rpc 2.0, csv, beve, serialization
description:
\
# Glaze
One of the fastest JSON libraries in the world. Glaze reads and writes from\
 object memory, simplifying interfaces and offering incredible performance.

Formats Supported:

- [JSON](https://stephenberry.github.io/glaze/json/) | `glaze/json.hpp`
- [BEVE](https://github.com/beve-org/beve) (Binary Efficient Versatile\
 Encoding) | `glaze/beve.hpp`
- [CBOR](https://stephenberry.github.io/glaze/cbor/) (Concise Binary Object\
 Representation) | `glaze/cbor.hpp`
- [CSV](https://stephenberry.github.io/glaze/csv/) (Comma Separated Value) |\
 `glaze/csv.hpp`
- [MessagePack](https://stephenberry.github.io/glaze/msgpack/) |\
 `glaze/msgpack.hpp`
- [Stencil/Mustache](https://stephenberry.github.io/glaze/stencil-mustache/)\
 (string interpolation) | `glaze/stencil/stencil.hpp`
- [TOML 1.1](https://stephenberry.github.io/glaze/toml/) (Tom's Obvious,\
 Minimal Language) | `glaze/toml.hpp`
- [YAML](https://stephenberry.github.io/glaze/yaml/) | `glaze/yaml.hpp`
- [EETF](https://stephenberry.github.io/glaze/EETF/erlang-external-term-forma\
t/) (Erlang External Term Format) | `glaze/eetf.hpp`
- [And Many More Features](https://stephenberry.github.io/glaze/)

> [!NOTE]
>
> Glaze is getting HTTP support with REST servers, clients, websockets, and\
 more. The networking side of Glaze is under active development, and while it\
 is usable and feedback is desired, the API is likely to be changing and\
 improving.

## With C++23 & C++26 compile time reflection for MSVC, Clang, and GCC!

- Read/write aggregate initializable structs without writing any metadata or\
 macros!
- See [example on Compiler Explorer](https://gcc.godbolt.org/z/T4To5fKfz)

## C++26 P2996 Reflection Support

Glaze now supports [P2996 "Reflection for C++26"](https://wg21.link/P2996).\
 When enabled, P2996 unlocks capabilities that aren't possible with\
 traditional compile-time reflection:

- **Non-aggregate types** — classes with constructors, virtual functions, and\
 inheritance just work
- **Automatic enum serialization** — no `glz::meta` needed, enums serialize\
 to strings automatically
- **Unlimited struct members** — no 128-member cap
- **Private member access** — reflect on all members regardless of access\
 specifiers
- **Standardized** — no compiler-specific hacks, built on `std::meta`

```cpp
// Classes with constructors — just works with P2996
class User {
public:
   std::string name;
   int age;
   User() = default;
   User(std::string n, int a) : name(std::move(n)), age(a) {}
};

User u{"Alice", 30};
auto json = glz::write_json(u).value_or("error");
// {"name":"Alice","age":30}

// Enums serialize as strings — no glz::meta required
enum class Color { Red, Green, Blue };
Color c = Color::Green;

struct reflect_enums_opts : glz::opts {
   bool reflect_enums = true;
};
auto color_json = glz::write<reflect_enums_opts{}>(c).value_or("error");
// "Green"
```

Supported compilers: [GCC 16+](https://gcc.gnu.org/gcc-16/changes.html)\
 (`-std=c++26 -freflection`) and [Bloomberg clang-p2996](https://github.com/b\
loomberg/clang-p2996). See the [P2996 documentation](https://stephenberry.git\
hub.io/glaze/p2996-reflection/) for setup and details.

## [📖 Documentation](https://stephenberry.github.io/glaze/)

See this README, the [Glaze Documentation Page](https://stephenberry.github.i\
o/glaze/), or [docs folder](https://github.com/stephenberry/glaze/tree/main/d\
ocs) for documentation.

## Highlights

- Pure, compile time reflection for structs
  - Powerful meta specialization system for custom names and behavior
  - [C++26 P2996 reflection](https://stephenberry.github.io/glaze/p2996-refle\
ction/) support — non-aggregates, automatic enums, unlimited members
- JSON [RFC 8259](https://datatracker.ietf.org/doc/html/rfc8259) compliance\
 with UTF-8 validation
- Standard C++ library support
- Header only
- Direct to memory serialization/deserialization
- Compile time maps with constant time lookups and perfect hashing
- Powerful wrappers to modify read/write behavior ([Wrappers](https://stephen\
berry.github.io/glaze/wrappers/))
- Use your own custom read/write functions ([Custom Read/Write](#custom-readw\
rite))
- [Handle unknown keys](https://stephenberry.github.io/glaze/unknown-keys/)\
 in a fast and flexible manner
- Direct memory access through [JSON pointer syntax](https://stephenberry.git\
hub.io/glaze/json-pointer-syntax/)
- [JMESPath](https://stephenberry.github.io/glaze/JMESPath/) querying
- No exceptions (compiles with `-fno-exceptions`)
  - If you desire helpers that throw for cleaner syntax see [Glaze\
 Exceptions](https://stephenberry.github.io/glaze/exceptions/)
- No runtime type information necessary (compiles with `-fno-rtti`)
- [JSON Schema generation](https://stephenberry.github.io/glaze/json-schema/)
- [Partial Read](https://stephenberry.github.io/glaze/partial-read/) and\
 [Partial Write](https://stephenberry.github.io/glaze/partial-write/) support
- [Streaming I/O](https://stephenberry.github.io/glaze/streaming/) for\
 reading/writing large files with bounded memory
- [Much more!](#more-features)

## Performance

| Library                                                      | Roundtrip\
 Time (s) | Write (MB/s) | Read (MB/s) |
| ------------------------------------------------------------ |\
 ------------------ | ------------ | ----------- |
| [**Glaze**](https://github.com/stephenberry/glaze)           | **1.01**    \
       | **1396**     | **1200**    |
| [**simdjson (on demand)**](https://github.com/simdjson/simdjson) | **N/A** \
           | **N/A**      | **1163**    |
| [**yyjson**](https://github.com/ibireme/yyjson)              | **1.22**    \
       | **1023**     | **1106**    |
| [**reflect_cpp**](https://github.com/getml/reflect-cpp)      | **3.15**    \
       | **488**      | **365**     |
| [**daw_json_link**](https://github.com/beached/daw_json_link) | **3.29**   \
        | **334**      | **479**     |
| [**RapidJSON**](https://github.com/Tencent/rapidjson)        | **3.76**    \
       | **289**      | **416**     |
| [**json_struct**](https://github.com/jorgen/json_struct)     | **5.87**    \
       | **178**      | **316**     |
| [**Boost.JSON**](https://boost.org/libs/json)                | **5.38**    \
       | **198**      | **308**     |
| [**nlohmann**](https://github.com/nlohmann/json)             | **15.44**   \
       | **86**       | **81**      |

[Performance test code available here](https://github.com/stephenberry/json_p\
erformance)

*Performance caveats: [simdjson](https://github.com/simdjson/simdjson) and\
 [yyjson](https://github.com/ibireme/yyjson) are great, but they experience\
 major performance losses when the data is not in the expected sequence or\
 any keys are missing (the problem grows as the file size increases, as they\
 must re-iterate through the document).*

*Also, [simdjson](https://github.com/simdjson/simdjson) and\
 [yyjson](https://github.com/ibireme/yyjson) do not support automatic escaped\
 string handling, so if any of the currently non-escaped strings in this\
 benchmark were to contain an escape, the escapes would not be handled.*

[ABC Test](https://github.com/stephenberry/json_performance) shows how\
 simdjson has poor performance when keys are not in the expected sequence:

| Library                                                      | Read (MB/s) |
| ------------------------------------------------------------ | ----------- |
| [**Glaze**](https://github.com/stephenberry/glaze)           | **1219**    |
| [**simdjson (on demand)**](https://github.com/simdjson/simdjson) | **89**  \
    |

## Binary Performance

Tagged binary specification: [BEVE](https://github.com/beve-org/beve)

| Metric                | Roundtrip Time (s) | Write (MB/s) | Read (MB/s) |
| --------------------- | ------------------ | ------------ | ----------- |
| Raw performance       | **0.42**           | **3235**     | **2468**    |
| Equivalent JSON data* | **0.42**           | **3547**     | **2706**    |

JSON size: 670 bytes

BEVE size: 611 bytes

*BEVE packs more efficiently than JSON, so transporting the same data is even\
 faster.

## Examples

> [!TIP]
>
> See the [example_json](https://github.com/stephenberry/glaze/blob/main/test\
s/example_json/example_json.cpp) unit test for basic examples of how to use\
 Glaze. See [json_test](https://github.com/stephenberry/glaze/blob/main/tests\
/json_test/json_test.cpp) for an extensive test of features.

Your struct will automatically get reflected! No metadata is required by the\
 user.

```c++
struct my_struct
{
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
  std::array<uint64_t, 3> arr = { 1, 2, 3 };
  std::map<std::string, int> map{{"one", 1}, {"two", 2}};
};
```

**JSON** (prettified)

```json
{
   "i": 287,
   "d": 3.14,
   "hello": "Hello World",
   "arr": [
      1,
      2,
      3
   ],
   "map": {
      "one": 1,
      "two": 2
   }
}
```

**Write JSON**

```c++
my_struct s{};
std::string buffer = glz::write_json(s).value_or("error");
```

or

```c++
my_struct s{};
std::string buffer{};
auto ec = glz::write_json(s, buffer);
if (ec) {
  // handle error
}
```

**Read JSON**

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
,"map":{"one":1,"two":2}})";
auto s = glz::read_json<my_struct>(buffer);
if (s) // check std::expected
{
  s.value(); // s.value() is a my_struct populated from buffer
}
```

or

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
,"map":{"one":1,"two":2}})";
my_struct s{};
auto ec = glz::read_json(s, buffer); // populates s from buffer
if (ec) {
  // handle error
}
```

### Read/Write From File

```c++
auto ec = glz::read_file_json(obj, "./obj.json", std::string{});
auto ec = glz::write_file_json(obj, "./obj.json", std::string{});
```

> [!IMPORTANT]
>
> The file name (2nd argument), must be null terminated.

### Writing to Streams

For streaming to `std::ostream` destinations (files, network, etc.) with\
 bounded memory:

```c++
#include "glaze/core/ostream_buffer.hpp"

std::ofstream file("output.json");
glz::basic_ostream_buffer<std::ofstream> buffer(file);  // Concrete type for\
 performance
auto ec = glz::write_json(obj, buffer);
```

The buffer flushes incrementally during serialization, enabling arbitrarily\
 large outputs with fixed memory. See [Streaming I/O](https://stephenberry.gi\
thub.io/glaze/streaming/) for details on buffer types and stream concepts.

### Reading from Streams

For streaming from `std::istream` sources (files, network, etc.) with bounded\
 memory:

```c++
#include "glaze/core/istream_buffer.hpp"

std::ifstream file("input.json");
glz::basic_istream_buffer<std::ifstream> buffer(file);
my_struct obj;
auto ec = glz::read_json(obj, buffer);
```

The buffer refills automatically during parsing, enabling reading of\
 arbitrarily large inputs with fixed memory. See [Streaming\
 I/O](https://stephenberry.github.io/glaze/streaming/) for NDJSON processing\
 and other streaming patterns.

## Compiler/System Support

- Requires C++23
- Tested for both 64bit and 32bit
- Supports both little-endian and big-endian systems

[Actions](https://github.com/stephenberry/glaze/actions) build and test with\
 [Clang](https://clang.llvm.org) (18+), [MSVC](https://visualstudio.microsoft\
.com/vs/features/cplusplus/) (2022), and [GCC](https://gcc.gnu.org) (13+) on\
 apple, windows, and linux. Big-endian is tested via QEMU emulation on s390x.

![clang build](https://github.com/stephenberry/glaze/actions/workflows/clang.\
yml/badge.svg) ![gcc build](https://github.com/stephenberry/glaze/actions/wor\
kflows/gcc.yml/badge.svg) ![msvc build](https://github.com/stephenberry/glaze\
/actions/workflows/msvc.yml/badge.svg) 

> Glaze seeks to maintain compatibility with the latest three versions of GCC\
 and Clang, as well as the latest version of MSVC and Apple Clang (Xcode).\
 And, we aim to only drop old versions with major releases.

### MSVC Compiler Flags

Glaze requires a C++ standard conformant pre-processor, which requires the\
 `/Zc:preprocessor` flag when building with MSVC.

### SIMD Architecture Detection

Glaze automatically detects the target architecture and enables\
 platform-specific SIMD optimizations using compiler-predefined macros:

| Flag | Detected When | Architecture |
|------|--------------|--------------|
| `GLZ_USE_SSE2` | `__x86_64__` or `_M_X64` | x86-64 (always has SSE2) |
| `GLZ_USE_AVX2` | `__AVX2__` (in addition to x86-64) | x86-64 with AVX2 |
| `GLZ_USE_NEON` | `__aarch64__`, `_M_ARM64`, or `__ARM_NEON` | ARM64 /\
 AArch64 |

Since these are target-architecture macros set by the compiler,\
 cross-compilation works automatically (e.g., an x86 host cross-compiling for\
 ARM will not enable x86 SIMD paths).

To disable SIMD optimizations:

```cmake
set(glaze_DISABLE_SIMD_WHEN_SUPPORTED ON)
```

This sets `GLZ_DISABLE_SIMD` as an INTERFACE compile definition, propagated\
 to all targets linking against `glaze::glaze`. Without CMake, define\
 `GLZ_DISABLE_SIMD` before including Glaze headers.

### Disable Forced Inlining

For faster compilation and reduced binary size at the cost of peak\
 performance, use `glaze_DISABLE_ALWAYS_INLINE`:

```cmake
set(glaze_DISABLE_ALWAYS_INLINE ON)
```

> **Note:** This reduces compilation time and binary size, which can be\
 useful for embedded systems where size is critical. For additional binary\
 size reduction, see Optimization Levels below.

### C++26 P2996 Reflection

Glaze supports [C++26 P2996 reflection](https://wg21.link/P2996) as an\
 alternative backend for struct reflection. This replaces traditional\
 `__PRETTY_FUNCTION__` parsing with standardized reflection primitives.

```cmake
set(glaze_ENABLE_REFLECTION26 ON)
```

Requires [GCC 16+](https://gcc.gnu.org/gcc-16/changes.html) or [Bloomberg\
 clang-p2996](https://github.com/bloomberg/clang-p2996) with flags:

**GCC 16+:**
```bash
-std=c++26 -freflection
```

**Bloomberg clang-p2996:**
```bash
-std=c++26 -freflection -fexpansion-statements -stdlib=libc++
```

Benefits include unlimited struct members (vs 128 with traditional\
 reflection), cleaner type names, and future C++ standards compliance. See\
 [P2996 Reflection](https://stephenberry.github.io/glaze/p2996-reflection/)\
 for details.

### Optimization Levels (Embedded/Size Optimization)

Glaze provides optimization levels to control the trade-off between binary\
 size and runtime performance. This is useful for embedded systems:

```cpp
auto json = glz::write<glz::opts_size{}>(obj);
auto ec = glz::read<glz::opts_size{}>(obj, buffer);
```

| Level | Preset | Description |
|-------|--------|-------------|
| `normal` | (default) | Maximum performance (~278KB lookup tables for\
 integers and floats) |
| `size` | `opts_size` | Minimal binary (~400B integer tables,\
 `std::to_chars` for floats, linear search) |

See [Optimization Levels](https://stephenberry.github.io/glaze/optimization-l\
evels/) for full details.

## How To Use Glaze

### [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.ht\
ml)
```cmake
include(FetchContent)

FetchContent_Declare(
  glaze
  GIT_REPOSITORY https://github.com/stephenberry/glaze.git
  GIT_TAG main
  GIT_SHALLOW TRUE
)

FetchContent_MakeAvailable(glaze)

target_link_libraries(${PROJECT_NAME} PRIVATE glaze::glaze)
```

### [Conan](https://conan.io)

- Included in [Conan Center](https://conan.io/center/) ![Conan\
 Center](https://img.shields.io/conan/v/glaze)

```
find_package(glaze REQUIRED)

target_link_libraries(main PRIVATE glaze::glaze)
```

### [build2](https://build2.org)

- Available on [cppget](https://cppget.org/libglaze)

```
import libs = libglaze%lib{glaze}
```

### Arch Linux

- [Official Arch repository](https://archlinux.org/packages/extra/any/glaze/)
- AUR git package: [glaze-git](https://aur.archlinux.org/packages/glaze-git)

### See this [Example Repository](https://github.com/stephenberry/glaze_examp\
le) for how to use Glaze in a new project

---

## See [FAQ](https://stephenberry.github.io/glaze/FAQ/) for Frequently Asked\
 Questions

# Explicit Metadata

If you want to specialize your reflection then you can **optionally** write\
 the code below:

> This metadata is also necessary for non-aggregate initializable structs.

```c++
template <>
struct glz::meta<my_struct> {
   using T = my_struct;
   static constexpr auto value = object(
      &T::i,
      &T::d,
      &T::hello,
      &T::arr,
      &T::map
   );
};
```

## Local Glaze Meta

<details><summary>Glaze also supports metadata within its associated\
 class:</summary>

```c++
struct my_struct
{
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
  std::array<uint64_t, 3> arr = { 1, 2, 3 };
  std::map<std::string, int> map{{"one", 1}, {"two", 2}};
  
  struct glaze {
     using T = my_struct;
     static constexpr auto value = glz::object(
        &T::i,
        &T::d,
        &T::hello,
        &T::arr,
        &T::map
     );
  };
};
```

</details>

## Custom Key Names or Unnamed Types

When you define Glaze metadata, objects will automatically reflect the\
 non-static names of your member object pointers. However, if you want custom\
 names or you register lambda functions or wrappers that do not provide names\
 for your fields, you can optionally add field names in your metadata.

Example of custom names:

```c++
template <>
struct glz::meta<my_struct> {
   using T = my_struct;
   static constexpr auto value = object(
      "integer", &T::i,
      "double", &T::d,
      "string", &T::hello,
      "array", &T::arr,
      "my map", &T::map
   );
};
```

> Each of these strings is optional and can be removed for individual fields\
 if you want the name to be reflected.
>
> Names are required for:
>
> - static constexpr member variables
> - [Wrappers](https://stephenberry.github.io/glaze/wrappers/)
> - Lambda functions

### Extending pure reflection with `modify`

If you only need to tweak a couple of fields, you can layer those changes on\
 top of the automatically reflected members with `glz::meta<T>::modify`:

```c++
struct server_status
{
   std::string name;
   std::string region;
   uint64_t active_sessions{};
   std::optional<std::string> maintenance;
   double cpu_percent{};
};

template <> struct glz::meta<server_status>
{
   static constexpr auto modify = glz::object(
      "maintenance_alias", [](auto& self) -> auto& { return self.maintenance;\
 },
      "cpuPercent", &server_status::cpu_percent
   );
};
```

Serialising

```c++
server_status status{
   .name = "edge-01",
   .region = "us-east",
   .active_sessions = 2412,
   .maintenance = std::string{"scheduled"},
   .cpu_percent = 73.5,
};
```

produces

```json
{
  "name": "edge-01",
  "region": "us-east",
  "active_sessions": 2412,
  "maintenance": "scheduled",
  "cpu_percent": 73.5,
  "maintenance_alias": "scheduled",
  "cpuPercent": 73.5
}
```

All the untouched members (`name`, `region`, `active_sessions`,\
 `maintenance`, `cpu_percent`) still come from pure reflection, so adding or\
 removing members later keeps working automatically. Only the extra keys\
 provided in `modify` are layered on top.

# Reflection API

Glaze provides a compile time reflection API that can be modified via\
 `glz::meta` specializations. This reflection API uses pure reflection unless\
 a `glz::meta` specialization is provided, in which case the default behavior\
 is overridden by the developer.

```c++
static_assert(glz::reflect<my_struct>::size == 5); // Number of fields
static_assert(glz::reflect<my_struct>::keys[0] == "i"); // Access keys
```

> [!WARNING]
>
> The `glz::reflect` fields described above have been formalized and are\
 unlikely to change. Other fields may evolve as we continue to formalize the\
 spec.

## glz::for_each_field

```c++
struct test_type {
   int32_t int1{};
   int64_t int2{};
};

test_type var{42, 43};

glz::for_each_field(var, [](auto& field) {
    field += 1;
});

expect(var.int1 == 43);
expect(var.int2 == 44);
```

# Custom Read/Write

Custom reading and writing can be achieved through the powerful `to`/`from`\
 specialization approach, which is described here: [custom-serialization.md](\
https://github.com/stephenberry/glaze/blob/main/docs/custom-serialization.md)\
. However, this only works for user defined types.

For common use cases or cases where a specific member variable should have\
 special reading and writing, you can use [glz::custom](https://github.com/st\
ephenberry/glaze/blob/main/docs/wrappers.md#custom) to register read/write\
 member functions, std::functions, or lambda functions.

<details><summary>See example:</summary>

```c++
struct custom_encoding
{
   uint64_t x{};
   std::string y{};
   std::array<uint32_t, 3> z{};
   
   void read_x(const std::string& s) {
      x = std::stoi(s);
   }
   
   uint64_t write_x() {
      return x;
   }
   
   void read_y(const std::string& s) {
      y = "hello" + s;
   }
   
   auto& write_z() {
      z[0] = 5;
      return z;
   }
};

template <>
struct glz::meta<custom_encoding>
{
   using T = custom_encoding;
   static constexpr auto value = object("x", custom<&T::read_x, &T::write_x>,\
 //
                                        "y", custom<&T::read_y, &T::y>, //
                                        "z", custom<&T::z, &T::write_z>);
};

suite custom_encoding_test = [] {
   "custom_reading"_test = [] {
      custom_encoding obj{};
      std::string s = R"({"x":"3","y":"world","z":[1,2,3]})";
      expect(!glz::read_json(obj, s));
      expect(obj.x == 3);
      expect(obj.y == "helloworld");
      expect(obj.z == std::array<uint32_t, 3>{1, 2, 3});
   };
   
   "custom_writing"_test = [] {
      custom_encoding obj{};
      std::string s = R"({"x":"3","y":"world","z":[1,2,3]})";
      expect(!glz::read_json(obj, s));
      std::string out{};
      expect(not glz::write_json(obj, out));
      expect(out == R"({"x":3,"y":"helloworld","z":[5,2,3]})");
   };
};
```

</details>

<details><summary>Another example with constexpr lambdas:</summary>

```c++
struct custom_buffer_input
{
   std::string str{};
};

template <>
struct glz::meta<custom_buffer_input>
{
   static constexpr auto read_x = [](custom_buffer_input& s, const\
 std::string& input) { s.str = input; };
   static constexpr auto write_x = [](auto& s) -> auto& { return s.str; };
   static constexpr auto value = glz::object("str", glz::custom<read_x,\
 write_x>);
};

suite custom_lambdas_test = [] {
   "custom_buffer_input"_test = [] {
      std::string s = R"({"str":"Hello!"})";
      custom_buffer_input obj{};
      expect(!glz::read_json(obj, s));
      expect(obj.str == "Hello!");
      s.clear();
      expect(!glz::write_json(obj, s));
      expect(s == R"({"str":"Hello!"})");
      expect(obj.str == "Hello!");
   };
};
```

</details>

### Error handling with `glz::custom`

Developers can throw errors, but for builds that disable exceptions or if it\
 is desirable to integrate error handling within Glaze's `context`, the last\
 argument of custom lambdas may be a `glz::context&`. This enables custom\
 error handling that integrates well with the rest of Glaze.

<details><summary>See example:</summary>

```c++
struct age_custom_error_obj
{
   int age{};
};

template <>
struct glz::meta<age_custom_error_obj>
{
   using T = age_custom_error_obj;
   static constexpr auto read_x = [](T& s, int age, glz::context& ctx) {
      if (age < 21) {
         ctx.error = glz::error_code::constraint_violated;
         ctx.custom_error_message = "age too young";
      }
      else {
         s.age = age;
      }
   };
   static constexpr auto value = object("age", glz::custom<read_x, &T::age>);
};
```

In use:
```c++
age_custom_error_obj obj{};
std::string s = R"({"age":18})";
auto ec = glz::read_json(obj, s);
auto err_msg = glz::format_error(ec, s);
std::cout << err_msg << '\n';
```

Console output:
```
1:10: constraint_violated
   {"age":18}
            ^ age too young
```

</details>

# Object Mapping

When using member pointers (e.g. `&T::a`) the C++ class structures must match\
 the JSON interface. It may be desirable to map C++ classes with differing\
 layouts to the same object interface. This is accomplished through\
 registering lambda functions instead of member pointers.

```c++
template <>
struct glz::meta<Thing> {
   static constexpr auto value = object(
      "i", [](auto&& self) -> auto& { return self.subclass.i; }
   );
};
```

The value `self` passed to the lambda function will be a `Thing` object, and\
 the lambda function allows us to make the subclass invisible to the object\
 interface.

Lambda functions by default copy returns, therefore the `auto&` return type\
 is typically required in order for glaze to write to memory.

> Note that remapping can also be achieved through pointers/references, as\
 glaze treats values, pointers, and references in the same manner when\
 writing/reading.

# Value Types

A class can be treated as an underlying value as follows:

```c++
struct S {
  int x{};
};

template <>
struct glz::meta<S> {
  static constexpr auto value{ &S::x };
};
```

or using a lambda:

```c++
template <>
struct glz::meta<S> {
  static constexpr auto value = [](auto& self) -> auto& { return self.x; };
};
```

# Read Constraints

Glaze provides a wrapper to enable complex reading constraints for struct\
 members: `glz::read_constraint`.

<details><summary>See example:</summary>

```c++
struct constrained_object
{
   int age{};
   std::string name{};
};

template <>
struct glz::meta<constrained_object>
{
   using T = constrained_object;
   static constexpr auto limit_age = [](const T&, int age) {
      return (age >= 0 && age <= 120);
   };
   
   static constexpr auto limit_name = [](const T&, const std::string& name) {
      return name.size() <= 8;
   };
   
   static constexpr auto value = object("age", read_constraint<&T::age,\
 limit_age, "Age out of range">, //
                                        "name", read_constraint<&T::name,\
 limit_name, "Name is too long">);
};
```

For invalid input such as `{"age": -1, "name": "Victor"}`, Glaze will outut\
 the following formatted error message:

```
1:11: constraint_violated
   {"age": -1, "name": "Victor"}
             ^ Age out of range
```

- Member functions can also be registered as the constraint. 
- The first field of the constraint lambda is the parent object, allowing\
 complex constraints to be written by the user.

</details>

# Reading/Writing Private Fields

Serialize and deserialize private fields by making a `glz::meta<T>` and\
 adding `friend struct glz::meta<T>;` to your class.

<details><summary>See example:</summary>

```c++
class private_fields_t
{
private:
   double cash = 22.0;
   std::string currency = "$";

   friend struct glz::meta<private_fields_t>;
};

template <>
struct glz::meta<private_fields_t>
{
   using T = private_fields_t;
   static constexpr auto value = object(&T::cash, &T::currency);
};

suite private_fields_tests = []
{
   "private fields"_test = [] {
      private_fields_t obj{};
      std::string buffer{};
      expect(not glz::write_json(obj, buffer));
      expect(buffer == R"({"cash":22,"currency":"$"})");
      
      buffer = R"({"cash":2200.0, "currency":"¢"})";
      expect(not glz::read_json(obj, buffer));
      buffer.clear();
      expect(not glz::write_json(obj, buffer));
      expect(buffer == R"({"cash":2200,"currency":"¢"})");
   };
};
```

</details>

# Error Handling

Glaze is safe to use with untrusted messages. Errors are returned as error\
 codes, typically within a `glz::expected`, which behaves just like a\
 `std::expected`.

> Glaze works to short circuit error handling, which means the parsing exits\
 very rapidly if an error is encountered.

To generate more helpful error messages, call `format_error`:

```c++
auto pe = glz::read_json(obj, buffer);
if (pe) {
  std::string descriptive_error = glz::format_error(pe, buffer);
}
```

This test case:

```json
{"Hello":"World"x, "color": "red"}
```

Produces this error:

```
1:17: expected_comma
   {"Hello":"World"x, "color": "red"}
                   ^
```

Denoting that x is invalid here.

## Bytes Consumed on Read

The `error_ctx` type returned by read operations includes a `count` field\
 that indicates the byte position in the input buffer:

```c++
std::string buffer = R"({"x":1,"y":2})";
my_struct obj{};
auto ec = glz::read_json(obj, buffer);
if (!ec) {
   // Success: ec.count contains bytes consumed
   size_t bytes_consumed = ec.count;
   // bytes_consumed == 13 (entire JSON object)
}
```

This is useful for:
- **Streaming**: Reading multiple JSON values from a single buffer
- **Partial parsing**: Knowing where parsing stopped with `partial_read`\
 option
- **Error diagnostics**: On failure, `count` indicates where the error\
 occurred

# Input Buffer (Null) Termination

A non-const `std::string` is recommended for input buffers, as this allows\
 Glaze to improve performance with temporary padding and the buffer will be\
 null terminated.

## JSON

By default the option `null_terminated` is set to `true` and null-terminated\
 buffers must be used when parsing JSON. The option can be turned off with a\
 small loss in performance, which allows non-null terminated buffers:

```c++
constexpr glz::opts options{.null_terminated = false};
auto ec = glz::read<options>(value, buffer); // read in a non-null terminated\
 buffer
```

## BEVE

Null-termination is not required for BEVE. It makes no difference in\
 performance.

## CBOR

Null-termination is not required for CBOR. It makes no difference in\
 performance.

## CSV

Null-termination is not required for CSV. It makes no difference in\
 performance.


# Type Support

## Array Types

Array types logically convert to JSON array values. Concepts are used to\
 allow various containers and even user containers if they match standard\
 library interfaces.

- `glz::array` (compile time mixed types)
- `std::tuple` (compile time mixed types)
- `std::array`
- `std::vector`
- `std::deque`
- `std::list`
- `std::forward_list`
- `std::span`
- `std::set`
- `std::unordered_set`

## Object Types

Object types logically convert to JSON object values, such as maps. Like\
 JSON, Glaze treats object definitions as unordered maps. Therefore the order\
 of an object layout does not have to match the same binary sequence in C++.

- `glz::object` (compile time mixed types)
- `std::map`
- `std::unordered_map`
- `std::pair` (enables dynamic keys in stack storage)

> `std::pair` is handled as an object with a single key and value, but when\
 `std::pair` is used in an array, Glaze concatenates the pairs into a single\
 object. `std::vector<std::pair<...>>` will serialize as a single  object. If\
 you don't want this behavior set the compile time option `.concatenate =\
 false`.

## Variants

- `std::variant`

See [Variant Handling](https://stephenberry.github.io/glaze/variant-handling/\
) for more information.

## Nullable Types

- `std::unique_ptr`
- `std::shared_ptr`
- `std::optional`

Nullable types may be allocated by valid input or nullified by the `null`\
 keyword.

```c++
std::unique_ptr<int> ptr{};
std::string buffer{};
expect(not glz::write_json(ptr, buffer));
expect(buffer == "null");

expect(not glz::read_json(ptr, "5"));
expect(*ptr == 5);
buffer.clear();
expect(not glz::write_json(ptr, buffer));
expect(buffer == "5");

expect(not glz::read_json(ptr, "null"));
expect(!bool(ptr));
```

## Enums

By default enums will be written and read in integer form. No `glz::meta` is\
 necessary if this is the desired behavior.

However, if you prefer to use enums as strings in JSON, they can be\
 registered in the `glz::meta` as follows:

```c++
enum class Color { Red, Green, Blue };

template <>
struct glz::meta<Color> {
   using enum Color;
   static constexpr auto value = enumerate(Red,
                                           Green,
                                           Blue
   );
};
```

In use:

```c++
Color color = Color::Red;
std::string buffer{};
glz::write_json(color, buffer);
expect(buffer == "\"Red\"");
```

> [!TIP]
>
> For automatic enum-to-string serialization without writing metadata for\
 each enum, use an enum reflection library ([magic_enum](https://github.com/N\
eargye/magic_enum), [enchantum](https://github.com/ZXShady/enchantum), or\
 [simple_enum](https://github.com/arturbac/simple_enum)) with a generic\
 `glz::meta` specialization. See [Automatic Enum Strings](https://stephenberr\
y.github.io/glaze/enum-reflection/) for details.

# JSON With Comments (JSONC)

Comments are supported with the specification defined here:\
 [JSONC](https://github.com/stephenberry/JSONC)

Read support for comments is provided with `glz::read_jsonc` or\
 `glz::read<glz::opts{.comments = true}>(...)`.

# Prettify JSON

Formatted JSON can be written out directly via a compile time option:

```c++
auto ec = glz::write<glz::opts{.prettify = true}>(obj, buffer);
```

Or, JSON text can be formatted with the `glz::prettify_json` function:

```c++
std::string buffer = R"({"i":287,"d":3.14,"hello":"Hello World","arr":[1,2,3]\
})");
auto beautiful = glz::prettify_json(buffer);
```

`beautiful` is now:

```json
{
   "i": 287,
   "d": 3.14,
   "hello": "Hello World",
   "arr": [
      1,
      2,
      3
   ]
}
```

# Minify JSON

To write minified JSON:

```c++
auto ec = glz::write_json(obj, buffer); // default is minified
```

To minify JSON text call:

```c++
std::string minified = glz::minify_json(buffer);
```

## Minified JSON Reading

If you wish require minified JSON or know your input will always be minified,\
 then you can gain a little more performance by using the compile time option\
 `.minified = true`.

```c++
auto ec = glz::read<glz::opts{.minified = true}>(obj, buffer);
```

## Boolean Flags

Glaze supports registering a set of boolean flags that behave as an array of\
 string options:

```c++
struct flags_t {
   bool x{ true };
   bool y{};
   bool z{ true };
};

template <>
struct glz::meta<flags_t> {
   using T = flags_t;
   static constexpr auto value = flags("x", &T::x, "y", &T::y, "z", &T::z);
};
```

Example:

```c++
flags_t s{};
expect(glz::write_json(s) == R"(["x","z"])");
```

Only `"x"` and `"z"` are written out, because they are true. Reading in the\
 buffer will set the appropriate booleans.

> When writing BEVE, `flags` only use one bit per boolean (byte aligned).

## Logging JSON

Sometimes you just want to write out JSON structures on the fly as\
 efficiently as possible. Glaze provides tuple-like structures that allow you\
 to stack allocate structures to write out JSON with high speed. These\
 structures are named `glz::obj` for objects and `glz::arr` for arrays.

Below is an example of building an object, which also contains an array, and\
 writing it out.

```c++
auto obj = glz::obj{"pi", 3.14, "happy", true, "name", "Stephen", "arr",\
 glz::arr{"Hello", "World", 2}};

std::string s{};
expect(not glz::write_json(obj, s));
expect(s == R"({"pi":3.14,"happy":true,"name":"Stephen","arr":["Hello","World\
",2]})");
```

> This approach is significantly faster than `glz::generic` for generic JSON.\
 But, may not be suitable for all contexts.

## Merge

`glz::merge` allows the user to merge multiple JSON object types into a\
 single object.

```c++
glz::obj o{"pi", 3.141};
std::map<std::string_view, int> map = {{"a", 1}, {"b", 2}, {"c", 3}};
auto merged = glz::merge{o, map};
std::string s{};
glz::write_json(merged, s); // will write out a single, merged object
// s is now: {"pi":3.141,"a":0,"b":2,"c":3}
```

> `glz::merge` stores references to lvalues to avoid copies

## Generic JSON

See [Generic JSON](https://stephenberry.github.io/glaze/generic-json/) for\
 `glz::generic`.

```c++
glz::generic json{};
std::string buffer = R"([5,"Hello World",{"pi":3.14}])";
glz::read_json(json, buffer);
assert(json[2]["pi"].get<double>() == 3.14);
```

## Lazy JSON

See [Lazy JSON](https://stephenberry.github.io/glaze/lazy-json/) for\
 `glz::lazy_json`.

```c++
std::string json = R"({"name":"John","age":30,"city":"New York"})";
auto result = glz::lazy_json(json);
if (result) {
   auto age = (*result)["age"].get<int>(); // Only parses what you access
}
```

> `glz::lazy_json` provides on-demand parsing without any upfront processing,\
 ideal for extracting a few fields from large JSON documents.

`glz::lazy_beve` provides the same lazy parsing capability for BEVE binary\
 format. See [Lazy BEVE](https://stephenberry.github.io/glaze/lazy-beve/).

## Raw Buffer Performance

Glaze is just about as fast writing to a `std::string` as it is writing to a\
 raw char buffer. If you have sufficiently allocated space in your buffer you\
 can write to the raw buffer, as shown below, but it is not recommended.

```c++
glz::read_json(obj, buffer);
const auto result = glz::write_json(obj, buffer.data());
if (!result) {
   buffer.resize(result.count);
}
```

### Writing to Fixed-Size Buffers

All write functions return `glz::error_ctx`, which provides both error\
 information and the byte count:

```c++
std::array<char, 1024> buffer;
auto ec = glz::write_json(my_obj, buffer);
if (ec) {
   if (ec.ec == glz::error_code::buffer_overflow) {
      // Buffer was too small
      std::cerr << "Overflow after " << ec.count << " bytes\n";
   }
   return;
}
// Success: ec.count contains bytes written
std::string_view json(buffer.data(), ec.count);
```

The `error_ctx` type provides:
- `if (ec)` - true when there is an error (matches `std::error_code`\
 semantics)
- `ec.count` - bytes processed (always populated, even on error)
- `ec.ec` - the error code
- `glz::format_error(ec, buffer)` - formatted error message

## Compile Time Options

The `glz::opts` struct defines the default compile time options for\
 reading/writing.

Instead of calling `glz::read_json(...)`, you can call `glz::read<glz::opts{}\
>(...)` and customize the options.

For example: `glz::read<glz::opts{.error_on_unknown_keys = false}>(...)` will\
 turn off erroring on unknown keys and simple skip the items.

`glz::opts` can also switch between formats:

- `glz::read<glz::opts{.format = glz::BEVE}>(...)` -> `glz::read_beve(...)`
- `glz::read<glz::opts{.format = glz::JSON}>(...)` -> `glz::read_json(...)`

> [!IMPORTANT]
>
> See [Options](https://stephenberry.github.io/glaze/options/) for a\
 **comprehensive reference table** of all compile time options, including\
 inheritable options that can be added to custom option structs.

### Common Compile Time Options

The `glz::opts` struct provides default options. Here are the most commonly\
 used:

| Option | Default | Description |
|--------|---------|-------------|
| `format` | `JSON` | Format selector (`JSON`, `BEVE`, `CSV`, `TOML`) |
| `null_terminated` | `true` | Whether input buffer is null terminated |
| `error_on_unknown_keys` | `true` | Error on unknown JSON keys |
| `skip_null_members` | `true` | Skip null values when writing |
| `prettify` | `false` | Output formatted JSON |
| `minified` | `false` | Require minified input (faster parsing) |
| `error_on_missing_keys` | `false` | Require all keys to be present |
| `partial_read` | `false` | Exit after reading deepest object |

**Inheritable options** (not in `glz::opts` by default) can be added via\
 custom structs:

```c++
struct my_opts : glz::opts {
   bool validate_skipped = true;        // Full validation on skipped values
   bool append_arrays = true;           // Append to arrays instead of replace
};

constexpr my_opts opts{};
auto ec = glz::read<opts>(obj, buffer);
```

> See [Options](https://stephenberry.github.io/glaze/options/) for the\
 complete list with detailed descriptions, and [Wrappers](https://stephenberr\
y.github.io/glaze/wrappers/) for per-field options.

## JSON Conformance

By default Glaze is strictly conformant with the latest JSON standard except\
 in two cases with associated options:

- `validate_skipped`
  This option does full JSON validation for skipped values when parsing. This\
 is not set by default because values are typically skipped when the user is\
 unconcerned with them, and Glaze still validates for major issues. But, this\
 makes skipping faster by not caring if the skipped values are exactly JSON\
 conformant. For example, by default Glaze will ensure skipped numbers have\
 all valid numerical characters, but it will not validate for issues like\
 leading zeros in skipped numbers unless `validate_skipped` is on. Wherever\
 Glaze parses a value to be used it is fully validated.
- `validate_trailing_whitespace`
  This option validates the trailing whitespace in a parsed document. Because\
 Glaze parses C++ structs, there is typically no need to continue parsing\
 after the object of interest has been read. Turn on this option if you want\
 to ensure that the rest of the document has valid whitespace, otherwise\
 Glaze will just ignore the content after the content of interest has been\
 parsed.

> [!NOTE]
>
> By default, Glaze does not unicode escape control characters (e.g. `"\x1f"`\
 to `"\u001f"`), as this poses a risk of embedding null characters and other\
 invisible characters in strings. The compile time option `escape_control_cha\
racters` is available for those who desire to write out control characters as\
 escaped unicode in strings.
>
> ```c++
> // Example options for enabling escape_control_characters
> struct options : glz::opts {
>    bool escape_control_characters = true;
> };
> ```

## Skip

It can be useful to acknowledge a keys existence in an object to prevent\
 errors, and yet the value may not be needed or exist in C++. These cases are\
 handled by registering a `glz::skip` type with the meta data.

<details><summary>See example:</summary>

```c++
struct S {
  int i{};
};

template <>
struct glz::meta<S> {
  static constexpr auto value = object("key_to_skip", skip{}, &S::i);
};
```

```c++
std::string buffer = R"({"key_to_skip": [1,2,3], "i": 7})";
S s{};
glz::read_json(s, buffer);
// The value [1,2,3] will be skipped
expect(s.i == 7); // only the value i will be read into
```

</details>

## Hide

Glaze is designed to help with building generic APIs. Sometimes a value needs\
 to be exposed to the API, but it is not desirable to read in or write out\
 the value in JSON. This is the use case for `glz::hide`.

`glz::hide` hides the value from JSON output while still allowing API (and\
 JSON pointer) access.

<details><summary>See example:</summary>

```c++
struct hide_struct {
  int i = 287;
  double d = 3.14;
  std::string hello = "Hello World";
};

template <>
struct glz::meta<hide_struct> {
   using T = hide_struct;
   static constexpr auto value = object(&T::i,  //
                                        &T::d, //
                                        "hello", hide{&T::hello});
};
```

```c++
hide_struct s{};
auto b = glz::write_json(s);
expect(b == R"({"i":287,"d":3.14})"); // notice that "hello" is hidden from\
 the output
```

</details>

## Quoted Numbers

You can parse quoted JSON numbers directly to types like `double`, `int`,\
 etc. by utilizing the `glz::quoted` wrapper.

```c++
struct A {
   double x;
   std::vector<uint32_t> y;
};

template <>
struct glz::meta<A> {
   static constexpr auto value = object("x", glz::quoted_num<&A::x>, "y",\
 glz::quoted_num<&A::y>);
};
```

```json
{
  "x": "3.14",
  "y": ["1", "2", "3"]
}
```

The quoted JSON numbers will be parsed directly into the `double` and\
 `std::vector<uint32_t>`. The `glz::quoted` function works for nested objects\
 and arrays as well.

## JSON Lines (NDJSON) Support

Glaze supports [JSON Lines](https://jsonlines.org) (or Newline Delimited\
 JSON) for array-like types (e.g. `std::vector` and `std::tuple`).

```c++
std::vector<std::string> x = { "Hello", "World", "Ice", "Cream" };
std::string s = glz::write_ndjson(x).value_or("error");
auto ec = glz::read_ndjson(x, s);
```

# More Features

### [Data Recorder](https://stephenberry.github.io/glaze/recorder/)

### [Command Line Interface Menu](https://stephenberry.github.io/glaze/cli-me\
nu/)

### [JMESPath](https://stephenberry.github.io/glaze/JMESPath/)

- Querying JSON

### [JSON Include System](https://stephenberry.github.io/glaze/json-include/)

### [JSON Pointer Syntax](https://stephenberry.github.io/glaze/json-pointer-s\
yntax/)

### [JSON-RPC 2.0](https://stephenberry.github.io/glaze/rpc/json-rpc/)

### [JSON Schema](https://stephenberry.github.io/glaze/json-schema/)

### [Shared Library API](https://stephenberry.github.io/glaze/glaze-interface\
s/)

### [Streaming I/O](https://stephenberry.github.io/glaze/streaming/)

### [Tagged Binary Messages](https://stephenberry.github.io/glaze/binary/)

### [Thread Pool](https://stephenberry.github.io/glaze/thread-pool/)

### [Time Trace Profiling](https://stephenberry.github.io/glaze/time-trace/)

- Output performance profiles to JSON and visualize using [Perfetto](https://\
ui.perfetto.dev)

### [Wrappers](https://stephenberry.github.io/glaze/wrappers/)

# Extensions

See the `ext` directory for extensions.

- [Eigen](https://gitlab.com/libeigen/eigen)
- [JSON-RPC 2.0](https://stephenberry.github.io/glaze/rpc/json-rpc/)
- [Command Line Interface Menu (cli_menu)](https://stephenberry.github.io/gla\
ze/cli-menu/)

# License

Glaze is distributed under the MIT license with an exception for embedded\
 forms:

> --- Optional exception to the license ---
>
> As an exception, if, as a result of your compiling your source code,\
 portions of this Software are embedded into a machine-executable object form\
 of such source code, you may redistribute such embedded portions in such\
 object form without including the copyright and permission notices.

\
description-type: text/markdown;variant=GFM
package-description:
\
# libglaze - In memory, JSON and interface library for C++

This is a `build2` package for the [`glaze`](https://github.com/stephenberry/\
glaze)
C++ library. It provides an in memory, JSON and interface library for C++.


## Usage

To start using `libglaze` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libglaze ^2.5.3
```

Then import the library in your `buildfile`:

```
import libs = libglaze%lib{glaze}
```

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/stephenberry/glaze
package-url: https://github.com/build2-packaging/glaze
email: stephenberry.developer@gmail.com
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libasio ^1.29.0 ? ($config.libglaze.repe_rpc)
requires: c++23
tests: libglaze-tests == 7.2.3
builds: default experimental; Only modern compilers are supported.
builds: &( +gcc-13+ +clang-18+ +msvc-17+ ); Requires newer features &\
 bug-fixes.
builds: +( +macos &clang-16+ ); Homebrew GCC is not supported.
bootstrap-build:
\
project = libglaze

using version
using config
using test
using install
using dist

\
root-build:
\
using cxx.guess

cxx.internal.scope = current

cxx.std = ($cxx.id == 'msvc' ? experimental : latest)

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

config [bool] config.libglaze.repe_rpc ?= true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: glaze/libglaze-7.2.3.tar.gz
sha256sum: 63a99f5fcdca1d5084e75cd46d697e9148a863d38cb3ea14abad886fc530af28
:
name: libglaze-tests
version: 2.9.5
type: exe
language: c++
project: glaze
summary: JSON and interface library for C++ ; Tests
license: MIT; MIT License.
url: https://github.com/stephenberry/glaze
package-url: https://github.com/build2-packaging/glaze
email: stephenberry.developer@gmail.com
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: Eigen ^3.4.0
depends: libasio
bootstrap-build:
\
project = libglaze-tests

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
cxx{*}: extension = cpp

exe{*}: test = true

test.target = $cxx.target

\
location: glaze/libglaze-tests-2.9.5.tar.gz
sha256sum: c16f74abb2f949ed5b74228f8cc75cbaea55116071bf3f682c27f12640c41339
:
name: libglaze-tests
version: 4.0.0
type: exe
language: c++
project: glaze
summary: JSON and interface library for C++ ; Tests
license: MIT; MIT License.
url: https://github.com/stephenberry/glaze
package-url: https://github.com/build2-packaging/glaze
email: stephenberry.developer@gmail.com
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: Eigen ^3.4.0
depends: libasio
requires: c++23
bootstrap-build:
\
project = libglaze-tests

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
cxx{*}: extension = cpp

exe{*}: test = true

test.target = $cxx.target

\
location: glaze/libglaze-tests-4.0.0.tar.gz
sha256sum: b11113c1baca02158a5e9f4cee42f8e3605f93a831b330ffbbdca272c2e4d1db
:
name: libglaze-tests
version: 4.0.1
type: exe
language: c++
project: glaze
summary: JSON and interface library for C++ ; Tests
license: MIT; MIT License.
url: https://github.com/stephenberry/glaze
package-url: https://github.com/build2-packaging/glaze
email: stephenberry.developer@gmail.com
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: Eigen ^3.4.0
depends: libasio
requires: c++23
bootstrap-build:
\
project = libglaze-tests

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
cxx{*}: extension = cpp

exe{*}: test = true

test.target = $cxx.target

\
location: glaze/libglaze-tests-4.0.1.tar.gz
sha256sum: 53b177b40e05642f8d9e8b4f28b95d8c3a6b9eabc4e76a4741535fdbf5a9adbb
:
name: libglaze-tests
version: 6.5.1
type: exe
language: c++
project: glaze
summary: JSON and interface library for C++ ; Tests
license: MIT; MIT License.
url: https://github.com/stephenberry/glaze
package-url: https://github.com/build2-packaging/glaze
email: stephenberry.developer@gmail.com
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: Eigen ^3.4.0
depends: libasio
requires: c++23
bootstrap-build:
\
project = libglaze-tests

using version
using config
using test
using install
using dist

\
root-build:
\
using cxx.guess

cxx.internal.scope = current

cxx.std = ($cxx.id == 'msvc' ? experimental : latest)

using cxx

hxx{*}: extension = hpp
cxx{*}: extension = cpp

exe{*}: test = true

test.target = $cxx.target

\
location: glaze/libglaze-tests-6.5.1.tar.gz
sha256sum: 52dd8cc471b897984942675224dd4637319c9a07da2f169451a56b88efc3772e
:
name: libglaze-tests
version: 7.2.3
type: exe
language: c++
project: glaze
summary: JSON and interface library for C++ ; Tests
license: MIT; MIT License.
url: https://github.com/stephenberry/glaze
package-url: https://github.com/build2-packaging/glaze
email: stephenberry.developer@gmail.com
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: Eigen ^3.4.0
depends: libasio
requires: c++23
bootstrap-build:
\
project = libglaze-tests

using version
using config
using test
using install
using dist

\
root-build:
\
using cxx.guess

cxx.internal.scope = current

cxx.std = ($cxx.id == 'msvc' ? experimental : latest)

using cxx

hxx{*}: extension = hpp
cxx{*}: extension = cpp

exe{*}: test = true

test.target = $cxx.target

\
location: glaze/libglaze-tests-7.2.3.tar.gz
sha256sum: 297201ffa8557dc0f467092c188167de7873beea162e2137a577060899df32d4
:
name: libicui18n
version: 74.2.0+2
upstream-version: 74.2
project: icu
summary: ICU high-level internationalization C/C++ library
license: Unicode-3.0 AND BSD-3-Clause AND BSD-2-Clause; Unicode License V3\
 for most of the original files.
topics: C, C++, Unicode, internationalization
description:
\
International Components for Unicode (ICU) is a set of cross-platform Unicode-
based globalization libraries with libicui18n C/C++ library providing high-
level internationalization support (formatting, collation, etc). For more
information see:

http://site.icu-project.org/

This package contains the original libicui18n library source code overlaid
with the build2-based build system and packaged for the build2 package manager
(bpkg).

See the INSTALL file for the prerequisites and installation instructions.

Send questions, bug reports, or any other feedback about library itself to the
ICU mailing lists. Send build system and packaging-related feedback to the
packaging@build2.org mailing list (see https://lists.build2.org for posting
guidelines, etc).

The packaging of libicui18n for build2 is tracked in a Git repository at:

https://git.build2.org/cgit/packaging/icu/

\
description-type: text/plain
url: http://site.icu-project.org/
doc-url: https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/
src-url: https://git.build2.org/cgit/packaging/icu/icu/tree/libicui18n/
package-url: https://git.build2.org/cgit/packaging/icu/
email: icu-support@lists.sourceforge.net; Mailing list.
package-email: packaging@build2.org; Mailing list.
build-error-email: builds@build2.org
depends: * build2 >= 0.18.0-
depends: * bpkg >= 0.18.0-
depends: libicuuc == 74.2.0
builds: all
bootstrap-build:
\
# file      : build/bootstrap.build
# license   : Unicode License; see accompanying LICENSE file

project = libicui18n

using version
using config
using test
using install
using dist

# Sync with the libicuuc library ABI version (see libicuuc's bootstrap.build
# for details).
#
abi_version_major = "$version.major"
abi_version_patch = ($version.patch != 0 ? ".$version.patch" : "")
abi_version       = "$abi_version_major.$version.minor$abi_version_patch"

\
root-build:
\
# file      : build/root.build
# license   : Unicode License; see accompanying LICENSE file

# Note that upstream compiles with -std=c++11 but this ends up with the 'auto
# return without trailing return type' error for Clang targeting MSVC runtime.
#
cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

if ($cxx.target.system == 'win32-msvc')
  cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS

if ($cxx.class == 'msvc')
  cxx.coptions += /wd4251 /wd4275 /wd4800

if ($build.mode != 'skeleton')
  source build/common.build

\
debian-name: libicu-dev
fedora-name: libicu-devel
location: icu/libicui18n-74.2.0+2.tar.gz
sha256sum: e6a325ebe17b14b1acbf852e325a6db95c9b6a0d63449d34cff7815e52fdb8d5
:
name: libicuio
version: 74.2.0+2
upstream-version: 74.2
project: icu
summary: ICU input/output C/C++ library
license: Unicode-3.0 AND BSD-3-Clause AND BSD-2-Clause; Unicode License V3\
 for most of the original files.
topics: C, C++, Unicode, internationalization, input/output
description:
\
International Components for Unicode (ICU) is a set of cross-platform Unicode-
based globalization libraries with libicuio C/C++ library providing
input/output support (writing Unicode string to std::ostream, etc). For more
information see:

http://site.icu-project.org/

This package contains the original libicuio library source code overlaid with
the build2-based build system and packaged for the build2 package manager
(bpkg).

See the INSTALL file for the prerequisites and installation instructions.

Send questions, bug reports, or any other feedback about library itself to the
ICU mailing lists. Send build system and packaging-related feedback to the
packaging@build2.org mailing list (see https://lists.build2.org for posting
guidelines, etc).

The packaging of libicuio for build2 is tracked in a Git repository at:

https://git.build2.org/cgit/packaging/icu/

\
description-type: text/plain
url: http://site.icu-project.org/
doc-url: https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/
src-url: https://git.build2.org/cgit/packaging/icu/icu/tree/libicuio/
package-url: https://git.build2.org/cgit/packaging/icu/
email: icu-support@lists.sourceforge.net; Mailing list.
package-email: packaging@build2.org; Mailing list.
build-error-email: builds@build2.org
depends: * build2 >= 0.18.0-
depends: * bpkg >= 0.18.0-
depends: libicuuc == 74.2.0
depends: libicui18n == 74.2.0
builds: all
bootstrap-build:
\
# file      : build/bootstrap.build
# license   : Unicode License; see accompanying LICENSE file

project = libicuio

using version
using config
using test
using install
using dist

# Sync with the libicuuc library ABI version (see libicuuc's bootstrap.build
# for details).
#
abi_version_major = "$version.major"
abi_version_patch = ($version.patch != 0 ? ".$version.patch" : "")
abi_version       = "$abi_version_major.$version.minor$abi_version_patch"

\
root-build:
\
# file      : build/root.build
# license   : Unicode License; see accompanying LICENSE file

# Note that upstream compiles with -std=c++11 but this ends up with the 'auto
# return without trailing return type' error for Clang targeting MSVC runtime.
#
cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

if ($cxx.target.system == 'win32-msvc')
  cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS

if ($cxx.class == 'msvc')
  cxx.coptions += /wd4251 /wd4275 /wd4800

if ($build.mode != 'skeleton')
  source build/common.build

\
debian-name: libicu-dev
fedora-name: libicu-devel
location: icu/libicuio-74.2.0+2.tar.gz
sha256sum: e053bf154aeec92d1c12065d289a6baa66145b250cb654fd1c9af65f340cbdac
:
name: libicuuc
version: 74.2.0+2
upstream-version: 74.2
language: c++
project: icu
summary: ICU basic internationalization C/C++ library
license: Unicode-3.0 AND BSD-3-Clause AND BSD-2-Clause; Unicode License V3\
 for most of the original files.
topics: C, C++, Unicode, internationalization
description:
\
International Components for Unicode (ICU) is a set of cross-platform Unicode-
based globalization libraries with libicuuc C/C++ library providing core
Unicode support and basic functionality (character properties, locales, etc)
and libicudata C library providing data for libicuuc and libicui18n (locale
data, etc). For more information see:

http://site.icu-project.org/

This package contains the original libicuuc and libicudata libraries source
code overlaid with the build2-based build system and packaged for the build2
package manager (bpkg).

See the INSTALL file for the prerequisites and installation instructions.

Send questions, bug reports, or any other feedback about library itself to the
ICU mailing lists. Send build system and packaging-related feedback to the
packaging@build2.org mailing list (see https://lists.build2.org for posting
guidelines, etc).

The packaging of libicuuc and libicudata for build2 is tracked in a Git
repository at:

https://git.build2.org/cgit/packaging/icu/

\
description-type: text/plain
url: http://site.icu-project.org/
doc-url: https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/
src-url: https://git.build2.org/cgit/packaging/icu/icu/tree/libicuuc/
package-url: https://git.build2.org/cgit/packaging/icu/
email: icu-support@lists.sourceforge.net; Mailing list.
package-email: packaging@build2.org; Mailing list.
build-error-email: builds@build2.org
depends: * build2 >= 0.18.0-
depends: * bpkg >= 0.18.0-
depends: * icu-tools == 74.2.0
builds: all
bootstrap-build:
\
# file      : build/bootstrap.build
# license   : Unicode License; see accompanying LICENSE file

project = libicuuc

using version
using config
using test
using install
using dist

# The ICU version has the <release>.<shared-update>[.<update>] form. The
# shared update version is 0 during development, 1 for the initial release,
# and is incremented for the C/C++ and Java libraries common changes. The
# update version is incremented (or added) for updates applied to only the
# C/C++ or Java library.
#
# Note that the release version is not a semantic version and we will map the
# two-component versions to the standard versions as
# <release>.<shared-update>.0.
#
# The library naming scheme on Linux is
# libicuuc.so.<release>.<shared-update>[.<update>] (LIB_VERSION in
# icu4c/source/configure.ac). The ABI compatibility is preserved for the
# shared updates. See also:
#
# https://unicode-org.github.io/icu/userguide/icu/design.html#version-numbers\
-in-icu
#
abi_version_major = "$version.major"
abi_version_patch = ($version.patch != 0 ? ".$version.patch" : "")
abi_version       = "$abi_version_major.$version.minor$abi_version_patch"

\
root-build:
\
# file      : build/root.build
# license   : Unicode License; see accompanying LICENSE file

c.std = 11

using c
using c.predefs

h{*}: extension = h
c{*}: extension = c

# Note that upstream compiles with -std=c++11 but this ends up with the 'auto
# return without trailing return type' error for Clang targeting MSVC runtime.
#
cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

if ($c.target.system == 'win32-msvc')
  cc.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS

if ($c.class == 'msvc')
  cc.coptions += /wd4251 /wd4275 /wd4800

using c.as-cpp

using in

if ($build.mode != 'skeleton')
  source build/common.build

\
debian-name: libicu-dev
fedora-name: libicu-devel
location: icu/libicuuc-74.2.0+2.tar.gz
sha256sum: 8f8c1dcc3e9add01ed99094d4b7511fdb98afc9de6a7eb744c017010436c5dd7
:
name: libimgui
version: 1.92.3+3
project: imgui
summary: Dear ImGui: Bloat-free Graphical User interface for C++ with minimal\
 dependencies
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
tests: libimgui-null-backend-test == 1.92.3
examples: libimgui-examples == 1.92.3
bootstrap-build:
\
project = libimgui

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# ImGui configuration variables
# For more information, refer to libimgui/imgui/imconfig.h
config [bool] config.libimgui.disable                          ?= false #\
 Disables all ImGui functionality
config [bool] config.libimgui.disable_demo_windows             ?= false
config [bool] config.libimgui.disable_metrics_window           ?= false
config [bool] config.libimgui.disable_obsolete_functions       ?= false
config [bool] config.libimgui.use_bgra_packed_color            ?= false
config [bool] config.libimgui.use_wchar32                      ?= false
config [bool] config.libimgui.use_32bit_indices                ?= false
config [bool] config.libimgui.debug_highlight_all_id_conflicts ?= false

\
location: imgui/libimgui-1.92.3+3.tar.gz
sha256sum: 26ddd09e4401aa9baaaefa4acf3af4a56ed3dc2e0407843caa53954f6ad70803
:
name: libimgui-docking
version: 1.92.3+3
project: imgui
summary: Dear ImGui: Bloat-free Graphical User interface for C++ with minimal\
 dependencies ; docking branch
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
tests: libimgui-null-backend-test-docking == 1.92.3
examples: libimgui-examples-docking == 1.92.3
bootstrap-build:
\
project = libimgui-docking

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# ImGui configuration variables
# For more information, refer to libimgui-docking/imgui/imconfig.h
config [bool] config.libimgui_docking.disable                          ?=\
 false # Disables all ImGui functionality
config [bool] config.libimgui_docking.disable_demo_windows             ?=\
 false
config [bool] config.libimgui_docking.disable_metrics_window           ?=\
 false
config [bool] config.libimgui_docking.disable_obsolete_functions       ?=\
 false
config [bool] config.libimgui_docking.use_bgra_packed_color            ?=\
 false
config [bool] config.libimgui_docking.use_wchar32                      ?=\
 false
config [bool] config.libimgui_docking.use_32bit_indices                ?=\
 false
config [bool] config.libimgui_docking.debug_highlight_all_id_conflicts ?=\
 false

\
location: imgui/libimgui-docking-1.92.3+3.tar.gz
sha256sum: 43ecc0e48005638d497754903ca087ae4e7232432af5b15e3b5753df747ad001
:
name: libimgui-examples
version: 1.92.3+3
project: imgui
summary: Executable examples of usage of the Dear ImGui library
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui-platform-glfw == 1.92.3
depends: libimgui-platform-osx == 1.92.3 ? ($cxx.target.class == 'macos')
depends: libimgui-platform-win32 == 1.92.3 ? ($cxx.target.class == 'windows')
depends: libimgui-render-dx9 == 1.92.3 ? ($cxx.target.class == 'windows')
depends: libimgui-render-dx10 == 1.92.3 ? ($cxx.target.class == 'windows')
depends: libimgui-render-dx11 == 1.92.3 ? ($cxx.target.class == 'windows')
depends: libimgui-render-dx12 == 1.92.3 ? ($cxx.target.class == 'windows')
depends: libimgui-render-metal == 1.92.3 ? ($cxx.target.class == 'macos')
depends: libimgui-render-opengl2 == 1.92.3
depends: libimgui-render-opengl3 == 1.92.3
depends: libimgui-render-vulkan == 1.92.3
bootstrap-build:
\
project = libimgui-examples

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-examples-1.92.3+3.tar.gz
sha256sum: 34b9a8e962c971bcffc2a34f4462c879325ba646d0118b81aa22bedcc6b4ce5b
:
name: libimgui-examples-docking
version: 1.92.3+3
project: imgui
summary: Executable examples of usage of the Dear ImGui library ; docking\
 branch
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui-platform-glfw-docking == 1.92.3
depends: libimgui-platform-osx-docking == 1.92.3 ? ($cxx.target.class ==\
 'macos')
depends: libimgui-platform-win32-docking == 1.92.3 ? ($cxx.target.class ==\
 'windows')
depends: libimgui-render-dx9-docking == 1.92.3 ? ($cxx.target.class ==\
 'windows')
depends: libimgui-render-dx10-docking == 1.92.3 ? ($cxx.target.class ==\
 'windows')
depends: libimgui-render-dx11-docking == 1.92.3 ? ($cxx.target.class ==\
 'windows')
depends: libimgui-render-dx12-docking == 1.92.3 ? ($cxx.target.class ==\
 'windows')
depends: libimgui-render-metal-docking == 1.92.3 ? ($cxx.target.class ==\
 'macos')
depends: libimgui-render-opengl2-docking == 1.92.3
depends: libimgui-render-opengl3-docking == 1.92.3
depends: libimgui-render-vulkan-docking == 1.92.3
bootstrap-build:
\
project = libimgui-examples-docking

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-examples-docking-1.92.3+3.tar.gz
sha256sum: 443cf9029e4ced5f09989207f34c825e8dc1efdfec27f39ace140e20d68aa1e5
:
name: libimgui-null-backend-test
version: 1.92.3+3
project: imgui
summary: Package using Dear ImGui's example_null backend to test libimgui.
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = libimgui-null-backend-test

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-null-backend-test-1.92.3+3.tar.gz
sha256sum: d5a72c52442a4bdd4a3032f651453324fbc055cca673589f8f912416f04981cc
:
name: libimgui-null-backend-test-docking
version: 1.92.3+3
project: imgui
summary: Package using Dear ImGui's example_null backend to test libimgui ;\
 docking branch
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = libimgui-null-backend-test-docking

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-null-backend-test-docking-1.92.3+3.tar.gz
sha256sum: ef6aa50e59b70537cef2c806d4c17ea0065f92d1359c0e20443d2a22d8b046db
:
name: libimgui-platform-glfw
version: 1.92.3+3
project: imgui
summary: Dear ImGui platform backend for GLFW
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui == 1.92.3
depends:
\
glfw >= 3.4.0
{
  require
  {
    if ($cxx.target.class == 'linux')
    {
      config.glfw.build_wayland=true
      config.glfw.build_x11=true
    }
  }
}
\
bootstrap-build:
\
project = libimgui-platform-glfw

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-platform-glfw-1.92.3+3.tar.gz
sha256sum: 85a022818c44a43df19dd656bd613eaee6edef783ec320219b74da198726fd19
:
name: libimgui-platform-glfw-docking
version: 1.92.3+3
project: imgui
summary: Dear ImGui platform backend for GLFW ; docking branch
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui-docking == 1.92.3
depends:
\
glfw >= 3.4.0
{
  require
  {
    if ($cxx.target.class == 'linux')
    {
      config.glfw.build_wayland=true
      config.glfw.build_x11=true
    }
  }
}
\
bootstrap-build:
\
project = libimgui-platform-glfw-docking

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-platform-glfw-docking-1.92.3+3.tar.gz
sha256sum: 75b2f73f4529e1876aefa642430bfef91982fdd89b3b376f200abdcb03eb6cd6
:
name: libimgui-platform-osx
version: 1.92.3+3
project: imgui
summary: Dear ImGui platform backend for OSX
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui == 1.92.3
builds: &( +macos -gcc )
bootstrap-build:
\
project = libimgui-platform-osx

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-platform-osx-1.92.3+3.tar.gz
sha256sum: 18d8052972eee1a59f95205f35cc1b5fb478d9bec263b4b0d65bbe4be123a89b
:
name: libimgui-platform-osx-docking
version: 1.92.3+3
project: imgui
summary: Dear ImGui platform backend for OSX ; docking branch
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui-docking == 1.92.3
builds: &( +macos -gcc )
bootstrap-build:
\
project = libimgui-platform-osx-docking

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-platform-osx-docking-1.92.3+3.tar.gz
sha256sum: 05802e7e59ff14b7525678a9b929939d74bd3455766437d6300768d1370f1f72
:
name: libimgui-platform-win32
version: 1.92.3+3
project: imgui
summary: Dear ImGui platform backend for Win32
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui == 1.92.3
builds: &( +windows -gcc )
bootstrap-build:
\
project = libimgui-platform-win32

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-platform-win32-1.92.3+3.tar.gz
sha256sum: b3cda4a8d895d5633191c5cae14e6914f73131204653317e748c77977c4b27aa
:
name: libimgui-platform-win32-docking
version: 1.92.3+3
project: imgui
summary: Dear ImGui platform backend for Win32 ; docking branch
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui-docking == 1.92.3
builds: &( +windows -gcc )
bootstrap-build:
\
project = libimgui-platform-win32-docking

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-platform-win32-docking-1.92.3+3.tar.gz
sha256sum: 2cd11aea27adace4d2f6476573503ac4aa1e20f279c9747dc5c6067cd2ad48f4
:
name: libimgui-render-dx10
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for DirectX 10
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui == 1.92.3
builds: &( +windows -gcc )
bootstrap-build:
\
project = libimgui-render-dx10

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-dx10-1.92.3+3.tar.gz
sha256sum: f0402966a49955156a882eb44e4f2ccdc6752530a2dad1a68da58addfc06648f
:
name: libimgui-render-dx10-docking
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for DirectX 10 ; docking branch
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui-docking == 1.92.3
builds: &( +windows -gcc )
bootstrap-build:
\
project = libimgui-render-dx10-docking

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-dx10-docking-1.92.3+3.tar.gz
sha256sum: f8fa5cd28ce639ec8cc7a4beb7d0e044379b8afc49bc51760b90ec8ab927b8ff
:
name: libimgui-render-dx11
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for DirectX 11
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui == 1.92.3
builds: &( +windows -gcc )
bootstrap-build:
\
project = libimgui-render-dx11

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-dx11-1.92.3+3.tar.gz
sha256sum: 13f033e2b26ec8bfd8b2d07b121de2f431edc71028387da31706425c5d54b443
:
name: libimgui-render-dx11-docking
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for DirectX 11 ; docking branch
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui-docking == 1.92.3
builds: &( +windows -gcc )
bootstrap-build:
\
project = libimgui-render-dx11-docking

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-dx11-docking-1.92.3+3.tar.gz
sha256sum: e25558849dd697b95d6a7c5176a9b040f85c1ec429fda7f859e083cb6c17709b
:
name: libimgui-render-dx12
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for DirectX 12
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui == 1.92.3
builds: &( +windows -gcc )
bootstrap-build:
\
project = libimgui-render-dx12

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-dx12-1.92.3+3.tar.gz
sha256sum: 179a5cf94f99090d0a5e892dcb5e3c1cbce86c94915c0e2a156d166389836935
:
name: libimgui-render-dx12-docking
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for DirectX 12 ; docking branch
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui-docking == 1.92.3
builds: &( +windows -gcc )
bootstrap-build:
\
project = libimgui-render-dx12-docking

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-dx12-docking-1.92.3+3.tar.gz
sha256sum: 0b9d85833a6dd64fb8e5ebfad9bfe87978b8be63fca7c5a197ae922dfff8d32f
:
name: libimgui-render-dx9
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for DirectX 9
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui == 1.92.3
builds: &( +windows -gcc )
bootstrap-build:
\
project = libimgui-render-dx9

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-dx9-1.92.3+3.tar.gz
sha256sum: fcafe33b18490cb1c091c72dcdbaab56ac21dbe3686f52594022a52c80198e2c
:
name: libimgui-render-dx9-docking
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for DirectX 9 ; docking branch
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui-docking == 1.92.3
builds: &( +windows -gcc )
bootstrap-build:
\
project = libimgui-render-dx9-docking

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-dx9-docking-1.92.3+3.tar.gz
sha256sum: dd40a88a5cf0a85d81c72632bb19e460dd93f4cb61954799ce29f635b4218fc6
:
name: libimgui-render-metal
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for Metal
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui == 1.92.3
builds: &( +macos -gcc )
bootstrap-build:
\
project = libimgui-render-metal

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-metal-1.92.3+3.tar.gz
sha256sum: 63997d5d11b60f71004b26a48ed41a440aa96af121516fe4f88f79930bfd59e3
:
name: libimgui-render-metal-docking
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for Metal ; docking branch
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui-docking == 1.92.3
builds: &( +macos -gcc )
bootstrap-build:
\
project = libimgui-render-metal-docking

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-metal-docking-1.92.3+3.tar.gz
sha256sum: 37dd62176bd964d956fe2c17cb0dee4e1a6c6721d586c0da6ebbe974e72a7444
:
name: libimgui-render-opengl2
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for Open GL 2
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui == 1.92.3
depends: libopengl-meta ^1.0.0-
bootstrap-build:
\
project = libimgui-render-opengl2

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-opengl2-1.92.3+3.tar.gz
sha256sum: 3cde0fc92bd12f6c06b5ee6648984a75e65b0f2a35a7946445a78bd8eb5f7207
:
name: libimgui-render-opengl2-docking
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for Open GL 2 ; docking branch
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui-docking == 1.92.3
depends: libopengl-meta ^1.0.0-
bootstrap-build:
\
project = libimgui-render-opengl2-docking

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-opengl2-docking-1.92.3+3.tar.gz
sha256sum: 6e5965ce7b156b23d5b8937146bee6b13b44aec878770139464356e05d92026c
:
name: libimgui-render-opengl3
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for OpenGL 3
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui == 1.92.3
depends: libopengl-meta ^1.0.0-
bootstrap-build:
\
project = libimgui-render-opengl3

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-opengl3-1.92.3+3.tar.gz
sha256sum: cc5655aeae7dbbe6a9d99852d9017ee97d1e5ada72160691d7d94137a06d6bba
:
name: libimgui-render-opengl3-docking
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for OpenGL 3 ; docking branch
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui-docking == 1.92.3
depends: libopengl-meta ^1.0.0-
bootstrap-build:
\
project = libimgui-render-opengl3-docking

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-opengl3-docking-1.92.3+3.tar.gz
sha256sum: b488b31f440f8cdf43dba2c31ead532802624eac3158eb6040584ef4f05d4636
:
name: libimgui-render-vulkan
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for Vulkan
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui == 1.92.3
depends: libvulkan-meta ^1.0.0
bootstrap-build:
\
project = libimgui-render-vulkan

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-vulkan-1.92.3+3.tar.gz
sha256sum: 7349c4c77d1d5ae21f3fe971ee4f25d4281903c4b0f36ea9fff02afdcb6aa57d
:
name: libimgui-render-vulkan-docking
version: 1.92.3+3
project: imgui
summary: Dear ImGui render backend for Vulkan ; docking branch
license: MIT
description:
\
Dear ImGui
=====

<center><b><i>"Give someone state and they'll have a bug one day, but teach\
 them how to represent state in two separate locations that have to be kept\
 in sync and they'll have bugs for a lifetime."</i></b></center> <a\
 href="https://twitter.com/rygorous/status/1507178315886444544">-ryg</a>

----

[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)]\
(https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis\
 Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg\
)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)\
 [![Tests Status](https://github.com/ocornut/imgui_test_engine/workflows/test\
s/badge.svg)](https://github.com/ocornut/imgui_test_engine/actions?workflow=t\
ests)

<sub>(This library is available under a free and permissive license, but\
 needs financial support to sustain its continued improvements. In addition\
 to maintenance and stability there are many desirable features yet to be\
 added. If your company is using Dear ImGui, please consider reaching\
 out.)</sub>

Businesses: support continued development and maintenance via invoiced\
 sponsoring/support contracts:
<br>&nbsp;&nbsp;_E-mail: contact @ dearimgui dot com_
<br>Individuals: support continued development and maintenance\
 [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=\
WGHNC6MBFLZ2S). Also see [Funding](https://github.com/ocornut/imgui/wiki/Fund\
ing) page.

| [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) -\
 [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Getting\
 Started & Integration](#getting-started--integration) |
:----------------------------------------------------------: |
| [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-fa\
q) -  [How to help](#how-to-help) - **[Funding & Sponsors](https://github.com\
/ocornut/imgui/wiki/Funding)** - [Credits](#credits) - [License](#license) |
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github\
.com/ocornut/imgui/wiki/Useful-Extensions) - [Language bindings & framework\
 backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using\
 Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui)\
 - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |

### The Pitch

Dear ImGui is a **bloat-free graphical user interface library for C++**. It\
 outputs optimized vertex buffers that you can render anytime in your\
 3D-pipeline-enabled application. It is fast, portable, renderer agnostic,\
 and self-contained (no external dependencies).

Dear ImGui is designed to **enable fast iterations** and to **empower\
 programmers** to create **content creation tools and visualization / debug\
 tools** (as opposed to UI for the average end-user). It favors simplicity\
 and productivity toward this goal and lacks certain features commonly found\
 in more high-level libraries. Among other things, full internationalization\
 (right-to-left text, bidirectional text, text shaping etc.) and\
 accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for\
 tooling), real-time 3D applications, fullscreen applications, embedded\
 applications, or any applications on console platforms where operating\
 system features are non-standard.

 - Minimize state synchronization.
 - Minimize UI-related state storage on user side.
 - Minimize setup and maintenance.
 - Easy to use to create dynamic UI which are the reflection of a dynamic\
 data set.
 - Easy to use to create code-driven and data-driven tools.
 - Easy to use to create ad hoc short-lived tools and long-lived, more\
 elaborate tools.
 - Easy to hack and improve.
 - Portable, minimize dependencies, run on target (consoles, phones, etc.).
 - Efficient runtime and memory consumption.
 - Battle-tested, used by [many major actors in the game industry](https://gi\
thub.com/ocornut/imgui/wiki/Software-using-dear-imgui).

### Usage

**The core of Dear ImGui is self-contained within a few platform-agnostic\
 files** which you can easily compile in your application/engine. They are\
 all the files in the root folder of the repository (imgui*.cpp, imgui*.h).\
 **No specific build process is required**. You can add the .cpp files into\
 your existing project.

**Backends for a variety of graphics API and rendering platforms** are\
 provided in the [backends/](https://github.com/ocornut/imgui/tree/master/bac\
kends) folder, along with example applications in the [examples/](https://git\
hub.com/ocornut/imgui/tree/master/examples) folder. You may also create your\
 own backend. Anywhere where you can render textured triangles, you can\
 render Dear ImGui.

See the [Getting Started & Integration](#getting-started--integration)\
 section of this document for more details.

After Dear ImGui is set up in your application, you can use it from\
 \_anywhere\_ in your program loop:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.gith\
ubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
![sample code output (light, segoeui font, freetype)](https://user-images.git\
hubusercontent.com/8225057/191050838-8742efd4-504d-4334-a9a2-e756d15bc2ab.png)

```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
![my_first_tool_v188](https://user-images.githubusercontent.com/8225057/19105\
5698-690a5651-458f-4856-b5a9-e8cc95c543e2.gif)

Dear ImGui allows you to **create elaborate tools** as well as very\
 short-lived ones. On the extreme side of short-livedness: using the\
 Edit&Continue (hot code reload) feature of modern compilers you can add a\
 few widgets to tweak variables while your application is running, and remove\
 the code a minute later! Dear ImGui is not just for tweaking values. You can\
 use it to trace a running algorithm by just emitting text commands. You can\
 use it along with your own reflection data to browse your dataset live. You\
 can use it to expose the internals of a subsystem in your engine, to create\
 a logger, an inspection tool, a profiler, a debugger, an entire game-making\
 editor/framework, etc.

### How it works

The IMGUI paradigm through its API tries to minimize superfluous state\
 duplication, state synchronization, and state retention from the user's\
 point of view. It is less error-prone (less code and fewer bugs) than\
 traditional retained-mode interfaces, and lends itself to creating dynamic\
 user interfaces. Check out the Wiki's [About the IMGUI paradigm](https://git\
hub.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily\
 render in your application. The number of draw calls and state changes\
 required to render them is fairly small. Because Dear ImGui doesn't know or\
 touch graphics state directly, you can call its functions  anywhere in your\
 code (e.g. in the middle of a running algorithm, or in the middle of your\
 own rendering process). Refer to the sample applications in the examples/\
 folder for instructions on how to integrate Dear ImGui with your existing\
 codebase.

_A common misunderstanding is to mistake immediate mode GUI for immediate\
 mode rendering, which usually implies hammering your driver/GPU with a bunch\
 of inefficient draw calls and state changes as the GUI functions are called.\
 This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a\
 small list of draw calls batches. It never touches your GPU directly. The\
 draw call batches are decently optimal and you can render them later, in\
 your app or even remotely._

### Releases & Changelogs

See [Releases](https://github.com/ocornut/imgui/releases) page for decorated\
 Changelogs.
Reading the changelogs is a good way to keep up to date with the things Dear\
 ImGui has to offer, and maybe will give you ideas of some features that\
 you've been ignoring until now!

### Demo

Calling the `ImGui::ShowDemoWindow()` function will create a demo window\
 showcasing a variety of features and examples. The code is always available\
 for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.g\
ithubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).

You should be able to build the examples from sources. If you don't, let us\
 know! If you want to have a quick look at some Dear ImGui features, you can\
 download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui\
-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or\
 [older binaries](https://www.dearimgui.com/binaries).

The demo applications are not DPI aware so expect some blurriness on a 4K\
 screen. For DPI awareness in your application, you can load/reload your font\
 at a different scale and scale your style with `style.ScaleAllSizes()` (see\
 [FAQ](https://www.dearimgui.com/faq)).

### Getting Started & Integration

See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Start\
ed) guide for details.

On most platforms and when using C++, **you should be able to use a\
 combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/m\
aster/backends) backends without modification** (e.g. `imgui_impl_win32.cpp`\
 + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms,\
 consider using more imgui_impl_xxxx files instead of rewriting them: this\
 will be less work for you, and you can get Dear ImGui running immediately.\
 You can _later_ decide to rewrite a custom backend using your custom engine\
 functions if you wish so.

Integrating Dear ImGui within your custom engine is a matter of 1) wiring\
 mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render\
 engine 3) providing a render function that can bind textures and render\
 textured triangles, which is essentially what Backends are doing. The\
 [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is\
 populated with applications doing just that: setting up a window and using\
 backends. If you follow the [Getting Started](https://github.com/ocornut/img\
ui/wiki/Getting-Started) guide it should in theory take you less than an hour\
 to integrate Dear ImGui.  **Make sure to spend time reading the\
 [FAQ](https://www.dearimgui.com/faq), comments, and the examples\
 applications!**

Officially maintained backends/bindings (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2,\
 SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.

[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Binding\
s) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell,\
 Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin,\
 Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder,\
 Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio,\
 GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum,\
 Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU\
 (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop,\
 px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5,\
 UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/c\
imgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearim\
gui/dear_bindings)), you can use their metadata output to generate bindings\
 for other languages.

[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Exte\
nsions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting,\
 software renderers, remote network access, memory editors, gizmos, etc.\
 Notable and well supported extensions include [ImPlot](https://github.com/ep\
ezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_t\
est_engine).

Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and\
 ideas.

### Gallery

Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy)\
 (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data\
 analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and\
 [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-De\
ar-ImGui).

For more user-submitted screenshots of projects using Dear ImGui, check out\
 the [Gallery Threads](https://github.com/ocornut/imgui/issues?q=label%3Agall\
ery)!

For a list of third-party widgets and extensions, check out the [Useful\
 Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions)\
 wiki page.

|  |  |
|--|--|
| Custom engine [erhe](https://github.com/tksuoran/erhe) (docking\
 branch)<BR>[![erhe](https://user-images.githubusercontent.com/8225057/190203\
358-6988b846-0686-480e-8663-1311fbd18abd.jpg)](https://user-images.githubuser\
content.com/994606/147875067-a848991e-2ad2-4fd3-bf71-4aeb8a547bcf.png) |\
 Custom engine for [Wonder Boy: The Dragon's Trap](http://www.TheDragonsTrap.\
com) (2017)<BR>[![the dragon's trap](https://user-images.githubusercontent.co\
m/8225057/190203379-57fcb80e-4aec-4fec-959e-17ddd3cd71e5.jpg)](https://cloud.\
githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93\
b048a.png) |
| Custom engine (untitled)<BR>[![editor white](https://user-images.githubuser\
content.com/8225057/190203393-c5ac9f22-b900-4d1e-bfeb-6027c63e3d92.jpg)](http\
s://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png) |\
 Tracy Profiler ([github](https://github.com/wolfpld/tracy))<BR>[![tracy\
 profiler](https://user-images.githubusercontent.com/8225057/190203401-7b595f\
6e-607c-44d3-97ea-4c2673244dfb.jpg)](https://raw.githubusercontent.com/wiki/o\
cornut/imgui/web/v176/tracy_profiler.png) |

### Support, Frequently Asked Questions (FAQ)

See: [Frequently Asked Questions (FAQ)](https://github.com/ocornut/imgui/blob\
/master/docs/FAQ.md) where common questions are answered.

See: [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started)\
 and [Wiki](https://github.com/ocornut/imgui/wiki) for many links,\
 references, articles.

See: [Articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wik\
i#about-the-imgui-paradigm) to read/learn about the Immediate Mode GUI\
 paradigm.

See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Change\
s).

See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_t\
est_engine) for Automation & Testing.

For the purposes of getting search engines to crawl the wiki, here's a link\
 to the [Crawlable Wiki](https://github-wiki-see.page/m/ocornut/imgui/wiki)\
 (not for humans, [here's why](https://github-wiki-see.page/)).

Getting started? For first-time users having issues compiling/linking/running\
 or issues loading fonts, please use [GitHub Discussions](https://github.com/\
ocornut/imgui/discussions). For ANY other questions, bug reports, requests,\
 feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/is\
sues). Please read and fill the New Issue template carefully.

Private support is available for paying business customers (E-mail: _contact\
 @ dearimgui dot com_).

**Which version should I get?**

We occasionally tag [Releases](https://github.com/ocornut/imgui/releases)\
 (with nice releases notes) but it is generally safe and recommended to sync\
 to latest `master` or `docking` branch. The library is fairly stable and\
 regressions tend to be fixed fast when reported. Advanced users may want to\
 use the `docking` branch with [Multi-Viewport](https://github.com/ocornut/im\
gui/wiki/Multi-Viewports) and [Docking](https://github.com/ocornut/imgui/wiki\
/Docking) features. This branch is kept in sync with master regularly.

**Who uses Dear ImGui?**

See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Funding &\
 Sponsors](https://github.com/ocornut/imgui/wiki/Funding), and [Software\
 using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-\
imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your\
 game/software if you can! Also, see the [Gallery Threads](https://github.com\
/ocornut/imgui/issues?q=label%3Agallery)!

How to help
-----------

**How can I help?**

- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand\
 that by submitting a PR you are also submitting a request for the maintainer\
 to review your code and then take over its maintenance forever. PR should be\
 crafted both in the interest of the end-users and also to ease the\
 maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the\
 [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Be a [Funding Supporter](https://github.com/ocornut/imgui/wiki/Funding)!\
 Have your company financially support this project via invoiced\
 sponsors/maintenance or by buying a license for [Dear ImGui Test\
 Engine](https://github.com/ocornut/imgui_test_engine) (please reach out:\
 contact AT dearimgui DOT com).

Sponsors
--------

Ongoing Dear ImGui development is and has been financially supported by users\
 and private sponsors.
<BR>Please see the **[detailed list of current and past Dear ImGui funding\
 supporters and sponsors](https://github.com/ocornut/imgui/wiki/Funding)**\
 for details.
<BR>From November 2014 to December 2019, ongoing development has also been\
 financially supported by its users on Patreon and through individual\
 donations.

**THANK YOU to all past and present supporters for helping to keep this\
 project alive and thriving!**

Dear ImGui is using software and services provided free of charge for open\
 source projects:
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_m\
edium=github&utm_campaign=open_source) for static analysis (supports\
 C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous\
 integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for\
 code coverage analysis.

Credits
-------

Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or\
 indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors\
) to the GitHub. The early version of this library was developed with the\
 support of [Media Molecule](https://www.mediamolecule.com) and first used\
 internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS\
 Vita).

Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rok\
ups) (2020-2022): a good portion of work on automation system and regression\
 tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/i\
mgui_test_engine).

Maintenance/support contracts, sponsoring invoices and other B2B transactions\
 are hosted and handled by [Disco Hello](https://www.discohello.com).

Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games\
.com) where Atman Binstock had dropped his own simple implementation in the\
 codebase, which I spent quite some time improving and thinking about. It\
 turned out that Atman was exposed to the concept directly by working with\
 Casey. When I moved to Media Molecule I rewrote a new library trying to\
 overcome the flaws and limitations of the first one I've worked with. It\
 became this library and since then I have spent an unreasonable amount of\
 time iterating and improving it."

Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer\
 (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.c\
om/nothings/stb/) by Sean Barrett (public domain).

Inspiration, feedback, and testing for early versions: Casey Muratori, Atman\
 Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov,\
 Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for\
 kindly helping. Also thank you to everyone posting feedback, questions and\
 patches on GitHub.

License
-------

Dear ImGui is licensed under the MIT License, see [LICENSE.txt](https://githu\
b.com/ocornut/imgui/blob/master/LICENSE.txt) for more information.

\
description-type: text/markdown;variant=GFM
url: https://github.com/ocornut/imgui
doc-url: https://github.com/ocornut/imgui/wiki
src-url: https://github.com/ocornut/imgui
package-url: https://github.com/build2-packaging/imgui
email: contact@dearimgui.com
package-email: swat.somebug@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libimgui-docking == 1.92.3
depends: libvulkan-meta ^1.0.0
bootstrap-build:
\
project = libimgui-render-vulkan-docking

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: imgui/libimgui-render-vulkan-docking-1.92.3+3.tar.gz
sha256sum: dbcbced00eeb99207cf9a269bcefcace94919ee9978738b2750aa481444d2753
:
name: liblbfgs
version: 1.10.0
language: c
summary: libLBFGS is a C port of the implementation of Limited-memory\
 Broyden-Fletcher-Goldfarb-Shanno
license: MIT; MIT License.
description:
\

           libLBFGS: C library of limited-memory BFGS (L-BFGS)

                                       Copyright (c) 1990, Jorge Nocedal
                                 Copyright (c) 2007-2010, Naoaki Okazaki

=========================================================================
1. Introduction
=========================================================================
libLBFGS is a C port of the implementation of Limited-memory
Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) method written by Jorge Nocedal.
The original FORTRAN source code is available at:
http://www.ece.northwestern.edu/~nocedal/lbfgs.html

The L-BFGS method solves the unconstrainted minimization problem:
    minimize F(x), x = (x1, x2, ..., xN),
only if the objective function F(x) and its gradient G(x) are computable.

Refer to the libLBFGS web site for more information.
http://www.chokkan.org/software/liblbfgs/



=========================================================================
2. How to build
=========================================================================
[Microsoft Visual Studio 2008]
Open the solution file "lbfgs.sln" and build it.

[GCC]
$ ./configure
$ make
$ make install  # To install libLBFGS library and header.



=========================================================================
3. Note on SSE/SSE2 optimization
=========================================================================
This library has SSE/SSE2 optimization routines for vector arithmetic
operations on Intel/AMD processors. The SSE2 routine is for 64 bit double
values, and the SSE routine is for 32 bit float values. Since the default
parameters in libLBFGS are tuned for double precision values, it may need
to modify these parameters to use the SSE optimization routines.

To use the SSE2 optimization routine, specify --enable-sse2 option to the
configure script.

$ ./configure --enable-sse2

To build libLBFGS with SSE2 optimization enabled on Microsoft Visual
Studio 2005, define USE_SSE and __SSE2__ symbols.

Make sure to run libLBFGS on processors where SSE2 instrunctions are
available. The library does not check the existence of SSE2 instructions.

To package maintainers,

Please do not enable SSE/SSE2 optimization routine. The library built
with SSE/SSE2 optimization will crash without any notice when necessary
SSE/SSE2 instructions are unavailable on CPUs.



=========================================================================
4. License
=========================================================================
libLBFGS is distributed under the term of the MIT license.
Please refer to COPYING file in the distribution.

$Id$

\
description-type: text/plain
package-description:
\
# liblbfgs - A C library

This is a `build2` package for the [`liblbfgs`](https://github.com/chokkan/li\
blbfgs)
C library. It provides a C port of the implementation of Limited-memory
Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) method written by Jorge Nocedal.
The original FORTRAN source code is available at:
http://www.ece.northwestern.edu/~nocedal/lbfgs.html

The L-BFGS method solves the unconstrainted minimization problem:
    minimize F(x), x = (x1, x2, ..., xN),
only if the objective function F(x) and its gradient G(x) are computable.

Refer to the libLBFGS web site for more information.
http://www.chokkan.org/software/liblbfgs/


## Usage

To start using `liblbfgs` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: liblbfgs ^1.1.0
```

Then import the library in your `buildfile`:

```
import libs = liblbfgs%lib{lbfgs}
```


## Importable targets

This package provides the following importable targets:

```
lib{lbfgs}
```

<DESCRIPTION-OF-IMPORTABLE-TARGETS>


## Configuration variables

This package provides the following configuration variables:

```
[bool] config.liblbfgs.use_double ?= true
[bool] config.liblbfgs.use_ieee754 ?= true
[bool] config.liblbfgs.use_sse ?= true
```

- `use_double` enables double precision floating point arithmetics.
- `use_ieee754` enables optimization routines for IEEE754 floating point\
 values.
- `use_sse` enable SSE2 optimization routines.

\
package-description-type: text/markdown;variant=GFM
url: http://www.chokkan.org/software/liblbfgs/
package-url: https://github.com/build2-packaging/liblbfgs
email: okazaki@chokkan.org
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
bootstrap-build:
\
project = liblbfgs

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

config [bool] config.liblbfgs.use_double ?= true
config [bool] config.liblbfgs.use_ieee754 ?= true
config [bool] config.liblbfgs.use_sse ?= false

\
location: liblbfgs/liblbfgs-1.10.0.tar.gz
sha256sum: 8a2faa6a023cda2de96634e01b2b74b2d1aa5bef87a91ef8605b4f27cbf2ae1a
:
name: liblua
version: 5.4.7
type: lib
language: c
project: lua
summary: Embeddable scripting language, library
license: MIT
description:
\

This is Lua 5.4.7, released on 13 Jun 2024.

For installation instructions, license details, and
further information about Lua, see doc/readme.html.


\
description-type: text/plain
package-description:
\
# build2 Package for Lua

This project is a [build2](https://build2.org) package repository that\
 provides access to [Lua](https://lua.org/home.html), a powerful, efficient,\
 lightweight, embeddable scripting language.
It supports procedural programming, object-oriented programming, functional\
 programming, data-driven programming, and data description.

[![Official](https://img.shields.io/website/https/www.lua.org?down_message=of\
fline&label=Official&style=for-the-badge&up_color=blue&up_message=online)](ht\
tps://www.lua.org/)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/l\
ua.svg?down_message=offline&label=build2&style=for-the-badge&up_color=blue&up\
_message=online)](https://github.com/build2-packaging/lua)

[![cppget.org](https://img.shields.io/website/https/cppget.org/liblua.svg?dow\
n_message=offline&label=liblua+cppget.org&style=for-the-badge&up_color=blue&u\
p_message=online)](https://cppget.org/liblua)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/li\
blua.svg?down_message=empty&down_color=blue&label=liblua+queue.cppget.org&sty\
le=for-the-badge&up_color=orange&up_message=running)](https://queue.cppget.or\
g/liblua)

[![cppget.org](https://img.shields.io/website/https/cppget.org/lua.svg?down_m\
essage=offline&label=lua+cppget.org&style=for-the-badge&up_color=blue&up_mess\
age=online)](https://cppget.org/lua)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/lu\
a.svg?down_message=empty&down_color=blue&label=lua+queue.cppget.org&style=for\
-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/lua)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch the packages.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/lua.git

Add the respective dependencies in your project's `manifest` file to make the\
 required packages available for import.

    depends: liblua ^5.4.7  # C Library for Embedding Lua
    depends: lua ^5.4.7     # Lua Interpreter and Compiler

Then use the following lines in your `buildfile` to import library and\
 executables.

    import liblua = liblua%lib{lua}  # Library
    import luac = lua%exe{luac}      # Compiler
    import lua = lua%exe{luac}       # Interpreter

For backwards compatibility to earlier package versions, use the following\
 line to import `lib{lua}` from the `lua` package directly.
This is deprecated and should not be used for new projects.

    import liblua = lua%lib{lua}

## Configuration

### Use of GNU `readline` for Lua Interpreter
The use of the GNU `readline` library for the Lua interpreter is disabled by\
 default to reduce importation issues during CI runs.
If `readline` is available on your target platform, it is recommended to\
 enable it to improve editing capabilities on the Lua command line.

    config [bool] config.lua.readline ?= false

## Issues and Notes
- Lua's source code for releases is not provided as a git repository and\
 needs to be hard-copied into the `upstream` directory from\
 [here](https://lua.org/download.html).
- Lua's test suite for releases is not provided as a git repository and needs\
 to be hard-copied into the `upstream-tests` directory from\
 [here](https://www.lua.org/tests/).
- The `LICENSE` file was hard-copied from [Lua's website](https://lua.org/lic\
ense.html).
- Lua's compiler and interpreter have not been split into separate packages\
 to reduce complexity and importation issues based on backwards\
 compatibility. In most cases, interpreter and compiler will be used together\
 at the same time anyway.
- Lua's documentation files will only be installed with the `lua` package to\
 prevent redundant files in various directories after installation. An\
 explicit installation of Lua will most likely require all components anyway.
- There are no sophisticated upstream tests for Lua's C library. As such, we\
 only provide two smoke tests.
- So far, the Lua compiler `luac` is only compiled and not further tested.\
 There are also no real upstream tests for it.
- The tests package does not run Lua's complete or internal test suites as\
 these are expected to fail for various reasons as stated [here](https://www.\
lua.org/tests/). Instead, only the basic tests based on Lua scripts are\
 executed.
- Lua's basic tests fail for unoptimized builds on Windows with MSVC and\
 Clang. This is most likely caused by an intentional stack overflow in the\
 basics tests scripts that might not be properly caught.

## Contributing
Thank you in advance for your help and contribution to keep this package\
 up-to-date.
Please, file an issue on [GitHub](https://github.com/build2-packaging/lua/iss\
ues) for questions, bug reports, or to recommend updating the package version.
If you're making a pull request to fix bugs or update the package version\
 yourself, refer to the [`build2` Packaging Guidelines](https://build2.org/bu\
ild2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management).

\
package-description-type: text/markdown;variant=GFM
url: https://lua.org/home.html
doc-url: https://lua.org/docs.html
package-url: https://github.com/build2-packaging/lua
email: lua-l@googlegroups.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = liblua

using version
using config
using test
using install
using dist

\
root-build:
\
c.std = 99
cxx.std = latest

using c
using cxx

h{*}: extension = h
c{*}: extension = c

hxx{*}: extension = hpp
cxx{*}: extension = cpp

hxx{*}: cxx.importable = false

test.target = $c.target

\
location: lua/liblua-5.4.7.tar.gz
sha256sum: 4ae28825cfafc0454efab8d1af558748aeb4601482ee882345544bdb005120e8
:
name: liblua
version: 5.4.8
type: lib
language: c
project: lua
summary: Embeddable scripting language, library
license: MIT
description:
\

This is Lua 5.4.8, released on 21 May 2025.

For installation instructions, license details, and
further information about Lua, see doc/readme.html.


\
description-type: text/plain
package-description:
\
# liblua - Lua's C/C++ API, Auxiliary Library, and Standard Libraries

Lua is a powerful, efficient, lightweight, embeddable scripting language.
This is the `build2` package for the Lua library.
It provides access to Lua's C/C++ API (the set of C functions available to\
 the host program to communicate with Lua), its auxiliary library (several\
 convenient functions to interface C with Lua), and its standard libraries\
 (useful Lua functions that are implemented in C through the C API).

## Usage
To use `liblua` in your project, add the following configurations to the\
 respective files after you have gained access to a `build2` package\
 repository that contains it.

### `manifest`
To make `liblua` available for import, add the following dependency to the\
 `manifest` of each package in your project that requires it, adjusting the\
 version constraint as appropriate.

    depends: liblua ^5.4.8

### `buildfile`
To import the contained library, use the following declaration in your\
 `buildfile`.

    import liblua = liblua%lib{lua}

### C/C++ Header Inclusion
Finally, include the necessary Lua headers in your source code.

**For C:**
```c
#include <lua.h>      // C API
#include <lauxlib.h>  // Auxiliary Library
#include <lualib.h>   // Standard Libraries
```

**For C++:**
```c++
#include <lua.hpp>
```

\
package-description-type: text/markdown;variant=GFM
url: https://lua.org/home.html
doc-url: https://lua.org/docs.html
package-url: https://github.com/build2-packaging/lua
email: lua-l@googlegroups.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = liblua

using version
using config
using test
using install
using dist

\
root-build:
\
c.std = 99
cxx.std = latest

using c
using cxx

h{*}: extension = h
c{*}: extension = c

hxx{*}: extension = hpp
cxx{*}: extension = cpp

hxx{*}: cxx.importable = false

test.target = $c.target

\
location: lua/liblua-5.4.8.tar.gz
sha256sum: 7efe60e1fa85bbc6bd0936b606053deadd5c343e6823652c9136468b8823c03f
:
name: libnanort
version: 0.0.3
type: lib,binless
language: c++
project: nanort
summary: C++ ray tracing kernel library
license: MIT
description:
\
# NanoRT, single header only modern ray tracing kernel.

[![Travis Build Status](https://travis-ci.org/lighttransport/nanort.svg)](htt\
ps://travis-ci.org/lighttransport/nanort)
[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/k7j5d9v\
81qjm69j6?svg=true)](https://ci.appveyor.com/project/syoyo/nanort)

![](images/render_path_traced.png)

Path tracing example contributed by https://github.com/daseyb

`NanoRT` is simple single header only ray tracing kernel.

## Features

* Portable C++
  * Only use C++-03 features by default.
  * C++11 feature(threads) is also available
  * There is experimental C89 port of NanoRT in `c89` branch\
 https://github.com/lighttransport/nanort/tree/c89
* BVH spatial data structure for efficient ray intersection finding.
  * Should be able to handle ~10M triangles scene efficiently with moderate\
 memory consumption
* Custom geometry & intersection
  * Built-in triangle mesh gemetry & intersector is provided.
* Cross platform
  * MacOSX, Linux, Windows, iOS, Android, ARM, x86, SPARC, (maybe) MIPS,\
 (will be) RISC-V, etc.
  * For example, NanoRT works finely on Raspberry Pi 2 (arm 32bit) and\
 Raspberrry Pi 3!(AARCH64 kernel)
* GPU efficient data structure
  * Built BVH tree from `NanoRT` is a linear array and does not have\
 pointers, thus it is suited for GPU raytracing (GPU ray traversal).
* OpenMP multithreaded BVH build.
* Robust intersection calculation.
  * Robust BVH Ray Traversal (using up to 4 ulp version): http://jcgt.org/pub\
lished/0002/02/02/
  * Watertight Ray/Triangle Intesection: http://jcgt.org/published/0002/01/05/
* Double precision support
  * Beneficial for HPC and scientific visualization.

## Applications

* Test renderer for your light transport algorithm development.
* Test renderer for your shader language development.
* Collision detection (ray casting).
* BVH builder for GPU/Accelerator ray traversal.
* Add 2D/3D rendering feature for non-GPU system.
  * [ ] ImGui backend? https://github.com/syoyo/imgui/tree/nanort
  * [ ] Nano SVG backend? https://github.com/syoyo/nanovg-nanort

## Projects using NanoRT

* lightmetrica https://github.com/hi2p-perim/lightmetrica-v2
* OSPRay NanoRT module https://github.com/jeffamstutz/module_nanort/
* Your project here!

## Projects similar/related to NanoRT

* bvh: C++17 BVH Construction and Traversal Library https://github.com/madman\
n91/bvh
* BlazeRT: double precision ray tracer for scientific or engineering\
 applications https://github.com/cstatz/blazert

## API

`nanort::Ray` represents ray. The origin `org`, the direction `dir` (not\
 necessarily normalized), the minimum hit distance `min_t`(usually 0.0) and\
 the maximum hit distance `max_t` (usually too far, e.g. 1.0e+30) must be\
 filled before shooting ray.

`nanort::BVHAccel` builds BVH data structure from geometry, and provides the\
 function to find intersection point for a given ray.

`nanort::BVHBuildOptions` specifies parameters for BVH build. Usually default\
 parameters should work well.

`nanort::BVHTraceOptions` specifies ray traverse/intersection options.

```c
template<typename T>
class {
  T org[3];        // [in] must set
  T dir[3];        // [in] must set
  T min_t;         // [in] must set
  T max_t;         // [in] must set
  unsigned int type;  // optional. ray type.
} Ray;

class BVHTraceOptions {
  // Trace rays only in face ids range. faceIdsRange[0] < faceIdsRange[1]
  // default: 0 to 0x3FFFFFFF(2G faces)
  unsigned int prim_ids_range[2];
  bool cull_back_face; // default: false
};

nanort::BVHBuildOptions<float> build_options; // BVH build option(optional)

const float *vertices = ...;
const unsigned int *faces = ...;

// Need to specify stride bytes for `vertices`.
// When vertex is stored XYZXYZXYZ... in float type, stride become 12(=\
 sizeof(float) * 3).
nanort::TriangleMesh<float> triangle_mesh(vertices, faces, /* stride\
 */sizeof(float) * 3);
nanort::TriangleSAHPred<float> triangle_pred(vertices, faces, /* stride\
 */sizeof(float) * 3);

nanort::BVHAccel<float> accel;
ret = accel.Build(mesh.num_faces, triangle_mesh, triangle_pred,\
 build_options);

nanort::TriangleIntersector<> triangle_intersecter(vertices, faces, /* stride\
 */sizeof(float) * 3);

nanort::Ray<float> ray;
// fill ray org and ray dir.
...
// fill minimum and maximum hit distance.
ray.min_t = 0.0f;
ray.max_t = 1.0e+30f;

nanort::TriangleIntersection<float> isect;

// Store nearest hit point to `isect` and returns true if the hit point found.
BVHTraceOptions trace_options; // optional
bool hit = accel.Traverse(ray, triangle_intersecter, &isect, trace_options);
```

Application must prepare geometric information and store it in linear array.

For a builtin Triangle intersector,

* `vertices` : The array of triangle vertices (e.g. xyz * numVertices)
* `faces` : The array of triangle face indices (3 * numFaces)
* `stride` : Byte stride of each vertex data

are required attributes.


## Usage

```c
// NanoRT defines template based class, so no NANORT_IMPLEMENTATION anymore.
#include "nanort.h"
Mesh mesh;
// load mesh data...
nanort::BVHBuildOptions<float> options; // Use default option
nanort::TriangleMesh<float> triangle_mesh(mesh.vertices, mesh.faces, /*\
 stride */sizeof(float) * 3);
nanort::TriangleSAHPred<float> triangle_pred(mesh.vertices, mesh.faces, /*\
 stride */sizeof(float) * 3);
nanort::BVHAccel<float> accel;
ret = accel.Build(mesh.vertices, mesh.faces, mesh.num_faces, options);
assert(ret);
nanort::BVHBuildStatistics stats = accel.GetStatistics();
printf("  BVH statistics:\n");
printf("    # of leaf   nodes: %d\n", stats.num_leaf_nodes);
printf("    # of branch nodes: %d\n", stats.num_branch_nodes);
printf("  Max tree depth   : %d\n", stats.max_tree_depth);

std::vector<float> rgb(width * height * 3, 0.0f);
const float tFar = 1.0e+30f;
// Shoot rays.
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (int y = 0; y < height; y++) {
  for (int x = 0; x < width; x++) {
    BVHTraceOptions trace_options;
    // Simple camera. change eye pos and direction fit to .obj model.
    nanort::Ray<float> ray;
    ray.min_t = 0.0f;
    ray.max_t = tFar;
    ray.org[0] = 0.0f;
    ray.org[1] = 5.0f;
    ray.org[2] = 20.0f;
    float3 dir;
    dir[0] = (x / (float)width) - 0.5f;
    dir[1] = (y / (float)height) - 0.5f;
    dir[2] = -1.0f;
    dir.normalize();
    ray.dir[0] = dir[0];
    ray.dir[1] = dir[1];
    ray.dir[2] = dir[2];

    nanort::TriangleIntersector<> triangle_intersecter(mesh.vertices,\
 mesh.faces, /* stride */sizeof(float) * 3);
    nanort::TriangleIntersection<> isect,
    bool hit = accel.Traverse(ray, triangle_intersector, &isect,\
 trace_options);
    if (hit) {
      // Write your shader here.
      float3 normal;
      unsigned int fid = triangle_intersector.intersect.prim_id;
      normal[0] = mesh.facevarying_normals[3*3*fid+0]; // @todo { interpolate\
 normal }
      normal[1] = mesh.facevarying_normals[3*3*fid+1];
      normal[2] = mesh.facevarying_normals[3*3*fid+2];
      // Flip Y
      rgb[3 * ((height - y - 1) * width + x) + 0] = fabsf(normal[0]);
      rgb[3 * ((height - y - 1) * width + x) + 1] = fabsf(normal[1]);
      rgb[3 * ((height - y - 1) * width + x) + 2] = fabsf(normal[2]);
    }
  }
}
```

## Defines

```
NANORT_USE_CPP11_FEATURE : Enable C++11 feature
NANORT_ENABLE_PARALLEL_BUILD : Enable parallel BVH build(OpenMP version is\
 not yet fully tested).
```

## More example

See `examples` directory for example renderer using `NanoRT`.

* [x] [examples/path_tracer](examples/path_tracer) Path tracer example by\
 https://github.com/daseyb
  * [x] Better ortho basis generation: Building an Orthonormal Basis,\
 Revisited http://jcgt.org/published/0006/01/01/
* [x] [examples/bidir_path_tracer](examples/bidir_path_tracer) Bi-directional\
 path tracer example by https://github.com/tatsy
* [x] [examples/gui](examples/gui) Simple renderer with GUI(using ImGui)
* [x] [examples/vrcamera](examples/vrcamera) Stereo VR Camera
* [x] [examples/objrender](examples/objrender) Render wavefront .obj model\
 using NanoRT.
* [x] [examples/par_msquare](examples/par_msquare) Render heightfield by\
 converting it to meshes using par_msquare(marching squares)
* [x] [examples/las](examples/las) Visualize LiDAR(LAS) point cloud as sphere\
 geometry.
* [x] [examples/double_precision](examples/double_precision) Double precision\
 triangle geometry and BVH.
* [x] [examples/embree-api](examples/embree-api) NanoRT implementation of\
 Embree API.
* [x] [examples/ptex](examples/ptex) Ptex texturing.

<!--
### Screenshots
Raytracing allows to implement different camera models quite easily. See\
 [examples/gui](examples/gui) for different camera
models which can be set via the `config.json` or the GUI itself:
* `perspective`\\
  ![](examples/gui/screenshot/00_camera_perspective_fov45.png)
* `orthographic`\\
  ![](examples/gui/screenshot/01_camera_orthographic.png)
* `spherical` FoV 120 & 180:\\
  ![](examples/gui/screenshot/02_camera_spherical_fov120.png)
  ![](examples/gui/screenshot/02_camera_spherical_fov180.png)
* `spherical-panorama` FoV 120 & 180:\\
  ![](examples/gui/screenshot/03_camera_spherical-panorama_fov120.png)
  ![](examples/gui/screenshot/03_camera_spherical-panorama_fov180.png)
* `cylindrical`: FoV 90 & 120:\\
  ![](examples/gui/screenshot/04_camera_cylindrical_90.png)
  ![](examples/gui/screenshot/04_camera_cylindrical_120.png)
* `fish-eye`: FoV 120 & 180:\\
  ![](examples/gui/screenshot/05_camera_fish-eye_120.png)
  ![](examples/gui/screenshot/05_camera_fish-eye_180.png)
* `fish-eye MKX22`: nonlinear fish-eye lens "iZugar MKX22 Fisheye Lens" with\
 fixed FoV 220:\\
  ![](examples/gui/screenshot/06_camera_fish-eye_MKX22.png)

-->

### Custom geometry

Here is an example of custom geometry.

* [x] Spheres(particles) `examples/particle_primitive/`
* Cubic Bezier Curves
  * [x] Approximate as lines `examples/curves_primitive/`
  * [ ] Recursive Ray-Bezier intersection.
* [x] Cylinders `examples/cylinder_primitive/`

And plesae see API at wiki: https://github.com/lighttransport/nanort/wiki/API

## License

`nanort.h` is licensed under MIT license.

`NanoRT` uses `stack_container.h` which is licensed under:

    // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.

`NanoRT` examples use some external third party libraries. Licenses for such\
 third party libraries obey their own license.

Lucy statue model is from The Stanford 3D Scanning Repository\
 http://graphics.stanford.edu/data/3Dscanrep/

## TODO

PR are always welcome!

* [ ] Optimize ray tracing kernel
  * [ ] Efficient Ray Tracing Kernels for Modern CPU Architectures\
 http://jcgt.org/published/0004/04/05/
  * [ ] ARM NEON SIMD
  * [ ] Intel SSE SIMD
* [ ] Better cmake build.
* [ ] Implement more Embree compatible API.
* [ ] Scene graph support.
  * [x] NanoSG, Minimal scene graph library. [examples/nanosg](examples/nanos\
g)
  * [ ] Instancing support.
* [ ] Fix multi-hit ray traversal.
* [ ] Optimize Multi-hit ray traversal for BVH.
  * [ ] http://jcgt.org/published/0004/04/04/
* [ ] Ray traversal option.
  * [x] FaceID range.
  * [x] Double sided on/off.
  * [ ] Ray offset.
  * [x] Avoid self-intersection(BVHTraceOptions.skip_prim_id).
  * [x] Custom intersection filter through C++ template.
* [ ] Fast BVH build
  * [ ] Bonsai: Rapid Bounding Volume Hierarchy Generation using Mini Trees\
 http://jcgt.org/published/0004/03/02/
* [ ] Efficient BVH build
  * [ ] Spatial split BVH
* [ ] Motion blur
  * [ ] STBVH: A Spatial-Temporal BVH for Efficient Multi-Segment Motion Blur\
 http://www.highperformancegraphics.org/2017/program/
* [ ] Fast, Accurate ray curve intersection
  * [ ] Phantom Ray-Hair Intersector
* [x] Example bi-directional path tracing renderer by @tatsy.


\
description-type: text/markdown;variant=GFM
package-description:
\
# NanoRT - Ray Tracing Kernel

This is the `build2` package for NanoRT, a single header only modern ray\
 tracing kernel.

## Usage
To use this package in your project, add the following configurations to the\
 respective files after you have gained access to a `build2` package\
 repository that contains it.

### `manifest`
To make NanoRT available for import, add the following dependency to the\
 `manifest` of each package in your project that requires it, adjusting the\
 version constraint as appropriate.

    depends: libnanort ^0.0.3

### `buildfile`
To import the library, use the following declaration in your `buildfile`.

    import nanort = libnanort%lib{nanort}

### C++ Header Inclusion
Finally, include the necessary header in your C++ source code.
This package provides a direct and a prefixed version for the include path.
Note that NanoRT's configuration can be controlled by defining preprocessor\
 macros before including its header.
However, the most robust way to do this project-wide is in your `buildfile`.

```c++
#include <nanort.h>         // Direct Inclusion
#include <nanort/nanort.h>  // Prefixed Inclusion
```

## Configuration
Currently, there are no configuration variables available.
For controlling library features, refer to NanoRT's preprocessor macros.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/lighttransport/nanort
package-url: https://github.com/build2-packaging/nanort/
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = libnanort

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cc

hxx{*}: cxx.importable = false

test.target = $cxx.target

\
location: nanort/libnanort-0.0.3.tar.gz
sha256sum: 161b48a74e744cb4146c160cbca14a924b9e580f9be3e8bdc0930c49f0db7a09
:
name: libnvvm
version: 12.8.0+5
upstream-version: 12.8.61
type: lib,binless
language: c
project: nvidia-cuda-toolkit
summary: NVVM Compiler IR based on the LLVM IR
license: other: CUDA Toolkit
description:
\
# libnvvm - A C library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

NVVM IR is a compiler IR (intermediate representation) based on the LLVM IR.
The NVVM IR is designed to represent GPU compute kernels (for example, CUDA
kernels). High-level language front-ends, like the CUDA C compiler front-end,
can generate NVVM IR. The NVVM compiler (which is based on LLVM) generates
PTX code from NVVM IR.

## Usage

To start using `libnvvm` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libnvvm ^12.8.0
```

Then import the library in your `buildfile`:

```
import libs = libnvvm%libs{nvvm}
```


## Importable targets

This package provides the following importable targets:

```
libs{nvvm}
exe{cicc}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/cuda/redist/redistrib_12.8\
.0.json
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: cuda-nvcc ^12.0.0
depends: cuda-nvrtc ^12.0.0
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = libnvvm

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-cuda-toolkit/libnvvm-12.8.0+5.tar.gz
sha256sum: 45321822340b7ab631da47e72516807a5b0cf45da4f312bbd08581b1f4690749
:
name: libnvvm
version: 13.0.2+2
upstream-version: 13.0.88
type: lib,binless
language: c
project: nvidia-cuda-toolkit
summary: NVVM Compiler IR based on the LLVM IR
license: other: CUDA Toolkit
description:
\
# libnvvm - A C library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

NVVM IR is a compiler IR (intermediate representation) based on the LLVM IR.
The NVVM IR is designed to represent GPU compute kernels (for example, CUDA
kernels). High-level language front-ends, like the CUDA C compiler front-end,
can generate NVVM IR. The NVVM compiler (which is based on LLVM) generates
PTX code from NVVM IR.

## Usage

To start using `libnvvm` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libnvvm ^13.0.1
```

Then import the library in your `buildfile`:

```
import libs = libnvvm%libs{nvvm}
```


## Importable targets

This package provides the following importable targets:

```
libs{nvvm}
exe{cicc}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/cuda/redist/redistrib_13.0\
.2.json
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = libnvvm

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

legal{*}: backlink = false

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-cuda-toolkit/libnvvm-13.0.2+2.tar.gz
sha256sum: ef1ca4f26c6ee25a3ce95a22bb067cd570c7c5fee5ee774df49f4aea2e42a353
:
name: libpmp
version: 3.0.0
type: lib
language: c++
project: pmp-library
summary: C++ library for processing and visualizing polygon surface meshes;\
 Core Module
license: MIT
description:
\
# Introduction

[![build](https://github.com/pmp-library/pmp-library/workflows/build/badge.sv\
g)](https://github.com/pmp-library/pmp-library/actions?query=workflow%3Abuild)
[![Coverage Status](https://coveralls.io/repos/github/pmp-library/pmp-library\
/badge.svg?branch=master)](https://coveralls.io/github/pmp-library/pmp-librar\
y?branch=main)
[![Latest Release](https://img.shields.io/github/v/release/pmp-library/pmp-li\
brary?sort=semver)](https://github.com/pmp-library/pmp-library/releases/lates\
t)

The Polygon Mesh Processing Library is a modern C++ open-source library for\
 processing and visualizing polygon surface meshes. Its main features are:

- An efficient and easy-to-use mesh data structure
- Standard algorithms such as decimation, remeshing, subdivision, or smoothing
- Ready-to-use visualization tools
- Seamless cross-compilation to JavaScript ([demo](https://www.pmp-library.or\
g/mpview.html))

## Get Started

Clone the repository:

```sh
git clone https://github.com/pmp-library/pmp-library.git
```

Configure and build:

```sh
cd pmp-library && mkdir build && cd build && cmake .. && make
```

Run the mesh processing app:

```sh
./mpview ../data/off/bunny.off
```

Build your own tool:

```cpp
#include <pmp/surface_mesh.h>

int main(void)
{
    pmp::SurfaceMesh mesh;
    pmp::read(mesh,"input.obj");
    // .. do awesome things with your mesh
    pmp::write(mesh,"output.obj");
}
```

## Read the Docs

The [user guide](https://www.pmp-library.org/guide.html) contains all you\
 need to get started using PMP, including a [tutorial](https://www.pmp-librar\
y.org/tutorial.html) covering mesh processing basics.

## Contribute

Contributions to PMP are welcome! There are many ways you can help: Report\
 any [issues](https://github.com/pmp-library/pmp-library/issues) you find,\
 help to improve the documentation, join our [discussions](https://github.com\
/pmp-library/pmp-library/discussions) forum, or [contribute](https://www.pmp-\
library.org/contributing.html) new code.

## Acknowledge

If you are using PMP for research projects, please acknowledge its use by\
 referencing

```tex
@misc{pmp-library,
title  = {The Polygon Mesh Processing Library},
author = {Daniel Sieger and Mario Botsch},
note   = {http://www.pmp-library.org},
year   = {2019},
}
```

We acknowledge that PMP evolved from our previous work on [Surface_mesh](http\
://dx.doi.org/10.1007/978-3-642-24734-7_29) and [OpenMesh](https://pub.uni-bi\
elefeld.de/record/1961694).

## License

PMP is provided under a simple and flexible MIT-style [license](https://githu\
b.com/pmp-library/pmp-library/blob/master/LICENSE.txt) allowing for both\
 open-source and commercial usage.

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for pmp-library

This project is a [build2](https://build2.org) package repository that\
 provides access to [`pmp-library`](https://github.com/pmp-library/pmp-librar\
y), a modern C++ open-source library for processing and visualizing polygon\
 surface meshes.

[![Official](https://img.shields.io/website/https/github.com/pmp-library/pmp-\
library.svg?down_message=offline&label=Official&style=for-the-badge&up_color=\
blue&up_message=online)](https://github.com/pmp-library/pmp-library)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/p\
mp-library.svg?down_message=offline&label=build2&style=for-the-badge&up_color\
=blue&up_message=online)](https://github.com/build2-packaging/pmp-library)
[![cppget.org](https://img.shields.io/website/https/cppget.org/libpmp.svg?dow\
n_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_messa\
ge=online)](https://cppget.org/libpmp)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/li\
bpmp.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=for-\
the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/libpm\
p)

## Usage
Make sure to add the stable section of the [`cppget.org`](https://cppget.org/\
?about) repository to your project's `repositories.manifest` to be able to\
 fetch this package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/pmp-library.git

Add the respective dependency in your project's `manifest` file to make the\
 required packages available for import.
The `libpmp-vis` package requires `libpmp` package as its core module and\
 adds the visualization features to the standard mesh processing facilities.

    depends: libpmp ^3.0.0
    depends: libpmp-vis ^3.0.0

To import the respective library targets include one of the following\
 declarations in a `buildfile`.

    import pmp = libpmp%lib{pmp}
    import pmp_vis = libpmp-vis%lib{pmp-vis}

## Configuration
There are no configuration options available.

## Issues and Notes
- Naming Scheme:
    + Repository Name: Same as the upstream repository: `pmp-library`
    + Project Name: Same as the upstream repository and the project name\
 given in the upstream CMake file: `pmp-library`
    + Library Name: To be consistent with programming practices, we wanted\
 the library name to be the name of the upstream include folder: `lib{pmp}`
    + Package Name: According to the recommended build2 practices, the\
 respective library package gets the prefix `lib` and its name becomes\
 `libpmp`.
    + Similar for `lib{pmp-vis}` in package `libpmp-vis`
- For `aarch64-linux-gnu` targets using GCC the `loop_subdivision` tests of\
 the `libpmp` package fail with `terminate called after throwing an instance\
 of 'pmp::InvalidInputException'` and `what():  loop_subdivision: Not a\
 triangle mesh.`. This is an upstream issue and is probably already fixed for\
 the next version.
- The package `libpmp-vis` fails on various CI configurations due to the\
 required OpenGL-based libraries, like GLFW and GLEW.
- Library `lib{pmp}` from `libpmp` package exports `_USE_MATH_DEFINES` and\
 `NOMINMAX` macros on Windows to properly function.
- `pmp-library` supports OpenMP. Enabling OpenMP in the compile options of\
 your configuration will also compile the library with its builtin\
 parallelization.
- `pmp-library` supports 64-bit scalars and index types when the macros\
 `PMP_SCALAR_TYPE_64` and `PMP_INDEX_TYPE_64` are used for compilation (and\
 probably export as well). Currently, this is not supported in the package.
- `pmp-library` supports Emscripten. Most of the required upstream options\
 have not been added to the package so far.

## Contributing
Thanks in advance for your help and contribution to keep this package\
 up-to-date.
For now, please, file an issue on [GitHub](https://github.com/build2-packagin\
g/pmp-library/issues) for everything that is not described below.

### Recommend Updating Version
Please, file an issue on [GitHub](https://github.com/build2-packaging/pmp-lib\
rary/issues) with the new recommended version.

### Update Version by Pull Request
1. Fork the repository on [GitHub](https://github.com/build2-packaging/pmp-li\
brary) and clone it to your local machine.
2. Run `git submodule init` and `git submodule update` to get the current\
 upstream directory.
3. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
4. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
5. Update library version in `manifest` file if it has changed or add package\
 update by using `+n` for the `n`-th update.
6. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
7. Run `bdep ci` and test for errors.
8. If everything works fine, make a pull request on GitHub and write down the\
 `bdep ci` link to your CI tests.
9. After a successful pull request, we will run the appropriate commands to\
 publish a new package version.

### Update Version Directly if You Have Permissions
1. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
2. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
3. Update library version in `manifest` file if it has changed or add package\
 update by using `+n` for the `n`-th update.
4. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
5. Run `bdep ci` and test for errors and warnings.
6. When successful, run `bdep release --tag --push` to push new tag version\
 to repository.
7. Run `bdep publish` to publish the package to [cppget.org](https://cppget.o\
rg).

\
package-description-type: text/markdown;variant=GFM
changes:
\
# Changelog

All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0\
/).

This project aims to adhere to [Semantic Versioning](https://semver.org/spec/\
v2.0.0.html).

## Unreleased

### Added

- Add `mesh_to_matrices()` and `matrices_to_mesh()` functions to convert to\
 and from Eigen matrices.
- Add support to write binary STL files.
- Added `geodesics_heat()` for computing geodesics (based on the heat method)\
 on general polygon meshes.
- Generalize curvature computation in `curvature()` to polygon meshes.
- Add `mean_edge_length(SurfaceMesh)`.
- Add `min_face_area()` to compute minimum face area of all faces.
- Add `edge_area()` to compute the area associated to an edge.
- Added circulator enumerating edges around vertex: `SurfaceMesh::edges(Verte\
x)`.
- Functions `laplace_matrix()`, `mass_matrix()`, `gradient_matrix()`, and\
 `divergence_matrix()` that compute matrix representations of those discrete\
 differential operators. Works for both triangle meshes and general polygon\
 meshes, based on the paper Bunge et al, "Polygon Laplacian made simple",\
 Eurographics 2020.
- Smoothing, parameterization, and fairing are now implemented based on\
 sparse Laplacian matrices, which generalizes to general polygon meshes.
- Add `PMP_STRICT_COMPILATION` CMake option to control treating warnings as\
 errors. Default: On.
- Add function `flip_faces()` to reverse face orientation in a mesh (#123)
- Meshes and textures can be loaded by dropping the files onto the window,\
 both in normal GLFW windows and browser windows (using emscripten). Thanks\
 to Stephan Wenninger!

### Changed

- Get rid of git submodules, vendor all third-party libraries for simplicity.\
 See also #167.
- The function `voronoi_area()` now computes the barycentric Voronoi area,\
 because this version generalizes better to polygon meshes. The mixed Voronoi\
 area (for triangle meshes) is now computed by `voronoi_area_mixed()`.
- Consistently use lowercase file names
- Rename `Timer` to `StopWatch`
- `SurfaceMeshGL` renamed to `Renderer` and de-coupled from `SurfaceMesh`
- Replace `triangle_area(Face)` by `face_area(Face)`, which now supports\
 general polygons. `surface_area(SurfaceMesh)` now also works for general\
 polygon meshes.
- Remove max angle triangulation objective leading to fold-overs.
- Breaking change: Re-design algorithms API to use a simple function\
 interface.
- Breaking change: Make helper classes `Heap`, `Quadric`, `NormalCone`,\
 `TriangleKdTree` private.
- Remove `vertex_curvature()`, `VertexCurvature`, and `angle_sum()`.
- Support CMake's `BUILD_SHARED_LIBS` option to control building shared\
 libraries
- Fix `Mat3::inverse()` to use `fabs()`
- Remove `Matrix::allFinite()`.
- Make `SurfaceMesh::bounds()` a free function `pmp::bounds()`.
- Make `SurfaceMesh::edge_length()` a free function `pmp::edge_length()`.
- Remove object properties.
- Remove support for PLY format, see 1ec912b for why.
- Remove support for XYZ and AGI point set formats.
- Move `SurfaceMesh::read()` and `SurfaceMesh::write()` to free functions\
 `pmp::read()` and `pmp::write()`.
- Move IO functionality into its own module
- Upgrade C++ standard to C++17
- Remove `PMP_ASSERT()` macro.
- Remove `get_*_property_type()` functions from `SurfaceMesh`
- Move example apps from `src/apps` to `examples`. Remove `PMP_BUILD_APPS`\
 CMake option.
- Rename `Simplification` to `Decimation`
- Rename `Factory` to `Shapes`
- Drop `Surface` prefix from algorithms
- Update glew to version 2.2.0.
- Update stb_image to version 2.28 and stb_image_write to version 1.16.
- Upgrade ImGui to version 1.89.8

## [2.0.1] 2022-08-26

### Fixed

- Fix shared library version
- Fix compilation with PMP_SCALAR_TYPE=64
- Use correct C++ standard (C++14) in public target compile options
- Fix crash in smoothing demo app

### Changed

- Upgrade ImGui to version 1.88

## [2.0.0] 2022-08-14

### Added

- Add support for texture seams in `SurfaceSimplification`, thanks to Timo\
 Menzel.
- Add quad/tri subdivision, thanks to Hendrik Meyer.
- Add `SurfaceFactory` class to generate basic shapes. Thanks to\
 [u/lycium](https://www.reddit.com/user/lycium/) on Reddit for suggesting a\
 simplification of the `icosahedron()` function.
- Add support to render colors per face
- Add support to render colors per vertex, thanks to Xiewei Zhong
- Add function to compute volume of a mesh, thanks to Xiewei Zhong
- Add post-increment iterators and make low level functions to add elements\
 public. This makes it possible to use CGAL algorithms on a PMP\
 `SurfaceMesh`. Thanks to Andreas Fabri for contributing the changes!
- Add PMP_INSTALL option to CMake.
- Add PMP_BUILD_VIS CMake option to enable / disable building the pmp_vis\
 library and its dependencies.

### Changed

- Bump C++ standard to C++14
- `TriangleKdTree`: no longer record number of tests, remove\
 `NearestNeighbor::tests` member
- Remove `SurfaceSubdivision::sqrt3()`
- Remove `PMP_SHOW` macro
- Remove `pmp::Version` class and `Version.h`
- Build shared libraries on all platforms by default (except pmp_vis , see\
 #87)
- Bump CMake minimum required version to 3.16.3
- Make `SurfaceTriangulation::Objective` a scoped enum
- Remove `SurfaceMesh::triangulate()` functions to avoid redundancy with\
 `SurfaceTriangulation`
- Improve API by reporting errors using exceptions (see #16).
- `SurfaceFeatures` now returns the number of boundary / feature edges\
 detected.
- Update Eigen to version 3.4.0
- Update GoogleTest to version 1.12.1
- Update stb_image to version 2.26 and stb_image_writer to version 1.15.
- Update GLFW to version 3.3.8
- Change CMake policy CMP0072 to "NEW" behavior preferring GLVND

### Fixed

- Fix `SurfaceMesh::get_object_propertyType()` to `get_object_property_type()`
- `SurfaceRemeshing`: Don't leak feature properties. Spotted by Pierre\
 Buyssens.
- Fixed a rare bug regarding ImGui scaling on Linux. Thanks to Jan Erik\
 Swiadek for reporting and fixing this!
- Fix crash in `SurfaceRemeshing` when dealing with low quality meshes (#90,\
 #89)
- `SurfaceMesh::bounds()` no longer includes deleted vertices. Thanks to Paul\
 Du.
- Fix crash in `SurfaceHoleFilling` when a vertex selection already exists.
- Fix bug in `SurfaceHoleFilling` leading to artifacts in the filled surface\
 patch. See #64.
- Change sign of `vec2::perp()` to correctly model CCW rotation by 90 degrees.
- Fix bug in OpenGL buffer clean-up in `SurfaceMeshGL`.

## [1.2.1] 2020-05-10

### Fixed

- Fix rendering issues around sharp edges
- Fix bug in adaptive remeshing leading to over-refinement of corner vertices.
- Fix bug in bounding box computation. Thanks a lot to Jascha Achenbach for\
 reporting this bug!

## [1.2.0] 2020-03-15

### External libraries

- Upgrade Eigen to current master version to get rid of a compile error on\
 Windows
- Upgrade ImGui to version 1.75
- Upgrade stb_image to current master version

### Added

- Add constructors using initializer lists to Matrix/Vector classes
- Add assignment from and cast from Eigen matrices and vectors
- Improved rendering of general polygons, avoiding erroneous tessellation\
 into overlapping/flipped triangles in case of non-convex polygons.
- Added support for rendering using MatCaps. Thanks to Alec Jacobson for\
 suggesting this!

### Fixed

- Fix erroneous header install path (visualization)
- Fix bug hole filling (when filling single-triangle holes). Thanks a lot to\
 Pierre Buyssens for reporting this bug!
- Fix bug when fairing a mesh w/o boundary constraints. Thanks a lot to\
 Pierre Buyssens for reporting this bug!

## [1.1.0] 2019-05-30

### Added

- Compile-time switch `PMP_SCALAR_TYPE` to choose between float/double as\
 Scalar
- Support point set rendering for surface meshes without faces
- Add hole filling based on Liepa algorithm
- Add explicit warranty and liability disclaimer

### Changed

- Breaking change: Public members in Window and TrackballViewer classes made
  private and encapsulated through access functions
- Change SurfaceSmoothing to avoid model shrinking
- Improve normal computation for polygonal faces
- Upgrade GLFW to version 3.3
- Upgrade ImGui to version 1.70
- Upgrade Eigen to version 3.3.7
- Documentation updates

### Fixed

- Fix a bug in OFF reader when loading faces with high valence
- Fix a bug SurfaceGeodesic that lead to dist(v0,v1) != dist(v1,v0). As a\
 consequence, the Novotni method has been removed from SurfaceGeodesic.

## [1.0.0] 2019-02-18

### Added

- Algorithms module
- Visualization tools
- Support for range-based for loops
- Configurable index type
- Global object properties
- Support for emscripten
- Unit test suite
- Continuous integration
- Coding standard
- Version API

### Changed

- Switched to MIT license
- Library scope handle and property types
- Enhanced IO capabilities

\
changes-type: text/markdown;variant=GFM
url: https://www.pmp-library.org/
doc-url: https://www.pmp-library.org/
src-url: https://github.com/pmp-library/pmp-library
package-url: https://github.com/build2-packaging/pmp-library/
package-email: packaging@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: Eigen ^3.4.0
tests: libpmp-tests == 3.0.0
bootstrap-build:
\
project = libpmp

using version
using config
using test
using install
using dist

\
root-build:
\
# Suppress warnings coming from external libraries.
#
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: pmp-library/libpmp-3.0.0.tar.gz
sha256sum: c869d538c3b6099890c1432d79cfeb04509c67964189e43341dde87167863fd6
:
name: libpmp-examples
version: 3.0.0
type: exe
language: c++
project: pmp-library
summary: C++ library for processing and visualizing polygon surface meshes;\
 Examples
license: MIT
description:
\
# Introduction

[![build](https://github.com/pmp-library/pmp-library/workflows/build/badge.sv\
g)](https://github.com/pmp-library/pmp-library/actions?query=workflow%3Abuild)
[![Coverage Status](https://coveralls.io/repos/github/pmp-library/pmp-library\
/badge.svg?branch=master)](https://coveralls.io/github/pmp-library/pmp-librar\
y?branch=main)
[![Latest Release](https://img.shields.io/github/v/release/pmp-library/pmp-li\
brary?sort=semver)](https://github.com/pmp-library/pmp-library/releases/lates\
t)

The Polygon Mesh Processing Library is a modern C++ open-source library for\
 processing and visualizing polygon surface meshes. Its main features are:

- An efficient and easy-to-use mesh data structure
- Standard algorithms such as decimation, remeshing, subdivision, or smoothing
- Ready-to-use visualization tools
- Seamless cross-compilation to JavaScript ([demo](https://www.pmp-library.or\
g/mpview.html))

## Get Started

Clone the repository:

```sh
git clone https://github.com/pmp-library/pmp-library.git
```

Configure and build:

```sh
cd pmp-library && mkdir build && cd build && cmake .. && make
```

Run the mesh processing app:

```sh
./mpview ../data/off/bunny.off
```

Build your own tool:

```cpp
#include <pmp/surface_mesh.h>

int main(void)
{
    pmp::SurfaceMesh mesh;
    pmp::read(mesh,"input.obj");
    // .. do awesome things with your mesh
    pmp::write(mesh,"output.obj");
}
```

## Read the Docs

The [user guide](https://www.pmp-library.org/guide.html) contains all you\
 need to get started using PMP, including a [tutorial](https://www.pmp-librar\
y.org/tutorial.html) covering mesh processing basics.

## Contribute

Contributions to PMP are welcome! There are many ways you can help: Report\
 any [issues](https://github.com/pmp-library/pmp-library/issues) you find,\
 help to improve the documentation, join our [discussions](https://github.com\
/pmp-library/pmp-library/discussions) forum, or [contribute](https://www.pmp-\
library.org/contributing.html) new code.

## Acknowledge

If you are using PMP for research projects, please acknowledge its use by\
 referencing

```tex
@misc{pmp-library,
title  = {The Polygon Mesh Processing Library},
author = {Daniel Sieger and Mario Botsch},
note   = {http://www.pmp-library.org},
year   = {2019},
}
```

We acknowledge that PMP evolved from our previous work on [Surface_mesh](http\
://dx.doi.org/10.1007/978-3-642-24734-7_29) and [OpenMesh](https://pub.uni-bi\
elefeld.de/record/1961694).

## License

PMP is provided under a simple and flexible MIT-style [license](https://githu\
b.com/pmp-library/pmp-library/blob/master/LICENSE.txt) allowing for both\
 open-source and commercial usage.

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for pmp-library

This project is a [build2](https://build2.org) package repository that\
 provides access to [`pmp-library`](https://github.com/pmp-library/pmp-librar\
y), a modern C++ open-source library for processing and visualizing polygon\
 surface meshes.

[![Official](https://img.shields.io/website/https/github.com/pmp-library/pmp-\
library.svg?down_message=offline&label=Official&style=for-the-badge&up_color=\
blue&up_message=online)](https://github.com/pmp-library/pmp-library)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/p\
mp-library.svg?down_message=offline&label=build2&style=for-the-badge&up_color\
=blue&up_message=online)](https://github.com/build2-packaging/pmp-library)
[![cppget.org](https://img.shields.io/website/https/cppget.org/libpmp.svg?dow\
n_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_messa\
ge=online)](https://cppget.org/libpmp)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/li\
bpmp.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=for-\
the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/libpm\
p)

## Usage
Make sure to add the stable section of the [`cppget.org`](https://cppget.org/\
?about) repository to your project's `repositories.manifest` to be able to\
 fetch this package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/pmp-library.git

Add the respective dependency in your project's `manifest` file to make the\
 required packages available for import.
The `libpmp-vis` package requires `libpmp` package as its core module and\
 adds the visualization features to the standard mesh processing facilities.

    depends: libpmp ^3.0.0
    depends: libpmp-vis ^3.0.0

To import the respective library targets include one of the following\
 declarations in a `buildfile`.

    import pmp = libpmp%lib{pmp}
    import pmp_vis = libpmp-vis%lib{pmp-vis}

## Configuration
There are no configuration options available.

## Issues and Notes
- Naming Scheme:
    + Repository Name: Same as the upstream repository: `pmp-library`
    + Project Name: Same as the upstream repository and the project name\
 given in the upstream CMake file: `pmp-library`
    + Library Name: To be consistent with programming practices, we wanted\
 the library name to be the name of the upstream include folder: `lib{pmp}`
    + Package Name: According to the recommended build2 practices, the\
 respective library package gets the prefix `lib` and its name becomes\
 `libpmp`.
    + Similar for `lib{pmp-vis}` in package `libpmp-vis`
- For `aarch64-linux-gnu` targets using GCC the `loop_subdivision` tests of\
 the `libpmp` package fail with `terminate called after throwing an instance\
 of 'pmp::InvalidInputException'` and `what():  loop_subdivision: Not a\
 triangle mesh.`. This is an upstream issue and is probably already fixed for\
 the next version.
- The package `libpmp-vis` fails on various CI configurations due to the\
 required OpenGL-based libraries, like GLFW and GLEW.
- Library `lib{pmp}` from `libpmp` package exports `_USE_MATH_DEFINES` and\
 `NOMINMAX` macros on Windows to properly function.
- `pmp-library` supports OpenMP. Enabling OpenMP in the compile options of\
 your configuration will also compile the library with its builtin\
 parallelization.
- `pmp-library` supports 64-bit scalars and index types when the macros\
 `PMP_SCALAR_TYPE_64` and `PMP_INDEX_TYPE_64` are used for compilation (and\
 probably export as well). Currently, this is not supported in the package.
- `pmp-library` supports Emscripten. Most of the required upstream options\
 have not been added to the package so far.

## Contributing
Thanks in advance for your help and contribution to keep this package\
 up-to-date.
For now, please, file an issue on [GitHub](https://github.com/build2-packagin\
g/pmp-library/issues) for everything that is not described below.

### Recommend Updating Version
Please, file an issue on [GitHub](https://github.com/build2-packaging/pmp-lib\
rary/issues) with the new recommended version.

### Update Version by Pull Request
1. Fork the repository on [GitHub](https://github.com/build2-packaging/pmp-li\
brary) and clone it to your local machine.
2. Run `git submodule init` and `git submodule update` to get the current\
 upstream directory.
3. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
4. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
5. Update library version in `manifest` file if it has changed or add package\
 update by using `+n` for the `n`-th update.
6. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
7. Run `bdep ci` and test for errors.
8. If everything works fine, make a pull request on GitHub and write down the\
 `bdep ci` link to your CI tests.
9. After a successful pull request, we will run the appropriate commands to\
 publish a new package version.

### Update Version Directly if You Have Permissions
1. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
2. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
3. Update library version in `manifest` file if it has changed or add package\
 update by using `+n` for the `n`-th update.
4. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
5. Run `bdep ci` and test for errors and warnings.
6. When successful, run `bdep release --tag --push` to push new tag version\
 to repository.
7. Run `bdep publish` to publish the package to [cppget.org](https://cppget.o\
rg).

\
package-description-type: text/markdown;variant=GFM
changes:
\
# Changelog

All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0\
/).

This project aims to adhere to [Semantic Versioning](https://semver.org/spec/\
v2.0.0.html).

## Unreleased

### Added

- Add `mesh_to_matrices()` and `matrices_to_mesh()` functions to convert to\
 and from Eigen matrices.
- Add support to write binary STL files.
- Added `geodesics_heat()` for computing geodesics (based on the heat method)\
 on general polygon meshes.
- Generalize curvature computation in `curvature()` to polygon meshes.
- Add `mean_edge_length(SurfaceMesh)`.
- Add `min_face_area()` to compute minimum face area of all faces.
- Add `edge_area()` to compute the area associated to an edge.
- Added circulator enumerating edges around vertex: `SurfaceMesh::edges(Verte\
x)`.
- Functions `laplace_matrix()`, `mass_matrix()`, `gradient_matrix()`, and\
 `divergence_matrix()` that compute matrix representations of those discrete\
 differential operators. Works for both triangle meshes and general polygon\
 meshes, based on the paper Bunge et al, "Polygon Laplacian made simple",\
 Eurographics 2020.
- Smoothing, parameterization, and fairing are now implemented based on\
 sparse Laplacian matrices, which generalizes to general polygon meshes.
- Add `PMP_STRICT_COMPILATION` CMake option to control treating warnings as\
 errors. Default: On.
- Add function `flip_faces()` to reverse face orientation in a mesh (#123)
- Meshes and textures can be loaded by dropping the files onto the window,\
 both in normal GLFW windows and browser windows (using emscripten). Thanks\
 to Stephan Wenninger!

### Changed

- Get rid of git submodules, vendor all third-party libraries for simplicity.\
 See also #167.
- The function `voronoi_area()` now computes the barycentric Voronoi area,\
 because this version generalizes better to polygon meshes. The mixed Voronoi\
 area (for triangle meshes) is now computed by `voronoi_area_mixed()`.
- Consistently use lowercase file names
- Rename `Timer` to `StopWatch`
- `SurfaceMeshGL` renamed to `Renderer` and de-coupled from `SurfaceMesh`
- Replace `triangle_area(Face)` by `face_area(Face)`, which now supports\
 general polygons. `surface_area(SurfaceMesh)` now also works for general\
 polygon meshes.
- Remove max angle triangulation objective leading to fold-overs.
- Breaking change: Re-design algorithms API to use a simple function\
 interface.
- Breaking change: Make helper classes `Heap`, `Quadric`, `NormalCone`,\
 `TriangleKdTree` private.
- Remove `vertex_curvature()`, `VertexCurvature`, and `angle_sum()`.
- Support CMake's `BUILD_SHARED_LIBS` option to control building shared\
 libraries
- Fix `Mat3::inverse()` to use `fabs()`
- Remove `Matrix::allFinite()`.
- Make `SurfaceMesh::bounds()` a free function `pmp::bounds()`.
- Make `SurfaceMesh::edge_length()` a free function `pmp::edge_length()`.
- Remove object properties.
- Remove support for PLY format, see 1ec912b for why.
- Remove support for XYZ and AGI point set formats.
- Move `SurfaceMesh::read()` and `SurfaceMesh::write()` to free functions\
 `pmp::read()` and `pmp::write()`.
- Move IO functionality into its own module
- Upgrade C++ standard to C++17
- Remove `PMP_ASSERT()` macro.
- Remove `get_*_property_type()` functions from `SurfaceMesh`
- Move example apps from `src/apps` to `examples`. Remove `PMP_BUILD_APPS`\
 CMake option.
- Rename `Simplification` to `Decimation`
- Rename `Factory` to `Shapes`
- Drop `Surface` prefix from algorithms
- Update glew to version 2.2.0.
- Update stb_image to version 2.28 and stb_image_write to version 1.16.
- Upgrade ImGui to version 1.89.8

## [2.0.1] 2022-08-26

### Fixed

- Fix shared library version
- Fix compilation with PMP_SCALAR_TYPE=64
- Use correct C++ standard (C++14) in public target compile options
- Fix crash in smoothing demo app

### Changed

- Upgrade ImGui to version 1.88

## [2.0.0] 2022-08-14

### Added

- Add support for texture seams in `SurfaceSimplification`, thanks to Timo\
 Menzel.
- Add quad/tri subdivision, thanks to Hendrik Meyer.
- Add `SurfaceFactory` class to generate basic shapes. Thanks to\
 [u/lycium](https://www.reddit.com/user/lycium/) on Reddit for suggesting a\
 simplification of the `icosahedron()` function.
- Add support to render colors per face
- Add support to render colors per vertex, thanks to Xiewei Zhong
- Add function to compute volume of a mesh, thanks to Xiewei Zhong
- Add post-increment iterators and make low level functions to add elements\
 public. This makes it possible to use CGAL algorithms on a PMP\
 `SurfaceMesh`. Thanks to Andreas Fabri for contributing the changes!
- Add PMP_INSTALL option to CMake.
- Add PMP_BUILD_VIS CMake option to enable / disable building the pmp_vis\
 library and its dependencies.

### Changed

- Bump C++ standard to C++14
- `TriangleKdTree`: no longer record number of tests, remove\
 `NearestNeighbor::tests` member
- Remove `SurfaceSubdivision::sqrt3()`
- Remove `PMP_SHOW` macro
- Remove `pmp::Version` class and `Version.h`
- Build shared libraries on all platforms by default (except pmp_vis , see\
 #87)
- Bump CMake minimum required version to 3.16.3
- Make `SurfaceTriangulation::Objective` a scoped enum
- Remove `SurfaceMesh::triangulate()` functions to avoid redundancy with\
 `SurfaceTriangulation`
- Improve API by reporting errors using exceptions (see #16).
- `SurfaceFeatures` now returns the number of boundary / feature edges\
 detected.
- Update Eigen to version 3.4.0
- Update GoogleTest to version 1.12.1
- Update stb_image to version 2.26 and stb_image_writer to version 1.15.
- Update GLFW to version 3.3.8
- Change CMake policy CMP0072 to "NEW" behavior preferring GLVND

### Fixed

- Fix `SurfaceMesh::get_object_propertyType()` to `get_object_property_type()`
- `SurfaceRemeshing`: Don't leak feature properties. Spotted by Pierre\
 Buyssens.
- Fixed a rare bug regarding ImGui scaling on Linux. Thanks to Jan Erik\
 Swiadek for reporting and fixing this!
- Fix crash in `SurfaceRemeshing` when dealing with low quality meshes (#90,\
 #89)
- `SurfaceMesh::bounds()` no longer includes deleted vertices. Thanks to Paul\
 Du.
- Fix crash in `SurfaceHoleFilling` when a vertex selection already exists.
- Fix bug in `SurfaceHoleFilling` leading to artifacts in the filled surface\
 patch. See #64.
- Change sign of `vec2::perp()` to correctly model CCW rotation by 90 degrees.
- Fix bug in OpenGL buffer clean-up in `SurfaceMeshGL`.

## [1.2.1] 2020-05-10

### Fixed

- Fix rendering issues around sharp edges
- Fix bug in adaptive remeshing leading to over-refinement of corner vertices.
- Fix bug in bounding box computation. Thanks a lot to Jascha Achenbach for\
 reporting this bug!

## [1.2.0] 2020-03-15

### External libraries

- Upgrade Eigen to current master version to get rid of a compile error on\
 Windows
- Upgrade ImGui to version 1.75
- Upgrade stb_image to current master version

### Added

- Add constructors using initializer lists to Matrix/Vector classes
- Add assignment from and cast from Eigen matrices and vectors
- Improved rendering of general polygons, avoiding erroneous tessellation\
 into overlapping/flipped triangles in case of non-convex polygons.
- Added support for rendering using MatCaps. Thanks to Alec Jacobson for\
 suggesting this!

### Fixed

- Fix erroneous header install path (visualization)
- Fix bug hole filling (when filling single-triangle holes). Thanks a lot to\
 Pierre Buyssens for reporting this bug!
- Fix bug when fairing a mesh w/o boundary constraints. Thanks a lot to\
 Pierre Buyssens for reporting this bug!

## [1.1.0] 2019-05-30

### Added

- Compile-time switch `PMP_SCALAR_TYPE` to choose between float/double as\
 Scalar
- Support point set rendering for surface meshes without faces
- Add hole filling based on Liepa algorithm
- Add explicit warranty and liability disclaimer

### Changed

- Breaking change: Public members in Window and TrackballViewer classes made
  private and encapsulated through access functions
- Change SurfaceSmoothing to avoid model shrinking
- Improve normal computation for polygonal faces
- Upgrade GLFW to version 3.3
- Upgrade ImGui to version 1.70
- Upgrade Eigen to version 3.3.7
- Documentation updates

### Fixed

- Fix a bug in OFF reader when loading faces with high valence
- Fix a bug SurfaceGeodesic that lead to dist(v0,v1) != dist(v1,v0). As a\
 consequence, the Novotni method has been removed from SurfaceGeodesic.

## [1.0.0] 2019-02-18

### Added

- Algorithms module
- Visualization tools
- Support for range-based for loops
- Configurable index type
- Global object properties
- Support for emscripten
- Unit test suite
- Continuous integration
- Coding standard
- Version API

### Changed

- Switched to MIT license
- Library scope handle and property types
- Enhanced IO capabilities

\
changes-type: text/markdown;variant=GFM
url: https://www.pmp-library.org/
doc-url: https://www.pmp-library.org/
src-url: https://github.com/pmp-library/pmp-library
package-url: https://github.com/build2-packaging/pmp-library/
package-email: packaging@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: libpmp == 3.0.0
depends: libpmp-vis == 3.0.0
bootstrap-build:
\
project = libpmp-examples

using version
using config
using test
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: pmp-library/libpmp-examples-3.0.0.tar.gz
sha256sum: 6ddfc9d34ecdf228a5fe6c243405d2934e69fbbeae085b8ab5b7243ccea9da51
:
name: libpmp-tests
version: 3.0.0
type: exe
language: c++
project: pmp-library
summary: C++ library for processing and visualizing polygon surface meshes;\
 Tests
license: MIT
description:
\
# Introduction

[![build](https://github.com/pmp-library/pmp-library/workflows/build/badge.sv\
g)](https://github.com/pmp-library/pmp-library/actions?query=workflow%3Abuild)
[![Coverage Status](https://coveralls.io/repos/github/pmp-library/pmp-library\
/badge.svg?branch=master)](https://coveralls.io/github/pmp-library/pmp-librar\
y?branch=main)
[![Latest Release](https://img.shields.io/github/v/release/pmp-library/pmp-li\
brary?sort=semver)](https://github.com/pmp-library/pmp-library/releases/lates\
t)

The Polygon Mesh Processing Library is a modern C++ open-source library for\
 processing and visualizing polygon surface meshes. Its main features are:

- An efficient and easy-to-use mesh data structure
- Standard algorithms such as decimation, remeshing, subdivision, or smoothing
- Ready-to-use visualization tools
- Seamless cross-compilation to JavaScript ([demo](https://www.pmp-library.or\
g/mpview.html))

## Get Started

Clone the repository:

```sh
git clone https://github.com/pmp-library/pmp-library.git
```

Configure and build:

```sh
cd pmp-library && mkdir build && cd build && cmake .. && make
```

Run the mesh processing app:

```sh
./mpview ../data/off/bunny.off
```

Build your own tool:

```cpp
#include <pmp/surface_mesh.h>

int main(void)
{
    pmp::SurfaceMesh mesh;
    pmp::read(mesh,"input.obj");
    // .. do awesome things with your mesh
    pmp::write(mesh,"output.obj");
}
```

## Read the Docs

The [user guide](https://www.pmp-library.org/guide.html) contains all you\
 need to get started using PMP, including a [tutorial](https://www.pmp-librar\
y.org/tutorial.html) covering mesh processing basics.

## Contribute

Contributions to PMP are welcome! There are many ways you can help: Report\
 any [issues](https://github.com/pmp-library/pmp-library/issues) you find,\
 help to improve the documentation, join our [discussions](https://github.com\
/pmp-library/pmp-library/discussions) forum, or [contribute](https://www.pmp-\
library.org/contributing.html) new code.

## Acknowledge

If you are using PMP for research projects, please acknowledge its use by\
 referencing

```tex
@misc{pmp-library,
title  = {The Polygon Mesh Processing Library},
author = {Daniel Sieger and Mario Botsch},
note   = {http://www.pmp-library.org},
year   = {2019},
}
```

We acknowledge that PMP evolved from our previous work on [Surface_mesh](http\
://dx.doi.org/10.1007/978-3-642-24734-7_29) and [OpenMesh](https://pub.uni-bi\
elefeld.de/record/1961694).

## License

PMP is provided under a simple and flexible MIT-style [license](https://githu\
b.com/pmp-library/pmp-library/blob/master/LICENSE.txt) allowing for both\
 open-source and commercial usage.

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for pmp-library

This project is a [build2](https://build2.org) package repository that\
 provides access to [`pmp-library`](https://github.com/pmp-library/pmp-librar\
y), a modern C++ open-source library for processing and visualizing polygon\
 surface meshes.

[![Official](https://img.shields.io/website/https/github.com/pmp-library/pmp-\
library.svg?down_message=offline&label=Official&style=for-the-badge&up_color=\
blue&up_message=online)](https://github.com/pmp-library/pmp-library)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/p\
mp-library.svg?down_message=offline&label=build2&style=for-the-badge&up_color\
=blue&up_message=online)](https://github.com/build2-packaging/pmp-library)
[![cppget.org](https://img.shields.io/website/https/cppget.org/libpmp.svg?dow\
n_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_messa\
ge=online)](https://cppget.org/libpmp)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/li\
bpmp.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=for-\
the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/libpm\
p)

## Usage
Make sure to add the stable section of the [`cppget.org`](https://cppget.org/\
?about) repository to your project's `repositories.manifest` to be able to\
 fetch this package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/pmp-library.git

Add the respective dependency in your project's `manifest` file to make the\
 required packages available for import.
The `libpmp-vis` package requires `libpmp` package as its core module and\
 adds the visualization features to the standard mesh processing facilities.

    depends: libpmp ^3.0.0
    depends: libpmp-vis ^3.0.0

To import the respective library targets include one of the following\
 declarations in a `buildfile`.

    import pmp = libpmp%lib{pmp}
    import pmp_vis = libpmp-vis%lib{pmp-vis}

## Configuration
There are no configuration options available.

## Issues and Notes
- Naming Scheme:
    + Repository Name: Same as the upstream repository: `pmp-library`
    + Project Name: Same as the upstream repository and the project name\
 given in the upstream CMake file: `pmp-library`
    + Library Name: To be consistent with programming practices, we wanted\
 the library name to be the name of the upstream include folder: `lib{pmp}`
    + Package Name: According to the recommended build2 practices, the\
 respective library package gets the prefix `lib` and its name becomes\
 `libpmp`.
    + Similar for `lib{pmp-vis}` in package `libpmp-vis`
- For `aarch64-linux-gnu` targets using GCC the `loop_subdivision` tests of\
 the `libpmp` package fail with `terminate called after throwing an instance\
 of 'pmp::InvalidInputException'` and `what():  loop_subdivision: Not a\
 triangle mesh.`. This is an upstream issue and is probably already fixed for\
 the next version.
- The package `libpmp-vis` fails on various CI configurations due to the\
 required OpenGL-based libraries, like GLFW and GLEW.
- Library `lib{pmp}` from `libpmp` package exports `_USE_MATH_DEFINES` and\
 `NOMINMAX` macros on Windows to properly function.
- `pmp-library` supports OpenMP. Enabling OpenMP in the compile options of\
 your configuration will also compile the library with its builtin\
 parallelization.
- `pmp-library` supports 64-bit scalars and index types when the macros\
 `PMP_SCALAR_TYPE_64` and `PMP_INDEX_TYPE_64` are used for compilation (and\
 probably export as well). Currently, this is not supported in the package.
- `pmp-library` supports Emscripten. Most of the required upstream options\
 have not been added to the package so far.

## Contributing
Thanks in advance for your help and contribution to keep this package\
 up-to-date.
For now, please, file an issue on [GitHub](https://github.com/build2-packagin\
g/pmp-library/issues) for everything that is not described below.

### Recommend Updating Version
Please, file an issue on [GitHub](https://github.com/build2-packaging/pmp-lib\
rary/issues) with the new recommended version.

### Update Version by Pull Request
1. Fork the repository on [GitHub](https://github.com/build2-packaging/pmp-li\
brary) and clone it to your local machine.
2. Run `git submodule init` and `git submodule update` to get the current\
 upstream directory.
3. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
4. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
5. Update library version in `manifest` file if it has changed or add package\
 update by using `+n` for the `n`-th update.
6. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
7. Run `bdep ci` and test for errors.
8. If everything works fine, make a pull request on GitHub and write down the\
 `bdep ci` link to your CI tests.
9. After a successful pull request, we will run the appropriate commands to\
 publish a new package version.

### Update Version Directly if You Have Permissions
1. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
2. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
3. Update library version in `manifest` file if it has changed or add package\
 update by using `+n` for the `n`-th update.
4. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
5. Run `bdep ci` and test for errors and warnings.
6. When successful, run `bdep release --tag --push` to push new tag version\
 to repository.
7. Run `bdep publish` to publish the package to [cppget.org](https://cppget.o\
rg).

\
package-description-type: text/markdown;variant=GFM
changes:
\
# Changelog

All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0\
/).

This project aims to adhere to [Semantic Versioning](https://semver.org/spec/\
v2.0.0.html).

## Unreleased

### Added

- Add `mesh_to_matrices()` and `matrices_to_mesh()` functions to convert to\
 and from Eigen matrices.
- Add support to write binary STL files.
- Added `geodesics_heat()` for computing geodesics (based on the heat method)\
 on general polygon meshes.
- Generalize curvature computation in `curvature()` to polygon meshes.
- Add `mean_edge_length(SurfaceMesh)`.
- Add `min_face_area()` to compute minimum face area of all faces.
- Add `edge_area()` to compute the area associated to an edge.
- Added circulator enumerating edges around vertex: `SurfaceMesh::edges(Verte\
x)`.
- Functions `laplace_matrix()`, `mass_matrix()`, `gradient_matrix()`, and\
 `divergence_matrix()` that compute matrix representations of those discrete\
 differential operators. Works for both triangle meshes and general polygon\
 meshes, based on the paper Bunge et al, "Polygon Laplacian made simple",\
 Eurographics 2020.
- Smoothing, parameterization, and fairing are now implemented based on\
 sparse Laplacian matrices, which generalizes to general polygon meshes.
- Add `PMP_STRICT_COMPILATION` CMake option to control treating warnings as\
 errors. Default: On.
- Add function `flip_faces()` to reverse face orientation in a mesh (#123)
- Meshes and textures can be loaded by dropping the files onto the window,\
 both in normal GLFW windows and browser windows (using emscripten). Thanks\
 to Stephan Wenninger!

### Changed

- Get rid of git submodules, vendor all third-party libraries for simplicity.\
 See also #167.
- The function `voronoi_area()` now computes the barycentric Voronoi area,\
 because this version generalizes better to polygon meshes. The mixed Voronoi\
 area (for triangle meshes) is now computed by `voronoi_area_mixed()`.
- Consistently use lowercase file names
- Rename `Timer` to `StopWatch`
- `SurfaceMeshGL` renamed to `Renderer` and de-coupled from `SurfaceMesh`
- Replace `triangle_area(Face)` by `face_area(Face)`, which now supports\
 general polygons. `surface_area(SurfaceMesh)` now also works for general\
 polygon meshes.
- Remove max angle triangulation objective leading to fold-overs.
- Breaking change: Re-design algorithms API to use a simple function\
 interface.
- Breaking change: Make helper classes `Heap`, `Quadric`, `NormalCone`,\
 `TriangleKdTree` private.
- Remove `vertex_curvature()`, `VertexCurvature`, and `angle_sum()`.
- Support CMake's `BUILD_SHARED_LIBS` option to control building shared\
 libraries
- Fix `Mat3::inverse()` to use `fabs()`
- Remove `Matrix::allFinite()`.
- Make `SurfaceMesh::bounds()` a free function `pmp::bounds()`.
- Make `SurfaceMesh::edge_length()` a free function `pmp::edge_length()`.
- Remove object properties.
- Remove support for PLY format, see 1ec912b for why.
- Remove support for XYZ and AGI point set formats.
- Move `SurfaceMesh::read()` and `SurfaceMesh::write()` to free functions\
 `pmp::read()` and `pmp::write()`.
- Move IO functionality into its own module
- Upgrade C++ standard to C++17
- Remove `PMP_ASSERT()` macro.
- Remove `get_*_property_type()` functions from `SurfaceMesh`
- Move example apps from `src/apps` to `examples`. Remove `PMP_BUILD_APPS`\
 CMake option.
- Rename `Simplification` to `Decimation`
- Rename `Factory` to `Shapes`
- Drop `Surface` prefix from algorithms
- Update glew to version 2.2.0.
- Update stb_image to version 2.28 and stb_image_write to version 1.16.
- Upgrade ImGui to version 1.89.8

## [2.0.1] 2022-08-26

### Fixed

- Fix shared library version
- Fix compilation with PMP_SCALAR_TYPE=64
- Use correct C++ standard (C++14) in public target compile options
- Fix crash in smoothing demo app

### Changed

- Upgrade ImGui to version 1.88

## [2.0.0] 2022-08-14

### Added

- Add support for texture seams in `SurfaceSimplification`, thanks to Timo\
 Menzel.
- Add quad/tri subdivision, thanks to Hendrik Meyer.
- Add `SurfaceFactory` class to generate basic shapes. Thanks to\
 [u/lycium](https://www.reddit.com/user/lycium/) on Reddit for suggesting a\
 simplification of the `icosahedron()` function.
- Add support to render colors per face
- Add support to render colors per vertex, thanks to Xiewei Zhong
- Add function to compute volume of a mesh, thanks to Xiewei Zhong
- Add post-increment iterators and make low level functions to add elements\
 public. This makes it possible to use CGAL algorithms on a PMP\
 `SurfaceMesh`. Thanks to Andreas Fabri for contributing the changes!
- Add PMP_INSTALL option to CMake.
- Add PMP_BUILD_VIS CMake option to enable / disable building the pmp_vis\
 library and its dependencies.

### Changed

- Bump C++ standard to C++14
- `TriangleKdTree`: no longer record number of tests, remove\
 `NearestNeighbor::tests` member
- Remove `SurfaceSubdivision::sqrt3()`
- Remove `PMP_SHOW` macro
- Remove `pmp::Version` class and `Version.h`
- Build shared libraries on all platforms by default (except pmp_vis , see\
 #87)
- Bump CMake minimum required version to 3.16.3
- Make `SurfaceTriangulation::Objective` a scoped enum
- Remove `SurfaceMesh::triangulate()` functions to avoid redundancy with\
 `SurfaceTriangulation`
- Improve API by reporting errors using exceptions (see #16).
- `SurfaceFeatures` now returns the number of boundary / feature edges\
 detected.
- Update Eigen to version 3.4.0
- Update GoogleTest to version 1.12.1
- Update stb_image to version 2.26 and stb_image_writer to version 1.15.
- Update GLFW to version 3.3.8
- Change CMake policy CMP0072 to "NEW" behavior preferring GLVND

### Fixed

- Fix `SurfaceMesh::get_object_propertyType()` to `get_object_property_type()`
- `SurfaceRemeshing`: Don't leak feature properties. Spotted by Pierre\
 Buyssens.
- Fixed a rare bug regarding ImGui scaling on Linux. Thanks to Jan Erik\
 Swiadek for reporting and fixing this!
- Fix crash in `SurfaceRemeshing` when dealing with low quality meshes (#90,\
 #89)
- `SurfaceMesh::bounds()` no longer includes deleted vertices. Thanks to Paul\
 Du.
- Fix crash in `SurfaceHoleFilling` when a vertex selection already exists.
- Fix bug in `SurfaceHoleFilling` leading to artifacts in the filled surface\
 patch. See #64.
- Change sign of `vec2::perp()` to correctly model CCW rotation by 90 degrees.
- Fix bug in OpenGL buffer clean-up in `SurfaceMeshGL`.

## [1.2.1] 2020-05-10

### Fixed

- Fix rendering issues around sharp edges
- Fix bug in adaptive remeshing leading to over-refinement of corner vertices.
- Fix bug in bounding box computation. Thanks a lot to Jascha Achenbach for\
 reporting this bug!

## [1.2.0] 2020-03-15

### External libraries

- Upgrade Eigen to current master version to get rid of a compile error on\
 Windows
- Upgrade ImGui to version 1.75
- Upgrade stb_image to current master version

### Added

- Add constructors using initializer lists to Matrix/Vector classes
- Add assignment from and cast from Eigen matrices and vectors
- Improved rendering of general polygons, avoiding erroneous tessellation\
 into overlapping/flipped triangles in case of non-convex polygons.
- Added support for rendering using MatCaps. Thanks to Alec Jacobson for\
 suggesting this!

### Fixed

- Fix erroneous header install path (visualization)
- Fix bug hole filling (when filling single-triangle holes). Thanks a lot to\
 Pierre Buyssens for reporting this bug!
- Fix bug when fairing a mesh w/o boundary constraints. Thanks a lot to\
 Pierre Buyssens for reporting this bug!

## [1.1.0] 2019-05-30

### Added

- Compile-time switch `PMP_SCALAR_TYPE` to choose between float/double as\
 Scalar
- Support point set rendering for surface meshes without faces
- Add hole filling based on Liepa algorithm
- Add explicit warranty and liability disclaimer

### Changed

- Breaking change: Public members in Window and TrackballViewer classes made
  private and encapsulated through access functions
- Change SurfaceSmoothing to avoid model shrinking
- Improve normal computation for polygonal faces
- Upgrade GLFW to version 3.3
- Upgrade ImGui to version 1.70
- Upgrade Eigen to version 3.3.7
- Documentation updates

### Fixed

- Fix a bug in OFF reader when loading faces with high valence
- Fix a bug SurfaceGeodesic that lead to dist(v0,v1) != dist(v1,v0). As a\
 consequence, the Novotni method has been removed from SurfaceGeodesic.

## [1.0.0] 2019-02-18

### Added

- Algorithms module
- Visualization tools
- Support for range-based for loops
- Configurable index type
- Global object properties
- Support for emscripten
- Unit test suite
- Continuous integration
- Coding standard
- Version API

### Changed

- Switched to MIT license
- Library scope handle and property types
- Enhanced IO capabilities

\
changes-type: text/markdown;variant=GFM
url: https://www.pmp-library.org/
doc-url: https://www.pmp-library.org/
src-url: https://github.com/pmp-library/pmp-library
package-url: https://github.com/build2-packaging/pmp-library/
package-email: packaging@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: gtest ^1.11.0
bootstrap-build:
\
project = libpmp-tests

using version
using config
using test
using dist

\
root-build:
\
# Suppress warnings coming from external libraries.
#
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: pmp-library/libpmp-tests-3.0.0.tar.gz
sha256sum: c2f46ca80cedfa6ea0f01f89b553a146bb4e682bd85599524e0822ad3e5deae3
:
name: libpmp-vis
version: 3.0.0
type: lib
language: c++
project: pmp-library
summary: C++ library for processing and visualizing polygon surface meshes;\
 Visualization Module
license: MIT
description:
\
# Introduction

[![build](https://github.com/pmp-library/pmp-library/workflows/build/badge.sv\
g)](https://github.com/pmp-library/pmp-library/actions?query=workflow%3Abuild)
[![Coverage Status](https://coveralls.io/repos/github/pmp-library/pmp-library\
/badge.svg?branch=master)](https://coveralls.io/github/pmp-library/pmp-librar\
y?branch=main)
[![Latest Release](https://img.shields.io/github/v/release/pmp-library/pmp-li\
brary?sort=semver)](https://github.com/pmp-library/pmp-library/releases/lates\
t)

The Polygon Mesh Processing Library is a modern C++ open-source library for\
 processing and visualizing polygon surface meshes. Its main features are:

- An efficient and easy-to-use mesh data structure
- Standard algorithms such as decimation, remeshing, subdivision, or smoothing
- Ready-to-use visualization tools
- Seamless cross-compilation to JavaScript ([demo](https://www.pmp-library.or\
g/mpview.html))

## Get Started

Clone the repository:

```sh
git clone https://github.com/pmp-library/pmp-library.git
```

Configure and build:

```sh
cd pmp-library && mkdir build && cd build && cmake .. && make
```

Run the mesh processing app:

```sh
./mpview ../data/off/bunny.off
```

Build your own tool:

```cpp
#include <pmp/surface_mesh.h>

int main(void)
{
    pmp::SurfaceMesh mesh;
    pmp::read(mesh,"input.obj");
    // .. do awesome things with your mesh
    pmp::write(mesh,"output.obj");
}
```

## Read the Docs

The [user guide](https://www.pmp-library.org/guide.html) contains all you\
 need to get started using PMP, including a [tutorial](https://www.pmp-librar\
y.org/tutorial.html) covering mesh processing basics.

## Contribute

Contributions to PMP are welcome! There are many ways you can help: Report\
 any [issues](https://github.com/pmp-library/pmp-library/issues) you find,\
 help to improve the documentation, join our [discussions](https://github.com\
/pmp-library/pmp-library/discussions) forum, or [contribute](https://www.pmp-\
library.org/contributing.html) new code.

## Acknowledge

If you are using PMP for research projects, please acknowledge its use by\
 referencing

```tex
@misc{pmp-library,
title  = {The Polygon Mesh Processing Library},
author = {Daniel Sieger and Mario Botsch},
note   = {http://www.pmp-library.org},
year   = {2019},
}
```

We acknowledge that PMP evolved from our previous work on [Surface_mesh](http\
://dx.doi.org/10.1007/978-3-642-24734-7_29) and [OpenMesh](https://pub.uni-bi\
elefeld.de/record/1961694).

## License

PMP is provided under a simple and flexible MIT-style [license](https://githu\
b.com/pmp-library/pmp-library/blob/master/LICENSE.txt) allowing for both\
 open-source and commercial usage.

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for pmp-library

This project is a [build2](https://build2.org) package repository that\
 provides access to [`pmp-library`](https://github.com/pmp-library/pmp-librar\
y), a modern C++ open-source library for processing and visualizing polygon\
 surface meshes.

[![Official](https://img.shields.io/website/https/github.com/pmp-library/pmp-\
library.svg?down_message=offline&label=Official&style=for-the-badge&up_color=\
blue&up_message=online)](https://github.com/pmp-library/pmp-library)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/p\
mp-library.svg?down_message=offline&label=build2&style=for-the-badge&up_color\
=blue&up_message=online)](https://github.com/build2-packaging/pmp-library)
[![cppget.org](https://img.shields.io/website/https/cppget.org/libpmp.svg?dow\
n_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_messa\
ge=online)](https://cppget.org/libpmp)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/li\
bpmp.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=for-\
the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/libpm\
p)

## Usage
Make sure to add the stable section of the [`cppget.org`](https://cppget.org/\
?about) repository to your project's `repositories.manifest` to be able to\
 fetch this package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/pmp-library.git

Add the respective dependency in your project's `manifest` file to make the\
 required packages available for import.
The `libpmp-vis` package requires `libpmp` package as its core module and\
 adds the visualization features to the standard mesh processing facilities.

    depends: libpmp ^3.0.0
    depends: libpmp-vis ^3.0.0

To import the respective library targets include one of the following\
 declarations in a `buildfile`.

    import pmp = libpmp%lib{pmp}
    import pmp_vis = libpmp-vis%lib{pmp-vis}

## Configuration
There are no configuration options available.

## Issues and Notes
- Naming Scheme:
    + Repository Name: Same as the upstream repository: `pmp-library`
    + Project Name: Same as the upstream repository and the project name\
 given in the upstream CMake file: `pmp-library`
    + Library Name: To be consistent with programming practices, we wanted\
 the library name to be the name of the upstream include folder: `lib{pmp}`
    + Package Name: According to the recommended build2 practices, the\
 respective library package gets the prefix `lib` and its name becomes\
 `libpmp`.
    + Similar for `lib{pmp-vis}` in package `libpmp-vis`
- For `aarch64-linux-gnu` targets using GCC the `loop_subdivision` tests of\
 the `libpmp` package fail with `terminate called after throwing an instance\
 of 'pmp::InvalidInputException'` and `what():  loop_subdivision: Not a\
 triangle mesh.`. This is an upstream issue and is probably already fixed for\
 the next version.
- The package `libpmp-vis` fails on various CI configurations due to the\
 required OpenGL-based libraries, like GLFW and GLEW.
- Library `lib{pmp}` from `libpmp` package exports `_USE_MATH_DEFINES` and\
 `NOMINMAX` macros on Windows to properly function.
- `pmp-library` supports OpenMP. Enabling OpenMP in the compile options of\
 your configuration will also compile the library with its builtin\
 parallelization.
- `pmp-library` supports 64-bit scalars and index types when the macros\
 `PMP_SCALAR_TYPE_64` and `PMP_INDEX_TYPE_64` are used for compilation (and\
 probably export as well). Currently, this is not supported in the package.
- `pmp-library` supports Emscripten. Most of the required upstream options\
 have not been added to the package so far.

## Contributing
Thanks in advance for your help and contribution to keep this package\
 up-to-date.
For now, please, file an issue on [GitHub](https://github.com/build2-packagin\
g/pmp-library/issues) for everything that is not described below.

### Recommend Updating Version
Please, file an issue on [GitHub](https://github.com/build2-packaging/pmp-lib\
rary/issues) with the new recommended version.

### Update Version by Pull Request
1. Fork the repository on [GitHub](https://github.com/build2-packaging/pmp-li\
brary) and clone it to your local machine.
2. Run `git submodule init` and `git submodule update` to get the current\
 upstream directory.
3. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
4. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
5. Update library version in `manifest` file if it has changed or add package\
 update by using `+n` for the `n`-th update.
6. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
7. Run `bdep ci` and test for errors.
8. If everything works fine, make a pull request on GitHub and write down the\
 `bdep ci` link to your CI tests.
9. After a successful pull request, we will run the appropriate commands to\
 publish a new package version.

### Update Version Directly if You Have Permissions
1. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged.
2. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
3. Update library version in `manifest` file if it has changed or add package\
 update by using `+n` for the `n`-th update.
4. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
5. Run `bdep ci` and test for errors and warnings.
6. When successful, run `bdep release --tag --push` to push new tag version\
 to repository.
7. Run `bdep publish` to publish the package to [cppget.org](https://cppget.o\
rg).

\
package-description-type: text/markdown;variant=GFM
changes:
\
# Changelog

All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0\
/).

This project aims to adhere to [Semantic Versioning](https://semver.org/spec/\
v2.0.0.html).

## Unreleased

### Added

- Add `mesh_to_matrices()` and `matrices_to_mesh()` functions to convert to\
 and from Eigen matrices.
- Add support to write binary STL files.
- Added `geodesics_heat()` for computing geodesics (based on the heat method)\
 on general polygon meshes.
- Generalize curvature computation in `curvature()` to polygon meshes.
- Add `mean_edge_length(SurfaceMesh)`.
- Add `min_face_area()` to compute minimum face area of all faces.
- Add `edge_area()` to compute the area associated to an edge.
- Added circulator enumerating edges around vertex: `SurfaceMesh::edges(Verte\
x)`.
- Functions `laplace_matrix()`, `mass_matrix()`, `gradient_matrix()`, and\
 `divergence_matrix()` that compute matrix representations of those discrete\
 differential operators. Works for both triangle meshes and general polygon\
 meshes, based on the paper Bunge et al, "Polygon Laplacian made simple",\
 Eurographics 2020.
- Smoothing, parameterization, and fairing are now implemented based on\
 sparse Laplacian matrices, which generalizes to general polygon meshes.
- Add `PMP_STRICT_COMPILATION` CMake option to control treating warnings as\
 errors. Default: On.
- Add function `flip_faces()` to reverse face orientation in a mesh (#123)
- Meshes and textures can be loaded by dropping the files onto the window,\
 both in normal GLFW windows and browser windows (using emscripten). Thanks\
 to Stephan Wenninger!

### Changed

- Get rid of git submodules, vendor all third-party libraries for simplicity.\
 See also #167.
- The function `voronoi_area()` now computes the barycentric Voronoi area,\
 because this version generalizes better to polygon meshes. The mixed Voronoi\
 area (for triangle meshes) is now computed by `voronoi_area_mixed()`.
- Consistently use lowercase file names
- Rename `Timer` to `StopWatch`
- `SurfaceMeshGL` renamed to `Renderer` and de-coupled from `SurfaceMesh`
- Replace `triangle_area(Face)` by `face_area(Face)`, which now supports\
 general polygons. `surface_area(SurfaceMesh)` now also works for general\
 polygon meshes.
- Remove max angle triangulation objective leading to fold-overs.
- Breaking change: Re-design algorithms API to use a simple function\
 interface.
- Breaking change: Make helper classes `Heap`, `Quadric`, `NormalCone`,\
 `TriangleKdTree` private.
- Remove `vertex_curvature()`, `VertexCurvature`, and `angle_sum()`.
- Support CMake's `BUILD_SHARED_LIBS` option to control building shared\
 libraries
- Fix `Mat3::inverse()` to use `fabs()`
- Remove `Matrix::allFinite()`.
- Make `SurfaceMesh::bounds()` a free function `pmp::bounds()`.
- Make `SurfaceMesh::edge_length()` a free function `pmp::edge_length()`.
- Remove object properties.
- Remove support for PLY format, see 1ec912b for why.
- Remove support for XYZ and AGI point set formats.
- Move `SurfaceMesh::read()` and `SurfaceMesh::write()` to free functions\
 `pmp::read()` and `pmp::write()`.
- Move IO functionality into its own module
- Upgrade C++ standard to C++17
- Remove `PMP_ASSERT()` macro.
- Remove `get_*_property_type()` functions from `SurfaceMesh`
- Move example apps from `src/apps` to `examples`. Remove `PMP_BUILD_APPS`\
 CMake option.
- Rename `Simplification` to `Decimation`
- Rename `Factory` to `Shapes`
- Drop `Surface` prefix from algorithms
- Update glew to version 2.2.0.
- Update stb_image to version 2.28 and stb_image_write to version 1.16.
- Upgrade ImGui to version 1.89.8

## [2.0.1] 2022-08-26

### Fixed

- Fix shared library version
- Fix compilation with PMP_SCALAR_TYPE=64
- Use correct C++ standard (C++14) in public target compile options
- Fix crash in smoothing demo app

### Changed

- Upgrade ImGui to version 1.88

## [2.0.0] 2022-08-14

### Added

- Add support for texture seams in `SurfaceSimplification`, thanks to Timo\
 Menzel.
- Add quad/tri subdivision, thanks to Hendrik Meyer.
- Add `SurfaceFactory` class to generate basic shapes. Thanks to\
 [u/lycium](https://www.reddit.com/user/lycium/) on Reddit for suggesting a\
 simplification of the `icosahedron()` function.
- Add support to render colors per face
- Add support to render colors per vertex, thanks to Xiewei Zhong
- Add function to compute volume of a mesh, thanks to Xiewei Zhong
- Add post-increment iterators and make low level functions to add elements\
 public. This makes it possible to use CGAL algorithms on a PMP\
 `SurfaceMesh`. Thanks to Andreas Fabri for contributing the changes!
- Add PMP_INSTALL option to CMake.
- Add PMP_BUILD_VIS CMake option to enable / disable building the pmp_vis\
 library and its dependencies.

### Changed

- Bump C++ standard to C++14
- `TriangleKdTree`: no longer record number of tests, remove\
 `NearestNeighbor::tests` member
- Remove `SurfaceSubdivision::sqrt3()`
- Remove `PMP_SHOW` macro
- Remove `pmp::Version` class and `Version.h`
- Build shared libraries on all platforms by default (except pmp_vis , see\
 #87)
- Bump CMake minimum required version to 3.16.3
- Make `SurfaceTriangulation::Objective` a scoped enum
- Remove `SurfaceMesh::triangulate()` functions to avoid redundancy with\
 `SurfaceTriangulation`
- Improve API by reporting errors using exceptions (see #16).
- `SurfaceFeatures` now returns the number of boundary / feature edges\
 detected.
- Update Eigen to version 3.4.0
- Update GoogleTest to version 1.12.1
- Update stb_image to version 2.26 and stb_image_writer to version 1.15.
- Update GLFW to version 3.3.8
- Change CMake policy CMP0072 to "NEW" behavior preferring GLVND

### Fixed

- Fix `SurfaceMesh::get_object_propertyType()` to `get_object_property_type()`
- `SurfaceRemeshing`: Don't leak feature properties. Spotted by Pierre\
 Buyssens.
- Fixed a rare bug regarding ImGui scaling on Linux. Thanks to Jan Erik\
 Swiadek for reporting and fixing this!
- Fix crash in `SurfaceRemeshing` when dealing with low quality meshes (#90,\
 #89)
- `SurfaceMesh::bounds()` no longer includes deleted vertices. Thanks to Paul\
 Du.
- Fix crash in `SurfaceHoleFilling` when a vertex selection already exists.
- Fix bug in `SurfaceHoleFilling` leading to artifacts in the filled surface\
 patch. See #64.
- Change sign of `vec2::perp()` to correctly model CCW rotation by 90 degrees.
- Fix bug in OpenGL buffer clean-up in `SurfaceMeshGL`.

## [1.2.1] 2020-05-10

### Fixed

- Fix rendering issues around sharp edges
- Fix bug in adaptive remeshing leading to over-refinement of corner vertices.
- Fix bug in bounding box computation. Thanks a lot to Jascha Achenbach for\
 reporting this bug!

## [1.2.0] 2020-03-15

### External libraries

- Upgrade Eigen to current master version to get rid of a compile error on\
 Windows
- Upgrade ImGui to version 1.75
- Upgrade stb_image to current master version

### Added

- Add constructors using initializer lists to Matrix/Vector classes
- Add assignment from and cast from Eigen matrices and vectors
- Improved rendering of general polygons, avoiding erroneous tessellation\
 into overlapping/flipped triangles in case of non-convex polygons.
- Added support for rendering using MatCaps. Thanks to Alec Jacobson for\
 suggesting this!

### Fixed

- Fix erroneous header install path (visualization)
- Fix bug hole filling (when filling single-triangle holes). Thanks a lot to\
 Pierre Buyssens for reporting this bug!
- Fix bug when fairing a mesh w/o boundary constraints. Thanks a lot to\
 Pierre Buyssens for reporting this bug!

## [1.1.0] 2019-05-30

### Added

- Compile-time switch `PMP_SCALAR_TYPE` to choose between float/double as\
 Scalar
- Support point set rendering for surface meshes without faces
- Add hole filling based on Liepa algorithm
- Add explicit warranty and liability disclaimer

### Changed

- Breaking change: Public members in Window and TrackballViewer classes made
  private and encapsulated through access functions
- Change SurfaceSmoothing to avoid model shrinking
- Improve normal computation for polygonal faces
- Upgrade GLFW to version 3.3
- Upgrade ImGui to version 1.70
- Upgrade Eigen to version 3.3.7
- Documentation updates

### Fixed

- Fix a bug in OFF reader when loading faces with high valence
- Fix a bug SurfaceGeodesic that lead to dist(v0,v1) != dist(v1,v0). As a\
 consequence, the Novotni method has been removed from SurfaceGeodesic.

## [1.0.0] 2019-02-18

### Added

- Algorithms module
- Visualization tools
- Support for range-based for loops
- Configurable index type
- Global object properties
- Support for emscripten
- Unit test suite
- Continuous integration
- Coding standard
- Version API

### Changed

- Switched to MIT license
- Library scope handle and property types
- Enhanced IO capabilities

\
changes-type: text/markdown;variant=GFM
url: https://www.pmp-library.org/
doc-url: https://www.pmp-library.org/
src-url: https://github.com/pmp-library/pmp-library
package-url: https://github.com/build2-packaging/pmp-library/
package-email: packaging@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: libpmp == 3.0.0
depends: stb_image ^2.28.0
depends: stb_image_write ^1.16.0
depends: glew ^2.2.0
depends: libimgui-render-opengl3 ^1.88.0
depends: libimgui-platform-glfw ^1.88.0
bootstrap-build:
\
project = libpmp-vis

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: pmp-library/libpmp-vis-3.0.0.tar.gz
sha256sum: 4a73dd45ca40dab28994cd706547b55b53f1b8281eb0f972bdf268d06e84cd0f
:
name: libpostproc
version: 7.0.2+2
language: c
project: FFmpeg
summary: Utility library to aid portable multimedia programming
license: LGPL-2.1-or-later; GNU Lesser General Public License v2.1 or later.
package-description:
\
# libpostproc - A C library

This is a `build2` package for the [`libpostproc`](https://github.com/FFmpeg/\
FFmpeg)
C library. It provides <SUMMARY-OF-FUNCTIONALITY>.


## Usage

To start using `libpostproc` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libpostproc ^7.0.2
```

Then import the library in your `buildfile`:

```
import libs = libpostproc%lib{postproc}
```


## Importable targets

This package provides the following importable targets:

```
lib{postproc}
```

The `libpostproc` library provides video postprocessing utilities.

\
package-description-type: text/markdown;variant=GFM
url: https://git.ffmpeg.org/ffmpeg.git
package-url: https://github.com/build2-packaging/build2-FFmpeg
email: libav-user@ffmpeg.org; Mailing list.
package-email: libav-user@ffmpeg.org; Mailing list.
depends: * build2 >= 0.18.0-
depends: * bpkg >= 0.18.0-
depends: * nasm ^2.16.3
depends: libavutil == 7.0.2
bootstrap-build:
\
project = libpostproc

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

c.std = 17

using c

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

if ($build.mode != 'skeleton')
  source build/common-configs.build

\
location: FFmpeg/libpostproc-7.0.2+2.tar.gz
sha256sum: 8ef973b9869c22824e66e2f791dad89e94bff40d8c03ed5815fb76dca2882822
:
name: libquill
version: 8.1.0
type: lib,binless
language: c++
project: quill
summary: Asynchronous low latency C++ logging library
license: MIT
package-description:
\
# libquill - A C++ library

This is a `build2` package for the [`Quill`](https://github.com/odygrd/quill)
C++ library. It provides high-performance asynchronous logging.


## Usage

To start using `libquill` in your project, add the following\
 [`depends`](https://build2.org/bpkg/doc/build2-package-manager-manual.xhtml#\
manifest-package-depends) value to your [`manifest`](https://build2.org/bpkg/\
doc/build2-package-manager-manual.xhtml#manifests), adjusting the version\
 constraint as appropriate:

```
depends: libquill ^8.1.0
```

Then import the library in your `buildfile`:

```
import libs = libquill%lib{quill}
```


## Importable targets

This package provides the following importable targets:

```
lib{quill}
```

### Importable targets description

* `quill` - Asynchronous low latency C++ logging library.


## Configuration variables

This package provides the following configuration variables:

```
[bool] config.libquill.no_exceptions ?= false
[bool] config.libquill.no_thread_name_support ?= false
[bool] config.libquill.x86arch ?= false
[bool] config.libquill.disable_non_prefixed_macros ?= false
```

### Configuration variables description

* `no_exceptions` - Whether to build without exception handling support.
* `no_thread_name_support` - Whether to disable features that require thread\
 name retrieval, ensuring compatibility with older Windows versions (e.g.,\
 Windows Server 2012/2016) and Android.
* `x86arch` - Whether to enable x86-specific optimizations for cache\
 coherence using _mm_prefetch, _mm_clflush, and _mm_clflushopt instructions.
* `disable_non_prefixed_macros` - Whether to disable non-prefixed `LOG_*`\
 macros, keeping only the `QUILL_LOG_*` macros to avoid conflicts with other\
 logging libraries.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/odygrd/quill
doc-url: https://quillcpp.readthedocs.io/en/v8.0.0/
src-url: https://github.com/odygrd/quill
package-url: https://github.com/build2-packaging/quill
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = libquill

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
hxx{*}: extension = h
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# Configuration variables.

# Whether to build without exception handling support.
#
config [bool] config.libquill.no_exceptions ?= false

# Whether to disable features that require thread name retrieval, ensuring
# compatibility with older Windows versions (e.g., Windows Server 2012/2016)
# and Android.
#
config [bool] config.libquill.no_thread_name_support ?= false

# Whether to enable x86-specific optimizations for cache coherence using
# _mm_prefetch, _mm_clflush, and _mm_clflushopt instructions.
#
config [bool] config.libquill.x86arch ?= false

# Whether to disable non-prefixed `LOG_*` macros, keeping only the
# `QUILL_LOG_*` macros to avoid conflicts with other logging libraries.
#
config [bool] config.libquill.disable_non_prefixed_macros ?= false

\
location: quill/libquill-8.1.0.tar.gz
sha256sum: 88c0d67e611e2a93467a370f22ed80191b51f9180cefd5e0a390e07c47be9882
:
name: libquill
version: 9.0.3
type: lib,binless
language: c++
project: quill
summary: Asynchronous low latency C++ logging library
license: MIT
package-description:
\
# libquill - A C++ library

This is a `build2` package for the [`Quill`](https://github.com/odygrd/quill)
C++ library. It provides high-performance asynchronous logging.


## Usage

To start using `libquill` in your project, add the following\
 [`depends`](https://build2.org/bpkg/doc/build2-package-manager-manual.xhtml#\
manifest-package-depends) value to your [`manifest`](https://build2.org/bpkg/\
doc/build2-package-manager-manual.xhtml#manifests), adjusting the version\
 constraint as appropriate:

```
depends: libquill ^9.0.3
```

Then import the library in your `buildfile`:

```
import libs = libquill%lib{quill}
```


## Importable targets

This package provides the following importable targets:

```
lib{quill}
```

### Importable targets description

* `quill` - Asynchronous low latency C++ logging library.


## Configuration variables

This package provides the following configuration variables:

```
[bool] config.libquill.no_exceptions ?= false
[bool] config.libquill.no_thread_name_support ?= false
[bool] config.libquill.x86arch ?= false
[bool] config.libquill.disable_non_prefixed_macros ?= false
[bool] config.libquill.disable_function_name ?= false
```

### Configuration variables description

* `no_exceptions` - Whether to build without exception handling support.
* `no_thread_name_support` - Whether to disable features that require thread\
 name retrieval, ensuring compatibility with older Windows versions (e.g.,\
 Windows Server 2012/2016) and Android.
* `x86arch` - Whether to enable x86-specific optimizations for cache\
 coherence using _mm_prefetch, _mm_clflush, and _mm_clflushopt instructions.
* `disable_non_prefixed_macros` - Whether to disable non-prefixed `LOG_*`\
 macros, keeping only the `QUILL_LOG_*` macros to avoid conflicts with other\
 logging libraries.
* `disable_function_name` - Whether to disable the use of __FUNCTION__ in\
 `LOG_*` macros when the function name is not needed.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/odygrd/quill
doc-url: https://quillcpp.readthedocs.io/en/v9.0.0/
src-url: https://github.com/odygrd/quill
package-url: https://github.com/build2-packaging/quill
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = libquill

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
hxx{*}: extension = h
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# Configuration variables.
#
config [bool] config.libquill.no_exceptions ?= false
config [bool] config.libquill.no_thread_name_support ?= false
config [bool] config.libquill.x86arch ?= false
config [bool] config.libquill.disable_non_prefixed_macros ?= false
config [bool] config.libquill.disable_function_name ?= false

\
location: quill/libquill-9.0.3.tar.gz
sha256sum: 4c2aa8f01a3a029d192a7a0ef742605b0d04679a18572391c19b648ee4119ef0
:
name: libquill
version: 10.0.0
type: lib,binless
language: c++
project: quill
summary: Asynchronous low latency C++ logging library
license: MIT
package-description:
\
# libquill - A C++ library

This is a `build2` package for the [`Quill`](https://github.com/odygrd/quill)
C++ library. It provides high-performance asynchronous logging.


## Usage

To start using `libquill` in your project, add the following\
 [`depends`](https://build2.org/bpkg/doc/build2-package-manager-manual.xhtml#\
manifest-package-depends) value to your [`manifest`](https://build2.org/bpkg/\
doc/build2-package-manager-manual.xhtml#manifests), adjusting the version\
 constraint as appropriate:

```
depends: libquill ^10.0.0
```

Then import the library in your `buildfile`:

```
import libs = libquill%lib{quill}
```


## Importable targets

This package provides the following importable targets:

```
lib{quill}
```

### Importable targets description

* `quill` - Asynchronous low latency C++ logging library.


## Configuration variables

This package provides the following configuration variables:

```
[bool] config.libquill.no_exceptions ?= false
[bool] config.libquill.no_thread_name_support ?= false
[bool] config.libquill.x86arch ?= false
[bool] config.libquill.disable_non_prefixed_macros ?= false
[bool] config.libquill.disable_function_name ?= false
```

### Configuration variables description

* `no_exceptions` - Whether to build without exception handling support.
* `no_thread_name_support` - Whether to disable features that require thread\
 name retrieval, ensuring compatibility with older Windows versions (e.g.,\
 Windows Server 2012/2016) and Android.
* `x86arch` - Whether to enable x86-specific optimizations for cache\
 coherence using _mm_prefetch, _mm_clflush, and _mm_clflushopt instructions.
* `disable_non_prefixed_macros` - Whether to disable non-prefixed `LOG_*`\
 macros, keeping only the `QUILL_LOG_*` macros to avoid conflicts with other\
 logging libraries.
* `disable_function_name` - Whether to disable the use of __FUNCTION__ in\
 `LOG_*` macros when the function name is not needed.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/odygrd/quill
doc-url: https://quillcpp.readthedocs.io/en/v9.0.0/
src-url: https://github.com/odygrd/quill
package-url: https://github.com/build2-packaging/quill
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = libquill

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
hxx{*}: extension = h
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# Configuration variables.
#
config [bool] config.libquill.no_exceptions ?= false
config [bool] config.libquill.no_thread_name_support ?= false
config [bool] config.libquill.x86arch ?= false
config [bool] config.libquill.disable_non_prefixed_macros ?= false
config [bool] config.libquill.disable_function_name ?= false

\
location: quill/libquill-10.0.0.tar.gz
sha256sum: 4cf348f88f72078e452c06e156214fe4d8a33f01e8607593eb9c5b355ba1eb23
:
name: libquill
version: 10.1.0
type: lib,binless
language: c++
project: quill
summary: Asynchronous low latency C++ logging library
license: MIT
package-description:
\
# libquill - A C++ library

This is a `build2` package for the [`Quill`](https://github.com/odygrd/quill)
C++ library. It provides high-performance asynchronous logging.


## Usage

To start using `libquill` in your project, add the following\
 [`depends`](https://build2.org/bpkg/doc/build2-package-manager-manual.xhtml#\
manifest-package-depends) value to your [`manifest`](https://build2.org/bpkg/\
doc/build2-package-manager-manual.xhtml#manifests), adjusting the version\
 constraint as appropriate:

```
depends: libquill ^10.1.0
```

Then import the library in your `buildfile`:

```
import libs = libquill%lib{quill}
```


## Importable targets

This package provides the following importable targets:

```
lib{quill}
```

### Importable targets description

* `quill` - Asynchronous low latency C++ logging library.


## Configuration variables

This package provides the following configuration variables:

```
[bool] config.libquill.no_exceptions ?= false
[bool] config.libquill.no_thread_name_support ?= false
[bool] config.libquill.x86arch ?= false
[bool] config.libquill.disable_non_prefixed_macros ?= false
[bool] config.libquill.disable_function_name ?= false
```

### Configuration variables description

* `no_exceptions` - Whether to build without exception handling support.
* `no_thread_name_support` - Whether to disable features that require thread\
 name retrieval, ensuring compatibility with older Windows versions (e.g.,\
 Windows Server 2012/2016) and Android.
* `x86arch` - Whether to enable x86-specific optimizations for cache\
 coherence using _mm_prefetch, _mm_clflush, and _mm_clflushopt instructions.
* `disable_non_prefixed_macros` - Whether to disable non-prefixed `LOG_*`\
 macros, keeping only the `QUILL_LOG_*` macros to avoid conflicts with other\
 logging libraries.
* `disable_function_name` - Whether to disable the use of __FUNCTION__ in\
 `LOG_*` macros when the function name is not needed.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/odygrd/quill
doc-url: https://quillcpp.readthedocs.io/en/latest/
src-url: https://github.com/odygrd/quill
package-url: https://github.com/build2-packaging/quill
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = libquill

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
hxx{*}: extension = h
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# Configuration variables.
#
config [bool] config.libquill.no_exceptions ?= false
config [bool] config.libquill.no_thread_name_support ?= false
config [bool] config.libquill.x86arch ?= false
config [bool] config.libquill.disable_non_prefixed_macros ?= false
config [bool] config.libquill.disable_function_name ?= false

\
location: quill/libquill-10.1.0.tar.gz
sha256sum: f03b00b3871b75bfeaa5015cb62aba6abb8e4dba569d358760f6a267c609685f
:
name: libspimpl
version: 1.2.0
type: lib,binless
language: c++
summary: PIMPLs without having to implement any special member functions
license: BSL-1.0; Boost Software License 1.0.
description:
\
# Rule of Zero PIMPL

A single-header C++ library for PIMPLs without having to implement any\
 special member functions as described in [oliora's blog](http://oliora.githu\
b.io/2015/12/29/pimpl-and-rule-of-zero.html).

## Code Samples

Header File:

```cpp
#include "spimpl.h"

class Copyable {
public:
  Copyable(int x);

  int x();

  // All five special members are compiler-generated.

private:
  class Impl;

  // Movable and copyable Smart PIMPL
  spimpl::impl_ptr<Impl> impl_;
};
```

Implementation File:

```cpp
Copyable::Copyable(int x)
: impl_(spimpl::make_impl<Impl>(x)) {}

struct Copyable::Impl {
  Impl(int x): x(x) {}

  int x;
};

int Copyable::x() {
  return impl_->x;
}
```

## GDB Support

For easier debugging with GDB you might want to add the following to your
`.gdbinit` file. This makes `*impl_` and `impl->` behave more naturally in
GDB.

```py
python
import gdb
import gdb.xmethod
import libstdcxx.v6.xmethods
from libstdcxx.v6 import register_libstdcxx_printers

register_libstdcxx_printers (None)

class SpimplGetWorker(gdb.xmethod.XMethodWorker):
    def __init__(self, elem_type): self.elem_type = elem_type
    def get_arg_types(self): return None
    def get_result_type(self, obj): return self.elem_type.pointer()
    def __call__(self, obj):
        ptr = obj['ptr_']
        eval_string = '(*(%s*)(%s)).get()'%(ptr.type, ptr.address)
        return gdb.parse_and_eval(eval_string)

class SpimplDerefWorker(SpimplGetWorker):
    def __init__(self, elem_type): SpimplGetWorker.__init__(self, elem_type)
    def get_arg_types(self): return None
    def get_result_type(self, obj): return self.elem_type
    def __call__(self, obj):
        return SpimplGetWorker.__call__(self, obj).dereference()

class SpimplMethodsMatcher(gdb.xmethod.XMethodMatcher):
    def __init__(self):
        gdb.xmethod.XMethodMatcher.__init__(self, 'spimpl')
        self._method_dict = {
            'operator->': libstdcxx.v6.xmethods.LibStdCxxXMethod('operator->'\
, SpimplGetWorker),
            'operator*': libstdcxx.v6.xmethods.LibStdCxxXMethod('operator*',\
 SpimplDerefWorker),
        }
        self.methods = [self._method_dict[m] for m in self._method_dict]

    def match(self, class_type, method_name):
        if not re.match('^spimpl::impl_ptr<.*>$', class_type.tag):
            return None
        method = self._method_dict.get(method_name)
        if method is None or not method.enabled:
            return None
        return method.worker_class(class_type.template_argument(0))

gdb.xmethod.register_xmethod_matcher(None, SpimplMethodsMatcher())
end
```

\
description-type: text/markdown;variant=GFM
package-description:
\
# libspimpl - Rule of Zero PIMPL

This is a `build2` package for the [`spimpl`](https://github.com/oliora/sampl\
es/)
C++ header library. It provides a single-header C++ library for PIMPLs\
 without having to implement any special member functions as described in\
 [`oliora's blog`](https://oliora.github.io/2015/12/29/pimpl-and-rule-of-zero\
.html).

## Usage

To start using `libspimpl` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libspimpl ^1.2.0
```

Then import the library in your `buildfile`:

```
import libs = libspimpl%lib{spimpl}
```


\
package-description-type: text/markdown;variant=GFM
url: https://github.com/oliora/samples/
package-url: https://github.com/build2-packaging/libspimpl
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
bootstrap-build:
\
project = libspimpl

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: libspimpl/libspimpl-1.2.0.tar.gz
sha256sum: c623c935bdf1ef92bed3ea860af8ea7cb4cfb472afa3d5bcd0d242a1e8cb4494
:
name: libsqlite3
version: 3.51.3
project: sqlite
summary: SQL database engine as an in-process C library
license: blessing; SQLite Blessing.
topics: C, SQLite, SQL, relational database
description:
\
SQLite is a C library that implements an in-process SQL database engine. A
complete database is stored in a single file on disk. The code for SQLite is
in the public domain. For more information see:

https://sqlite.org/

This package contains the original SQLite library source code overlaid with
the build2-based build system and packaged for the build2 package manager
(bpkg).

See the INSTALL file for the prerequisites and installation instructions.

Send questions, bug reports, or any other feedback about the library itself to
the SQLite mailing lists. Send build system and packaging-related feedback to
the packaging@build2.org mailing list (see https://lists.build2.org for
posting guidelines, etc).

The packaging of SQLite for build2 is tracked in a Git repository at:

https://git.build2.org/cgit/packaging/sqlite/

\
description-type: text/plain
url: https://sqlite.org/
doc-url: https://sqlite.org/c3ref/intro.html
src-url: https://git.build2.org/cgit/packaging/sqlite/sqlite/tree/libsqlite3/
package-url: https://git.build2.org/cgit/packaging/sqlite/
email: sqlite-users@mailinglists.sqlite.org; Mailing list.
package-email: packaging@build2.org; Mailing list.
build-error-email: builds@build2.org
depends: * build2 >= 0.15.0
depends: * bpkg >= 0.15.0
builds: all
bootstrap-build:
\
# file      : build/bootstrap.build
# copyright : not copyrighted - public domain

project = libsqlite3

# SQLite releases usually have 3-component versions but once in a while they
# will make a 4-component release for what appears to be important bug fixes
# only. So instead of dragging the fourth component around (and confusing a
# lot of people in the process) we will always have three components and will
# handle an occasional bugfix release with a revision.
#
# See also: https://www.sqlite.org/versionnumbers.html
#
# The SQLite documentation says that as long as the major version stays the
# same, then it is backwards-compatible. And since we have the major version
# already embedded into the library name, it doesn't make much sense to repeat
# it.
#
# Note, however, that the binary-compatible API doesn't mean all the builds of
# SQLite are binary-compatible since they can be built with different sets of
# enabled/disabled functionality. In fact, one easy way to break backwards-
# compatibility is to disable some feature that was previously enabled.
#
# So what we seem to need is not an ABI version but an ABI id that identifies
# a specific set of features. And this will not be easy/possible if we want
# to use platform-native versioning (e.g., libsqlite3.so.<num> on Linux). The
# only way to make this work would be to "reserve" some range for build2-based
# builds (e.g., 1000-2000 so that we will have libsqlite3.so.1000; that sure
# looks weird).
#
# Another alternative is to use platform-neutral versioning by embedding the
# id into the library name, similar to '3'. This is probably better since
# there is no "newer" semantics here. While ideally we should use something
# like -build2-0 (i.e., "build2 build, id 0"), that will look rather ugly. So
# we will use just the number but start with -1 in order not to clash with .0
# used by the autotools build (which becomes -0 on, e.g., Windows; I don't
# believe it will ever be incremented though).
#
abi_major = 1

using version
using config
using dist
using test
using install

\
root-build:
\
# file      : build/root.build
# copyright : not copyrighted - public domain

using c

h{*}: extension = h
c{*}: extension = c

if ($c.target.system == 'win32-msvc')
  c.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS

if ($c.class == 'msvc')
  c.coptions += /wd4251 /wd4275 /wd4800

\
location: sqlite/libsqlite3-3.51.3.tar.gz
sha256sum: 259ba9581a2e5817700b61d2f6ae16fa184c7938782d2ca26615eebbc746073d
:
name: libswresample
version: 7.0.2+2
language: c
project: FFmpeg
summary: Utility library to aid portable multimedia programming
license: LGPL-2.1-or-later; GNU Lesser General Public License v2.1 or later.
description:
\
Libswresample Documentation
***************************


1 Description
2 See Also
3 Authors
1 Description
*************

The libswresample library performs highly optimized audio resampling,
rematrixing and sample format conversion operations.

   Specifically, this library performs the following conversions:

   • _Resampling_: is the process of changing the audio rate, for
     example from a high sample rate of 44100Hz to 8000Hz.  Audio
     conversion from high to low sample rate is a lossy process.
     Several resampling options and algorithms are available.

   • _Format conversion_: is the process of converting the type of
     samples, for example from 16-bit signed samples to unsigned 8-bit
     or float samples.  It also handles packing conversion, when passing
     from packed layout (all samples belonging to distinct channels
     interleaved in the same buffer), to planar layout (all samples
     belonging to the same channel stored in a dedicated buffer or
     "plane").

   • _Rematrixing_: is the process of changing the channel layout, for
     example from stereo to mono.  When the input channels cannot be
     mapped to the output streams, the process is lossy, since it
     involves different gain factors and mixing.

   Various other audio conversions (e.g.  stretching and padding) are
enabled through dedicated options.

2 See Also
**********

ffmpeg(1), ffplay(1), ffprobe(1), ffmpeg-resampler(1), libavutil(3)

3 Authors
*********

The FFmpeg developers.

   For details about the authorship, see the Git history of the project
(https://git.ffmpeg.org/ffmpeg), e.g.  by typing the command ‘git log’
in the FFmpeg source directory, or browsing the online repository at
<https://git.ffmpeg.org/ffmpeg>.

   Maintainers for the specific components are listed in the file
‘MAINTAINERS’ in the source code tree.


\
description-type: text/plain
package-description:
\
# libswresample - A C library

This is a `build2` package for the [`libswresample`](https://github.com/FFmpe\
g/FFmpeg)
C library. It provides highly optimized audio resampling,
rematrixing and sample format conversion operations.


## Usage

To start using `libswresample` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libswresample ^7.0.2
```

Then import the library in your `buildfile`:

```
import libs = libswresample%lib{swresample}
```


## Importable targets

This package provides the following importable targets:

```
lib{swresample}
```

The `libswresample` library performs highly optimized audio resampling,
rematrixing and sample format conversion operations.

\
package-description-type: text/markdown;variant=GFM
url: https://git.ffmpeg.org/ffmpeg.git
package-url: https://github.com/build2-packaging/build2-FFmpeg
email: libav-user@ffmpeg.org; Mailing list.
package-email: libav-user@ffmpeg.org; Mailing list.
depends: * build2 >= 0.18.0-
depends: * bpkg >= 0.18.0-
depends: * nasm ^2.16.3
depends: libavutil == 7.0.2
depends: libswscale == 7.0.2
build-include: **/x86_64**
build-exclude: **; Only x86_64 currently supported.
bootstrap-build:
\
project = libswresample

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

c.std = 17

using c
using c.as-cpp
using c.predefs

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

if ($build.mode != 'skeleton')
  source build/common-configs.build

\
location: FFmpeg/libswresample-7.0.2+2.tar.gz
sha256sum: f4b595f7c429b4440d0c5a6aede465fa3daeafc0d44f0f9641c00808180ea461
:
name: libswscale
version: 7.0.2+2
language: c
project: FFmpeg
summary: Utility library to aid portable multimedia programming
license: LGPL-2.1-or-later; GNU Lesser General Public License v2.1 or later.
description:
\
Libswscale Documentation
************************


1 Description
2 See Also
3 Authors
1 Description
*************

The libswscale library performs highly optimized image scaling and
colorspace and pixel format conversion operations.

   Specifically, this library performs the following conversions:

   • _Rescaling_: is the process of changing the video size.  Several
     rescaling options and algorithms are available.  This is usually a
     lossy process.

   • _Pixel format conversion_: is the process of converting the image
     format and colorspace of the image, for example from planar YUV420P
     to RGB24 packed.  It also handles packing conversion, that is
     converts from packed layout (all pixels belonging to distinct
     planes interleaved in the same buffer), to planar layout (all
     samples belonging to the same plane stored in a dedicated buffer or
     "plane").

     This is usually a lossy process in case the source and destination
     colorspaces differ.

2 See Also
**********

ffmpeg(1), ffplay(1), ffprobe(1), ffmpeg-scaler(1), libavutil(3)

3 Authors
*********

The FFmpeg developers.

   For details about the authorship, see the Git history of the project
(https://git.ffmpeg.org/ffmpeg), e.g.  by typing the command ‘git log’
in the FFmpeg source directory, or browsing the online repository at
<https://git.ffmpeg.org/ffmpeg>.

   Maintainers for the specific components are listed in the file
‘MAINTAINERS’ in the source code tree.


\
description-type: text/plain
package-description:
\
# libswscale - A C library

This is a `build2` package for the [`libswscale`](https://github.com/FFmpeg/F\
Fmpeg)
C library. It provides highly optimized image scaling and
colorspace and pixel format conversion operations.


## Usage

To start using `libswscale` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libswscale ^7.0.2
```

Then import the library in your `buildfile`:

```
import libs = libswscale%lib{swscale}
```


## Importable targets

This package provides the following importable targets:

```
lib{swscale}
```

The `libswscale `library performs highly optimized image scaling and
colorspace and pixel format conversion operations.

\
package-description-type: text/markdown;variant=GFM
url: https://git.ffmpeg.org/ffmpeg.git
package-url: https://github.com/build2-packaging/build2-FFmpeg
email: libav-user@ffmpeg.org; Mailing list.
package-email: libav-user@ffmpeg.org; Mailing list.
depends: * build2 >= 0.18.0-
depends: * bpkg >= 0.18.0-
depends: * nasm ^2.16.3
depends: libavutil == 7.0.2
build-include: **/x86_64**
build-exclude: **; Only x86_64 currently supported.
bootstrap-build:
\
project = libswscale

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

c.std = 17

using c
using c.as-cpp
using c.predefs

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

if ($build.mode != 'skeleton')
  source build/common-configs.build

\
location: FFmpeg/libswscale-7.0.2+2.tar.gz
sha256sum: b62eb124344b59ee9314aa1b0686aaadcebe3024aef340f3a9070cf7b8b49a03
:
name: libtaskflow
version: 3.10.0+1
type: lib,binless
language: c++
project: taskflow
summary: A General-purpose Task-parallel Programming System
license: MIT; MIT License.
description:
\
# Taskflow <img align="right" width="10%" src="image/taskflow_logo.png">

<!--[![Linux Build Status](https://travis-ci.com/taskflow/taskflow.svg?branch\
=master)](https://travis-ci.com/taskflow/taskflow)-->
[![Ubuntu](https://github.com/taskflow/taskflow/workflows/Ubuntu/badge.svg)](\
https://github.com/taskflow/taskflow/actions?query=workflow%3AUbuntu)
[![macOS](https://github.com/taskflow/taskflow/workflows/macOS/badge.svg)](ht\
tps://github.com/taskflow/taskflow/actions?query=workflow%3AmacOS)
[![Windows](https://github.com/taskflow/taskflow/workflows/Windows/badge.svg)\
](https://github.com/taskflow/taskflow/actions?query=workflow%3AWindows)
[![Wiki](image/api-doc.svg)][documentation]
[![TFProf](image/tfprof.svg)](https://taskflow.github.io/tfprof/)
[![Cite](image/cite-tpds.svg)][TPDS22]

Taskflow helps you quickly write parallel and heterogeneous task programs in\
 modern C++

# Why Taskflow?

Taskflow is faster, more expressive, and easier for drop-in integration
than many of existing task programming frameworks
in handling complex parallel workloads.

![](image/performance.png)

Taskflow lets you quickly implement task decomposition strategies
that incorporate both regular and irregular compute patterns,
together with an efficient *work-stealing* scheduler to optimize your\
 multithreaded performance.

| [Static Tasking](#start-your-first-taskflow-program) | [Subflow\
 Tasking](#create-a-subflow-graph) |
| :------------: | :-------------: |
| ![](image/static_graph.svg) | <img align="right" src="image/dynamic_graph.s\
vg" width="100%"> |

Taskflow supports conditional tasking for you to make rapid control-flow\
 decisions
across dependent tasks to implement cycles and conditions that were otherwise\
 difficult to do
with existing tools.

| [Conditional Tasking](#integrate-control-flow-to-a-task-graph) |
| :-----------------: |
| ![](image/condition.svg) |

Taskflow is composable. You can create large parallel graphs through
composition of modular and reusable blocks that are easier to optimize
at an individual scope.

| [Taskflow Composition](#compose-task-graphs) |
| :---------------: |
|![](image/framework.svg)|

Taskflow supports heterogeneous tasking for you to
accelerate a wide range of scientific computing applications
by harnessing the power of CPU-GPU collaborative computing.

| [Concurrent CPU-GPU Tasking](#offload-a-task-to-a-gpu) |
| :-----------------: |
| ![](image/cudaflow.svg) |


Taskflow provides visualization and tooling needed for profiling Taskflow\
 programs.

| [Taskflow Profiler](https://taskflow.github.io/tfprof) |
| :-----------------: |
| ![](image/tfprof.png) |

We are committed to support trustworthy developments for both academic and\
 industrial research projects
in parallel computing. Check out [Who is Using Taskflow](https://taskflow.git\
hub.io/#tag_users) and what our users say:

+ *"Taskflow is the cleanest Task API I've ever seen." [Damien Hocking\
 @Corelium Inc](http://coreliuminc.com)*
+ *"Taskflow has a very simple and elegant tasking interface. The performance\
 also scales very well." [Glen Fraser][totalgee]*
+ *"Taskflow lets me handle parallel processing in a smart way." [Hayabusa\
 @Learning](https://cpp-learning.com/cpp-taskflow/)*
+ *"Taskflow improves the throughput of our graph engine in just a few hours\
 of coding." [Jean-Michaël @KDAB](https://ossia.io/)*
+ *"Best poster award for open-source parallel programming library." [Cpp\
 Conference 2018][Cpp Conference 2018]*
+ *"Second Prize of Open-source Software Competition." [ACM Multimedia\
 Conference 2019](https://tsung-wei-huang.github.io/img/mm19-ossc-award.jpg)*

See a quick [presentation](https://taskflow.github.io/) and
visit the [documentation][documentation] to learn more about Taskflow.
Technical details can be referred to our [IEEE TPDS paper][TPDS22].

# Start Your First Taskflow Program

The following program (`simple.cpp`) creates four tasks 
`A`, `B`, `C`, and `D`, where `A` runs before `B` and `C`, and `D`
runs after `B` and `C`.
When `A` finishes, `B` and `C` can run in parallel.
Try it live on [Compiler Explorer (godbolt)](https://godbolt.org/z/j8hx3xnnx)!



```cpp
#include <taskflow/taskflow.hpp>  // Taskflow is header-only

int main(){
  
  tf::Executor executor;
  tf::Taskflow taskflow;

  auto [A, B, C, D] = taskflow.emplace(  // create four tasks
    [] () { std::cout << "TaskA\n"; },
    [] () { std::cout << "TaskB\n"; },
    [] () { std::cout << "TaskC\n"; },
    [] () { std::cout << "TaskD\n"; } 
  );                                  
                                      
  A.precede(B, C);  // A runs before B and C
  D.succeed(B, C);  // D runs after  B and C
                                      
  executor.run(taskflow).wait(); 

  return 0;
}
```

Taskflow is *header-only* and there is no wrangle with installation.
To compile the program, clone the Taskflow project and 
tell the compiler to include the [headers](./taskflow/).

```bash
~$ git clone https://github.com/taskflow/taskflow.git  # clone it only once
~$ g++ -std=c++20 examples/simple.cpp -I. -O2 -pthread -o simple
~$ ./simple
TaskA
TaskC 
TaskB 
TaskD
```

# Visualize Your First Taskflow Program

Taskflow comes with a built-in profiler, 
[TFProf](https://taskflow.github.io/tfprof/), 
for you to profile and visualize taskflow programs
in an easy-to-use web-based interface.

![](doxygen/images/tfprof.png)

```bash
# run the program with the environment variable TF_ENABLE_PROFILER enabled
~$ TF_ENABLE_PROFILER=simple.json ./simple
~$ cat simple.json
[
{"executor":"0","data":[{"worker":0,"level":0,"data":[{"span":[172,186],"name\
":"0_0","type":"static"},{"span":[187,189],"name":"0_1","type":"static"}]},{"\
worker":2,"level":0,"data":[{"span":[93,164],"name":"2_0","type":"static"},{"\
span":[170,179],"name":"2_1","type":"static"}]}]}
]
# paste the profiling json data to https://taskflow.github.io/tfprof/
```

In addition to execution diagram, you can dump the graph to a DOT format 
and visualize it using a number of free [GraphViz][GraphViz] tools.

```
// dump the taskflow graph to a DOT format through std::cout
taskflow.dump(std::cout); 
```

<p align="center"><img src="doxygen/images/simple.svg"></p>

# Express Task Graph Parallelism

Taskflow empowers users with both static and dynamic task graph constructions
to express end-to-end parallelism in a task graph that
embeds in-graph control flow.

1. [Create a Subflow Graph](#create-a-subflow-graph)
2. [Integrate Control Flow to a Task Graph](#integrate-control-flow-to-a-task\
-graph)
3. [Offload a Task to a GPU](#offload-a-task-to-a-gpu)
4. [Compose Task Graphs](#compose-task-graphs)
5. [Launch Asynchronous Tasks](#launch-asynchronous-tasks)
6. [Execute a Taskflow](#execute-a-taskflow)
7. [Leverage Standard Parallel Algorithms](#leverage-standard-parallel-algori\
thms)

## Create a Subflow Graph

Taskflow supports *dynamic tasking* for you to create a subflow
graph from the execution of a task to perform dynamic parallelism.
The following program spawns a task dependency graph parented at task `B`.

```cpp
tf::Task A = taskflow.emplace([](){}).name("A");  
tf::Task C = taskflow.emplace([](){}).name("C");  
tf::Task D = taskflow.emplace([](){}).name("D");  

tf::Task B = taskflow.emplace([] (tf::Subflow& subflow) { 
  tf::Task B1 = subflow.emplace([](){}).name("B1");  
  tf::Task B2 = subflow.emplace([](){}).name("B2");  
  tf::Task B3 = subflow.emplace([](){}).name("B3");  
  B3.succeed(B1, B2);  // B3 runs after B1 and B2
}).name("B");

A.precede(B, C);  // A runs before B and C
D.succeed(B, C);  // D runs after  B and C
```

<p align="center"><img src="doxygen/images/subflow_join.svg"></p>

## Integrate Control Flow to a Task Graph 

Taskflow supports *conditional tasking* for you to make rapid 
control-flow decisions across dependent tasks to implement cycles 
and conditions in an *end-to-end* task graph.

```cpp
tf::Task init = taskflow.emplace([](){}).name("init");
tf::Task stop = taskflow.emplace([](){}).name("stop");

// creates a condition task that returns a random binary
tf::Task cond = taskflow.emplace(
  [](){ return std::rand() % 2; }
).name("cond");

init.precede(cond);

// creates a feedback loop {0: cond, 1: stop}
cond.precede(cond, stop);
```

<p align="center"><img src="doxygen/images/conditional-tasking-1.svg"></p>


## Offload a Task to a GPU

Taskflow supports GPU tasking for you to accelerate a wide range of\
 scientific computing applications by harnessing the power of CPU-GPU\
 collaborative computing using Nvidia CUDA Graph.

```cpp
__global__ void saxpy(size_t N, float alpha, float* dx, float* dy) {
  int i = blockIdx.x*blockDim.x + threadIdx.x;
  if (i < n) {
    y[i] = a*x[i] + y[i];
  }
}
  
// create a CUDA Graph task
tf::Task cudaflow = taskflow.emplace([&]() {
  tf::cudaGraph cg;
  tf::cudaTask h2d_x = cg.copy(dx, hx.data(), N);
  tf::cudaTask h2d_y = cg.copy(dy, hy.data(), N);
  tf::cudaTask d2h_x = cg.copy(hx.data(), dx, N);
  tf::cudaTask d2h_y = cg.copy(hy.data(), dy, N);
  tf::cudaTask saxpy = cg.kernel((N+255)/256, 256, 0, saxpy, N, 2.0f, dx, dy);
  saxpy.succeed(h2d_x, h2d_y)
       .precede(d2h_x, d2h_y);
  
  // instantiate an executable CUDA graph and run it through a stream
  tf::cudaGraphExec exec(cg);
  tf::cudaStream stream;
  stream.run(exec).synchronize();
}).name("CUDA Graph Task");
```

<p align="center"><img src="doxygen/images/saxpy_1_cudaflow.svg"></p>

## Compose Task Graphs

Taskflow is composable. 
You can create large parallel graphs through composition of modular 
and reusable blocks that are easier to optimize at an individual scope.

```cpp
tf::Taskflow f1, f2;

// create taskflow f1 of two tasks
tf::Task f1A = f1.emplace([]() { std::cout << "Task f1A\n"; })
                 .name("f1A");
tf::Task f1B = f1.emplace([]() { std::cout << "Task f1B\n"; })
                 .name("f1B");

// create taskflow f2 with one module task composed of f1
tf::Task f2A = f2.emplace([]() { std::cout << "Task f2A\n"; })
                 .name("f2A");
tf::Task f2B = f2.emplace([]() { std::cout << "Task f2B\n"; })
                 .name("f2B");
tf::Task f2C = f2.emplace([]() { std::cout << "Task f2C\n"; })
                 .name("f2C");

tf::Task f1_module_task = f2.composed_of(f1)
                            .name("module");

f1_module_task.succeed(f2A, f2B)
              .precede(f2C);
```

<p align="center"><img src="doxygen/images/composition.svg"></p>

## Launch Asynchronous Tasks

Taskflow supports *asynchronous* tasking.
You can launch tasks asynchronously to dynamically explore task graph\
 parallelism.

```cpp
tf::Executor executor;

// create asynchronous tasks directly from an executor
std::future<int> future = executor.async([](){ 
  std::cout << "async task returns 1\n";
  return 1;
}); 
executor.silent_async([](){ std::cout << "async task does not return\n"; });

// create asynchronous tasks with dynamic dependencies
tf::AsyncTask A = executor.silent_dependent_async([](){ printf("A\n"); });
tf::AsyncTask B = executor.silent_dependent_async([](){ printf("B\n"); }, A);
tf::AsyncTask C = executor.silent_dependent_async([](){ printf("C\n"); }, A);
tf::AsyncTask D = executor.silent_dependent_async([](){ printf("D\n"); }, B,\
 C);

executor.wait_for_all();
```

## Execute a Taskflow

The executor provides several *thread-safe* methods to run a taskflow. 
You can run a taskflow once, multiple times, or until a stopping criteria is\
 met. 
These methods are non-blocking with a `tf::Future<void>` return 
to let you query the execution status. 

```cpp
// runs the taskflow once
tf::Future<void> run_once = executor.run(taskflow); 

// wait on this run to finish
run_once.get();

// run the taskflow four times
executor.run_n(taskflow, 4);

// runs the taskflow five times
executor.run_until(taskflow, [counter=5](){ return --counter == 0; });

// block the executor until all submitted taskflows complete
executor.wait_for_all();
```

## Leverage Standard Parallel Algorithms

Taskflow defines algorithms for you to quickly express common parallel
patterns using standard C++ syntaxes, 
such as parallel iterations, parallel reductions, and parallel sort.

```cpp
tf::Task task1 = taskflow.for_each( // assign each element to 100 in parallel
  first, last, [] (auto& i) { i = 100; }    
);
tf::Task task2 = taskflow.reduce(   // reduce a range of items in parallel
  first, last, init, [] (auto a, auto b) { return a + b; }
);
tf::Task task3 = taskflow.sort(     // sort a range of items in parallel
  first, last, [] (auto a, auto b) { return a < b; }
);
```

Additionally, Taskflow provides composable graph building blocks for you to 
efficiently implement common parallel algorithms, such as parallel pipeline.

```cpp
// create a pipeline to propagate five tokens through three serial stages
tf::Pipeline pl(num_parallel_lines,
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    if(pf.token() == 5) {
      pf.stop();
    }
  }},
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    printf("stage 2: input buffer[%zu] = %d\n", pf.line(), buffer[pf.line()]);
  }},
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    printf("stage 3: input buffer[%zu] = %d\n", pf.line(), buffer[pf.line()]);
  }}
);
taskflow.composed_of(pl)
executor.run(taskflow).wait();
```


# Supported Compilers

To use Taskflow, you only need a compiler that supports C++17:

+ GNU C++ Compiler at least v8.4 with -std=c++17
+ Clang C++ Compiler at least v6.0 with -std=c++17
+ Microsoft Visual Studio at least v19.27 with /std:c++17
+ AppleClang Xcode Version at least v12.0 with -std=c++17
+ Nvidia CUDA Toolkit and Compiler (nvcc) at least v11.1 with -std=c++17
+ Intel C++ Compiler at least v19.0.1 with -std=c++17
+ Intel DPC++ Clang Compiler at least v13.0.0 with -std=c++17 and SYCL20

Taskflow works on Linux, Windows, and Mac OS X.

Although %Taskflow supports primarily C++17, you can enable C++20 compilation
through `-std=c++20` to achieve better performance due to new C++20 features.

# Learn More about Taskflow

Visit our [project website][Project Website] and [documentation][documentatio\
n]
to learn more about Taskflow. To get involved:

  + See [release notes][release notes] to stay up-to-date with newest versions
  + Read the step-by-step tutorial at [cookbook][cookbook]
  + Submit an issue at [GitHub issues][GitHub issues]
  + Find out our technical details at [references][references]
  + Watch our technical talks at YouTube

| [CppCon20 Tech Talk][cppcon20 talk] | [MUC++ Tech Talk](https://www.youtube\
.com/watch?v=u8Mc_WgGwVY) |
| :------------: | :-------------: |
| ![](doxygen/images/cppcon20-thumbnail.jpg) | <img align="right"\
 src="doxygen/images/muc++20-thumbnail.jpg" width="100%"> |

We are committed to support trustworthy developments for 
both academic and industrial research projects in parallel 
and heterogeneous computing. 
If you are using Taskflow, please cite the following paper we published at\
 2021 IEEE TPDS:

+ Tsung-Wei Huang, Dian-Lun Lin, Chun-Xun Lin, and Yibo Lin, &quot;[Taskflow:\
 A Lightweight Parallel and Heterogeneous Task Graph Computing\
 System](https://tsung-wei-huang.github.io/papers/tpds21-taskflow.pdf),&quot;\
 <i>IEEE Transactions on Parallel and Distributed Systems (TPDS)</i>, vol.\
 33, no. 6, pp. 1303-1320, June 2022

More importantly, we appreciate all Taskflow [contributors][contributors] and 
the following organizations for sponsoring the Taskflow project!

| <!-- --> | <!-- --> | <!-- --> | <!-- --> |
|:-------------------------:|:-------------------------:|:-------------------\
------:|:-------------------------:|
|<img src="doxygen/images/utah-ece-logo.png">|<img src="doxygen/images/nsf.pn\
g"> | <img src="doxygen/images/darpa.png"> | <img src="doxygen/images/NumFocu\
s.png">|
|<img src="doxygen/images/nvidia-logo.png"> | <img src="doxygen/images/uw-mad\
ison-ece-logo.png"> | | |

# License

Taskflow is licensed with the [MIT License](./LICENSE). 
You are completely free to re-distribute your work derived from Taskflow.

* * *

[Tsung-Wei Huang]:       https://tsung-wei-huang.github.io/
[GitHub releases]:       https://github.com/taskflow/taskflow/releases
[GitHub issues]:         https://github.com/taskflow/taskflow/issues
[GitHub insights]:       https://github.com/taskflow/taskflow/pulse
[GitHub pull requests]:  https://github.com/taskflow/taskflow/pulls
[GraphViz]:              https://www.graphviz.org/
[Project Website]:       https://taskflow.github.io/
[cppcon20 talk]:         https://www.youtube.com/watch?v=MX15huP5DsM
[contributors]:          https://taskflow.github.io/taskflow/contributors.html
[totalgee]:              https://github.com/totalgee
[NSF]:                   https://www.nsf.gov/
[UIUC]:                  https://illinois.edu/
[CSL]:                   https://csl.illinois.edu/
[UofU]:                  https://www.utah.edu/
[documentation]:         https://taskflow.github.io/taskflow/index.html
[release notes]:         https://taskflow.github.io/taskflow/Releases.html
[cookbook]:              https://taskflow.github.io/taskflow/pages.html
[references]:            https://taskflow.github.io/taskflow/References.html
[PayMe]:                 https://www.paypal.me/twhuang/10
[email me]:              mailto:twh760812@gmail.com
[Cpp Conference 2018]:   https://github.com/CppCon/CppCon2018
[TPDS22]:                https://tsung-wei-huang.github.io/papers/tpds21-task\
flow.pdf


\
description-type: text/markdown;variant=GFM
package-description:
\
# libtaskflow - General-purpose Task-parallel Programming System

This is a `build2` package for the [`taskflow`](https://github.com/taskflow/t\
askflow)
C++ library. It provides task decomposition strategies that incorporate
both regular and irregular compute patterns, together with a work-stealing
scheduler to optimize your multithreaded performance.


## Usage

To start using `libtaskflow` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libtaskflow ^3.10.0
```

Then import the library in your `buildfile`:

```
import libs = libtaskflow%lib{taskflow}
```


## Importable targets

This package provides the following importable targets:

```
lib{taskflow}
```

Taskflow lets you quickly implement task decomposition strategies
that incorporate both regular and irregular compute patterns,
together with an efficient *work-stealing* scheduler to optimize your
multithreaded performance.


## Configuration variables

This package provides the following configuration variables:

```
[bool] config.libtaskflow.task_pool ?= true
[bool] config.libtaskflow.atomic_notifier ?= ($cxx.std >= 20)

[bool] config.libtaskflow.cuda ?= false
```

- `task_pool`       : Enable/Disable task pool optimization.
- `atomic_notifier` : Enable/Disable atomic notifier (requires C++20).
- `cuda`            : Enable/Disable the `<taskflow/cuda/...>` headers.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/taskflow/taskflow
package-url: https://github.com/build2-packaging/taskflow
email: twh760812@gmail.com; Author
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: cuda-cudart ^13.0.2 ? ($config.libtaskflow.cuda)
requires: c++20 ? ($config.libtaskflow.atomic_notifier)
requires: c++17 ? ($config.libtaskflow.cuda)
bootstrap-build:
\
project = libtaskflow

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# From upstream (see ../taskflow/taskflow.hpp):
config [bool] config.libtaskflow.task_pool       ?= true
config [bool] config.libtaskflow.atomic_notifier ?= ($cxx.std >= 20)

# Implied by upstream depending on feature requirements:
config [bool] config.libtaskflow.cuda ?= false

\
location: taskflow/libtaskflow-3.10.0+1.tar.gz
sha256sum: 0af888147f54affc62945d57e3d36b557487bc81f5c952868ba65b640d39319d
:
name: libtaskflow
version: 3.11.0
type: lib,binless
language: c++
project: taskflow
summary: A General-purpose Task-parallel Programming System
license: MIT; MIT License.
description:
\
# Taskflow <img align="right" width="10%" src="image/taskflow_logo.png">

<!--[![Linux Build Status](https://travis-ci.com/taskflow/taskflow.svg?branch\
=master)](https://travis-ci.com/taskflow/taskflow)-->
[![Ubuntu](https://github.com/taskflow/taskflow/workflows/Ubuntu/badge.svg)](\
https://github.com/taskflow/taskflow/actions?query=workflow%3AUbuntu)
[![macOS](https://github.com/taskflow/taskflow/workflows/macOS/badge.svg)](ht\
tps://github.com/taskflow/taskflow/actions?query=workflow%3AmacOS)
[![Windows](https://github.com/taskflow/taskflow/workflows/Windows/badge.svg)\
](https://github.com/taskflow/taskflow/actions?query=workflow%3AWindows)
[![Wiki](image/api-doc.svg)][documentation]
[![TFProf](image/tfprof.svg)](https://taskflow.github.io/tfprof/)
[![Cite](image/cite-tpds.svg)][TPDS22]

Taskflow helps you quickly write parallel and heterogeneous task programs in\
 modern C++

# Why Taskflow?

Taskflow is faster, more expressive, and easier for drop-in integration
than many of existing task programming frameworks
in handling complex parallel workloads.

![](image/performance.png)

Taskflow lets you quickly implement task decomposition strategies
that incorporate both regular and irregular compute patterns,
together with an efficient *work-stealing* scheduler to optimize your\
 multithreaded performance.

| [Static Tasking](#start-your-first-taskflow-program) | [Subflow\
 Tasking](#create-a-subflow-graph) |
| :------------: | :-------------: |
| ![](image/static_graph.svg) | <img align="right" src="image/dynamic_graph.s\
vg" width="100%"> |

Taskflow supports conditional tasking for you to make rapid control-flow\
 decisions
across dependent tasks to implement cycles and conditions that were otherwise\
 difficult to do
with existing tools.

| [Conditional Tasking](#integrate-control-flow-to-a-task-graph) |
| :-----------------: |
| ![](image/condition.svg) |

Taskflow is composable. You can create large parallel graphs through
composition of modular and reusable blocks that are easier to optimize
at an individual scope.

| [Taskflow Composition](#compose-task-graphs) |
| :---------------: |
|![](image/framework.svg)|

Taskflow supports heterogeneous tasking for you to
accelerate a wide range of scientific computing applications
by harnessing the power of CPU-GPU collaborative computing.

| [Concurrent CPU-GPU Tasking](#offload-a-task-to-a-gpu) |
| :-----------------: |
| ![](image/cudaflow.svg) |


Taskflow provides visualization and tooling needed for profiling Taskflow\
 programs.

| [Taskflow Profiler](https://taskflow.github.io/tfprof) |
| :-----------------: |
| ![](image/tfprof.png) |

We are committed to support trustworthy developments for both academic and\
 industrial research projects
in parallel computing. Check out [Who is Using Taskflow](https://taskflow.git\
hub.io/#tag_users) and what our users say:

+ *"Taskflow is the cleanest Task API I've ever seen." [Damien Hocking\
 @Corelium Inc](http://coreliuminc.com)*
+ *"Taskflow has a very simple and elegant tasking interface. The performance\
 also scales very well." [Glen Fraser][totalgee]*
+ *"Taskflow lets me handle parallel processing in a smart way." [Hayabusa\
 @Learning](https://cpp-learning.com/cpp-taskflow/)*
+ *"Taskflow improves the throughput of our graph engine in just a few hours\
 of coding." [Jean-Michaël @KDAB](https://ossia.io/)*
+ *"Best poster award for open-source parallel programming library." [Cpp\
 Conference 2018][Cpp Conference 2018]*
+ *"Second Prize of Open-source Software Competition." [ACM Multimedia\
 Conference 2019](https://tsung-wei-huang.github.io/img/mm19-ossc-award.jpg)*

See a quick poster presentation below and
visit the [documentation][documentation] to learn more about Taskflow.
Technical details can be referred to our [IEEE TPDS paper][TPDS22].

![](image/taskflow-poster.png)

# Start Your First Taskflow Program

The following program (`simple.cpp`) creates a taskflow of four tasks 
`A`, `B`, `C`, and `D`, where `A` runs before `B` and `C`, and `D`
runs after `B` and `C`.
When `A` finishes, `B` and `C` can run in parallel.
Try it live on [Compiler Explorer (godbolt)](https://godbolt.org/z/j8hx3xnnx)!



```cpp
#include <taskflow/taskflow.hpp>  // Taskflow is header-only

int main(){
  
  tf::Executor executor;
  tf::Taskflow taskflow;

  auto [A, B, C, D] = taskflow.emplace(  // create four tasks
    [] () { std::cout << "TaskA\n"; },
    [] () { std::cout << "TaskB\n"; },
    [] () { std::cout << "TaskC\n"; },
    [] () { std::cout << "TaskD\n"; } 
  );                                  
                                      
  A.precede(B, C);  // A runs before B and C
  D.succeed(B, C);  // D runs after  B and C
                                      
  executor.run(taskflow).wait(); 

  return 0;
}
```

Taskflow is *header-only* and there is no wrangle with installation.
To compile the program, clone the Taskflow project and 
tell the compiler to include the [headers](./taskflow/).

```bash
~$ git clone https://github.com/taskflow/taskflow.git  # clone it only once
~$ g++ -std=c++20 examples/simple.cpp -I. -O2 -pthread -o simple
~$ ./simple
TaskA
TaskC 
TaskB 
TaskD
```

# Visualize Your First Taskflow Program

Taskflow comes with a built-in profiler, 
[TFProf](https://taskflow.github.io/tfprof/), 
for you to profile and visualize taskflow programs
in an easy-to-use web-based interface.

![](doxygen/images/tfprof.png)

```bash
# run the program with the environment variable TF_ENABLE_PROFILER enabled
~$ TF_ENABLE_PROFILER=simple.json ./simple
~$ cat simple.json
[
{"executor":"0","data":[{"worker":0,"level":0,"data":[{"span":[172,186],"name\
":"0_0","type":"static"},{"span":[187,189],"name":"0_1","type":"static"}]},{"\
worker":2,"level":0,"data":[{"span":[93,164],"name":"2_0","type":"static"},{"\
span":[170,179],"name":"2_1","type":"static"}]}]}
]
# paste the profiling json data to https://taskflow.github.io/tfprof/
```

In addition to execution diagram, you can dump the graph to a DOT format 
and visualize it using a number of free [GraphViz][GraphViz] tools.

```
// dump the taskflow graph to a DOT format through std::cout
taskflow.dump(std::cout); 
```

<p align="center"><img src="doxygen/images/simple.svg"></p>

# Express Task Graph Parallelism

Taskflow empowers users with both static and dynamic task graph constructions
to express end-to-end parallelism in a task graph that
embeds in-graph control flow.

1. [Create a Subflow Graph](#create-a-subflow-graph)
2. [Integrate Control Flow to a Task Graph](#integrate-control-flow-to-a-task\
-graph)
3. [Offload a Task to a GPU](#offload-a-task-to-a-gpu)
4. [Compose Task Graphs](#compose-task-graphs)
5. [Launch Asynchronous Tasks](#launch-asynchronous-tasks)
6. [Execute a Taskflow](#execute-a-taskflow)
7. [Leverage Standard Parallel Algorithms](#leverage-standard-parallel-algori\
thms)

## Create a Subflow Graph

Taskflow supports *dynamic tasking* for you to create a subflow
graph from the execution of a task to perform dynamic parallelism.
The following program spawns a task dependency graph parented at task `B`.

```cpp
tf::Task A = taskflow.emplace([](){}).name("A");  
tf::Task C = taskflow.emplace([](){}).name("C");  
tf::Task D = taskflow.emplace([](){}).name("D");  

tf::Task B = taskflow.emplace([] (tf::Subflow& subflow) { 
  tf::Task B1 = subflow.emplace([](){}).name("B1");  
  tf::Task B2 = subflow.emplace([](){}).name("B2");  
  tf::Task B3 = subflow.emplace([](){}).name("B3");  
  B3.succeed(B1, B2);  // B3 runs after B1 and B2
}).name("B");

A.precede(B, C);  // A runs before B and C
D.succeed(B, C);  // D runs after  B and C
```

<p align="center"><img src="doxygen/images/subflow_join.svg"></p>

## Integrate Control Flow to a Task Graph 

Taskflow supports *conditional tasking* for you to make rapid 
control-flow decisions across dependent tasks to implement cycles 
and conditions in an *end-to-end* task graph.

```cpp
tf::Task init = taskflow.emplace([](){}).name("init");
tf::Task stop = taskflow.emplace([](){}).name("stop");

// creates a condition task that returns a random binary
tf::Task cond = taskflow.emplace(
  [](){ return std::rand() % 2; }
).name("cond");

init.precede(cond);

// creates a feedback loop {0: cond, 1: stop}
cond.precede(cond, stop);
```

<p align="center"><img src="doxygen/images/conditional-tasking-1.svg"></p>


## Offload a Task to a GPU

Taskflow supports GPU tasking for you to accelerate a wide range of\
 scientific computing applications by harnessing the power of CPU-GPU\
 collaborative computing using Nvidia CUDA Graph.

```cpp
__global__ void saxpy(size_t N, float alpha, float* dx, float* dy) {
  int i = blockIdx.x*blockDim.x + threadIdx.x;
  if (i < n) {
    y[i] = a*x[i] + y[i];
  }
}
  
// create a CUDA Graph task
tf::Task cudaflow = taskflow.emplace([&]() {
  tf::cudaGraph cg;
  tf::cudaTask h2d_x = cg.copy(dx, hx.data(), N);
  tf::cudaTask h2d_y = cg.copy(dy, hy.data(), N);
  tf::cudaTask d2h_x = cg.copy(hx.data(), dx, N);
  tf::cudaTask d2h_y = cg.copy(hy.data(), dy, N);
  tf::cudaTask saxpy = cg.kernel((N+255)/256, 256, 0, saxpy, N, 2.0f, dx, dy);
  saxpy.succeed(h2d_x, h2d_y)
       .precede(d2h_x, d2h_y);
  
  // instantiate an executable CUDA graph and run it through a stream
  tf::cudaGraphExec exec(cg);
  tf::cudaStream stream;
  stream.run(exec).synchronize();
}).name("CUDA Graph Task");
```

<p align="center"><img src="doxygen/images/saxpy_1_cudaflow.svg"></p>

## Compose Task Graphs

Taskflow is composable. 
You can create large parallel graphs through composition of modular 
and reusable blocks that are easier to optimize at an individual scope.

```cpp
tf::Taskflow f1, f2;

// create taskflow f1 of two tasks
tf::Task f1A = f1.emplace([]() { std::cout << "Task f1A\n"; })
                 .name("f1A");
tf::Task f1B = f1.emplace([]() { std::cout << "Task f1B\n"; })
                 .name("f1B");

// create taskflow f2 with one module task composed of f1
tf::Task f2A = f2.emplace([]() { std::cout << "Task f2A\n"; })
                 .name("f2A");
tf::Task f2B = f2.emplace([]() { std::cout << "Task f2B\n"; })
                 .name("f2B");
tf::Task f2C = f2.emplace([]() { std::cout << "Task f2C\n"; })
                 .name("f2C");

tf::Task f1_module_task = f2.composed_of(f1)
                            .name("module");

f1_module_task.succeed(f2A, f2B)
              .precede(f2C);
```

<p align="center"><img src="doxygen/images/composition.svg"></p>

## Launch Asynchronous Tasks

Taskflow supports *asynchronous* tasking.
You can launch tasks asynchronously to dynamically explore task graph\
 parallelism.

```cpp
tf::Executor executor;

// create asynchronous tasks directly from an executor
std::future<int> future = executor.async([](){ 
  std::cout << "async task returns 1\n";
  return 1;
}); 
executor.silent_async([](){ std::cout << "async task does not return\n"; });

// create asynchronous tasks with dynamic dependencies
tf::AsyncTask A = executor.silent_dependent_async([](){ printf("A\n"); });
tf::AsyncTask B = executor.silent_dependent_async([](){ printf("B\n"); }, A);
tf::AsyncTask C = executor.silent_dependent_async([](){ printf("C\n"); }, A);
tf::AsyncTask D = executor.silent_dependent_async([](){ printf("D\n"); }, B,\
 C);

executor.wait_for_all();
```

## Execute a Taskflow

The executor provides several *thread-safe* methods to run a taskflow. 
You can run a taskflow once, multiple times, or until a stopping criteria is\
 met. 
These methods are non-blocking with a `tf::Future<void>` return 
to let you query the execution status. 

```cpp
// runs the taskflow once
tf::Future<void> run_once = executor.run(taskflow); 

// wait on this run to finish
run_once.get();

// run the taskflow four times
executor.run_n(taskflow, 4);

// runs the taskflow five times
executor.run_until(taskflow, [counter=5](){ return --counter == 0; });

// block the executor until all submitted taskflows complete
executor.wait_for_all();
```

## Leverage Standard Parallel Algorithms

Taskflow defines algorithms for you to quickly express common parallel
patterns using standard C++ syntaxes, 
such as parallel iterations, parallel reductions, and parallel sort.

```cpp
tf::Task task1 = taskflow.for_each( // assign each element to 100 in parallel
  first, last, [] (auto& i) { i = 100; }    
);
tf::Task task2 = taskflow.reduce(   // reduce a range of items in parallel
  first, last, init, [] (auto a, auto b) { return a + b; }
);
tf::Task task3 = taskflow.sort(     // sort a range of items in parallel
  first, last, [] (auto a, auto b) { return a < b; }
);
```

Additionally, Taskflow provides composable graph building blocks for you to 
efficiently implement common parallel algorithms, such as parallel pipeline.

```cpp
// create a pipeline to propagate five tokens through three serial stages
tf::Pipeline pl(num_parallel_lines,
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    if(pf.token() == 5) {
      pf.stop();
    }
  }},
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    printf("stage 2: input buffer[%zu] = %d\n", pf.line(), buffer[pf.line()]);
  }},
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    printf("stage 3: input buffer[%zu] = %d\n", pf.line(), buffer[pf.line()]);
  }}
);
taskflow.composed_of(pl)
executor.run(taskflow).wait();
```


# Supported Compilers

To use Taskflow, you only need a compiler that supports C++17:

+ GNU C++ Compiler at least v8.4 with -std=c++17
+ Clang C++ Compiler at least v6.0 with -std=c++17
+ Microsoft Visual Studio at least v19.14 with /std:c++17
+ AppleClang Xcode Version at least v12.0 with -std=c++17
+ Nvidia CUDA Toolkit and Compiler (nvcc) at least v11.1 with -std=c++17
+ Intel C++ Compiler at least v19.0.1 with -std=c++17
+ Intel DPC++ Clang Compiler at least v13.0.0 with -std=c++17 and SYCL20

Taskflow works on Linux, Windows, and Mac OS X.

Although Taskflow supports primarily C++17, you can enable C++20 compilation
through `-std=c++20` (or `/std:c++20` for MSVC) to achieve better performance\
 due to new C++20 features.

# Learn More about Taskflow

Visit our [project website][Project Website] and [documentation][documentatio\
n]
to learn more about Taskflow. To get involved:

  + See [release notes][release notes] to stay up-to-date with newest versions
  + Read the step-by-step tutorial at [cookbook][cookbook]
  + Submit an issue at [GitHub issues][GitHub issues]
  + Find out our technical details at [references][references]
  + Watch our technical talks at YouTube

[![Taskflow Tutorials](https://img.youtube.com/vi/u4vaY0cjzos/0.jpg)](https:/\
/www.youtube.com/watch?v=u4vaY0cjzos)

We are committed to support trustworthy developments for 
both academic and industrial research projects in parallel 
and heterogeneous computing. 
If you are using Taskflow, please cite the following paper we published at\
 2021 IEEE TPDS:

+ Tsung-Wei Huang, Dian-Lun Lin, Chun-Xun Lin, and Yibo Lin, &quot;[Taskflow:\
 A Lightweight Parallel and Heterogeneous Task Graph Computing\
 System](https://tsung-wei-huang.github.io/papers/tpds21-taskflow.pdf),&quot;\
 <i>IEEE Transactions on Parallel and Distributed Systems (TPDS)</i>, vol.\
 33, no. 6, pp. 1303-1320, June 2022

More importantly, we appreciate all Taskflow [contributors][contributors] and 
the following organizations for sponsoring the Taskflow project!

| <!-- --> | <!-- --> | <!-- --> | <!-- --> |
|:-------------------------:|:-------------------------:|:-------------------\
------:|:-------------------------:|
|<img src="doxygen/images/utah-ece-logo.png">|<img src="doxygen/images/nsf.pn\
g"> | <img src="doxygen/images/darpa.png"> | <img src="doxygen/images/NumFocu\
s.png">|
|<img src="doxygen/images/nvidia-logo.png"> | <img src="doxygen/images/uw-mad\
ison-ece-logo.png"> | | |

[Taskflow](https://ads.fund/token/0xadf8c696719c904923504683d3f3f7d18774ac06)\
 project is also supported by ADS.FUND.

# License

Taskflow is licensed with the [MIT License](./LICENSE). 
You are completely free to re-distribute your work derived from Taskflow.

* * *

[Tsung-Wei Huang]:       https://tsung-wei-huang.github.io/
[GitHub releases]:       https://github.com/taskflow/taskflow/releases
[GitHub issues]:         https://github.com/taskflow/taskflow/issues
[GitHub insights]:       https://github.com/taskflow/taskflow/pulse
[GitHub pull requests]:  https://github.com/taskflow/taskflow/pulls
[GraphViz]:              https://www.graphviz.org/
[Project Website]:       https://taskflow.github.io/
[cppcon20 talk]:         https://www.youtube.com/watch?v=MX15huP5DsM
[contributors]:          https://taskflow.github.io/taskflow/contributors.html
[totalgee]:              https://github.com/totalgee
[NSF]:                   https://www.nsf.gov/
[UIUC]:                  https://illinois.edu/
[CSL]:                   https://csl.illinois.edu/
[UofU]:                  https://www.utah.edu/
[documentation]:         https://taskflow.github.io/taskflow/index.html
[release notes]:         https://taskflow.github.io/taskflow/Releases.html
[cookbook]:              https://taskflow.github.io/taskflow/pages.html
[references]:            https://taskflow.github.io/taskflow/References.html
[PayMe]:                 https://www.paypal.me/twhuang/10
[email me]:              mailto:twh760812@gmail.com
[Cpp Conference 2018]:   https://github.com/CppCon/CppCon2018
[TPDS22]:                https://tsung-wei-huang.github.io/papers/tpds21-task\
flow.pdf


\
description-type: text/markdown;variant=GFM
package-description:
\
# libtaskflow - General-purpose Task-parallel Programming System

This is a `build2` package for the [`taskflow`](https://github.com/taskflow/t\
askflow)
C++ library. It provides task decomposition strategies that incorporate
both regular and irregular compute patterns, together with a work-stealing
scheduler to optimize your multithreaded performance.


## Usage

To start using `libtaskflow` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libtaskflow ^3.10.0
```

Then import the library in your `buildfile`:

```
import libs = libtaskflow%lib{taskflow}
```


## Importable targets

This package provides the following importable targets:

```
lib{taskflow}
```

Taskflow lets you quickly implement task decomposition strategies
that incorporate both regular and irregular compute patterns,
together with an efficient *work-stealing* scheduler to optimize your
multithreaded performance.


## Configuration variables

This package provides the following configuration variables:

```
[bool] config.libtaskflow.task_pool ?= true
[bool] config.libtaskflow.atomic_notifier ?= ($cxx.std >= 20)

[bool] config.libtaskflow.cuda ?= false
```

- `task_pool`       : Enable/Disable task pool optimization.
- `atomic_notifier` : Enable/Disable atomic notifier (requires C++20).
- `cuda`            : Enable/Disable the `<taskflow/cuda/...>` headers.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/taskflow/taskflow
package-url: https://github.com/build2-packaging/taskflow
email: twh760812@gmail.com; Author
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: cuda-cudart ^12.8.0+4 ? ($config.libtaskflow.cuda)
requires: c++20 ? ($config.libtaskflow.atomic_notifier)
requires: c++17 ? ($config.libtaskflow.cuda)
bootstrap-build:
\
project = libtaskflow

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# From upstream (see upstream/CMakeLists.txt):
config [bool] config.libtaskflow.disable_exception_handling ?= false
config [bool] config.libtaskflow.task_pool                  ?= true
config [bool] config.libtaskflow.atomic_notifier            ?= ($cxx.std >=\
 20)

# Implied by upstream depending on feature requirements:
config [bool] config.libtaskflow.cuda ?= false

\
location: taskflow/libtaskflow-3.11.0.tar.gz
sha256sum: e4ece1957f036587ab40d409f20ae5660d546ddd7683145b9a3f52c5f0f40181
:
name: libtaskflow
version: 4.0.0
type: lib,binless
language: c++
project: taskflow
summary: A General-purpose Task-parallel Programming System
license: MIT; MIT License.
description:
\
# Taskflow <img align="right" width="10%" src="image/taskflow_logo.png">

<!--[![Linux Build Status](https://travis-ci.com/taskflow/taskflow.svg?branch\
=master)](https://travis-ci.com/taskflow/taskflow)-->
[![Ubuntu](https://github.com/taskflow/taskflow/workflows/Ubuntu/badge.svg)](\
https://github.com/taskflow/taskflow/actions?query=workflow%3AUbuntu)
[![macOS](https://github.com/taskflow/taskflow/workflows/macOS/badge.svg)](ht\
tps://github.com/taskflow/taskflow/actions?query=workflow%3AmacOS)
[![Windows](https://github.com/taskflow/taskflow/workflows/Windows/badge.svg)\
](https://github.com/taskflow/taskflow/actions?query=workflow%3AWindows)
[![Wiki](image/api-doc.svg)][documentation]
[![TFProf](image/tfprof.svg)](https://taskflow.github.io/tfprof/)
[![Cite](image/cite-tpds.svg)][TPDS22]

Taskflow helps you quickly write task-parallel programs using modern C++

# Why Taskflow?

Taskflow is faster, more expressive, and easier to integrate than many\
 existing task programming frameworks when handling complex parallel\
 workloads.

![](image/performance.png)

Taskflow lets you quickly implement task decomposition strategies
that incorporate both regular and irregular compute patterns,
together with an efficient *work-stealing* scheduler to optimize your\
 multithreaded performance.

| [Static Tasking](#start-your-first-taskflow-program) | [Subflow\
 Tasking](#create-a-subflow-graph) |
| :------------: | :-------------: |
| ![](image/static_graph.svg) | <img align="right" src="image/dynamic_graph.s\
vg" width="100%"> |

Taskflow supports conditional tasking for you to make rapid control-flow\
 decisions
across dependent tasks to implement cycles and conditions that were otherwise\
 difficult to do
with existing tools.

| [Conditional Tasking](#integrate-control-flow-to-a-task-graph) |
| :-----------------: |
| ![](image/condition.svg) |

Taskflow is composable. You can create large parallel graphs through
composition of modular and reusable blocks that are easier to optimize
at an individual scope.

| [Taskflow Composition](#compose-task-graphs) |
| :---------------: |
|![](image/framework.svg)|

Taskflow supports heterogeneous tasking for you to
accelerate a wide range of scientific computing applications
by harnessing the power of CPU-GPU collaborative computing.

| [Concurrent CPU-GPU Tasking](#offload-a-task-to-a-gpu) |
| :-----------------: |
| ![](image/cudaflow.svg) |


Taskflow provides visualization and tooling needed for profiling Taskflow\
 programs.

| [Taskflow Profiler](https://taskflow.github.io/tfprof) |
| :-----------------: |
| ![](image/tfprof.png) |

We are committed to support trustworthy developments for both academic and\
 industrial research projects
in parallel computing. Check out [Who is Using Taskflow](https://taskflow.git\
hub.io/#tag_users) and what our users say:

+ *"Taskflow is the cleanest Task API I've ever seen." [Damien Hocking\
 @Corelium Inc](http://coreliuminc.com)*
+ *"Taskflow has a very simple and elegant tasking interface. The performance\
 also scales very well." [Glen Fraser][totalgee]*
+ *"Taskflow lets me handle parallel processing in a smart way." [Hayabusa\
 @Learning](https://cpp-learning.com/cpp-taskflow/)*
+ *"Taskflow improves the throughput of our graph engine in just a few hours\
 of coding." [Jean-Michaël @KDAB](https://ossia.io/)*
+ *"Best poster award for open-source parallel programming library." [Cpp\
 Conference 2018][Cpp Conference 2018]*
+ *"Second Prize of Open-source Software Competition." [ACM Multimedia\
 Conference 2019](https://tsung-wei-huang.github.io/img/mm19-ossc-award.jpg)*

See a quick poster presentation below and
visit the [documentation][documentation] to learn more about Taskflow.
Technical details can be referred to our [IEEE TPDS paper][TPDS22].

![](image/taskflow-poster.png)

# Start Your First Taskflow Program

The following program (`simple.cpp`) creates a taskflow of four tasks 
`A`, `B`, `C`, and `D`, where `A` runs before `B` and `C`, and `D`
runs after `B` and `C`.
When `A` finishes, `B` and `C` can run in parallel.
Try it live on [Compiler Explorer (godbolt)](https://godbolt.org/z/j8hx3xnnx)!



```cpp
#include <taskflow/taskflow.hpp>  // Taskflow is header-only

int main(){
  
  tf::Executor executor;
  tf::Taskflow taskflow;

  auto [A, B, C, D] = taskflow.emplace(  // create four tasks
    [] () { std::cout << "TaskA\n"; },
    [] () { std::cout << "TaskB\n"; },
    [] () { std::cout << "TaskC\n"; },
    [] () { std::cout << "TaskD\n"; } 
  );                                  
                                      
  A.precede(B, C);  // A runs before B and C
  D.succeed(B, C);  // D runs after  B and C
                                      
  executor.run(taskflow).wait(); 

  return 0;
}
```

Taskflow is *header-only* and there is no wrangle with installation.
To compile the program, clone the Taskflow project and 
tell the compiler to include the [headers](./taskflow/).

```bash
~$ git clone https://github.com/taskflow/taskflow.git  # clone it only once
~$ g++ -std=c++20 examples/simple.cpp -I. -O2 -pthread -o simple
~$ ./simple
TaskA
TaskC 
TaskB 
TaskD
```

# Visualize Your First Taskflow Program

Taskflow comes with a built-in profiler, 
[TFProf](https://taskflow.github.io/tfprof/), 
for you to profile and visualize taskflow programs
in an easy-to-use web-based interface.

![](doxygen/images/tfprof.png)

```bash
# run the program with the environment variable TF_ENABLE_PROFILER enabled
~$ TF_ENABLE_PROFILER=simple.json ./simple
~$ cat simple.json
[
{"executor":"0","data":[{"worker":0,"level":0,"data":[{"span":[172,186],"name\
":"0_0","type":"static"},{"span":[187,189],"name":"0_1","type":"static"}]},{"\
worker":2,"level":0,"data":[{"span":[93,164],"name":"2_0","type":"static"},{"\
span":[170,179],"name":"2_1","type":"static"}]}]}
]
# paste the profiling json data to https://taskflow.github.io/tfprof/
```

In addition to execution diagram, you can dump the graph to a DOT format 
and visualize it using a number of free [GraphViz][GraphViz] tools.

```
// dump the taskflow graph to a DOT format through std::cout
taskflow.dump(std::cout); 
```

<p align="center"><img src="doxygen/images/simple.svg"></p>

# Express Task Graph Parallelism

Taskflow empowers users with both static and dynamic task graph constructions
to express end-to-end parallelism in a task graph that
embeds in-graph control flow.

1. [Create a Subflow Graph](#create-a-subflow-graph)
2. [Integrate Control Flow to a Task Graph](#integrate-control-flow-to-a-task\
-graph)
3. [Offload a Task to a GPU](#offload-a-task-to-a-gpu)
4. [Compose Task Graphs](#compose-task-graphs)
5. [Launch Asynchronous Tasks](#launch-asynchronous-tasks)
6. [Execute a Taskflow](#execute-a-taskflow)
7. [Leverage Standard Parallel Algorithms](#leverage-standard-parallel-algori\
thms)

## Create a Subflow Graph

Taskflow supports *dynamic tasking* for you to create a subflow
graph from the execution of a task to perform dynamic parallelism.
The following program spawns a task dependency graph parented at task `B`.

```cpp
tf::Task A = taskflow.emplace([](){}).name("A");  
tf::Task C = taskflow.emplace([](){}).name("C");  
tf::Task D = taskflow.emplace([](){}).name("D");  

tf::Task B = taskflow.emplace([] (tf::Subflow& subflow) { 
  tf::Task B1 = subflow.emplace([](){}).name("B1");  
  tf::Task B2 = subflow.emplace([](){}).name("B2");  
  tf::Task B3 = subflow.emplace([](){}).name("B3");  
  B3.succeed(B1, B2);  // B3 runs after B1 and B2
}).name("B");

A.precede(B, C);  // A runs before B and C
D.succeed(B, C);  // D runs after  B and C
```

<p align="center"><img src="doxygen/images/subflow_join.svg"></p>

## Integrate Control Flow to a Task Graph 

Taskflow supports *conditional tasking* for you to make rapid 
control-flow decisions across dependent tasks to implement cycles 
and conditions in an *end-to-end* task graph.

```cpp
tf::Task init = taskflow.emplace([](){}).name("init");
tf::Task stop = taskflow.emplace([](){}).name("stop");

// creates a condition task that returns a random binary
tf::Task cond = taskflow.emplace(
  [](){ return std::rand() % 2; }
).name("cond");

init.precede(cond);

// creates a feedback loop {0: cond, 1: stop}
cond.precede(cond, stop);
```

<p align="center"><img src="doxygen/images/conditional-tasking-1.svg"></p>


## Offload a Task to a GPU

Taskflow supports GPU tasking for you to accelerate a wide range of\
 scientific computing applications by harnessing the power of CPU-GPU\
 collaborative computing using Nvidia CUDA Graph.

```cpp
__global__ void saxpy(size_t N, float alpha, float* dx, float* dy) {
  int i = blockIdx.x*blockDim.x + threadIdx.x;
  if (i < N) {
    y[i] = alpha*x[i] + y[i];
  }
}
  
// create a CUDA Graph task
tf::Task cudaflow = taskflow.emplace([&]() {
  tf::cudaGraph cg;
  tf::cudaTask h2d_x = cg.copy(dx, hx.data(), N);
  tf::cudaTask h2d_y = cg.copy(dy, hy.data(), N);
  tf::cudaTask d2h_x = cg.copy(hx.data(), dx, N);
  tf::cudaTask d2h_y = cg.copy(hy.data(), dy, N);
  tf::cudaTask saxpy = cg.kernel((N+255)/256, 256, 0, saxpy, N, 2.0f, dx, dy);
  saxpy.succeed(h2d_x, h2d_y)
       .precede(d2h_x, d2h_y);
  
  // instantiate an executable CUDA graph and run it through a stream
  tf::cudaGraphExec exec(cg);
  tf::cudaStream stream;
  stream.run(exec).synchronize();
}).name("CUDA Graph Task");
```

<p align="center"><img src="doxygen/images/saxpy_1_cudaflow.svg"></p>

## Compose Task Graphs

Taskflow is composable. 
You can create large parallel graphs through composition of modular 
and reusable blocks that are easier to optimize at an individual scope.

```cpp
tf::Taskflow f1, f2;

// create taskflow f1 of two tasks
tf::Task f1A = f1.emplace([]() { std::cout << "Task f1A\n"; })
                 .name("f1A");
tf::Task f1B = f1.emplace([]() { std::cout << "Task f1B\n"; })
                 .name("f1B");

// create taskflow f2 with one module task composed of f1
tf::Task f2A = f2.emplace([]() { std::cout << "Task f2A\n"; })
                 .name("f2A");
tf::Task f2B = f2.emplace([]() { std::cout << "Task f2B\n"; })
                 .name("f2B");
tf::Task f2C = f2.emplace([]() { std::cout << "Task f2C\n"; })
                 .name("f2C");

tf::Task f1_module_task = f2.composed_of(f1)
                            .name("module");

f1_module_task.succeed(f2A, f2B)
              .precede(f2C);
```

<p align="center"><img src="doxygen/images/composition.svg"></p>

## Launch Asynchronous Tasks

Taskflow supports *asynchronous* tasking.
You can launch tasks asynchronously to dynamically explore task graph\
 parallelism.

```cpp
tf::Executor executor;

// create asynchronous tasks directly from an executor
std::future<int> future = executor.async([](){ 
  std::cout << "async task returns 1\n";
  return 1;
}); 
executor.silent_async([](){ std::cout << "async task does not return\n"; });

// create asynchronous tasks with dynamic dependencies
tf::AsyncTask A = executor.silent_dependent_async([](){ printf("A\n"); });
tf::AsyncTask B = executor.silent_dependent_async([](){ printf("B\n"); }, A);
tf::AsyncTask C = executor.silent_dependent_async([](){ printf("C\n"); }, A);
tf::AsyncTask D = executor.silent_dependent_async([](){ printf("D\n"); }, B,\
 C);

executor.wait_for_all();
```

## Execute a Taskflow

The executor provides several *thread-safe* methods to run a taskflow. 
You can run a taskflow once, multiple times, or until a stopping criteria is\
 met. 
These methods are non-blocking with a `tf::Future<void>` return 
to let you query the execution status. 

```cpp
// runs the taskflow once
tf::Future<void> run_once = executor.run(taskflow); 

// wait on this run to finish
run_once.get();

// run the taskflow four times
executor.run_n(taskflow, 4);

// runs the taskflow five times
executor.run_until(taskflow, [counter=5](){ return --counter == 0; });

// block the executor until all submitted taskflows complete
executor.wait_for_all();
```

## Leverage Standard Parallel Algorithms

Taskflow defines algorithms for you to quickly express common parallel
patterns using standard C++ syntaxes, 
such as parallel iterations, parallel reductions, and parallel sort.

```cpp
tf::Task task1 = taskflow.for_each( // assign each element to 100 in parallel
  first, last, [] (auto& i) { i = 100; }    
);
tf::Task task2 = taskflow.reduce(   // reduce a range of items in parallel
  first, last, init, [] (auto a, auto b) { return a + b; }
);
tf::Task task3 = taskflow.sort(     // sort a range of items in parallel
  first, last, [] (auto a, auto b) { return a < b; }
);
```

Additionally, Taskflow provides composable graph building blocks for you to 
efficiently implement common parallel algorithms, such as parallel pipeline.

```cpp
// create a pipeline to propagate five tokens through three serial stages
tf::Pipeline pl(num_parallel_lines,
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    if(pf.token() == 5) {
      pf.stop();
    }
  }},
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    printf("stage 2: input buffer[%zu] = %d\n", pf.line(), buffer[pf.line()]);
  }},
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    printf("stage 3: input buffer[%zu] = %d\n", pf.line(), buffer[pf.line()]);
  }}
);
taskflow.composed_of(pl)
executor.run(taskflow).wait();
```


# Supported Compilers

To use Taskflow v4.0.0, you need a compiler that supports C++20:

  + GNU C++ Compiler at least v11.0 with -std=c++20
  + Clang C++ Compiler at least v12.0 with -std=c++20
  + Microsoft Visual Studio at least v19.29 (VS 2019) with /std:c++20
  + Apple Clang (Xcode) at least v13.0 with -std=c++20
  + NVIDIA CUDA Toolkit and Compiler (nvcc) at least v12.0 with host compiler\
 supporting C++20
  + Intel oneAPI DPC++/C++ Compiler at least v2022.0 with -std=c++20

Taskflow works on Linux, Windows, and Mac OS X.

# Learn More about Taskflow

Visit our [project website][Project Website] and [documentation][documentatio\
n]
to learn more about Taskflow. To get involved:

  + See [release notes][release notes] to stay up-to-date with newest versions
  + Read the step-by-step tutorial at [cookbook][cookbook]
  + Submit an issue at [GitHub issues][GitHub issues]
  + Find out our technical details at [references][references]
  + Watch our technical talks at YouTube

[![Taskflow Tutorials](https://img.youtube.com/vi/u4vaY0cjzos/0.jpg)](https:/\
/www.youtube.com/watch?v=u4vaY0cjzos)

We are committed to support trustworthy developments for 
both academic and industrial research projects in parallel 
and heterogeneous computing. 
If you are using Taskflow, please cite the following paper we published at\
 2021 IEEE TPDS:

+ Tsung-Wei Huang, Dian-Lun Lin, Chun-Xun Lin, and Yibo Lin, &quot;[Taskflow:\
 A Lightweight Parallel and Heterogeneous Task Graph Computing\
 System](https://tsung-wei-huang.github.io/papers/tpds21-taskflow.pdf),&quot;\
 <i>IEEE Transactions on Parallel and Distributed Systems (TPDS)</i>, vol.\
 33, no. 6, pp. 1303-1320, June 2022

More importantly, we appreciate all Taskflow [contributors][contributors] and 
the following organizations for sponsoring the Taskflow project!

| <!-- --> | <!-- --> | <!-- --> | <!-- --> |
|:-------------------------:|:-------------------------:|:-------------------\
------:|:-------------------------:|
|<img src="doxygen/images/utah-ece-logo.png">|<img src="doxygen/images/nsf.pn\
g"> | <img src="doxygen/images/darpa.png"> | <img src="doxygen/images/NumFocu\
s.png">|
|<img src="doxygen/images/nvidia-logo.png"> | <img src="doxygen/images/uw-mad\
ison-ece-logo.png"> | | |

[Taskflow](https://ads.fund/token/0xadf8c696719c904923504683d3f3f7d18774ac06)\
 project is also supported by ADS.FUND.

# License

Taskflow is licensed with the [MIT License](./LICENSE). 
You are completely free to re-distribute your work derived from Taskflow.

* * *

[Tsung-Wei Huang]:       https://tsung-wei-huang.github.io/
[GitHub releases]:       https://github.com/taskflow/taskflow/releases
[GitHub issues]:         https://github.com/taskflow/taskflow/issues
[GitHub insights]:       https://github.com/taskflow/taskflow/pulse
[GitHub pull requests]:  https://github.com/taskflow/taskflow/pulls
[GraphViz]:              https://www.graphviz.org/
[Project Website]:       https://taskflow.github.io/
[cppcon20 talk]:         https://www.youtube.com/watch?v=MX15huP5DsM
[contributors]:          https://taskflow.github.io/taskflow/contributors.html
[totalgee]:              https://github.com/totalgee
[NSF]:                   https://www.nsf.gov/
[UIUC]:                  https://illinois.edu/
[CSL]:                   https://csl.illinois.edu/
[UofU]:                  https://www.utah.edu/
[documentation]:         https://taskflow.github.io/taskflow/index.html
[release notes]:         https://taskflow.github.io/taskflow/Releases.html
[cookbook]:              https://taskflow.github.io/taskflow/pages.html
[references]:            https://taskflow.github.io/taskflow/References.html
[PayMe]:                 https://www.paypal.me/twhuang/10
[email me]:              mailto:twh760812@gmail.com
[Cpp Conference 2018]:   https://github.com/CppCon/CppCon2018
[TPDS22]:                https://tsung-wei-huang.github.io/papers/tpds21-task\
flow.pdf


\
description-type: text/markdown;variant=GFM
package-description:
\
# libtaskflow - General-purpose Task-parallel Programming System

This is a `build2` package for the [`taskflow`](https://github.com/taskflow/t\
askflow)
C++ library. It provides task decomposition strategies that incorporate
both regular and irregular compute patterns, together with a work-stealing
scheduler to optimize your multithreaded performance.


## Usage

To start using `libtaskflow` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libtaskflow ^3.10.0
```

Then import the library in your `buildfile`:

```
import libs = libtaskflow%lib{taskflow}
```


## Importable targets

This package provides the following importable targets:

```
lib{taskflow}
```

Taskflow lets you quickly implement task decomposition strategies
that incorporate both regular and irregular compute patterns,
together with an efficient *work-stealing* scheduler to optimize your
multithreaded performance.


## Configuration variables

This package provides the following configuration variables:

```
[bool] config.libtaskflow.task_pool ?= true
[bool] config.libtaskflow.atomic_notifier ?= ($cxx.std >= 20)

[bool] config.libtaskflow.cuda ?= false
```

- `task_pool`       : Enable/Disable task pool optimization.
- `atomic_notifier` : Enable/Disable atomic notifier (requires C++20).
- `cuda`            : Enable/Disable the `<taskflow/cuda/...>` headers.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/taskflow/taskflow
package-url: https://github.com/build2-packaging/taskflow
email: twh760812@gmail.com; Author
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: cuda-cudart ^13.0.2+2 ? ($config.libtaskflow.cuda)
requires: c++20
bootstrap-build:
\
project = libtaskflow

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# From upstream (see upstream/CMakeLists.txt):
config [bool] config.libtaskflow.disable_exception_handling ?= false
config [bool] config.libtaskflow.task_pool                  ?= true
config [bool] config.libtaskflow.atomic_notifier            ?= true

# Implied by upstream depending on feature requirements:
config [bool] config.libtaskflow.cuda ?= false

\
location: taskflow/libtaskflow-4.0.0.tar.gz
sha256sum: e1abefa5a5af0c2a622b51d9cd605e55036f55d1eb4848077a5ef1905d5ba563
:
name: libtaskflow-tests
version: 3.10.0+1
type: exe
language: c++
project: taskflow
summary: A General-purpose Task-parallel Programming System ; tests
license: MIT; MIT License.
description:
\
# Taskflow <img align="right" width="10%" src="image/taskflow_logo.png">

<!--[![Linux Build Status](https://travis-ci.com/taskflow/taskflow.svg?branch\
=master)](https://travis-ci.com/taskflow/taskflow)-->
[![Ubuntu](https://github.com/taskflow/taskflow/workflows/Ubuntu/badge.svg)](\
https://github.com/taskflow/taskflow/actions?query=workflow%3AUbuntu)
[![macOS](https://github.com/taskflow/taskflow/workflows/macOS/badge.svg)](ht\
tps://github.com/taskflow/taskflow/actions?query=workflow%3AmacOS)
[![Windows](https://github.com/taskflow/taskflow/workflows/Windows/badge.svg)\
](https://github.com/taskflow/taskflow/actions?query=workflow%3AWindows)
[![Wiki](image/api-doc.svg)][documentation]
[![TFProf](image/tfprof.svg)](https://taskflow.github.io/tfprof/)
[![Cite](image/cite-tpds.svg)][TPDS22]

Taskflow helps you quickly write parallel and heterogeneous task programs in\
 modern C++

# Why Taskflow?

Taskflow is faster, more expressive, and easier for drop-in integration
than many of existing task programming frameworks
in handling complex parallel workloads.

![](image/performance.png)

Taskflow lets you quickly implement task decomposition strategies
that incorporate both regular and irregular compute patterns,
together with an efficient *work-stealing* scheduler to optimize your\
 multithreaded performance.

| [Static Tasking](#start-your-first-taskflow-program) | [Subflow\
 Tasking](#create-a-subflow-graph) |
| :------------: | :-------------: |
| ![](image/static_graph.svg) | <img align="right" src="image/dynamic_graph.s\
vg" width="100%"> |

Taskflow supports conditional tasking for you to make rapid control-flow\
 decisions
across dependent tasks to implement cycles and conditions that were otherwise\
 difficult to do
with existing tools.

| [Conditional Tasking](#integrate-control-flow-to-a-task-graph) |
| :-----------------: |
| ![](image/condition.svg) |

Taskflow is composable. You can create large parallel graphs through
composition of modular and reusable blocks that are easier to optimize
at an individual scope.

| [Taskflow Composition](#compose-task-graphs) |
| :---------------: |
|![](image/framework.svg)|

Taskflow supports heterogeneous tasking for you to
accelerate a wide range of scientific computing applications
by harnessing the power of CPU-GPU collaborative computing.

| [Concurrent CPU-GPU Tasking](#offload-a-task-to-a-gpu) |
| :-----------------: |
| ![](image/cudaflow.svg) |


Taskflow provides visualization and tooling needed for profiling Taskflow\
 programs.

| [Taskflow Profiler](https://taskflow.github.io/tfprof) |
| :-----------------: |
| ![](image/tfprof.png) |

We are committed to support trustworthy developments for both academic and\
 industrial research projects
in parallel computing. Check out [Who is Using Taskflow](https://taskflow.git\
hub.io/#tag_users) and what our users say:

+ *"Taskflow is the cleanest Task API I've ever seen." [Damien Hocking\
 @Corelium Inc](http://coreliuminc.com)*
+ *"Taskflow has a very simple and elegant tasking interface. The performance\
 also scales very well." [Glen Fraser][totalgee]*
+ *"Taskflow lets me handle parallel processing in a smart way." [Hayabusa\
 @Learning](https://cpp-learning.com/cpp-taskflow/)*
+ *"Taskflow improves the throughput of our graph engine in just a few hours\
 of coding." [Jean-Michaël @KDAB](https://ossia.io/)*
+ *"Best poster award for open-source parallel programming library." [Cpp\
 Conference 2018][Cpp Conference 2018]*
+ *"Second Prize of Open-source Software Competition." [ACM Multimedia\
 Conference 2019](https://tsung-wei-huang.github.io/img/mm19-ossc-award.jpg)*

See a quick [presentation](https://taskflow.github.io/) and
visit the [documentation][documentation] to learn more about Taskflow.
Technical details can be referred to our [IEEE TPDS paper][TPDS22].

# Start Your First Taskflow Program

The following program (`simple.cpp`) creates four tasks 
`A`, `B`, `C`, and `D`, where `A` runs before `B` and `C`, and `D`
runs after `B` and `C`.
When `A` finishes, `B` and `C` can run in parallel.
Try it live on [Compiler Explorer (godbolt)](https://godbolt.org/z/j8hx3xnnx)!



```cpp
#include <taskflow/taskflow.hpp>  // Taskflow is header-only

int main(){
  
  tf::Executor executor;
  tf::Taskflow taskflow;

  auto [A, B, C, D] = taskflow.emplace(  // create four tasks
    [] () { std::cout << "TaskA\n"; },
    [] () { std::cout << "TaskB\n"; },
    [] () { std::cout << "TaskC\n"; },
    [] () { std::cout << "TaskD\n"; } 
  );                                  
                                      
  A.precede(B, C);  // A runs before B and C
  D.succeed(B, C);  // D runs after  B and C
                                      
  executor.run(taskflow).wait(); 

  return 0;
}
```

Taskflow is *header-only* and there is no wrangle with installation.
To compile the program, clone the Taskflow project and 
tell the compiler to include the [headers](./taskflow/).

```bash
~$ git clone https://github.com/taskflow/taskflow.git  # clone it only once
~$ g++ -std=c++20 examples/simple.cpp -I. -O2 -pthread -o simple
~$ ./simple
TaskA
TaskC 
TaskB 
TaskD
```

# Visualize Your First Taskflow Program

Taskflow comes with a built-in profiler, 
[TFProf](https://taskflow.github.io/tfprof/), 
for you to profile and visualize taskflow programs
in an easy-to-use web-based interface.

![](doxygen/images/tfprof.png)

```bash
# run the program with the environment variable TF_ENABLE_PROFILER enabled
~$ TF_ENABLE_PROFILER=simple.json ./simple
~$ cat simple.json
[
{"executor":"0","data":[{"worker":0,"level":0,"data":[{"span":[172,186],"name\
":"0_0","type":"static"},{"span":[187,189],"name":"0_1","type":"static"}]},{"\
worker":2,"level":0,"data":[{"span":[93,164],"name":"2_0","type":"static"},{"\
span":[170,179],"name":"2_1","type":"static"}]}]}
]
# paste the profiling json data to https://taskflow.github.io/tfprof/
```

In addition to execution diagram, you can dump the graph to a DOT format 
and visualize it using a number of free [GraphViz][GraphViz] tools.

```
// dump the taskflow graph to a DOT format through std::cout
taskflow.dump(std::cout); 
```

<p align="center"><img src="doxygen/images/simple.svg"></p>

# Express Task Graph Parallelism

Taskflow empowers users with both static and dynamic task graph constructions
to express end-to-end parallelism in a task graph that
embeds in-graph control flow.

1. [Create a Subflow Graph](#create-a-subflow-graph)
2. [Integrate Control Flow to a Task Graph](#integrate-control-flow-to-a-task\
-graph)
3. [Offload a Task to a GPU](#offload-a-task-to-a-gpu)
4. [Compose Task Graphs](#compose-task-graphs)
5. [Launch Asynchronous Tasks](#launch-asynchronous-tasks)
6. [Execute a Taskflow](#execute-a-taskflow)
7. [Leverage Standard Parallel Algorithms](#leverage-standard-parallel-algori\
thms)

## Create a Subflow Graph

Taskflow supports *dynamic tasking* for you to create a subflow
graph from the execution of a task to perform dynamic parallelism.
The following program spawns a task dependency graph parented at task `B`.

```cpp
tf::Task A = taskflow.emplace([](){}).name("A");  
tf::Task C = taskflow.emplace([](){}).name("C");  
tf::Task D = taskflow.emplace([](){}).name("D");  

tf::Task B = taskflow.emplace([] (tf::Subflow& subflow) { 
  tf::Task B1 = subflow.emplace([](){}).name("B1");  
  tf::Task B2 = subflow.emplace([](){}).name("B2");  
  tf::Task B3 = subflow.emplace([](){}).name("B3");  
  B3.succeed(B1, B2);  // B3 runs after B1 and B2
}).name("B");

A.precede(B, C);  // A runs before B and C
D.succeed(B, C);  // D runs after  B and C
```

<p align="center"><img src="doxygen/images/subflow_join.svg"></p>

## Integrate Control Flow to a Task Graph 

Taskflow supports *conditional tasking* for you to make rapid 
control-flow decisions across dependent tasks to implement cycles 
and conditions in an *end-to-end* task graph.

```cpp
tf::Task init = taskflow.emplace([](){}).name("init");
tf::Task stop = taskflow.emplace([](){}).name("stop");

// creates a condition task that returns a random binary
tf::Task cond = taskflow.emplace(
  [](){ return std::rand() % 2; }
).name("cond");

init.precede(cond);

// creates a feedback loop {0: cond, 1: stop}
cond.precede(cond, stop);
```

<p align="center"><img src="doxygen/images/conditional-tasking-1.svg"></p>


## Offload a Task to a GPU

Taskflow supports GPU tasking for you to accelerate a wide range of\
 scientific computing applications by harnessing the power of CPU-GPU\
 collaborative computing using Nvidia CUDA Graph.

```cpp
__global__ void saxpy(size_t N, float alpha, float* dx, float* dy) {
  int i = blockIdx.x*blockDim.x + threadIdx.x;
  if (i < n) {
    y[i] = a*x[i] + y[i];
  }
}
  
// create a CUDA Graph task
tf::Task cudaflow = taskflow.emplace([&]() {
  tf::cudaGraph cg;
  tf::cudaTask h2d_x = cg.copy(dx, hx.data(), N);
  tf::cudaTask h2d_y = cg.copy(dy, hy.data(), N);
  tf::cudaTask d2h_x = cg.copy(hx.data(), dx, N);
  tf::cudaTask d2h_y = cg.copy(hy.data(), dy, N);
  tf::cudaTask saxpy = cg.kernel((N+255)/256, 256, 0, saxpy, N, 2.0f, dx, dy);
  saxpy.succeed(h2d_x, h2d_y)
       .precede(d2h_x, d2h_y);
  
  // instantiate an executable CUDA graph and run it through a stream
  tf::cudaGraphExec exec(cg);
  tf::cudaStream stream;
  stream.run(exec).synchronize();
}).name("CUDA Graph Task");
```

<p align="center"><img src="doxygen/images/saxpy_1_cudaflow.svg"></p>

## Compose Task Graphs

Taskflow is composable. 
You can create large parallel graphs through composition of modular 
and reusable blocks that are easier to optimize at an individual scope.

```cpp
tf::Taskflow f1, f2;

// create taskflow f1 of two tasks
tf::Task f1A = f1.emplace([]() { std::cout << "Task f1A\n"; })
                 .name("f1A");
tf::Task f1B = f1.emplace([]() { std::cout << "Task f1B\n"; })
                 .name("f1B");

// create taskflow f2 with one module task composed of f1
tf::Task f2A = f2.emplace([]() { std::cout << "Task f2A\n"; })
                 .name("f2A");
tf::Task f2B = f2.emplace([]() { std::cout << "Task f2B\n"; })
                 .name("f2B");
tf::Task f2C = f2.emplace([]() { std::cout << "Task f2C\n"; })
                 .name("f2C");

tf::Task f1_module_task = f2.composed_of(f1)
                            .name("module");

f1_module_task.succeed(f2A, f2B)
              .precede(f2C);
```

<p align="center"><img src="doxygen/images/composition.svg"></p>

## Launch Asynchronous Tasks

Taskflow supports *asynchronous* tasking.
You can launch tasks asynchronously to dynamically explore task graph\
 parallelism.

```cpp
tf::Executor executor;

// create asynchronous tasks directly from an executor
std::future<int> future = executor.async([](){ 
  std::cout << "async task returns 1\n";
  return 1;
}); 
executor.silent_async([](){ std::cout << "async task does not return\n"; });

// create asynchronous tasks with dynamic dependencies
tf::AsyncTask A = executor.silent_dependent_async([](){ printf("A\n"); });
tf::AsyncTask B = executor.silent_dependent_async([](){ printf("B\n"); }, A);
tf::AsyncTask C = executor.silent_dependent_async([](){ printf("C\n"); }, A);
tf::AsyncTask D = executor.silent_dependent_async([](){ printf("D\n"); }, B,\
 C);

executor.wait_for_all();
```

## Execute a Taskflow

The executor provides several *thread-safe* methods to run a taskflow. 
You can run a taskflow once, multiple times, or until a stopping criteria is\
 met. 
These methods are non-blocking with a `tf::Future<void>` return 
to let you query the execution status. 

```cpp
// runs the taskflow once
tf::Future<void> run_once = executor.run(taskflow); 

// wait on this run to finish
run_once.get();

// run the taskflow four times
executor.run_n(taskflow, 4);

// runs the taskflow five times
executor.run_until(taskflow, [counter=5](){ return --counter == 0; });

// block the executor until all submitted taskflows complete
executor.wait_for_all();
```

## Leverage Standard Parallel Algorithms

Taskflow defines algorithms for you to quickly express common parallel
patterns using standard C++ syntaxes, 
such as parallel iterations, parallel reductions, and parallel sort.

```cpp
tf::Task task1 = taskflow.for_each( // assign each element to 100 in parallel
  first, last, [] (auto& i) { i = 100; }    
);
tf::Task task2 = taskflow.reduce(   // reduce a range of items in parallel
  first, last, init, [] (auto a, auto b) { return a + b; }
);
tf::Task task3 = taskflow.sort(     // sort a range of items in parallel
  first, last, [] (auto a, auto b) { return a < b; }
);
```

Additionally, Taskflow provides composable graph building blocks for you to 
efficiently implement common parallel algorithms, such as parallel pipeline.

```cpp
// create a pipeline to propagate five tokens through three serial stages
tf::Pipeline pl(num_parallel_lines,
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    if(pf.token() == 5) {
      pf.stop();
    }
  }},
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    printf("stage 2: input buffer[%zu] = %d\n", pf.line(), buffer[pf.line()]);
  }},
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    printf("stage 3: input buffer[%zu] = %d\n", pf.line(), buffer[pf.line()]);
  }}
);
taskflow.composed_of(pl)
executor.run(taskflow).wait();
```


# Supported Compilers

To use Taskflow, you only need a compiler that supports C++17:

+ GNU C++ Compiler at least v8.4 with -std=c++17
+ Clang C++ Compiler at least v6.0 with -std=c++17
+ Microsoft Visual Studio at least v19.27 with /std:c++17
+ AppleClang Xcode Version at least v12.0 with -std=c++17
+ Nvidia CUDA Toolkit and Compiler (nvcc) at least v11.1 with -std=c++17
+ Intel C++ Compiler at least v19.0.1 with -std=c++17
+ Intel DPC++ Clang Compiler at least v13.0.0 with -std=c++17 and SYCL20

Taskflow works on Linux, Windows, and Mac OS X.

Although %Taskflow supports primarily C++17, you can enable C++20 compilation
through `-std=c++20` to achieve better performance due to new C++20 features.

# Learn More about Taskflow

Visit our [project website][Project Website] and [documentation][documentatio\
n]
to learn more about Taskflow. To get involved:

  + See [release notes][release notes] to stay up-to-date with newest versions
  + Read the step-by-step tutorial at [cookbook][cookbook]
  + Submit an issue at [GitHub issues][GitHub issues]
  + Find out our technical details at [references][references]
  + Watch our technical talks at YouTube

| [CppCon20 Tech Talk][cppcon20 talk] | [MUC++ Tech Talk](https://www.youtube\
.com/watch?v=u8Mc_WgGwVY) |
| :------------: | :-------------: |
| ![](doxygen/images/cppcon20-thumbnail.jpg) | <img align="right"\
 src="doxygen/images/muc++20-thumbnail.jpg" width="100%"> |

We are committed to support trustworthy developments for 
both academic and industrial research projects in parallel 
and heterogeneous computing. 
If you are using Taskflow, please cite the following paper we published at\
 2021 IEEE TPDS:

+ Tsung-Wei Huang, Dian-Lun Lin, Chun-Xun Lin, and Yibo Lin, &quot;[Taskflow:\
 A Lightweight Parallel and Heterogeneous Task Graph Computing\
 System](https://tsung-wei-huang.github.io/papers/tpds21-taskflow.pdf),&quot;\
 <i>IEEE Transactions on Parallel and Distributed Systems (TPDS)</i>, vol.\
 33, no. 6, pp. 1303-1320, June 2022

More importantly, we appreciate all Taskflow [contributors][contributors] and 
the following organizations for sponsoring the Taskflow project!

| <!-- --> | <!-- --> | <!-- --> | <!-- --> |
|:-------------------------:|:-------------------------:|:-------------------\
------:|:-------------------------:|
|<img src="doxygen/images/utah-ece-logo.png">|<img src="doxygen/images/nsf.pn\
g"> | <img src="doxygen/images/darpa.png"> | <img src="doxygen/images/NumFocu\
s.png">|
|<img src="doxygen/images/nvidia-logo.png"> | <img src="doxygen/images/uw-mad\
ison-ece-logo.png"> | | |

# License

Taskflow is licensed with the [MIT License](./LICENSE). 
You are completely free to re-distribute your work derived from Taskflow.

* * *

[Tsung-Wei Huang]:       https://tsung-wei-huang.github.io/
[GitHub releases]:       https://github.com/taskflow/taskflow/releases
[GitHub issues]:         https://github.com/taskflow/taskflow/issues
[GitHub insights]:       https://github.com/taskflow/taskflow/pulse
[GitHub pull requests]:  https://github.com/taskflow/taskflow/pulls
[GraphViz]:              https://www.graphviz.org/
[Project Website]:       https://taskflow.github.io/
[cppcon20 talk]:         https://www.youtube.com/watch?v=MX15huP5DsM
[contributors]:          https://taskflow.github.io/taskflow/contributors.html
[totalgee]:              https://github.com/totalgee
[NSF]:                   https://www.nsf.gov/
[UIUC]:                  https://illinois.edu/
[CSL]:                   https://csl.illinois.edu/
[UofU]:                  https://www.utah.edu/
[documentation]:         https://taskflow.github.io/taskflow/index.html
[release notes]:         https://taskflow.github.io/taskflow/Releases.html
[cookbook]:              https://taskflow.github.io/taskflow/pages.html
[references]:            https://taskflow.github.io/taskflow/References.html
[PayMe]:                 https://www.paypal.me/twhuang/10
[email me]:              mailto:twh760812@gmail.com
[Cpp Conference 2018]:   https://github.com/CppCon/CppCon2018
[TPDS22]:                https://tsung-wei-huang.github.io/papers/tpds21-task\
flow.pdf


\
description-type: text/markdown;variant=GFM
package-description:
\
# libtaskflow - General-purpose Task-parallel Programming System

This is a `build2` package for the [`taskflow`](https://github.com/taskflow/t\
askflow)
C++ library. It provides task decomposition strategies that incorporate
both regular and irregular compute patterns, together with a work-stealing
scheduler to optimize your multithreaded performance.


## Usage

To start using `libtaskflow` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libtaskflow ^3.10.0
```

Then import the library in your `buildfile`:

```
import libs = libtaskflow%lib{taskflow}
```


## Importable targets

This package provides the following importable targets:

```
lib{taskflow}
```

Taskflow lets you quickly implement task decomposition strategies
that incorporate both regular and irregular compute patterns,
together with an efficient *work-stealing* scheduler to optimize your
multithreaded performance.


## Configuration variables

This package provides the following configuration variables:

```
[bool] config.libtaskflow.task_pool ?= true
[bool] config.libtaskflow.atomic_notifier ?= ($cxx.std >= 20)

[bool] config.libtaskflow.cuda ?= false
```

- `task_pool`       : Enable/Disable task pool optimization.
- `atomic_notifier` : Enable/Disable atomic notifier (requires C++20).
- `cuda`            : Enable/Disable the `<taskflow/cuda/...>` headers.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/taskflow/taskflow
package-url: https://github.com/build2-packaging/taskflow
email: twh760812@gmail.com; Author
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libtaskflow == 3.10.0
depends: doctest ^2.4.7
bootstrap-build:
\
project = libtaskflow-tests

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# Every exe{} in this subproject is by default a test.
#
exe{*}: test = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: taskflow/libtaskflow-tests-3.10.0+1.tar.gz
sha256sum: 149a2e3a1b47eda7abbd8a875347ea90583ef84a1c4db5de441be921d66da0dc
:
name: libtaskflow-tests
version: 3.11.0
type: exe
language: c++
project: taskflow
summary: A General-purpose Task-parallel Programming System ; tests
license: MIT; MIT License.
description:
\
# Taskflow <img align="right" width="10%" src="image/taskflow_logo.png">

<!--[![Linux Build Status](https://travis-ci.com/taskflow/taskflow.svg?branch\
=master)](https://travis-ci.com/taskflow/taskflow)-->
[![Ubuntu](https://github.com/taskflow/taskflow/workflows/Ubuntu/badge.svg)](\
https://github.com/taskflow/taskflow/actions?query=workflow%3AUbuntu)
[![macOS](https://github.com/taskflow/taskflow/workflows/macOS/badge.svg)](ht\
tps://github.com/taskflow/taskflow/actions?query=workflow%3AmacOS)
[![Windows](https://github.com/taskflow/taskflow/workflows/Windows/badge.svg)\
](https://github.com/taskflow/taskflow/actions?query=workflow%3AWindows)
[![Wiki](image/api-doc.svg)][documentation]
[![TFProf](image/tfprof.svg)](https://taskflow.github.io/tfprof/)
[![Cite](image/cite-tpds.svg)][TPDS22]

Taskflow helps you quickly write parallel and heterogeneous task programs in\
 modern C++

# Why Taskflow?

Taskflow is faster, more expressive, and easier for drop-in integration
than many of existing task programming frameworks
in handling complex parallel workloads.

![](image/performance.png)

Taskflow lets you quickly implement task decomposition strategies
that incorporate both regular and irregular compute patterns,
together with an efficient *work-stealing* scheduler to optimize your\
 multithreaded performance.

| [Static Tasking](#start-your-first-taskflow-program) | [Subflow\
 Tasking](#create-a-subflow-graph) |
| :------------: | :-------------: |
| ![](image/static_graph.svg) | <img align="right" src="image/dynamic_graph.s\
vg" width="100%"> |

Taskflow supports conditional tasking for you to make rapid control-flow\
 decisions
across dependent tasks to implement cycles and conditions that were otherwise\
 difficult to do
with existing tools.

| [Conditional Tasking](#integrate-control-flow-to-a-task-graph) |
| :-----------------: |
| ![](image/condition.svg) |

Taskflow is composable. You can create large parallel graphs through
composition of modular and reusable blocks that are easier to optimize
at an individual scope.

| [Taskflow Composition](#compose-task-graphs) |
| :---------------: |
|![](image/framework.svg)|

Taskflow supports heterogeneous tasking for you to
accelerate a wide range of scientific computing applications
by harnessing the power of CPU-GPU collaborative computing.

| [Concurrent CPU-GPU Tasking](#offload-a-task-to-a-gpu) |
| :-----------------: |
| ![](image/cudaflow.svg) |


Taskflow provides visualization and tooling needed for profiling Taskflow\
 programs.

| [Taskflow Profiler](https://taskflow.github.io/tfprof) |
| :-----------------: |
| ![](image/tfprof.png) |

We are committed to support trustworthy developments for both academic and\
 industrial research projects
in parallel computing. Check out [Who is Using Taskflow](https://taskflow.git\
hub.io/#tag_users) and what our users say:

+ *"Taskflow is the cleanest Task API I've ever seen." [Damien Hocking\
 @Corelium Inc](http://coreliuminc.com)*
+ *"Taskflow has a very simple and elegant tasking interface. The performance\
 also scales very well." [Glen Fraser][totalgee]*
+ *"Taskflow lets me handle parallel processing in a smart way." [Hayabusa\
 @Learning](https://cpp-learning.com/cpp-taskflow/)*
+ *"Taskflow improves the throughput of our graph engine in just a few hours\
 of coding." [Jean-Michaël @KDAB](https://ossia.io/)*
+ *"Best poster award for open-source parallel programming library." [Cpp\
 Conference 2018][Cpp Conference 2018]*
+ *"Second Prize of Open-source Software Competition." [ACM Multimedia\
 Conference 2019](https://tsung-wei-huang.github.io/img/mm19-ossc-award.jpg)*

See a quick poster presentation below and
visit the [documentation][documentation] to learn more about Taskflow.
Technical details can be referred to our [IEEE TPDS paper][TPDS22].

![](image/taskflow-poster.png)

# Start Your First Taskflow Program

The following program (`simple.cpp`) creates a taskflow of four tasks 
`A`, `B`, `C`, and `D`, where `A` runs before `B` and `C`, and `D`
runs after `B` and `C`.
When `A` finishes, `B` and `C` can run in parallel.
Try it live on [Compiler Explorer (godbolt)](https://godbolt.org/z/j8hx3xnnx)!



```cpp
#include <taskflow/taskflow.hpp>  // Taskflow is header-only

int main(){
  
  tf::Executor executor;
  tf::Taskflow taskflow;

  auto [A, B, C, D] = taskflow.emplace(  // create four tasks
    [] () { std::cout << "TaskA\n"; },
    [] () { std::cout << "TaskB\n"; },
    [] () { std::cout << "TaskC\n"; },
    [] () { std::cout << "TaskD\n"; } 
  );                                  
                                      
  A.precede(B, C);  // A runs before B and C
  D.succeed(B, C);  // D runs after  B and C
                                      
  executor.run(taskflow).wait(); 

  return 0;
}
```

Taskflow is *header-only* and there is no wrangle with installation.
To compile the program, clone the Taskflow project and 
tell the compiler to include the [headers](./taskflow/).

```bash
~$ git clone https://github.com/taskflow/taskflow.git  # clone it only once
~$ g++ -std=c++20 examples/simple.cpp -I. -O2 -pthread -o simple
~$ ./simple
TaskA
TaskC 
TaskB 
TaskD
```

# Visualize Your First Taskflow Program

Taskflow comes with a built-in profiler, 
[TFProf](https://taskflow.github.io/tfprof/), 
for you to profile and visualize taskflow programs
in an easy-to-use web-based interface.

![](doxygen/images/tfprof.png)

```bash
# run the program with the environment variable TF_ENABLE_PROFILER enabled
~$ TF_ENABLE_PROFILER=simple.json ./simple
~$ cat simple.json
[
{"executor":"0","data":[{"worker":0,"level":0,"data":[{"span":[172,186],"name\
":"0_0","type":"static"},{"span":[187,189],"name":"0_1","type":"static"}]},{"\
worker":2,"level":0,"data":[{"span":[93,164],"name":"2_0","type":"static"},{"\
span":[170,179],"name":"2_1","type":"static"}]}]}
]
# paste the profiling json data to https://taskflow.github.io/tfprof/
```

In addition to execution diagram, you can dump the graph to a DOT format 
and visualize it using a number of free [GraphViz][GraphViz] tools.

```
// dump the taskflow graph to a DOT format through std::cout
taskflow.dump(std::cout); 
```

<p align="center"><img src="doxygen/images/simple.svg"></p>

# Express Task Graph Parallelism

Taskflow empowers users with both static and dynamic task graph constructions
to express end-to-end parallelism in a task graph that
embeds in-graph control flow.

1. [Create a Subflow Graph](#create-a-subflow-graph)
2. [Integrate Control Flow to a Task Graph](#integrate-control-flow-to-a-task\
-graph)
3. [Offload a Task to a GPU](#offload-a-task-to-a-gpu)
4. [Compose Task Graphs](#compose-task-graphs)
5. [Launch Asynchronous Tasks](#launch-asynchronous-tasks)
6. [Execute a Taskflow](#execute-a-taskflow)
7. [Leverage Standard Parallel Algorithms](#leverage-standard-parallel-algori\
thms)

## Create a Subflow Graph

Taskflow supports *dynamic tasking* for you to create a subflow
graph from the execution of a task to perform dynamic parallelism.
The following program spawns a task dependency graph parented at task `B`.

```cpp
tf::Task A = taskflow.emplace([](){}).name("A");  
tf::Task C = taskflow.emplace([](){}).name("C");  
tf::Task D = taskflow.emplace([](){}).name("D");  

tf::Task B = taskflow.emplace([] (tf::Subflow& subflow) { 
  tf::Task B1 = subflow.emplace([](){}).name("B1");  
  tf::Task B2 = subflow.emplace([](){}).name("B2");  
  tf::Task B3 = subflow.emplace([](){}).name("B3");  
  B3.succeed(B1, B2);  // B3 runs after B1 and B2
}).name("B");

A.precede(B, C);  // A runs before B and C
D.succeed(B, C);  // D runs after  B and C
```

<p align="center"><img src="doxygen/images/subflow_join.svg"></p>

## Integrate Control Flow to a Task Graph 

Taskflow supports *conditional tasking* for you to make rapid 
control-flow decisions across dependent tasks to implement cycles 
and conditions in an *end-to-end* task graph.

```cpp
tf::Task init = taskflow.emplace([](){}).name("init");
tf::Task stop = taskflow.emplace([](){}).name("stop");

// creates a condition task that returns a random binary
tf::Task cond = taskflow.emplace(
  [](){ return std::rand() % 2; }
).name("cond");

init.precede(cond);

// creates a feedback loop {0: cond, 1: stop}
cond.precede(cond, stop);
```

<p align="center"><img src="doxygen/images/conditional-tasking-1.svg"></p>


## Offload a Task to a GPU

Taskflow supports GPU tasking for you to accelerate a wide range of\
 scientific computing applications by harnessing the power of CPU-GPU\
 collaborative computing using Nvidia CUDA Graph.

```cpp
__global__ void saxpy(size_t N, float alpha, float* dx, float* dy) {
  int i = blockIdx.x*blockDim.x + threadIdx.x;
  if (i < n) {
    y[i] = a*x[i] + y[i];
  }
}
  
// create a CUDA Graph task
tf::Task cudaflow = taskflow.emplace([&]() {
  tf::cudaGraph cg;
  tf::cudaTask h2d_x = cg.copy(dx, hx.data(), N);
  tf::cudaTask h2d_y = cg.copy(dy, hy.data(), N);
  tf::cudaTask d2h_x = cg.copy(hx.data(), dx, N);
  tf::cudaTask d2h_y = cg.copy(hy.data(), dy, N);
  tf::cudaTask saxpy = cg.kernel((N+255)/256, 256, 0, saxpy, N, 2.0f, dx, dy);
  saxpy.succeed(h2d_x, h2d_y)
       .precede(d2h_x, d2h_y);
  
  // instantiate an executable CUDA graph and run it through a stream
  tf::cudaGraphExec exec(cg);
  tf::cudaStream stream;
  stream.run(exec).synchronize();
}).name("CUDA Graph Task");
```

<p align="center"><img src="doxygen/images/saxpy_1_cudaflow.svg"></p>

## Compose Task Graphs

Taskflow is composable. 
You can create large parallel graphs through composition of modular 
and reusable blocks that are easier to optimize at an individual scope.

```cpp
tf::Taskflow f1, f2;

// create taskflow f1 of two tasks
tf::Task f1A = f1.emplace([]() { std::cout << "Task f1A\n"; })
                 .name("f1A");
tf::Task f1B = f1.emplace([]() { std::cout << "Task f1B\n"; })
                 .name("f1B");

// create taskflow f2 with one module task composed of f1
tf::Task f2A = f2.emplace([]() { std::cout << "Task f2A\n"; })
                 .name("f2A");
tf::Task f2B = f2.emplace([]() { std::cout << "Task f2B\n"; })
                 .name("f2B");
tf::Task f2C = f2.emplace([]() { std::cout << "Task f2C\n"; })
                 .name("f2C");

tf::Task f1_module_task = f2.composed_of(f1)
                            .name("module");

f1_module_task.succeed(f2A, f2B)
              .precede(f2C);
```

<p align="center"><img src="doxygen/images/composition.svg"></p>

## Launch Asynchronous Tasks

Taskflow supports *asynchronous* tasking.
You can launch tasks asynchronously to dynamically explore task graph\
 parallelism.

```cpp
tf::Executor executor;

// create asynchronous tasks directly from an executor
std::future<int> future = executor.async([](){ 
  std::cout << "async task returns 1\n";
  return 1;
}); 
executor.silent_async([](){ std::cout << "async task does not return\n"; });

// create asynchronous tasks with dynamic dependencies
tf::AsyncTask A = executor.silent_dependent_async([](){ printf("A\n"); });
tf::AsyncTask B = executor.silent_dependent_async([](){ printf("B\n"); }, A);
tf::AsyncTask C = executor.silent_dependent_async([](){ printf("C\n"); }, A);
tf::AsyncTask D = executor.silent_dependent_async([](){ printf("D\n"); }, B,\
 C);

executor.wait_for_all();
```

## Execute a Taskflow

The executor provides several *thread-safe* methods to run a taskflow. 
You can run a taskflow once, multiple times, or until a stopping criteria is\
 met. 
These methods are non-blocking with a `tf::Future<void>` return 
to let you query the execution status. 

```cpp
// runs the taskflow once
tf::Future<void> run_once = executor.run(taskflow); 

// wait on this run to finish
run_once.get();

// run the taskflow four times
executor.run_n(taskflow, 4);

// runs the taskflow five times
executor.run_until(taskflow, [counter=5](){ return --counter == 0; });

// block the executor until all submitted taskflows complete
executor.wait_for_all();
```

## Leverage Standard Parallel Algorithms

Taskflow defines algorithms for you to quickly express common parallel
patterns using standard C++ syntaxes, 
such as parallel iterations, parallel reductions, and parallel sort.

```cpp
tf::Task task1 = taskflow.for_each( // assign each element to 100 in parallel
  first, last, [] (auto& i) { i = 100; }    
);
tf::Task task2 = taskflow.reduce(   // reduce a range of items in parallel
  first, last, init, [] (auto a, auto b) { return a + b; }
);
tf::Task task3 = taskflow.sort(     // sort a range of items in parallel
  first, last, [] (auto a, auto b) { return a < b; }
);
```

Additionally, Taskflow provides composable graph building blocks for you to 
efficiently implement common parallel algorithms, such as parallel pipeline.

```cpp
// create a pipeline to propagate five tokens through three serial stages
tf::Pipeline pl(num_parallel_lines,
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    if(pf.token() == 5) {
      pf.stop();
    }
  }},
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    printf("stage 2: input buffer[%zu] = %d\n", pf.line(), buffer[pf.line()]);
  }},
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    printf("stage 3: input buffer[%zu] = %d\n", pf.line(), buffer[pf.line()]);
  }}
);
taskflow.composed_of(pl)
executor.run(taskflow).wait();
```


# Supported Compilers

To use Taskflow, you only need a compiler that supports C++17:

+ GNU C++ Compiler at least v8.4 with -std=c++17
+ Clang C++ Compiler at least v6.0 with -std=c++17
+ Microsoft Visual Studio at least v19.14 with /std:c++17
+ AppleClang Xcode Version at least v12.0 with -std=c++17
+ Nvidia CUDA Toolkit and Compiler (nvcc) at least v11.1 with -std=c++17
+ Intel C++ Compiler at least v19.0.1 with -std=c++17
+ Intel DPC++ Clang Compiler at least v13.0.0 with -std=c++17 and SYCL20

Taskflow works on Linux, Windows, and Mac OS X.

Although Taskflow supports primarily C++17, you can enable C++20 compilation
through `-std=c++20` (or `/std:c++20` for MSVC) to achieve better performance\
 due to new C++20 features.

# Learn More about Taskflow

Visit our [project website][Project Website] and [documentation][documentatio\
n]
to learn more about Taskflow. To get involved:

  + See [release notes][release notes] to stay up-to-date with newest versions
  + Read the step-by-step tutorial at [cookbook][cookbook]
  + Submit an issue at [GitHub issues][GitHub issues]
  + Find out our technical details at [references][references]
  + Watch our technical talks at YouTube

[![Taskflow Tutorials](https://img.youtube.com/vi/u4vaY0cjzos/0.jpg)](https:/\
/www.youtube.com/watch?v=u4vaY0cjzos)

We are committed to support trustworthy developments for 
both academic and industrial research projects in parallel 
and heterogeneous computing. 
If you are using Taskflow, please cite the following paper we published at\
 2021 IEEE TPDS:

+ Tsung-Wei Huang, Dian-Lun Lin, Chun-Xun Lin, and Yibo Lin, &quot;[Taskflow:\
 A Lightweight Parallel and Heterogeneous Task Graph Computing\
 System](https://tsung-wei-huang.github.io/papers/tpds21-taskflow.pdf),&quot;\
 <i>IEEE Transactions on Parallel and Distributed Systems (TPDS)</i>, vol.\
 33, no. 6, pp. 1303-1320, June 2022

More importantly, we appreciate all Taskflow [contributors][contributors] and 
the following organizations for sponsoring the Taskflow project!

| <!-- --> | <!-- --> | <!-- --> | <!-- --> |
|:-------------------------:|:-------------------------:|:-------------------\
------:|:-------------------------:|
|<img src="doxygen/images/utah-ece-logo.png">|<img src="doxygen/images/nsf.pn\
g"> | <img src="doxygen/images/darpa.png"> | <img src="doxygen/images/NumFocu\
s.png">|
|<img src="doxygen/images/nvidia-logo.png"> | <img src="doxygen/images/uw-mad\
ison-ece-logo.png"> | | |

[Taskflow](https://ads.fund/token/0xadf8c696719c904923504683d3f3f7d18774ac06)\
 project is also supported by ADS.FUND.

# License

Taskflow is licensed with the [MIT License](./LICENSE). 
You are completely free to re-distribute your work derived from Taskflow.

* * *

[Tsung-Wei Huang]:       https://tsung-wei-huang.github.io/
[GitHub releases]:       https://github.com/taskflow/taskflow/releases
[GitHub issues]:         https://github.com/taskflow/taskflow/issues
[GitHub insights]:       https://github.com/taskflow/taskflow/pulse
[GitHub pull requests]:  https://github.com/taskflow/taskflow/pulls
[GraphViz]:              https://www.graphviz.org/
[Project Website]:       https://taskflow.github.io/
[cppcon20 talk]:         https://www.youtube.com/watch?v=MX15huP5DsM
[contributors]:          https://taskflow.github.io/taskflow/contributors.html
[totalgee]:              https://github.com/totalgee
[NSF]:                   https://www.nsf.gov/
[UIUC]:                  https://illinois.edu/
[CSL]:                   https://csl.illinois.edu/
[UofU]:                  https://www.utah.edu/
[documentation]:         https://taskflow.github.io/taskflow/index.html
[release notes]:         https://taskflow.github.io/taskflow/Releases.html
[cookbook]:              https://taskflow.github.io/taskflow/pages.html
[references]:            https://taskflow.github.io/taskflow/References.html
[PayMe]:                 https://www.paypal.me/twhuang/10
[email me]:              mailto:twh760812@gmail.com
[Cpp Conference 2018]:   https://github.com/CppCon/CppCon2018
[TPDS22]:                https://tsung-wei-huang.github.io/papers/tpds21-task\
flow.pdf


\
description-type: text/markdown;variant=GFM
package-description:
\
# libtaskflow - General-purpose Task-parallel Programming System

This is a `build2` package for the [`taskflow`](https://github.com/taskflow/t\
askflow)
C++ library. It provides task decomposition strategies that incorporate
both regular and irregular compute patterns, together with a work-stealing
scheduler to optimize your multithreaded performance.


## Usage

To start using `libtaskflow` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libtaskflow ^3.10.0
```

Then import the library in your `buildfile`:

```
import libs = libtaskflow%lib{taskflow}
```


## Importable targets

This package provides the following importable targets:

```
lib{taskflow}
```

Taskflow lets you quickly implement task decomposition strategies
that incorporate both regular and irregular compute patterns,
together with an efficient *work-stealing* scheduler to optimize your
multithreaded performance.


## Configuration variables

This package provides the following configuration variables:

```
[bool] config.libtaskflow.task_pool ?= true
[bool] config.libtaskflow.atomic_notifier ?= ($cxx.std >= 20)

[bool] config.libtaskflow.cuda ?= false
```

- `task_pool`       : Enable/Disable task pool optimization.
- `atomic_notifier` : Enable/Disable atomic notifier (requires C++20).
- `cuda`            : Enable/Disable the `<taskflow/cuda/...>` headers.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/taskflow/taskflow
package-url: https://github.com/build2-packaging/taskflow
email: twh760812@gmail.com; Author
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libtaskflow == 3.11.0
depends: doctest ^2.4.7
depends: * cuda-nvcc ^12.8.0+4
bootstrap-build:
\
project = libtaskflow-tests

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# Every exe{} in this subproject is by default a test.
#
exe{*}: test = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: taskflow/libtaskflow-tests-3.11.0.tar.gz
sha256sum: 53501147222827f63ab4448a19201130ee096b82491d574da4131ce6d1362ab1
:
name: libtaskflow-tests
version: 4.0.0
type: exe
language: c++
project: taskflow
summary: A General-purpose Task-parallel Programming System ; tests
license: MIT; MIT License.
description:
\
# Taskflow <img align="right" width="10%" src="image/taskflow_logo.png">

<!--[![Linux Build Status](https://travis-ci.com/taskflow/taskflow.svg?branch\
=master)](https://travis-ci.com/taskflow/taskflow)-->
[![Ubuntu](https://github.com/taskflow/taskflow/workflows/Ubuntu/badge.svg)](\
https://github.com/taskflow/taskflow/actions?query=workflow%3AUbuntu)
[![macOS](https://github.com/taskflow/taskflow/workflows/macOS/badge.svg)](ht\
tps://github.com/taskflow/taskflow/actions?query=workflow%3AmacOS)
[![Windows](https://github.com/taskflow/taskflow/workflows/Windows/badge.svg)\
](https://github.com/taskflow/taskflow/actions?query=workflow%3AWindows)
[![Wiki](image/api-doc.svg)][documentation]
[![TFProf](image/tfprof.svg)](https://taskflow.github.io/tfprof/)
[![Cite](image/cite-tpds.svg)][TPDS22]

Taskflow helps you quickly write task-parallel programs using modern C++

# Why Taskflow?

Taskflow is faster, more expressive, and easier to integrate than many\
 existing task programming frameworks when handling complex parallel\
 workloads.

![](image/performance.png)

Taskflow lets you quickly implement task decomposition strategies
that incorporate both regular and irregular compute patterns,
together with an efficient *work-stealing* scheduler to optimize your\
 multithreaded performance.

| [Static Tasking](#start-your-first-taskflow-program) | [Subflow\
 Tasking](#create-a-subflow-graph) |
| :------------: | :-------------: |
| ![](image/static_graph.svg) | <img align="right" src="image/dynamic_graph.s\
vg" width="100%"> |

Taskflow supports conditional tasking for you to make rapid control-flow\
 decisions
across dependent tasks to implement cycles and conditions that were otherwise\
 difficult to do
with existing tools.

| [Conditional Tasking](#integrate-control-flow-to-a-task-graph) |
| :-----------------: |
| ![](image/condition.svg) |

Taskflow is composable. You can create large parallel graphs through
composition of modular and reusable blocks that are easier to optimize
at an individual scope.

| [Taskflow Composition](#compose-task-graphs) |
| :---------------: |
|![](image/framework.svg)|

Taskflow supports heterogeneous tasking for you to
accelerate a wide range of scientific computing applications
by harnessing the power of CPU-GPU collaborative computing.

| [Concurrent CPU-GPU Tasking](#offload-a-task-to-a-gpu) |
| :-----------------: |
| ![](image/cudaflow.svg) |


Taskflow provides visualization and tooling needed for profiling Taskflow\
 programs.

| [Taskflow Profiler](https://taskflow.github.io/tfprof) |
| :-----------------: |
| ![](image/tfprof.png) |

We are committed to support trustworthy developments for both academic and\
 industrial research projects
in parallel computing. Check out [Who is Using Taskflow](https://taskflow.git\
hub.io/#tag_users) and what our users say:

+ *"Taskflow is the cleanest Task API I've ever seen." [Damien Hocking\
 @Corelium Inc](http://coreliuminc.com)*
+ *"Taskflow has a very simple and elegant tasking interface. The performance\
 also scales very well." [Glen Fraser][totalgee]*
+ *"Taskflow lets me handle parallel processing in a smart way." [Hayabusa\
 @Learning](https://cpp-learning.com/cpp-taskflow/)*
+ *"Taskflow improves the throughput of our graph engine in just a few hours\
 of coding." [Jean-Michaël @KDAB](https://ossia.io/)*
+ *"Best poster award for open-source parallel programming library." [Cpp\
 Conference 2018][Cpp Conference 2018]*
+ *"Second Prize of Open-source Software Competition." [ACM Multimedia\
 Conference 2019](https://tsung-wei-huang.github.io/img/mm19-ossc-award.jpg)*

See a quick poster presentation below and
visit the [documentation][documentation] to learn more about Taskflow.
Technical details can be referred to our [IEEE TPDS paper][TPDS22].

![](image/taskflow-poster.png)

# Start Your First Taskflow Program

The following program (`simple.cpp`) creates a taskflow of four tasks 
`A`, `B`, `C`, and `D`, where `A` runs before `B` and `C`, and `D`
runs after `B` and `C`.
When `A` finishes, `B` and `C` can run in parallel.
Try it live on [Compiler Explorer (godbolt)](https://godbolt.org/z/j8hx3xnnx)!



```cpp
#include <taskflow/taskflow.hpp>  // Taskflow is header-only

int main(){
  
  tf::Executor executor;
  tf::Taskflow taskflow;

  auto [A, B, C, D] = taskflow.emplace(  // create four tasks
    [] () { std::cout << "TaskA\n"; },
    [] () { std::cout << "TaskB\n"; },
    [] () { std::cout << "TaskC\n"; },
    [] () { std::cout << "TaskD\n"; } 
  );                                  
                                      
  A.precede(B, C);  // A runs before B and C
  D.succeed(B, C);  // D runs after  B and C
                                      
  executor.run(taskflow).wait(); 

  return 0;
}
```

Taskflow is *header-only* and there is no wrangle with installation.
To compile the program, clone the Taskflow project and 
tell the compiler to include the [headers](./taskflow/).

```bash
~$ git clone https://github.com/taskflow/taskflow.git  # clone it only once
~$ g++ -std=c++20 examples/simple.cpp -I. -O2 -pthread -o simple
~$ ./simple
TaskA
TaskC 
TaskB 
TaskD
```

# Visualize Your First Taskflow Program

Taskflow comes with a built-in profiler, 
[TFProf](https://taskflow.github.io/tfprof/), 
for you to profile and visualize taskflow programs
in an easy-to-use web-based interface.

![](doxygen/images/tfprof.png)

```bash
# run the program with the environment variable TF_ENABLE_PROFILER enabled
~$ TF_ENABLE_PROFILER=simple.json ./simple
~$ cat simple.json
[
{"executor":"0","data":[{"worker":0,"level":0,"data":[{"span":[172,186],"name\
":"0_0","type":"static"},{"span":[187,189],"name":"0_1","type":"static"}]},{"\
worker":2,"level":0,"data":[{"span":[93,164],"name":"2_0","type":"static"},{"\
span":[170,179],"name":"2_1","type":"static"}]}]}
]
# paste the profiling json data to https://taskflow.github.io/tfprof/
```

In addition to execution diagram, you can dump the graph to a DOT format 
and visualize it using a number of free [GraphViz][GraphViz] tools.

```
// dump the taskflow graph to a DOT format through std::cout
taskflow.dump(std::cout); 
```

<p align="center"><img src="doxygen/images/simple.svg"></p>

# Express Task Graph Parallelism

Taskflow empowers users with both static and dynamic task graph constructions
to express end-to-end parallelism in a task graph that
embeds in-graph control flow.

1. [Create a Subflow Graph](#create-a-subflow-graph)
2. [Integrate Control Flow to a Task Graph](#integrate-control-flow-to-a-task\
-graph)
3. [Offload a Task to a GPU](#offload-a-task-to-a-gpu)
4. [Compose Task Graphs](#compose-task-graphs)
5. [Launch Asynchronous Tasks](#launch-asynchronous-tasks)
6. [Execute a Taskflow](#execute-a-taskflow)
7. [Leverage Standard Parallel Algorithms](#leverage-standard-parallel-algori\
thms)

## Create a Subflow Graph

Taskflow supports *dynamic tasking* for you to create a subflow
graph from the execution of a task to perform dynamic parallelism.
The following program spawns a task dependency graph parented at task `B`.

```cpp
tf::Task A = taskflow.emplace([](){}).name("A");  
tf::Task C = taskflow.emplace([](){}).name("C");  
tf::Task D = taskflow.emplace([](){}).name("D");  

tf::Task B = taskflow.emplace([] (tf::Subflow& subflow) { 
  tf::Task B1 = subflow.emplace([](){}).name("B1");  
  tf::Task B2 = subflow.emplace([](){}).name("B2");  
  tf::Task B3 = subflow.emplace([](){}).name("B3");  
  B3.succeed(B1, B2);  // B3 runs after B1 and B2
}).name("B");

A.precede(B, C);  // A runs before B and C
D.succeed(B, C);  // D runs after  B and C
```

<p align="center"><img src="doxygen/images/subflow_join.svg"></p>

## Integrate Control Flow to a Task Graph 

Taskflow supports *conditional tasking* for you to make rapid 
control-flow decisions across dependent tasks to implement cycles 
and conditions in an *end-to-end* task graph.

```cpp
tf::Task init = taskflow.emplace([](){}).name("init");
tf::Task stop = taskflow.emplace([](){}).name("stop");

// creates a condition task that returns a random binary
tf::Task cond = taskflow.emplace(
  [](){ return std::rand() % 2; }
).name("cond");

init.precede(cond);

// creates a feedback loop {0: cond, 1: stop}
cond.precede(cond, stop);
```

<p align="center"><img src="doxygen/images/conditional-tasking-1.svg"></p>


## Offload a Task to a GPU

Taskflow supports GPU tasking for you to accelerate a wide range of\
 scientific computing applications by harnessing the power of CPU-GPU\
 collaborative computing using Nvidia CUDA Graph.

```cpp
__global__ void saxpy(size_t N, float alpha, float* dx, float* dy) {
  int i = blockIdx.x*blockDim.x + threadIdx.x;
  if (i < N) {
    y[i] = alpha*x[i] + y[i];
  }
}
  
// create a CUDA Graph task
tf::Task cudaflow = taskflow.emplace([&]() {
  tf::cudaGraph cg;
  tf::cudaTask h2d_x = cg.copy(dx, hx.data(), N);
  tf::cudaTask h2d_y = cg.copy(dy, hy.data(), N);
  tf::cudaTask d2h_x = cg.copy(hx.data(), dx, N);
  tf::cudaTask d2h_y = cg.copy(hy.data(), dy, N);
  tf::cudaTask saxpy = cg.kernel((N+255)/256, 256, 0, saxpy, N, 2.0f, dx, dy);
  saxpy.succeed(h2d_x, h2d_y)
       .precede(d2h_x, d2h_y);
  
  // instantiate an executable CUDA graph and run it through a stream
  tf::cudaGraphExec exec(cg);
  tf::cudaStream stream;
  stream.run(exec).synchronize();
}).name("CUDA Graph Task");
```

<p align="center"><img src="doxygen/images/saxpy_1_cudaflow.svg"></p>

## Compose Task Graphs

Taskflow is composable. 
You can create large parallel graphs through composition of modular 
and reusable blocks that are easier to optimize at an individual scope.

```cpp
tf::Taskflow f1, f2;

// create taskflow f1 of two tasks
tf::Task f1A = f1.emplace([]() { std::cout << "Task f1A\n"; })
                 .name("f1A");
tf::Task f1B = f1.emplace([]() { std::cout << "Task f1B\n"; })
                 .name("f1B");

// create taskflow f2 with one module task composed of f1
tf::Task f2A = f2.emplace([]() { std::cout << "Task f2A\n"; })
                 .name("f2A");
tf::Task f2B = f2.emplace([]() { std::cout << "Task f2B\n"; })
                 .name("f2B");
tf::Task f2C = f2.emplace([]() { std::cout << "Task f2C\n"; })
                 .name("f2C");

tf::Task f1_module_task = f2.composed_of(f1)
                            .name("module");

f1_module_task.succeed(f2A, f2B)
              .precede(f2C);
```

<p align="center"><img src="doxygen/images/composition.svg"></p>

## Launch Asynchronous Tasks

Taskflow supports *asynchronous* tasking.
You can launch tasks asynchronously to dynamically explore task graph\
 parallelism.

```cpp
tf::Executor executor;

// create asynchronous tasks directly from an executor
std::future<int> future = executor.async([](){ 
  std::cout << "async task returns 1\n";
  return 1;
}); 
executor.silent_async([](){ std::cout << "async task does not return\n"; });

// create asynchronous tasks with dynamic dependencies
tf::AsyncTask A = executor.silent_dependent_async([](){ printf("A\n"); });
tf::AsyncTask B = executor.silent_dependent_async([](){ printf("B\n"); }, A);
tf::AsyncTask C = executor.silent_dependent_async([](){ printf("C\n"); }, A);
tf::AsyncTask D = executor.silent_dependent_async([](){ printf("D\n"); }, B,\
 C);

executor.wait_for_all();
```

## Execute a Taskflow

The executor provides several *thread-safe* methods to run a taskflow. 
You can run a taskflow once, multiple times, or until a stopping criteria is\
 met. 
These methods are non-blocking with a `tf::Future<void>` return 
to let you query the execution status. 

```cpp
// runs the taskflow once
tf::Future<void> run_once = executor.run(taskflow); 

// wait on this run to finish
run_once.get();

// run the taskflow four times
executor.run_n(taskflow, 4);

// runs the taskflow five times
executor.run_until(taskflow, [counter=5](){ return --counter == 0; });

// block the executor until all submitted taskflows complete
executor.wait_for_all();
```

## Leverage Standard Parallel Algorithms

Taskflow defines algorithms for you to quickly express common parallel
patterns using standard C++ syntaxes, 
such as parallel iterations, parallel reductions, and parallel sort.

```cpp
tf::Task task1 = taskflow.for_each( // assign each element to 100 in parallel
  first, last, [] (auto& i) { i = 100; }    
);
tf::Task task2 = taskflow.reduce(   // reduce a range of items in parallel
  first, last, init, [] (auto a, auto b) { return a + b; }
);
tf::Task task3 = taskflow.sort(     // sort a range of items in parallel
  first, last, [] (auto a, auto b) { return a < b; }
);
```

Additionally, Taskflow provides composable graph building blocks for you to 
efficiently implement common parallel algorithms, such as parallel pipeline.

```cpp
// create a pipeline to propagate five tokens through three serial stages
tf::Pipeline pl(num_parallel_lines,
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    if(pf.token() == 5) {
      pf.stop();
    }
  }},
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    printf("stage 2: input buffer[%zu] = %d\n", pf.line(), buffer[pf.line()]);
  }},
  tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf) {
    printf("stage 3: input buffer[%zu] = %d\n", pf.line(), buffer[pf.line()]);
  }}
);
taskflow.composed_of(pl)
executor.run(taskflow).wait();
```


# Supported Compilers

To use Taskflow v4.0.0, you need a compiler that supports C++20:

  + GNU C++ Compiler at least v11.0 with -std=c++20
  + Clang C++ Compiler at least v12.0 with -std=c++20
  + Microsoft Visual Studio at least v19.29 (VS 2019) with /std:c++20
  + Apple Clang (Xcode) at least v13.0 with -std=c++20
  + NVIDIA CUDA Toolkit and Compiler (nvcc) at least v12.0 with host compiler\
 supporting C++20
  + Intel oneAPI DPC++/C++ Compiler at least v2022.0 with -std=c++20

Taskflow works on Linux, Windows, and Mac OS X.

# Learn More about Taskflow

Visit our [project website][Project Website] and [documentation][documentatio\
n]
to learn more about Taskflow. To get involved:

  + See [release notes][release notes] to stay up-to-date with newest versions
  + Read the step-by-step tutorial at [cookbook][cookbook]
  + Submit an issue at [GitHub issues][GitHub issues]
  + Find out our technical details at [references][references]
  + Watch our technical talks at YouTube

[![Taskflow Tutorials](https://img.youtube.com/vi/u4vaY0cjzos/0.jpg)](https:/\
/www.youtube.com/watch?v=u4vaY0cjzos)

We are committed to support trustworthy developments for 
both academic and industrial research projects in parallel 
and heterogeneous computing. 
If you are using Taskflow, please cite the following paper we published at\
 2021 IEEE TPDS:

+ Tsung-Wei Huang, Dian-Lun Lin, Chun-Xun Lin, and Yibo Lin, &quot;[Taskflow:\
 A Lightweight Parallel and Heterogeneous Task Graph Computing\
 System](https://tsung-wei-huang.github.io/papers/tpds21-taskflow.pdf),&quot;\
 <i>IEEE Transactions on Parallel and Distributed Systems (TPDS)</i>, vol.\
 33, no. 6, pp. 1303-1320, June 2022

More importantly, we appreciate all Taskflow [contributors][contributors] and 
the following organizations for sponsoring the Taskflow project!

| <!-- --> | <!-- --> | <!-- --> | <!-- --> |
|:-------------------------:|:-------------------------:|:-------------------\
------:|:-------------------------:|
|<img src="doxygen/images/utah-ece-logo.png">|<img src="doxygen/images/nsf.pn\
g"> | <img src="doxygen/images/darpa.png"> | <img src="doxygen/images/NumFocu\
s.png">|
|<img src="doxygen/images/nvidia-logo.png"> | <img src="doxygen/images/uw-mad\
ison-ece-logo.png"> | | |

[Taskflow](https://ads.fund/token/0xadf8c696719c904923504683d3f3f7d18774ac06)\
 project is also supported by ADS.FUND.

# License

Taskflow is licensed with the [MIT License](./LICENSE). 
You are completely free to re-distribute your work derived from Taskflow.

* * *

[Tsung-Wei Huang]:       https://tsung-wei-huang.github.io/
[GitHub releases]:       https://github.com/taskflow/taskflow/releases
[GitHub issues]:         https://github.com/taskflow/taskflow/issues
[GitHub insights]:       https://github.com/taskflow/taskflow/pulse
[GitHub pull requests]:  https://github.com/taskflow/taskflow/pulls
[GraphViz]:              https://www.graphviz.org/
[Project Website]:       https://taskflow.github.io/
[cppcon20 talk]:         https://www.youtube.com/watch?v=MX15huP5DsM
[contributors]:          https://taskflow.github.io/taskflow/contributors.html
[totalgee]:              https://github.com/totalgee
[NSF]:                   https://www.nsf.gov/
[UIUC]:                  https://illinois.edu/
[CSL]:                   https://csl.illinois.edu/
[UofU]:                  https://www.utah.edu/
[documentation]:         https://taskflow.github.io/taskflow/index.html
[release notes]:         https://taskflow.github.io/taskflow/Releases.html
[cookbook]:              https://taskflow.github.io/taskflow/pages.html
[references]:            https://taskflow.github.io/taskflow/References.html
[PayMe]:                 https://www.paypal.me/twhuang/10
[email me]:              mailto:twh760812@gmail.com
[Cpp Conference 2018]:   https://github.com/CppCon/CppCon2018
[TPDS22]:                https://tsung-wei-huang.github.io/papers/tpds21-task\
flow.pdf


\
description-type: text/markdown;variant=GFM
package-description:
\
# libtaskflow - General-purpose Task-parallel Programming System

This is a `build2` package for the [`taskflow`](https://github.com/taskflow/t\
askflow)
C++ library. It provides task decomposition strategies that incorporate
both regular and irregular compute patterns, together with a work-stealing
scheduler to optimize your multithreaded performance.


## Usage

To start using `libtaskflow` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libtaskflow ^3.10.0
```

Then import the library in your `buildfile`:

```
import libs = libtaskflow%lib{taskflow}
```


## Importable targets

This package provides the following importable targets:

```
lib{taskflow}
```

Taskflow lets you quickly implement task decomposition strategies
that incorporate both regular and irregular compute patterns,
together with an efficient *work-stealing* scheduler to optimize your
multithreaded performance.


## Configuration variables

This package provides the following configuration variables:

```
[bool] config.libtaskflow.task_pool ?= true
[bool] config.libtaskflow.atomic_notifier ?= ($cxx.std >= 20)

[bool] config.libtaskflow.cuda ?= false
```

- `task_pool`       : Enable/Disable task pool optimization.
- `atomic_notifier` : Enable/Disable atomic notifier (requires C++20).
- `cuda`            : Enable/Disable the `<taskflow/cuda/...>` headers.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/taskflow/taskflow
package-url: https://github.com/build2-packaging/taskflow
email: twh760812@gmail.com; Author
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libtaskflow == 4.0.0
depends: doctest ^2.4.7
depends: * cuda-nvcc ^13.0.2+2
bootstrap-build:
\
project = libtaskflow-tests

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# Every exe{} in this subproject is by default a test.
#
exe{*}: test = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: taskflow/libtaskflow-tests-4.0.0.tar.gz
sha256sum: 4ffab950381c2ec0f401440621e2780be05ebf6a16e75904f31dc96ae2f7dd12
:
name: libtensorrt
version: 10.8.0+4
upstream-version: 10.8.0.43
type: lib,binless
language: c++
project: nvidia-tensorrt
summary: NVIDIA TensorRT
license: other: TensorRT; https://docs.nvidia.com/deeplearning/tensorrt/lates\
t/reference/sla.html
description:
\
# libtensort - A C++ library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

NVIDIA® TensorRT™ is a C++ library that facilitates high-performance inference
on NVIDIA GPUs. TensorRT takes a trained network, which consists of a network
definition and a set of trained parameters, and produces a highly optimized
runtime engine that performs inference for that network. TensorRT provides\
 APIs
using C++ and Python that help to express deep learning models using the\
 Network
Definition API or load a pre-defined model using the parsers that allow\
 TensorRT
to optimize and run them on an NVIDIA GPU. TensorRT applies graph\
 optimizations,
layer fusion, among other optimizations, while also finding the fastest
implementation of that model leveraging a diverse collection of highly\
 optimized
kernels. TensorRT also supplies a runtime that you can use to execute this
network on NVIDIA’s GPUs.

For more information about TensorRT, visit https://developer.nvidia.com/tenso\
rrt.

## Usage

To start using `libtensorrt` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libtensorrt ^10.8.0
```

Then import the library in your `buildfile`:

```
import libs = libtensorrt%libs{tensorrt}
```


## Importable targets

This package provides the following importable targets:

```
libs{tensorrt}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/machine-learning
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: cuda-cudart ^12.8.0+3
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = libtensorrt

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-tensorrt/libtensorrt-10.8.0+4.tar.gz
sha256sum: 0cef3fa97a38af619d0233c8a4eca9977f42a1731f805a8d143866b2b8b96221
:
name: libtensorrt
version: 10.13.3
upstream-version: 10.13.3.43
type: lib,binless
language: c++
project: nvidia-tensorrt
summary: NVIDIA TensorRT
license: other: TensorRT; https://docs.nvidia.com/deeplearning/tensorrt/lates\
t/reference/sla.html
description:
\
# libtensort - A C++ library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

NVIDIA® TensorRT™ is a C++ library that facilitates high-performance inference
on NVIDIA GPUs. TensorRT takes a trained network, which consists of a network
definition and a set of trained parameters, and produces a highly optimized
runtime engine that performs inference for that network. TensorRT provides\
 APIs
using C++ and Python that help to express deep learning models using the\
 Network
Definition API or load a pre-defined model using the parsers that allow\
 TensorRT
to optimize and run them on an NVIDIA GPU. TensorRT applies graph\
 optimizations,
layer fusion, among other optimizations, while also finding the fastest
implementation of that model leveraging a diverse collection of highly\
 optimized
kernels. TensorRT also supplies a runtime that you can use to execute this
network on NVIDIA’s GPUs.

For more information about TensorRT, visit https://developer.nvidia.com/tenso\
rrt.

## Usage

To start using `libtensorrt` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libtensorrt ^10.8.0
```

Then import the library in your `buildfile`:

```
import libs = libtensorrt%libs{tensorrt}
```


## Importable targets

This package provides the following importable targets:

```
libs{tensorrt}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/machine-learning
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: cuda-cudart ^13.0.2
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = libtensorrt

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-tensorrt/libtensorrt-10.13.3.tar.gz
sha256sum: 6cf6b20c87726088b1250c187a2ceba7977c0aeb848bb0848646872214ad2471
:
name: libtensorrt
version: 10.14.1
upstream-version: 10.14.1.48
type: lib,binless
language: c++
project: nvidia-tensorrt
summary: NVIDIA TensorRT
license: other: TensorRT; https://docs.nvidia.com/deeplearning/tensorrt/lates\
t/reference/sla.html
description:
\
# libtensort - A C++ library

> **NOTE:**  
This package is not open source and does not contain any source code. Instead,
in order to "build" the exported target(s) it downloads (potentially large)
pre-built binaries provided by NVIDIA for the target platform.
>
> CI for this package is disabled due to the above.  
Supported platforms/compilers are Windows/MSVC. Linux binaries exist but are
currently not available through this package.

NVIDIA® TensorRT™ is a C++ library that facilitates high-performance inference
on NVIDIA GPUs. TensorRT takes a trained network, which consists of a network
definition and a set of trained parameters, and produces a highly optimized
runtime engine that performs inference for that network. TensorRT provides\
 APIs
using C++ and Python that help to express deep learning models using the\
 Network
Definition API or load a pre-defined model using the parsers that allow\
 TensorRT
to optimize and run them on an NVIDIA GPU. TensorRT applies graph\
 optimizations,
layer fusion, among other optimizations, while also finding the fastest
implementation of that model leveraging a diverse collection of highly\
 optimized
kernels. TensorRT also supplies a runtime that you can use to execute this
network on NVIDIA’s GPUs.

For more information about TensorRT, visit https://developer.nvidia.com/tenso\
rrt.

## Usage

To start using `libtensorrt` in your project, add the following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libtensorrt ^10.8.0
```

Then import the library in your `buildfile`:

```
import libs = libtensorrt%libs{tensorrt}
```


## Importable targets

This package provides the following importable targets:

```
libs{tensorrt}
```

\
description-type: text/markdown;variant=GFM
url: https://developer.download.nvidia.com/compute/machine-learning
email: NVSDKIssues@nvidia.com
package-email: packaging@build2.org; Mailing list.
build-error-email: helmesjo@gmail.com
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: cuda-cudart ^13.0.2
builds: none; Times out downloading large binaries
bootstrap-build:
\
project = libtensorrt

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# Only Windows is currently supported.
#
if ($cc.target.class != 'windows')
  fail 'Only Windows is currently supported'

\
location: nvidia-tensorrt/libtensorrt-10.14.1.tar.gz
sha256sum: 485409d0e39969c808f328a14599f9da4318305090f63a1f8504e4a0cbf8621f
:
name: libtinyexr
version: 1.0.9
type: lib,binless
language: c++
project: tinyexr
summary: OpenEXR image loader/saver library
license: BSD-3-Clause
description:
\
# Tiny OpenEXR image library.

![Example](https://github.com/syoyo/tinyexr/blob/release/asakusa.png?raw=true)

[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/k07ftfe\
4ph057qau/branch/release?svg=true)](https://ci.appveyor.com/project/syoyo/tin\
yexr/branch/release)

[![Coverity Scan Build Status](https://scan.coverity.com/projects/5827/badge.\
svg)](https://scan.coverity.com/projects/5827)

`tinyexr` is a small, single header-only library to load and save OpenEXR\
 (.exr) images.
`tinyexr` is written in portable C++ (no library dependency except for STL),\
 thus `tinyexr` is good to embed into your application.
To use `tinyexr`, simply copy `tinyexr.h`, `miniz.c` and `miniz.h`(for zlib.\
 You can use system-installed zlib instead of miniz, or the zlib\
 implementation included in `stb_image[_write].h`. Controlled with\
 `TINYEXR_USE_MINIZ` and `TINYEXR_USE_STB_ZLIB` compile flags) into your\
 project.

# Security

TinyEXR does not use C++ exception.

TinyEXR now does not use `assert` from v1.0.4(2023/06/04), except for miniz's\
 assert.
(We plan to use wuff's zlib for better security and performance)

TinyEXR is fuzz tested and **currently no security issues**(No seg fault for\
 any malcious/corrupted input EXR data) as of v1.0.7.

# Features

Current status of `tinyexr` is:

- OpenEXR v1 image
  - [x] Scanline format
  - [x] Tiled format
    - [x] Tile format with no LoD (load).
    - [x] Tile format with LoD (load).
    - [x] Tile format with no LoD (save).
    - [x] Tile format with LoD (save).
  - [x] Custom attributes
- OpenEXR v2 image
  - [ ] Multipart format
    - [x] Load multi-part image
    - [x] Save multi-part image
    - [ ] Load multi-part deep image
    - [ ] Save multi-part deep image
  - [ ] deepscanline 
- OpenEXR v2 deep image
  - [x] Loading scanline + ZIPS + HALF or FLOAT pixel type.
- Compression
  - [x] NONE
  - [x] RLE
  - [x] ZIP
  - [x] ZIPS
  - [x] PIZ
  - [x] ZFP (tinyexr extension)
  - [ ] B44?
  - [ ] B44A?
  - [ ] PIX24?
  - [ ] DWA (not planned, patent encumbered)
- Line order.
  - [x] Increasing, decreasing (load)
  - [ ] Random?
  - [x] Increasing (save)
  - [ ] decreasing (save)
- Pixel format (UINT, FLOAT).
  - [x] UINT, FLOAT (load)
  - [x] UINT, FLOAT (deep load)
  - [x] UINT, FLOAT (save)
  - [ ] UINT, FLOAT (deep save)
- Support for big endian machine.
  - [x] Loading scanline image
  - [x] Saving scanline image
  - [x] Loading multi-part channel EXR (not tested)
  - [x] Saving multi-part channel EXR (not tested)
  - [ ] Loading deep image
  - [ ] Saving deep image
- Optimization
  - [x] C++11 thread loading
  - [ ] C++11 thread saving
  - [ ] ISPC?
  - [x] OpenMP multi-threading in EXR loading.
  - [x] OpenMP multi-threading in EXR saving.
  - [ ] OpenMP multi-threading in deep image loading.
  - [ ] OpenMP multi-threading in deep image saving.
* C interface.
  * You can easily write language bindings (e.g. golang)

# Supported platform

* [x] x86-64
  * [x] Windows 7 or later
  * [x] Linux(posix) system
  * [x] macOS
* [x] AARCH64
  * [x] aarch64 linux(e.g. Raspberry Pi)
  * [x] Android
  * [x] iOS
  * [x] macOS
* [ ] RISC-V(Should work)
* [x] Big endian machine(not maintained, but should work)
  * SPARC, PowerPC, ...
* [x] WebAssembly(JavaScript)
  * Loader only(See ![js](experimental/js/))
* [x] Python binding
  * Loader only https://pypi.org/project/pytinyexr/

# Requirements

* C++ compiler(C++11 recommended. C++03 may work)

# Use case

## New TinyEXR (v0.9.5+)

* Godot. Multi-platform 2D and 3D game engine https://godotengine.org/
* Filament. PBR engine(used in a converter tool). https://github.com/google/f\
ilament
* PyEXR. Loading OpenEXR (.exr) images using Python. https://github.com/ialha\
shim/PyEXR
* The-Forge. The Forge Cross-Platform Rendering Framework PC, Linux, Ray\
 Tracing, macOS / iOS, Android, XBOX, PS4 https://github.com/ConfettiFX/The-F\
orge
* psdr-cuda. Path-space differentiable renderer. https://github.com/uci-rende\
ring/psdr-cuda
* Studying Microfacets BSDFs https://virtualgonio.pages.xlim.fr/
* Your project here!

## Older TinyEXR (v0.9.0)

* mallie https://github.com/lighttransport/mallie
* Cinder 0.9.0 https://libcinder.org/notes/v0.9.0
* Piccante (develop branch) http://piccantelib.net/
* Your project here!

## Examples

* [examples/deepview/](examples/deepview) Deep image view
* [examples/rgbe2exr/](examples/rgbe2exr) .hdr to EXR converter
* [examples/exr2rgbe/](examples/exr2rgbe) EXR to .hdr converter
* [examples/ldr2exr/](examples/exr2rgbe) LDR to EXR converter
* [examples/exr2ldr/](examples/exr2ldr) EXR to LDR converter
* [examples/exr2fptiff/](examples/exr2fptiff) EXR to 32bit floating point\
 TIFF converter
  * for 32bit floating point TIFF to EXR convert, see https://github.com/syoy\
o/tinydngloader/tree/release/examples/fptiff2exr
* [examples/cube2longlat/](examples/cube2longlat) Cubemap to longlat\
 (equirectangler) converter

## Experimental

* [experimental/js/](experimental/js) JavaScript port using Emscripten

## Usage

NOTE: **API is still subject to change**. See the source code for details.

Include `tinyexr.h` with `TINYEXR_IMPLEMENTATION` flag (do this only for\
 **one** .cc file).

```cpp
//Please include your own zlib-compatible API header before
//including `tinyexr.h` when you disable `TINYEXR_USE_MINIZ`
//#define TINYEXR_USE_MINIZ 0
//#include "zlib.h"
//Or, if your project uses `stb_image[_write].h`, use their
//zlib implementation:
//#define TINYEXR_USE_STB_ZLIB 1
#define TINYEXR_IMPLEMENTATION
#include "tinyexr.h"
```

### Compile flags

* `TINYEXR_USE_MINIZ` Use miniz (default = 1). Please include `zlib.h` header\
 before `tinyexr.h` if you disable miniz support(e.g. use system's zlib).
* `TINYEXR_USE_STB_ZLIB` Use zlib from `stb_image[_write].h` instead of miniz\
 or the system's zlib (default = 0).
* `TINYEXR_USE_PIZ` Enable PIZ compression support (default = 1)
* `TINYEXR_USE_ZFP` Enable ZFP compression supoort (TinyEXR extension,\
 default = 0)
* `TINYEXR_USE_THREAD` Enable threaded loading using C++11 thread (Requires\
 C++11 compiler, default = 0)
* `TINYEXR_USE_OPENMP` Enable OpenMP threading support (default = 1 if\
 `_OPENMP` is defined)
  * Use `TINYEXR_USE_OPENMP=0` to force disable OpenMP code path even if\
 OpenMP is available/enabled in the compiler.

### Quickly reading RGB(A) EXR file.

```cpp
  const char* input = "asakusa.exr";
  float* out; // width * height * RGBA
  int width;
  int height;
  const char* err = NULL; // or nullptr in C++11

  int ret = LoadEXR(&out, &width, &height, input, &err);

  if (ret != TINYEXR_SUCCESS) {
    if (err) {
       fprintf(stderr, "ERR : %s\n", err);
       FreeEXRErrorMessage(err); // release memory of error message.
    }
  } else {
    ...
    free(out); // release memory of image data
  }

```

### Reading layered RGB(A) EXR file.

If you want to read EXR image with layer info (channel has a name with\
 delimiter `.`), please use `LoadEXRWithLayer` API.

You need to know layer name in advance (e.g. through `EXRLayers` API).

```cpp
  const char* input = ...;
  const char* layer_name = "diffuse"; // or use EXRLayers to get list of\
 layer names in .exr
  float* out; // width * height * RGBA
  int width;
  int height;
  const char* err = NULL; // or nullptr in C++11

  // will read `diffuse.R`, `diffuse.G`, `diffuse.B`, (`diffuse.A`) channels
  int ret = LoadEXRWithLayer(&out, &width, &height, input, layer_name, &err);

  if (ret != TINYEXR_SUCCESS) {
    if (err) {
       fprintf(stderr, "ERR : %s\n", err);
       FreeEXRErrorMessage(err); // release memory of error message.
    }
  } else {
    ...
    free(out); // release memory of image data
  }

```

### Loading Singlepart EXR from a file.

Scanline and tiled format are supported.

```cpp
  // 1. Read EXR version.
  EXRVersion exr_version;

  int ret = ParseEXRVersionFromFile(&exr_version, argv[1]);
  if (ret != 0) {
    fprintf(stderr, "Invalid EXR file: %s\n", argv[1]);
    return -1;
  }

  if (exr_version.multipart) {
    // must be multipart flag is false.
    return -1;
  }

  // 2. Read EXR header
  EXRHeader exr_header;
  InitEXRHeader(&exr_header);

  const char* err = NULL; // or `nullptr` in C++11 or later.
  ret = ParseEXRHeaderFromFile(&exr_header, &exr_version, argv[1], &err);
  if (ret != 0) {
    fprintf(stderr, "Parse EXR err: %s\n", err);
    FreeEXRErrorMessage(err); // free's buffer for an error message
    return ret;
  }

  // // Read HALF channel as FLOAT.
  // for (int i = 0; i < exr_header.num_channels; i++) {
  //   if (exr_header.pixel_types[i] == TINYEXR_PIXELTYPE_HALF) {
  //     exr_header.requested_pixel_types[i] = TINYEXR_PIXELTYPE_FLOAT;
  //   }
  // }

  EXRImage exr_image;
  InitEXRImage(&exr_image);

  ret = LoadEXRImageFromFile(&exr_image, &exr_header, argv[1], &err);
  if (ret != 0) {
    fprintf(stderr, "Load EXR err: %s\n", err);
    FreeEXRHeader(&exr_header);
    FreeEXRErrorMessage(err); // free's buffer for an error message
    return ret;
  }

  // 3. Access image data
  // `exr_image.images` will be filled when EXR is scanline format.
  // `exr_image.tiled` will be filled when EXR is tiled format.

  // 4. Free image data
  FreeEXRImage(&exr_image);
  FreeEXRHeader(&exr_header);
```

### Loading Multipart EXR from a file.

Scanline and tiled format are supported.

```cpp
  // 1. Read EXR version.
  EXRVersion exr_version;

  int ret = ParseEXRVersionFromFile(&exr_version, argv[1]);
  if (ret != 0) {
    fprintf(stderr, "Invalid EXR file: %s\n", argv[1]);
    return -1;
  }

  if (!exr_version.multipart) {
    // must be multipart flag is true.
    return -1;
  }

  // 2. Read EXR headers in the EXR.
  EXRHeader **exr_headers; // list of EXRHeader pointers.
  int num_exr_headers;
  const char *err = NULL; // or nullptr in C++11 or later

  // Memory for EXRHeader is allocated inside of ParseEXRMultipartHeaderFromF\
ile,
  ret = ParseEXRMultipartHeaderFromFile(&exr_headers, &num_exr_headers,\
 &exr_version, argv[1], &err);
  if (ret != 0) {
    fprintf(stderr, "Parse EXR err: %s\n", err);
    FreeEXRErrorMessage(err); // free's buffer for an error message
    return ret;
  }

  printf("num parts = %d\n", num_exr_headers);


  // 3. Load images.

  // Prepare array of EXRImage.
  std::vector<EXRImage> images(num_exr_headers);
  for (int i =0; i < num_exr_headers; i++) {
    InitEXRImage(&images[i]);
  }

  ret = LoadEXRMultipartImageFromFile(&images.at(0), const_cast<const\
 EXRHeader**>(exr_headers), num_exr_headers, argv[1], &err);
  if (ret != 0) {
    fprintf(stderr, "Parse EXR err: %s\n", err);
    FreeEXRErrorMessage(err); // free's buffer for an error message
    return ret;
  }

  printf("Loaded %d part images\n", num_exr_headers);

  // 4. Access image data
  // `exr_image.images` will be filled when EXR is scanline format.
  // `exr_image.tiled` will be filled when EXR is tiled format.

  // 5. Free images
  for (int i =0; i < num_exr_headers; i++) {
    FreeEXRImage(&images.at(i));
  }

  // 6. Free headers.
  for (int i =0; i < num_exr_headers; i++) {
    FreeEXRHeader(exr_headers[i]);
    free(exr_headers[i]);
  }
  free(exr_headers);
```


Saving Scanline EXR file.

```cpp
  // See `examples/rgbe2exr/` for more details.
  bool SaveEXR(const float* rgb, int width, int height, const char*\
 outfilename) {

    EXRHeader header;
    InitEXRHeader(&header);

    EXRImage image;
    InitEXRImage(&image);

    image.num_channels = 3;

    std::vector<float> images[3];
    images[0].resize(width * height);
    images[1].resize(width * height);
    images[2].resize(width * height);

    // Split RGBRGBRGB... into R, G and B layer
    for (int i = 0; i < width * height; i++) {
      images[0][i] = rgb[3*i+0];
      images[1][i] = rgb[3*i+1];
      images[2][i] = rgb[3*i+2];
    }

    float* image_ptr[3];
    image_ptr[0] = &(images[2].at(0)); // B
    image_ptr[1] = &(images[1].at(0)); // G
    image_ptr[2] = &(images[0].at(0)); // R

    image.images = (unsigned char**)image_ptr;
    image.width = width;
    image.height = height;

    header.num_channels = 3;
    header.channels = (EXRChannelInfo *)malloc(sizeof(EXRChannelInfo) *\
 header.num_channels);
    // Must be (A)BGR order, since most of EXR viewers expect this channel\
 order.
    strncpy(header.channels[0].name, "B", 255); header.channels[0].name[strle\
n("B")] = '\0';
    strncpy(header.channels[1].name, "G", 255); header.channels[1].name[strle\
n("G")] = '\0';
    strncpy(header.channels[2].name, "R", 255); header.channels[2].name[strle\
n("R")] = '\0';

    header.pixel_types = (int *)malloc(sizeof(int) * header.num_channels);
    header.requested_pixel_types = (int *)malloc(sizeof(int) *\
 header.num_channels);
    for (int i = 0; i < header.num_channels; i++) {
      header.pixel_types[i] = TINYEXR_PIXELTYPE_FLOAT; // pixel type of input\
 image
      header.requested_pixel_types[i] = TINYEXR_PIXELTYPE_HALF; // pixel type\
 of output image to be stored in .EXR
    }

    const char* err = NULL; // or nullptr in C++11 or later.
    int ret = SaveEXRImageToFile(&image, &header, outfilename, &err);
    if (ret != TINYEXR_SUCCESS) {
      fprintf(stderr, "Save EXR err: %s\n", err);
      FreeEXRErrorMessage(err); // free's buffer for an error message
      return ret;
    }
    printf("Saved exr file. [ %s ] \n", outfilename);

    free(rgb);

    free(header.channels);
    free(header.pixel_types);
    free(header.requested_pixel_types);

  }
```


Reading deep image EXR file.
See `example/deepview` for actual usage.

```cpp
  const char* input = "deepimage.exr";
  const char* err = NULL; // or nullptr
  DeepImage deepImage;

  int ret = LoadDeepEXR(&deepImage, input, &err);

  // access to each sample in the deep pixel.
  for (int y = 0; y < deepImage.height; y++) {
    int sampleNum = deepImage.offset_table[y][deepImage.width-1];
    for (int x = 0; x < deepImage.width-1; x++) {
      int s_start = deepImage.offset_table[y][x];
      int s_end   = deepImage.offset_table[y][x+1];
      if (s_start >= sampleNum) {
        continue;
      }
      s_end = (s_end < sampleNum) ? s_end : sampleNum;
      for (int s = s_start; s < s_end; s++) {
        float val = deepImage.image[depthChan][y][s];
        ...
      }
    }
  }

```

### deepview

`examples/deepview` is simple deep image viewer in OpenGL.

![DeepViewExample](https://github.com/syoyo/tinyexr/blob/release/examples/dee\
pview/deepview_screencast.gif?raw=true)

## TinyEXR extension

### ZFP

#### NOTE

TinyEXR adds ZFP compression as an experimemtal support (Linux and MacOSX\
 only).

ZFP only supports FLOAT format pixel, and its image width and height must be\
 the multiple of 4, since ZFP compresses pixels with 4x4 pixel block.

#### Setup

Checkout zfp repo as an submodule.

    $ git submodule update --init

#### Build

Then build ZFP

    $ cd deps/ZFP
    $ mkdir -p lib   # Create `lib` directory if not exist
    $ make

Set `1` to `TINYEXT_USE_ZFP` define in `tinyexr.h`

Build your app with linking `deps/ZFP/lib/libzfp.a`

#### ZFP attribute

For ZFP EXR image, the following attribute must exist in its EXR image.

* `zfpCompressionType` (uchar).
  * 0 = fixed rate compression
  * 1 = precision based variable rate compression
  * 2 = accuracy based variable rate compression

And the one of following attributes must exist in EXR, depending on the\
 `zfpCompressionType` value.

* `zfpCompressionRate` (double)
  * Specifies compression rate for fixed rate compression.
* `zfpCompressionPrecision` (int32)
  * Specifies the number of bits for precision based variable rate\
 compression.
* `zfpCompressionTolerance` (double)
  * Specifies the tolerance value for accuracy based variable rate\
 compression.

#### Note on ZFP compression.

At least ZFP code itself works well on big endian machine.

## Unit tests

See `test/unit` directory.

## TODO

Contribution is welcome!

- [ ] Compression
  - [ ] B44?
  - [ ] B44A?
  - [ ] PIX24?
- [ ] Custom attributes
  - [x] Normal image (EXR 1.x)
  - [ ] Deep image (EXR 2.x)
- [ ] JavaScript library (experimental, using Emscripten)
  - [x] LoadEXRFromMemory
  - [ ] SaveMultiChannelEXR
  - [ ] Deep image save/load
- [ ] Write from/to memory buffer.
  - [ ] Deep image save/load
- [ ] Tile format.
  - [x] Tile format with no LoD (load).
  - [ ] Tile format with LoD (load).
  - [ ] Tile format with no LoD (save).
  - [ ] Tile format with LoD (save).
- [ ] Support for custom compression type.
  - [x] zfp compression (Not in OpenEXR spec, though)
  - [ ] zstd?
- [x] Multi-channel.
- [ ] Multi-part (EXR2.0)
  - [x] Load multi-part image
  - [ ] Load multi-part deep image
- [ ] Line order.
  - [x] Increasing, decreasing (load)
  - [ ] Random?
  - [ ] Increasing, decreasing (save)
- [ ] Pixel format (UINT, FLOAT).
  - [x] UINT, FLOAT (load)
  - [x] UINT, FLOAT (deep load)
  - [x] UINT, FLOAT (save)
  - [ ] UINT, FLOAT (deep save)
- [ ] Support for big endian machine.
  - [ ] Loading multi-part channel EXR
  - [ ] Saving multi-part channel EXR
  - [ ] Loading deep image
  - [ ] Saving deep image
- [ ] Optimization
  - [ ] ISPC?
  - [x] OpenMP multi-threading in EXR loading.
  - [x] OpenMP multi-threading in EXR saving.
  - [ ] OpenMP multi-threading in deep image loading.
  - [ ] OpenMP multi-threading in deep image saving.

## Python bindings

`pytinyexr` is available: https://pypi.org/project/pytinyexr/ (loading only\
 as of 0.9.1)

## Similar or related projects

* miniexr: https://github.com/aras-p/miniexr (Write OpenEXR)
* stb_image_resize.h: https://github.com/nothings/stb (Good for HDR image\
 resizing)

## License

3-clause BSD

`tinyexr` uses miniz, which is developed by Rich Geldreich\
 <richgel99@gmail.com>, and licensed under public domain.

`tinyexr` tools uses stb, which is licensed under public domain:\
 https://github.com/nothings/stb
`tinyexr` uses some code from OpenEXR, which is licensed under 3-clause BSD\
 license.
`tinyexr` uses nanozlib and wuffs, whose are licensed unnder Apache 2.0\
 license.

## Author(s)

Syoyo Fujita (syoyo@lighttransport.com)

## Contributor(s)

* Matt Ebb (http://mattebb.com): deep image example. Thanks!
* Matt Pharr (http://pharr.org/matt/): Testing tinyexr with OpenEXR(IlmImf).\
 Thanks!
* Andrew Bell (https://github.com/andrewfb) & Richard Eakin\
 (https://github.com/richardeakin): Improving TinyEXR API. Thanks!
* Mike Wong (https://github.com/mwkm): ZIPS compression support in loading.\
 Thanks!

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for tinyexr

This project is a [build2](https://build2.org) package repository that\
 provides access to [`tinyexr`](https://github.com/syoyo/tinyexr), a small,\
 single-header-only C++ library to load and save OpenEXR (`.exr`) images.

[![Official](https://img.shields.io/website/https/github.com/syoyo/tinyexr.sv\
g?down_message=offline&label=Official&style=for-the-badge&up_color=blue&up_me\
ssage=online)](https://github.com/syoyo/tinyexr)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/t\
inyexr.svg?down_message=offline&label=build2&style=for-the-badge&up_color=blu\
e&up_message=online)](https://github.com/build2-packaging/tinyexr)
[![cppget.org](https://img.shields.io/website/https/cppget.org/libtinyexr.svg\
?down_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_m\
essage=online)](https://cppget.org/libtinyexr)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/li\
btinyexr.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=\
for-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/l\
ibtinyexr)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch this package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/tinyexr.git

Add the respective dependency in your project's `manifest` file to make the\
 package available for import.

    depends: libtinyexr ^1.0.9

The library can be imported by the following declaration in a `buildfile`.

    import tinyexr = libtinyexr%lib{tinyexr}

## Configuration
There are no configuration options available.

## Issues and Notes
- The test data in the `libtinyexr-tests` package is more than 240 MiB in\
 size and, as a consequence, not publishable on `cppget.org` because it is\
 too large. Thus, it is not declared as the mandatory external tests package\
 of `libtinyexr`. It can and should still be used for local testing and for\
 CI runs.
- By using the macros `TINYEXR_USE_THREAD` or `TINYEXR_USE_OPENMP`, `tinyexr`\
 is able to support multithreading by either using C++11 threads or OpenMP.\
 Please note that the package's build system is not automatically adding\
 dependencies and flags for `pthread` or OpenMP.
- Currently, the configuration of dependencies for `tinyexr` is not handled\
 by the package's build system. `tinyexr` uses `miniz` by default and it does\
 not provide specific tests for other configurations. Furthermore, support\
 for `zlib` and `stb`'s implementation of `zlib` only seems to be useful when\
 using `tinyexr` without a build system as drop-in header file. So, for now,\
 please refrain from using the following macros.
    + `TINYEXR_USE_MINIZ`
    + `TINYEXR_USE_STB_ZLIB`
- `tinyexr` adds ZFP compression only as an experimental support on Linux and\
 MacOS. Currently, it is not supported by the packgage's build system. Hence,\
 please, refrain from using the following macro.
    + `TINYEXR_USE_ZFP`
- The compilation of the tests package `libtinyexr-tests` is not supported on\
 target configurations `windows*-clang**` due to the wrong encoding of\
 `win32-filelist-utf16le.inc`. Presumably, this will not be fixed as it is an\
 upstream issue. Please note that the compilation and execution of the basic\
 tests still works on these configurations. Thus, the library should work\
 without flaws on those platforms.
- For Windows, the file `'日本語.exr'` and the test `utf8filename` had to be\
 removed from distribution and execution, respectively. Please, see [this\
 issue](https://github.com/build2/build2/issues/307) for more information.
- Emscripten is not supported.
- The examples are not supported by the package's build system, yet.
- For now, the fuzzers are not compiled and run.

## Contributing
Thank you in advance for your help and contribution to keep this package\
 up-to-date.
Please, file an issue on [GitHub](https://github.com/build2-packaging/tinyexr\
/issues) for questions, bug reports, or to recommend updating the package\
 version.
If you're making a pull request to fix bugs or update the package version\
 yourself, refer to the [`build2` Packaging Guidelines](https://build2.org/bu\
ild2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management).

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/syoyo/tinyexr
doc-url: https://github.com/syoyo/tinyexr
src-url: https://github.com/syoyo/tinyexr
package-url: https://github.com/build2-packaging/tinyexr/
email: syoyo@lighttransport.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libminiz ^3.0.0
bootstrap-build:
\
project = libtinyexr

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cc

hxx{*}: cxx.importable = false

test.target = $cxx.target

\
location: tinyexr/libtinyexr-1.0.9.tar.gz
sha256sum: d03447cf2341582f373d24a121b58d148ecf5c288637e4e053e80c9395d17012
:
name: libxerces-c
version: 3.3.0+3
language: c++
project: xerces-c
summary: Validating XML parsing and serialization C++ library
license: Apache-2.0; Apache License 2.0.
topics: Xerces, C++, XML parser, DOM, SAX
description:
\
Xerces-C++ is a validating XML parser written in a portable subset of C++
with the libxerces-c library providing support for validating, parsing,
manipulating, and generating XML documents using the DOM, SAX, and SAX2
APIs. For more information see:

http://xerces.apache.org/xerces-c/

This package contains the original libxerces-c library source code overlaid
with the build2-based build system and packaged for the build2 package manager
(bpkg).

See the INSTALL file for the prerequisites and installation instructions.

Send questions, bug reports, or any other feedback about the library itself to
the Xerces-C++ mailing lists. Send build system and packaging-related feedback
to the packaging@build2.org mailing list (see https://lists.build2.org for
posting guidelines, etc).

The packaging of Xerces-C++ for build2 is tracked in a Git repository at:

https://git.build2.org/cgit/packaging/xerces-c/

\
description-type: text/plain
url: http://xerces.apache.org/xerces-c/
doc-url: http://xerces.apache.org/xerces-c/api-3.html
src-url: https://git.build2.org/cgit/packaging/xerces-c/xerces-c/tree/libxerc\
es-c/
package-url: https://git.build2.org/cgit/packaging/xerces-c/
email: c-users@xerces.apache.org; Mailing list.
package-email: packaging@build2.org; Mailing list.
build-error-email: builds@build2.org
depends: * build2 >= 0.15.0
depends: * bpkg >= 0.15.0
depends: libcurl ^7.67.0 ? ($config.libxerces_c.network)
depends: {libicuuc >= 60.3.0 libicui18n >= 60.3.0} ? ($config.libxerces_c.tra\
nscoder_icu)
transcoder-icu-builds: macos windows
transcoder-icu-build-config: config.libxerces_c.transcoder_icu=true; Test\
 with ICU transcoder on Mac OS and Windows.
bindist-rhel-builds: bindist
bindist-rhel-build-include: linux_rhel*-**
bindist-rhel-build-exclude: **
bindist-rhel-build-config:
\
+bpkg.bindist.fedora:
+bbot.bindist.upload:
b.create:config.cxx.std=c++11
?sys:libicuuc
?sys:libicui18n
\
bindist-ubuntu-builds: bindist
bindist-ubuntu-build-include: linux_ubuntu*-**
bindist-ubuntu-build-exclude: **
bindist-ubuntu-build-config:
\
+bpkg.bindist.debian:
+bbot.bindist.upload:
b.create:config.cxx.std=c++11
?sys:libicuuc
?sys:libicui18n
\
bindist-windows-release-builds: bindist
bindist-windows-release-build-include: windows*-msvc**
bindist-windows-release-build-exclude: **
bindist-windows-release-build-config:
\
+bpkg.bindist.archive:
+bbot.bindist.upload:
bpkg.bindist.archive:config.install.relocatable=true
b.create:config.cc.coptions="/W2 /O2"
b.create:config.cxx.std=c++11
\
bindist-windows-debug-builds: bindist
bindist-windows-debug-build-include: windows*-msvc**
bindist-windows-debug-build-exclude: **
bindist-windows-debug-build-config:
\
+bpkg.bindist.archive:
+bbot.bindist.upload:
bpkg.bindist.archive:config.install.relocatable=true
bpkg.bindist.archive:--archive-build-meta=+debug
bpkg.create:config.bin.lib=shared
bpkg.create:config.bin.lib.suffix=D
b.create:config.cc.coptions="/W2 /Zi /MDd"
b.create:config.cc.loptions="/DEBUG:FULL"
b.test-installed.create:config.cc.coptions="/W2 /MDd"
b.test-installed.create:config.import.libxerces_c.xerces_c.lib=xerces-cD
b.create:config.cxx.std=c++11
\
bindist-macos-builds: bindist
bindist-macos-build-include: macos*-**
bindist-macos-build-exclude: **
bindist-macos-build-config:
\
+bpkg.bindist.archive:
+bbot.bindist.upload:
bpkg.bindist.archive:config.install.relocatable=true
b.create:config.cc.coptions="-Wall -O3"
b.create:config.cxx.std=c++11
\
bootstrap-build:
\
# file      : build/bootstrap.build
# license   : Apache License 2.0; see accompanying LICENSE file

project = libxerces-c

using version
using config
using dist
using test
using install

# The Xerces-C++ version has the <version>.<release>.<modification> form and
# follows the semver semantics. Specifically, the new versions and releases
# are issued when a certain number of bug fixes and new features are added
# and the modifications are issued when critical bugs are encountered. The
# releases and modifications may only contain the backward-compatible API
# changes. The ABI backward compatibility is only preserved for modifications.
#
# There is also the serialization format version number that can not be
# deduced from the package version. It is not documented which kind of package
# releases may increment this number, but based on its change history we can
# probably assume that this may not happen for modifications. Thus, we will
# check for its change (the XERCES_GRAMMAR_SERIALIZATION_LEVEL variable in
# configure.ac) only when the version or release number is incremented.
#
# See also: https://xerces.apache.org/xerces-c/faq-contributing-3.html
#
if ($version.major == 3 && $version.minor == 3)
{
  grammar_serialization_level = 7 # Serialization format version.

  abi_version = "$version.major.$version.minor"
}
else
  fail "increment the serialization format version?"

\
root-build:
\
# file      : build/root.build
# license   : Apache License 2.0; see accompanying LICENSE file

# We rely on C99 in macro deductions (see xercesc/config.h and
# xercesc/util/Xerces_autoconf_config.hpp for details).
#
c.std = 99

using c

h{*}: extension = h
c{*}: extension = c

cxx.std = latest

using cxx

hxx{*}: extension = hpp
txx{*}: extension = c
cxx{*}: extension = cpp

if ($c.target.system == 'win32-msvc')
  cc.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS

if ($c.class == 'msvc')
  cc.coptions += /wd4251 /wd4275 /wd4800

# Enable network support so that the parser can download remote resources
# (schemas, DTDs, etc).
#
# If enabled, then the libcurl library is used to access network resources.
#
config [bool] config.libxerces_c.network ?= false

# We use ICU everywhere except on Mac OS and Windows where we by default
# use native transcoders (but can still be forced to use ICU instead).
#
config [bool] config.libxerces_c.transcoder_icu ?= \\
  ($cxx.target.class != 'macos' && $cxx.target.class != 'windows')

if! $config.libxerces_c.transcoder_icu
{
  assert ($cxx.target.class == 'macos' || $cxx.target.class == 'windows') \\
    "only ICU transcoder is supported on $cxx.target.class"
}

\
location: xerces-c/libxerces-c-3.3.0+3.tar.gz
sha256sum: c5272e6308bb7f177a2d84115aab9dfd4f1394a0f0ff3ada779b3133ef582549
:
name: libxtl
version: 0.8.0
project: libxtl
summary: Build2 package for xtl - basic tools (containers, algorithms) used\
 by other quantstack packages
license: BSD-3-Clause
description:
\
# ![xtl](docs/source/xtl.svg)

[![Linux](https://github.com/xtensor-stack/xtl/actions/workflows/linux.yml/ba\
dge.svg)](https://github.com/xtensor-stack/xtl/actions/workflows/linux.yml)
[![OSX](https://github.com/xtensor-stack/xtl/actions/workflows/osx.yml/badge.\
svg)](https://github.com/xtensor-stack/xtl/actions/workflows/osx.yml)
[![Windows](https://github.com/xtensor-stack/xtl/actions/workflows/windows.ym\
l/badge.svg)](https://github.com/xtensor-stack/xtl/actions/workflows/windows.\
yml)
[![Documentation Status](http://readthedocs.org/projects/xtl/badge/?version=l\
atest)](https://xtl.readthedocs.io/en/latest/?badge=latest)
[![Join the Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://g\
itter.im/QuantStack/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-b\
adge&utm_content=badge)

Basic tools (containers, algorithms) used by other quantstack packages

## Installation

### Package managers

We provide a package for the mamba (or conda) package manager:

```bash
mamba install -c conda-forge xtl
```

### Install from sources

`xtl` is a header-only library.

You can directly install it from the sources:

```bash
cmake -D CMAKE_INSTALL_PREFIX=your_install_prefix
make install
```

## Documentation

To get started with using `xtl`, check out the full documentation

http://xtl.readthedocs.io/


## Building the HTML documentation

xtl's documentation is built with three tools

 - [doxygen](http://www.doxygen.org)
 - [sphinx](http://www.sphinx-doc.org)
 - [breathe](https://breathe.readthedocs.io)

While doxygen must be installed separately, you can install breathe by typing

```bash
pip install breathe
```

Breathe can also be installed with `conda`

```bash
conda install -c conda-forge breathe
```

Finally, build the documentation with

```bash
make html
```

from the `docs` subdirectory.

## License

We use a shared copyright model that enables all contributors to maintain the
copyright on their contributions.

This software is licensed under the BSD-3-Clause license. See the\
 [LICENSE](LICENSE) file for details.

\
description-type: text/markdown;variant=GFM
url: https://github.com/xtensor-stack/xtl
email: swat.somebug@gmail.com
depends: * build2 >= 0.15.0
depends: * bpkg >= 0.15.0
requires: c++14
tests: libxtl-tests == 0.8.0
bootstrap-build:
\
project = libxtl

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: libxtl/libxtl-0.8.0.tar.gz
sha256sum: 43ac361d3c755e6d7ba491f029eb6b41d9025515ecfac6fdf119e66386f2cc26
:
name: libxtl-tests
version: 0.8.0
project: libxtl
summary: Build2 package for xtl-tests
license: BSD-3-Clause
description:
\
# ![xtl](docs/source/xtl.svg)

[![Linux](https://github.com/xtensor-stack/xtl/actions/workflows/linux.yml/ba\
dge.svg)](https://github.com/xtensor-stack/xtl/actions/workflows/linux.yml)
[![OSX](https://github.com/xtensor-stack/xtl/actions/workflows/osx.yml/badge.\
svg)](https://github.com/xtensor-stack/xtl/actions/workflows/osx.yml)
[![Windows](https://github.com/xtensor-stack/xtl/actions/workflows/windows.ym\
l/badge.svg)](https://github.com/xtensor-stack/xtl/actions/workflows/windows.\
yml)
[![Documentation Status](http://readthedocs.org/projects/xtl/badge/?version=l\
atest)](https://xtl.readthedocs.io/en/latest/?badge=latest)
[![Join the Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://g\
itter.im/QuantStack/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-b\
adge&utm_content=badge)

Basic tools (containers, algorithms) used by other quantstack packages

## Installation

### Package managers

We provide a package for the mamba (or conda) package manager:

```bash
mamba install -c conda-forge xtl
```

### Install from sources

`xtl` is a header-only library.

You can directly install it from the sources:

```bash
cmake -D CMAKE_INSTALL_PREFIX=your_install_prefix
make install
```

## Documentation

To get started with using `xtl`, check out the full documentation

http://xtl.readthedocs.io/


## Building the HTML documentation

xtl's documentation is built with three tools

 - [doxygen](http://www.doxygen.org)
 - [sphinx](http://www.sphinx-doc.org)
 - [breathe](https://breathe.readthedocs.io)

While doxygen must be installed separately, you can install breathe by typing

```bash
pip install breathe
```

Breathe can also be installed with `conda`

```bash
conda install -c conda-forge breathe
```

Finally, build the documentation with

```bash
make html
```

from the `docs` subdirectory.

## License

We use a shared copyright model that enables all contributors to maintain the
copyright on their contributions.

This software is licensed under the BSD-3-Clause license. See the\
 [LICENSE](LICENSE) file for details.

\
description-type: text/markdown;variant=GFM
url: https://github.com/xtensor-stack/xtl
email: swat.somebug@gmail.com
depends: * build2 >= 0.15.0
depends: * bpkg >= 0.15.0
depends: nlohmann-json
depends: doctest
requires: c++14
bootstrap-build:
\
project = libxtl-tests

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# Every exe{} in this subproject is by default a test.
#
exe{*}: test = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target


# Additional configs for the test

config [bool] config.libxtl_tests.disable_exceptions ?= false

\
location: libxtl/libxtl-tests-0.8.0.tar.gz
sha256sum: 5f15ba983bc2e1de7e56d5b37f3241fd0569d0cf39cfe3c97abf589ea9aae905
:
name: libzycore
version: 1.5.0+1
language: c
project: zycore
summary: Internal library providing platform independent types, macros and a\
 fallback for environments without LibC
license: MIT
description:
\
# Zyan Core Library for C

<a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.s\
vg" alt="License: MIT"></a>
<a href="https://github.com/zyantific/zycore-c/actions"><img\
 src="https://github.com/zyantific/zycore-c/workflows/GitHub%20Actions%20CI/b\
adge.svg" alt="GitHub Actions"></a>
<a href="https://discord.zyantific.com/"><img src="https://img.shields.io/dis\
cord/390136917779415060.svg?logo=discord&label=Discord" alt="Discord"></a>

Internal library providing platform independent types, macros and a fallback\
 for environments without LibC.

## Features

- Platform independent types
  - Integer types (`ZyanU8`, `ZyanI32`, `ZyanUSize`, ...)
  - `ZyanBool` (+ `ZYAN_FALSE`, `ZYAN_TRUE`)
  - `ZYAN_NULL`
- Macros
  - Compiler/Platform/Architecture detection
  - Asserts and static asserts
  - Utils (`ARRAY_LENGTH`, `FALLTHROUGH`, `UNUSED`, ...)
- Common types
  - `ZyanBitset`
  - `ZyanString`/`ZyanStringView`
- Container types
  - `ZyanVector`
  - `ZyanList`
- LibC abstraction (WiP)

## License

Zycore is licensed under the MIT license.

\
description-type: text/markdown;variant=GFM
package-description:
\
# libzycore - A C library

The `libzycore` C library provides platform-independent types, macros, and\
 fallbacks for environments without libc.

## Usage

To start using `libzycore` in your project, add the following\
 [`depends`](https://build2.org/bpkg/doc/build2-package-manager-manual.xhtml#\
manifest-package-depends) value to your [`manifest`](https://build2.org/bpkg/\
doc/build2-package-manager-manual.xhtml#manifests), adjusting the version\
 constraint as appropriate:

```
depends: libzycore ^1.5.0
```

Then import the library in your `buildfile`:

```
import libs = libzycore%lib{zycore}
```

## Importable targets

This package provides the following importable targets:

```
lib{zycore}
```

### Importable targets description

* `zycore` - C library for platform-independent types, macros, and fallbacks\
 for environments without libc.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/zyantific/zycore-c
package-url: https://github.com/build2-packaging/zycore/
email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
tests: libzycore-tests == 1.5.0
bootstrap-build:
\
project = libzycore

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

\
location: zycore/libzycore-1.5.0+1.tar.gz
sha256sum: ac898abf1d9f7cfd884585caf0d17c2119cce59037b25bc506a327e4a1a693d4
:
name: libzycore
version: 1.5.1+1
language: c
project: zycore
summary: Platform-independent types, macros, and fallbacks for environments\
 without LibC.
license: MIT
description:
\
# Zyan Core Library for C

<a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.s\
vg" alt="License: MIT"></a>
<a href="https://github.com/zyantific/zycore-c/actions"><img\
 src="https://github.com/zyantific/zycore-c/workflows/GitHub%20Actions%20CI/b\
adge.svg" alt="GitHub Actions"></a>
<a href="https://discord.zyantific.com/"><img src="https://img.shields.io/dis\
cord/390136917779415060.svg?logo=discord&label=Discord" alt="Discord"></a>

Internal library providing platform independent types, macros and a fallback\
 for environments without LibC.

## Features

- Platform independent types
  - Integer types (`ZyanU8`, `ZyanI32`, `ZyanUSize`, ...)
  - `ZyanBool` (+ `ZYAN_FALSE`, `ZYAN_TRUE`)
  - `ZYAN_NULL`
- Macros
  - Compiler/Platform/Architecture detection
  - Asserts and static asserts
  - Utils (`ARRAY_LENGTH`, `FALLTHROUGH`, `UNUSED`, ...)
- Common types
  - `ZyanBitset`
  - `ZyanString`/`ZyanStringView`
- Container types
  - `ZyanVector`
  - `ZyanList`
- LibC abstraction (WiP)

## License

Zycore is licensed under the MIT license.

\
description-type: text/markdown;variant=GFM
package-description:
\
# libzycore - A C library

The `libzycore` C library provides platform-independent types, macros, and\
 fallbacks for environments without LibC.

## Usage

To start using `libzycore` in your project, add the following\
 [`depends`](https://build2.org/bpkg/doc/build2-package-manager-manual.xhtml#\
manifest-package-depends) value to your [`manifest`](https://build2.org/bpkg/\
doc/build2-package-manager-manual.xhtml#manifests), adjusting the version\
 constraint as appropriate:

```
depends: libzycore ^1.5.1
```

Then import the library in your `buildfile`:

```
import libs = libzycore%lib{zycore}
```

## Importable targets

This package provides the following importable targets:

```
lib{zycore}
```

### Importable targets description

* `zycore` - C library for platform-independent types, macros, and fallbacks\
 for environments without LibC.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/zyantific/zycore-c
package-url: https://github.com/build2-packaging/zycore/
email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
tests: libzycore-tests == 1.5.1
build-exclude: x86_64-microsoft-win32-msvc14.0; Missing <string_view>
bootstrap-build:
\
project = libzycore

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

\
location: zycore/libzycore-1.5.1+1.tar.gz
sha256sum: a1f8ec64643b2a175f62cceb6e1f2ce21b53d706714b654ded39aff1e1a04e27
:
name: libzycore-tests
version: 1.5.0+1
type: exe
language: c++
project: zycore
summary: Internal library providing platform independent types, macros and a\
 fallback for environments without LibC ; Tests
license: MIT; MIT License.
url: https://github.com/zyantific/zycore-c
package-url: https://github.com/build2-packaging/zycore/
email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: gtest ^1.11.0
bootstrap-build:
\
project = libzycore-tests

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hxx
ixx{*}: extension = ixx
txx{*}: extension = txx
cxx{*}: extension = cxx

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: zycore/libzycore-tests-1.5.0+1.tar.gz
sha256sum: 28f6910736b36ec18049deab0d075d5a013eb0bc28d0af02fe3917194595fd96
:
name: libzycore-tests
version: 1.5.1+1
type: exe
language: c++
project: zycore
summary: Internal library providing platform independent types, macros and a\
 fallback for environments without LibC ; Tests
license: MIT; MIT License.
url: https://github.com/zyantific/zycore-c
package-url: https://github.com/build2-packaging/zycore/
email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: gtest ^1.11.0
bootstrap-build:
\
project = libzycore-tests

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hxx
ixx{*}: extension = ixx
txx{*}: extension = txx
cxx{*}: extension = cxx

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: zycore/libzycore-tests-1.5.1+1.tar.gz
sha256sum: cb7ee4621c0706951b219d1c0b674e1f6e38cac1ce065b55a4fd01056f617c58
:
name: libzydis
version: 4.1.0+4
language: c
project: zydis
summary: Fast and lightweight x86/x86-64 disassembler and code generation\
 library
license: MIT
description:
\
<p align="center">
  <a href="https://zydis.re/">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="https://raw.github\
usercontent.com/zyantific/zydis/master/assets/img/logo-dark.svg"\
 width="400px">
      <source media="(prefers-color-scheme: light)" srcset="https://raw.githu\
busercontent.com/zyantific/zydis/master/assets/img/logo-light.svg"\
 width="400px">
      <img alt="zydis logo" src="https://raw.githubusercontent.com/zyantific/\
zydis/master/assets/img/logo-dark.svg" width="400px">
    </picture>
  </a>
</p>

<p align="center">
  <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License:\
 MIT">
  <a href="https://github.com/zyantific/zydis/actions"><img\
 src="https://github.com/zyantific/zydis/workflows/CI/badge.svg" alt="GitHub\
 Actions"></a>
  <a href="https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=\
1&q=proj:zydis"><img src="https://oss-fuzz-build-logs.storage.googleapis.com/\
badges/zydis.svg" alt="Fuzzing Status"></a>
  <a href="https://discord.zyantific.com/"><img src="https://img.shields.io/d\
iscord/390136917779415060.svg?logo=discord&label=Discord" alt="Discord"></a>
</p>

<p align="center">Fast and lightweight x86/x86-64 disassembler and code\
 generation library.</p>

## Features

- Supports all x86 and x86-64 (AMD64) instructions and [extensions](./include\
/Zydis/Generated/EnumISAExt.h)
- Optimized for high performance
- No dynamic memory allocation ("malloc")
- Thread-safe by design
- Very small file-size overhead compared to other common disassembler\
 libraries
- [Complete doxygen documentation](https://doc.zydis.re/)
- Trusted by many major open-source projects
  - Examples include [x64dbg][zydis-x64dbg], [Mozilla Firefox][zydis-firefox]\
 and [Webkit][zydis-webkit]
- Absolutely no third party dependencies — not even libc
  - Should compile on any platform with a working C11 compiler
  - Tested on Windows, macOS, FreeBSD, Linux and UEFI, both user and kernel\
 mode

[zydis-x64dbg]: https://github.com/x64dbg/x64dbg/tree/729285ef82580812edf7167\
c41aa6a2c23d8d72d/src/zydis_wrapper
[zydis-firefox]: https://github.com/mozilla/gecko-dev/tree/3ddbce3c426a55080b\
d84974444f9ac4869e580b/js/src/zydis
[zydis-webkit]: https://github.com/WebKit/WebKit/tree/1f2d2a92eeb831bedd01bbb\
5b694a0e29fa9af81/Source/JavaScriptCore/disassembler/zydis

## Examples

### Disassembler

The following example program uses Zydis to disassemble a given memory buffer\
 and prints the output to the console.

https://github.com/zyantific/zydis/blob/214536a814ba20d2e33d2a907198d1a329aac\
45c/examples/DisassembleSimple.c#L38-L63

The above example program generates the following output:

```asm
007FFFFFFF400000   push rcx
007FFFFFFF400001   lea eax, [rbp-0x01]
007FFFFFFF400004   push rax
007FFFFFFF400005   push qword ptr [rbp+0x0C]
007FFFFFFF400008   push qword ptr [rbp+0x08]
007FFFFFFF40000B   call [0x008000007588A5B1]
007FFFFFFF400011   test eax, eax
007FFFFFFF400013   js 0x007FFFFFFF42DB15
```

### Encoder

https://github.com/zyantific/zydis/blob/b37076e69f5aa149fde540cae43c50f15a380\
dfc/examples/EncodeMov.c#L39-L62

The above example program generates the following output:

```
48 C7 C0 37 13 00 00
```

### More Examples

More examples can be found in the [examples](./examples/) directory of this\
 repository.

## Build

There are many ways to make Zydis available on your system. The following\
 sub-sections list commonly used options.

### CMake Build

**Platforms:** Windows, macOS, Linux, BSDs

You can use CMake to build Zydis on all supported platforms. 
Instructions on how to install CMake can be found [here](https://cmake.org/in\
stall/).

```bash
git clone --recursive 'https://github.com/zyantific/zydis.git'
cd zydis
cmake -B build
cmake --build build -j4
```

### Visual Studio 2022 project

**Platforms:** Windows

We manually maintain a [Visual Studio 2022 project](./msvc/) in addition to\
 the CMake build logic.

### CMake generated VS project

**Platforms:** Windows

CMake can be instructed to generate a Visual Studio project for pretty much\
 any VS version. A video guide describing how to use the CMake GUI to\
 generate such project files is available [here](https://www.youtube.com/watc\
h?v=fywLDK1OAtQ). Don't be confused by the apparent use of macOS in the\
 video: Windows is simply running in a virtual machine.

### Amalgamated distribution

**Platforms:** any platform with a working C11 compiler

We provide an auto-generated single header & single source file variant of\
 Zydis. To use this variant
of Zydis in your project, all you need to do is to copy these two files into\
 your project. The 
amalgamated builds can be found on our [release page](https://github.com/zyan\
tific/zydis/releases)
as `zydis-amalgamated.tar.gz`.

These files are generated with the [`amalgamate.py`](./assets/amalgamate.py)\
 script.

### Package managers

**Platforms:** Windows, macOS, Linux, FreeBSD

Pre-built headers, shared libraries and executables are available through a\
 variety of package managers.

<details>
  <summary>Zydis version in various package repositories</summary>
  
  [![Packaging status](https://repology.org/badge/vertical-allrepos/zydis.svg\
)](https://repology.org/project/zydis/versions)
  
</details>

| Repository | Install command                            | 
|------------|--------------------------------------------|
| Arch Linux | `pacman -S zydis`                          |
| Debian     | `apt-get install libzydis-dev zydis-tools` |
| Homebrew   | `brew install zydis`                       |
| NixOS      | `nix-shell -p zydis`                       |
| Ubuntu     | `apt-get install libzydis-dev zydis-tools` |
| vcpkg      | `vcpkg install zydis`                      |

## Using Zydis in a CMake project

An example on how to use Zydis in your own CMake based project [can be found\
 in this repo](https://github.com/zyantific/zydis-submodule-example).

## `ZydisInfo` tool

The `ZydisInfo` command-line tool can be used to inspect essentially all\
 information 
that Zydis provides about an instruction.

![ZydisInfo](./assets/screenshots/ZydisInfo.png)

## Bindings

Official bindings exist for a selection of languages:

- [Rust](https://github.com/zyantific/zydis-rs)
- [Python 3](https://github.com/zyantific/zydis-py)

### asmjit-style C++ front-end

If you're looking for an asmjit-style assembler front-end for the encoder,\
 check out [zasm](https://github.com/zyantific/zasm).
zasm also provides an idiomatic C++ wrapper around the decoder and formatter\
 interface.

## Versions

### Scheme

Versions follow the [semantic versioning scheme](https://semver.org/). All\
 stability guarantees apply to the API only. ABI stability is provided only\
 between patch versions.

### Branches & Tags

- `master` holds the bleeding edge code of the next, unreleased Zydis\
 version. Elevated amounts of bugs and issues must be expected, API stability\
 is not guaranteed outside of tagged commits.
- Stable and preview versions are annotated with git tags
  - beta and other preview versions have `-beta`, `-rc`, etc. suffixes
- `maintenance/v3` points to the code of the latest release of v3
  - v3 won't get any feature updates but will receive security updates until\
 2025
- `maintenance/v2` points to the code of the last legacy release of v2
  - v2 is has reached end-of-life and won't receive any security updates

## Credits

- Intel (for open-sourcing [XED](https://github.com/intelxed/xed), allowing\
 for automatic comparison of our tables against theirs, improving both)
- [LLVM](https://llvm.org) (for providing pretty solid instruction data as\
 well)
- Christian Ludloff (https://sandpile.org, insanely helpful)
- [LekoArts](https://www.lekoarts.de/) (for creating the project logo)
- Our [contributors on GitHub](https://github.com/zyantific/zydis/graphs/cont\
ributors)

## Troubleshooting

### `-fPIC` for shared library builds

```
/usr/bin/ld: ./libfoo.a(foo.c.o): relocation R_X86_64_PC32 against symbol\
 `bar' can not be used when making a shared object; recompile with -fPIC
```

Under some circumstances (e.g. when building Zydis as a static library using
CMake and then using Makefiles to manually link it into a shared library),\
 CMake
might fail to detect that relocation information must be emitted. This can be\
 forced
by passing `-DCMAKE_POSITION_INDEPENDENT_CODE=ON` to the CMake invocation.

## Consulting and Business Support

We offer consulting services and professional business support for Zydis. If\
 you need a custom extension, require help in integrating Zydis into your\
 product or simply want contractually guaranteed updates and turnaround\
 times, we are happy to assist with that! Please contact us at\
 business@zyantific.com.

## Donations

Donations are collected and distributed using [flobernd](https://github.com/u\
sers/flobernd/sponsorship)'s account.

## License

Zydis is licensed under the MIT license.

\
description-type: text/markdown;variant=GFM
package-description:
\
# libzydis - A C library

The `libzydis` C library provides a fast and lightweight x86/x86-64\
 disassembler engine.

## Usage

To start using `libzydis` in your project, add the following\
 [`depends`](https://build2.org/bpkg/doc/build2-package-manager-manual.xhtml#\
manifest-package-depends) value to your [`manifest`](https://build2.org/bpkg/\
doc/build2-package-manager-manual.xhtml#manifests), adjusting the version\
 constraint as appropriate:

```
depends: libzydis ^1.4.0
```

Then import the library in your [`buildfile`](https://build2.org/build2/doc/b\
uild2-build-system-manual.xhtml#intro-lang):

```
import libs = libzydis%lib{zydis}
```

## Importable targets

This package provides the following importable targets:

```
lib{zydis}
```

### Importable targets description

* `zydis` - Fast and lightweight x86/x86-64 disassembler and code generation\
 library.

\
package-description-type: text/markdown;variant=GFM
url: https://zydis.re/
doc-url: https://doc.zydis.re/v4.1.0/html/
src-url: https://github.com/zyantific/zydis/
package-url: https://github.com/build2-packaging/zydis/
email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: libzycore ^1.5.1-
bootstrap-build:
\
project = libzydis

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

\
location: zydis/libzydis-4.1.0+4.tar.gz
sha256sum: 9cadf9e8f298d7427a360191f1725f5783950806151195d3579372fa0f0ad969
:
name: lua
version: 5.4.7
type: exe
language: c
project: lua
summary: Embeddable scripting language, interpreter and compiler
license: MIT
description:
\

This is Lua 5.4.7, released on 13 Jun 2024.

For installation instructions, license details, and
further information about Lua, see doc/readme.html.


\
description-type: text/plain
package-description:
\
# build2 Package for Lua

This project is a [build2](https://build2.org) package repository that\
 provides access to [Lua](https://lua.org/home.html), a powerful, efficient,\
 lightweight, embeddable scripting language.
It supports procedural programming, object-oriented programming, functional\
 programming, data-driven programming, and data description.

[![Official](https://img.shields.io/website/https/www.lua.org?down_message=of\
fline&label=Official&style=for-the-badge&up_color=blue&up_message=online)](ht\
tps://www.lua.org/)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/l\
ua.svg?down_message=offline&label=build2&style=for-the-badge&up_color=blue&up\
_message=online)](https://github.com/build2-packaging/lua)

[![cppget.org](https://img.shields.io/website/https/cppget.org/liblua.svg?dow\
n_message=offline&label=liblua+cppget.org&style=for-the-badge&up_color=blue&u\
p_message=online)](https://cppget.org/liblua)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/li\
blua.svg?down_message=empty&down_color=blue&label=liblua+queue.cppget.org&sty\
le=for-the-badge&up_color=orange&up_message=running)](https://queue.cppget.or\
g/liblua)

[![cppget.org](https://img.shields.io/website/https/cppget.org/lua.svg?down_m\
essage=offline&label=lua+cppget.org&style=for-the-badge&up_color=blue&up_mess\
age=online)](https://cppget.org/lua)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/lu\
a.svg?down_message=empty&down_color=blue&label=lua+queue.cppget.org&style=for\
-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/lua)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch the packages.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/lua.git

Add the respective dependencies in your project's `manifest` file to make the\
 required packages available for import.

    depends: liblua ^5.4.7  # C Library for Embedding Lua
    depends: lua ^5.4.7     # Lua Interpreter and Compiler

Then use the following lines in your `buildfile` to import library and\
 executables.

    import liblua = liblua%lib{lua}  # Library
    import luac = lua%exe{luac}      # Compiler
    import lua = lua%exe{luac}       # Interpreter

For backwards compatibility to earlier package versions, use the following\
 line to import `lib{lua}` from the `lua` package directly.
This is deprecated and should not be used for new projects.

    import liblua = lua%lib{lua}

## Configuration

### Use of GNU `readline` for Lua Interpreter
The use of the GNU `readline` library for the Lua interpreter is disabled by\
 default to reduce importation issues during CI runs.
If `readline` is available on your target platform, it is recommended to\
 enable it to improve editing capabilities on the Lua command line.

    config [bool] config.lua.readline ?= false

## Issues and Notes
- Lua's source code for releases is not provided as a git repository and\
 needs to be hard-copied into the `upstream` directory from\
 [here](https://lua.org/download.html).
- Lua's test suite for releases is not provided as a git repository and needs\
 to be hard-copied into the `upstream-tests` directory from\
 [here](https://www.lua.org/tests/).
- The `LICENSE` file was hard-copied from [Lua's website](https://lua.org/lic\
ense.html).
- Lua's compiler and interpreter have not been split into separate packages\
 to reduce complexity and importation issues based on backwards\
 compatibility. In most cases, interpreter and compiler will be used together\
 at the same time anyway.
- Lua's documentation files will only be installed with the `lua` package to\
 prevent redundant files in various directories after installation. An\
 explicit installation of Lua will most likely require all components anyway.
- There are no sophisticated upstream tests for Lua's C library. As such, we\
 only provide two smoke tests.
- So far, the Lua compiler `luac` is only compiled and not further tested.\
 There are also no real upstream tests for it.
- The tests package does not run Lua's complete or internal test suites as\
 these are expected to fail for various reasons as stated [here](https://www.\
lua.org/tests/). Instead, only the basic tests based on Lua scripts are\
 executed.
- Lua's basic tests fail for unoptimized builds on Windows with MSVC and\
 Clang. This is most likely caused by an intentional stack overflow in the\
 basics tests scripts that might not be properly caught.

## Contributing
Thank you in advance for your help and contribution to keep this package\
 up-to-date.
Please, file an issue on [GitHub](https://github.com/build2-packaging/lua/iss\
ues) for questions, bug reports, or to recommend updating the package version.
If you're making a pull request to fix bugs or update the package version\
 yourself, refer to the [`build2` Packaging Guidelines](https://build2.org/bu\
ild2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management).

\
package-description-type: text/markdown;variant=GFM
url: https://lua.org/home.html
doc-url: https://lua.org/docs.html
package-url: https://github.com/build2-packaging/lua
email: lua-l@googlegroups.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: liblua == 5.4.7
tests: lua-tests == 5.4.7
bootstrap-build:
\
project = lua

using version
using config
using test
using install
using dist

\
root-build:
\
c.std = 99

using c

h{*}: extension = h
c{*}: extension = c

test.target = $c.target

# Configuration Variables

# Whether to use GNU `readline` library for the Lua interpreter `exe{lua}`.
#
config [bool] config.lua.readline ?= false

\
location: lua/lua-5.4.7.tar.gz
sha256sum: 8d2aeca9c2cf5bc8fcfeca21226915ed6eb0928e3535092c6946b80932397cd0
:
name: lua
version: 5.4.8
type: exe
language: c
project: lua
summary: Embeddable scripting language, interpreter and compiler
license: MIT
description:
\

This is Lua 5.4.8, released on 21 May 2025.

For installation instructions, license details, and
further information about Lua, see doc/readme.html.


\
description-type: text/plain
package-description:
\
# lua - An Embeddable Scripting Language

This is the `build2` package for the Lua scripting language.
Lua is intended to be used both as an embeddable language for any program\
 that needs one, and as a lightweight and efficient stand-alone language.
The package provides the Lua interpreter and compiler.

## Usage
To use `lua` in your project, add the following configurations to the\
 respective files after you have gained access to a `build2` package\
 repository that contains it.

### `manifest`
To make `lua` available for import, add the following (build-time) dependency\
 to the `manifest` of each package in your project that requires it,\
 adjusting the version constraint as appropriate.

    depends: lua ^5.4.8

### `buildfile` and Importable Targets
To import the interpreter and compiler, use the following declarations in\
 your `buildfile`.

    import lua = lua%exe{lua}        # Interpreter
    import luac = lua%exe{luac}      # Compiler

For compatibility with earlier package versions, `lib{lua}` from the `liblua`\
 package can also be imported from the `lua` package directly.
This is deprecated and should not be used for new projects.

    import liblua = lua%lib{lua}

## Configuration

### Use of GNU `readline` for Lua Interpreter
The use of the GNU `readline` library for the Lua interpreter is disabled by\
 default to reduce importation issues during CI runs.
If `readline` is available on your target platform, it is recommended to\
 enable it to improve editing capabilities on the Lua command line.

    config [bool] config.lua.readline ?= false

\
package-description-type: text/markdown;variant=GFM
url: https://lua.org/home.html
doc-url: https://lua.org/docs.html
package-url: https://github.com/build2-packaging/lua
email: lua-l@googlegroups.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: liblua == 5.4.8
tests: lua-tests == 5.4.8
bootstrap-build:
\
project = lua

using version
using config
using test
using install
using dist

\
root-build:
\
c.std = 99

using c

h{*}: extension = h
c{*}: extension = c

test.target = $c.target

# Configuration Variables

# Whether to use GNU `readline` library for the Lua interpreter `exe{lua}`.
#
config [bool] config.lua.readline ?= false

\
location: lua/lua-5.4.8.tar.gz
sha256sum: 08dd85294472f6162746f8abf29a034e8f3ee588abd06a8ca84827d675b240f3
:
name: lua-tests
version: 5.4.7
type: exe
language: c
project: lua
summary: Embeddable scripting language, tests
license: MIT
description:
\

This is Lua 5.4.7, released on 13 Jun 2024.

For installation instructions, license details, and
further information about Lua, see doc/readme.html.


\
description-type: text/plain
package-description:
\
# build2 Package for Lua

This project is a [build2](https://build2.org) package repository that\
 provides access to [Lua](https://lua.org/home.html), a powerful, efficient,\
 lightweight, embeddable scripting language.
It supports procedural programming, object-oriented programming, functional\
 programming, data-driven programming, and data description.

[![Official](https://img.shields.io/website/https/www.lua.org?down_message=of\
fline&label=Official&style=for-the-badge&up_color=blue&up_message=online)](ht\
tps://www.lua.org/)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/l\
ua.svg?down_message=offline&label=build2&style=for-the-badge&up_color=blue&up\
_message=online)](https://github.com/build2-packaging/lua)

[![cppget.org](https://img.shields.io/website/https/cppget.org/liblua.svg?dow\
n_message=offline&label=liblua+cppget.org&style=for-the-badge&up_color=blue&u\
p_message=online)](https://cppget.org/liblua)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/li\
blua.svg?down_message=empty&down_color=blue&label=liblua+queue.cppget.org&sty\
le=for-the-badge&up_color=orange&up_message=running)](https://queue.cppget.or\
g/liblua)

[![cppget.org](https://img.shields.io/website/https/cppget.org/lua.svg?down_m\
essage=offline&label=lua+cppget.org&style=for-the-badge&up_color=blue&up_mess\
age=online)](https://cppget.org/lua)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/lu\
a.svg?down_message=empty&down_color=blue&label=lua+queue.cppget.org&style=for\
-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/lua)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch the packages.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/lua.git

Add the respective dependencies in your project's `manifest` file to make the\
 required packages available for import.

    depends: liblua ^5.4.7  # C Library for Embedding Lua
    depends: lua ^5.4.7     # Lua Interpreter and Compiler

Then use the following lines in your `buildfile` to import library and\
 executables.

    import liblua = liblua%lib{lua}  # Library
    import luac = lua%exe{luac}      # Compiler
    import lua = lua%exe{luac}       # Interpreter

For backwards compatibility to earlier package versions, use the following\
 line to import `lib{lua}` from the `lua` package directly.
This is deprecated and should not be used for new projects.

    import liblua = lua%lib{lua}

## Configuration

### Use of GNU `readline` for Lua Interpreter
The use of the GNU `readline` library for the Lua interpreter is disabled by\
 default to reduce importation issues during CI runs.
If `readline` is available on your target platform, it is recommended to\
 enable it to improve editing capabilities on the Lua command line.

    config [bool] config.lua.readline ?= false

## Issues and Notes
- Lua's source code for releases is not provided as a git repository and\
 needs to be hard-copied into the `upstream` directory from\
 [here](https://lua.org/download.html).
- Lua's test suite for releases is not provided as a git repository and needs\
 to be hard-copied into the `upstream-tests` directory from\
 [here](https://www.lua.org/tests/).
- The `LICENSE` file was hard-copied from [Lua's website](https://lua.org/lic\
ense.html).
- Lua's compiler and interpreter have not been split into separate packages\
 to reduce complexity and importation issues based on backwards\
 compatibility. In most cases, interpreter and compiler will be used together\
 at the same time anyway.
- Lua's documentation files will only be installed with the `lua` package to\
 prevent redundant files in various directories after installation. An\
 explicit installation of Lua will most likely require all components anyway.
- There are no sophisticated upstream tests for Lua's C library. As such, we\
 only provide two smoke tests.
- So far, the Lua compiler `luac` is only compiled and not further tested.\
 There are also no real upstream tests for it.
- The tests package does not run Lua's complete or internal test suites as\
 these are expected to fail for various reasons as stated [here](https://www.\
lua.org/tests/). Instead, only the basic tests based on Lua scripts are\
 executed.
- Lua's basic tests fail for unoptimized builds on Windows with MSVC and\
 Clang. This is most likely caused by an intentional stack overflow in the\
 basics tests scripts that might not be properly caught.

## Contributing
Thank you in advance for your help and contribution to keep this package\
 up-to-date.
Please, file an issue on [GitHub](https://github.com/build2-packaging/lua/iss\
ues) for questions, bug reports, or to recommend updating the package version.
If you're making a pull request to fix bugs or update the package version\
 yourself, refer to the [`build2` Packaging Guidelines](https://build2.org/bu\
ild2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management).

\
package-description-type: text/markdown;variant=GFM
url: https://lua.org/home.html
doc-url: https://lua.org/docs.html
package-url: https://github.com/build2-packaging/lua
email: lua-l@googlegroups.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = lua-tests

using version
using config
using test
using dist

\
root-build:
\
c.std = 99
cxx.std = latest

using c
using cxx

h{*}: extension = h
c{*}: extension = c

cxx{*}: extension = cpp
hxx{*}: extension = hpp
hxx{*}: cxx.importable = false

test.target = $c.target

# Lua Script File Definition
#
define lua: file
lua{*}: extension = lua

\
location: lua/lua-tests-5.4.7.tar.gz
sha256sum: b3132de3626719e4c8cd7a4fbc7722851dcfb6fc2b6f4efb56e3c7afee1a65a0
:
name: lua-tests
version: 5.4.8
type: exe
language: c
project: lua
summary: Embeddable scripting language, tests
license: MIT
description:
\

This is Lua 5.4.8, released on 21 May 2025.

For installation instructions, license details, and
further information about Lua, see doc/readme.html.


\
description-type: text/plain
package-description:
\
# lua - An Embeddable Scripting Language

This is the `build2` package for the Lua scripting language.
Lua is intended to be used both as an embeddable language for any program\
 that needs one, and as a lightweight and efficient stand-alone language.
The package provides the Lua interpreter and compiler.

## Usage
To use `lua` in your project, add the following configurations to the\
 respective files after you have gained access to a `build2` package\
 repository that contains it.

### `manifest`
To make `lua` available for import, add the following (build-time) dependency\
 to the `manifest` of each package in your project that requires it,\
 adjusting the version constraint as appropriate.

    depends: lua ^5.4.8

### `buildfile` and Importable Targets
To import the interpreter and compiler, use the following declarations in\
 your `buildfile`.

    import lua = lua%exe{lua}        # Interpreter
    import luac = lua%exe{luac}      # Compiler

For compatibility with earlier package versions, `lib{lua}` from the `liblua`\
 package can also be imported from the `lua` package directly.
This is deprecated and should not be used for new projects.

    import liblua = lua%lib{lua}

## Configuration

### Use of GNU `readline` for Lua Interpreter
The use of the GNU `readline` library for the Lua interpreter is disabled by\
 default to reduce importation issues during CI runs.
If `readline` is available on your target platform, it is recommended to\
 enable it to improve editing capabilities on the Lua command line.

    config [bool] config.lua.readline ?= false

\
package-description-type: text/markdown;variant=GFM
url: https://lua.org/home.html
doc-url: https://lua.org/docs.html
package-url: https://github.com/build2-packaging/lua
email: lua-l@googlegroups.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = lua-tests

using version
using config
using test
using dist

\
root-build:
\
c.std = 99
cxx.std = latest

using c
using cxx

h{*}: extension = h
c{*}: extension = c

cxx{*}: extension = cpp
hxx{*}: extension = hpp
hxx{*}: cxx.importable = false

test.target = $c.target

# Lua Script File Definition
#
define lua: file
lua{*}: extension = lua

\
location: lua/lua-tests-5.4.8.tar.gz
sha256sum: b3f2278bb3ee3d251b61a48517b30c077f9e12fed7470cd60cc17792dc177137
:
name: nanoflann
version: 1.6.0
type: lib,binless
language: c++
project: nanoflann
summary: Nearest-Neighbor (NN) search with KD-trees C++ library
license: BSD-2-Clause
description:
\
![nanoflann](https://raw.githubusercontent.com/jlblancoc/nanoflann/master/doc\
/logo.png)

# nanoflann
[![CI Linux](https://github.com/jlblancoc/nanoflann/actions/workflows/ci-linu\
x.yml/badge.svg)](https://github.com/jlblancoc/nanoflann/actions/workflows/ci\
-linux.yml)
[![CI Check clang-format](https://github.com/jlblancoc/nanoflann/actions/work\
flows/check-clang-format.yml/badge.svg)](https://github.com/jlblancoc/nanofla\
nn/actions/workflows/check-clang-format.yml)
[![CircleCI](https://circleci.com/gh/jlblancoc/nanoflann/tree/master.svg?styl\
e=svg)](https://circleci.com/gh/jlblancoc/nanoflann/tree/master)
[![Windows build status](https://ci.appveyor.com/api/projects/status/h8k1apfo\
gxyqhskd/branch/master?svg=true)](https://ci.appveyor.com/project/jlblancoc/n\
anoflann/branch/master)


## 1. About

*nanoflann* is a **C++11 [header-only](http://en.wikipedia.org/wiki/Header-on\
ly) library** for building KD-Trees of datasets with different topologies:\
 R<sup>2</sup>, R<sup>3</sup> (point clouds), SO(2) and SO(3) (2D and 3D\
 rotation groups). No support for approximate NN is provided. *nanoflann*\
 does not require compiling or installing. You just need to `#include\
 <nanoflann.hpp>` in your code.

This library is a *fork* of the [flann library](https://github.com/flann-lib/\
flann) by Marius Muja and David G. Lowe, and born as a child project of\
 [MRPT](https://www.mrpt.org/). Following the original license terms,\
 *nanoflann* is distributed under the BSD license. Please, for bugs use the\
 issues button or fork and open a pull request.

Cite as:
```
@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library\
 for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}
```

See the release [CHANGELOG](CHANGELOG.md) for a list of project changes.

### 1.1. Obtaining the code

* Easiest way: clone this GIT repository and take the `include/nanoflann.hpp`\
 file for use where you need it.
* Debian or Ubuntu ([21.04 or newer](https://packages.ubuntu.com/source/hirsu\
te/nanoflann)) users can install it simply with:
  ```bash 
  sudo apt install libnanoflann-dev
  ```
* macOS users can install `nanoflann` with [Homebrew](https://brew.sh) with:
  ```shell
  $ brew install brewsci/science/nanoflann
  ```
  or
  ```shell
  $ brew tap brewsci/science
  $ brew install nanoflann
  ```
  MacPorts users can use:
  ```
  $ sudo port install nanoflann
  ```
* Linux users can also install it with [Linuxbrew](https://docs.brew.sh/Homeb\
rew-on-Linux) with: `brew install homebrew/science/nanoflann`
* List of [**stable releases**](https://github.com/jlblancoc/nanoflann/releas\
es). Check out the [CHANGELOG](https://github.com/jlblancoc/nanoflann/blob/ma\
ster/CHANGELOG.md)

Although nanoflann itself doesn't have to be compiled, you can build some\
 examples and tests with:

    sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
    mkdir build && cd build && cmake ..
    make && make test


### 1.2. C++ API reference

  * Browse the [Doxygen documentation](https://jlblancoc.github.io/nanoflann/\
).

  * **Important note:** If L2 norms are used, notice that search radius and\
 all passed and returned distances are actually *squared distances*.

### 1.3. Code examples

  * KD-tree look-up with `knnSearch()` and `radiusSearch()`:\
 [pointcloud_kdd_radius.cpp](https://github.com/jlblancoc/nanoflann/blob/mast\
er/examples/pointcloud_kdd_radius.cpp)
  * KD-tree look-up on a point cloud dataset: [pointcloud_example.cpp](https:\
//github.com/jlblancoc/nanoflann/blob/master/examples/pointcloud_example.cpp)
  * KD-tree look-up on a dynamic point cloud dataset: [dynamic_pointcloud_exa\
mple.cpp](https://github.com/jlblancoc/nanoflann/blob/master/examples/dynamic\
_pointcloud_example.cpp)
  * KD-tree look-up on a rotation group (SO2): [SO2_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/SO2_adaptor_example.cpp)
  * KD-tree look-up on a rotation group (SO3): [SO3_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/SO3_adaptor_example.cpp)
  * KD-tree look-up on a point cloud dataset with an external adaptor class:\
 [pointcloud_adaptor_example.cpp](https://github.com/jlblancoc/nanoflann/blob\
/master/examples/pointcloud_adaptor_example.cpp)
  * KD-tree look-up directly on an `Eigen::Matrix<>`: [matrix_example.cpp](ht\
tps://github.com/jlblancoc/nanoflann/blob/master/examples/matrix_example.cpp)
  * KD-tree look-up directly on `std::vector<std::vector<T> >` or\
 `std::vector<Eigen::VectorXd>`: [vector_of_vectors_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/vector_of_vectors_example.cpp)
  * Example with a `Makefile` for usage through `pkg-config` (for example,\
 after doing a "make install" or after installing from Ubuntu repositories):\
 [example_with_pkgconfig/](https://github.com/jlblancoc/nanoflann/blob/master\
/examples/example_with_pkgconfig/)
  * Example of how to build an index and save it to disk for later usage:\
 [saveload_example.cpp](https://github.com/jlblancoc/nanoflann/blob/master/ex\
amples/saveload_example.cpp)
  * GUI examples (requires `mrpt-gui`, e.g. `sudo apt install\
 libmrpt-gui-dev`):
    - [nanoflann_gui_example_R3](https://github.com/jlblancoc/nanoflann/blob/\
master/examples/examples_gui/nanoflann_gui_example_R3/nanoflann_gui_example_R\
3.cpp)

![nanoflann-demo-1](https://user-images.githubusercontent.com/5497818/2015504\
33-d561c5a9-4e87-453d-9cf8-8202d7876235.gif)



### 1.4. Why a fork?

  * **Execution time efficiency**:
    * The power of the original `flann` library comes from the possibility of\
 choosing between different ANN algorithms. The cost of this flexibility is\
 the declaration of pure virtual methods which (in some circumstances) impose\
 [run-time penalties](http://www.cs.cmu.edu/~gilpin/c%2B%2B/performance.html#\
virtualfunctions). In `nanoflann` all those virtual methods have been\
 replaced by a combination of the [Curiously Recurring Template\
 Pattern](http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern)\
 (CRTP) and inlined methods, which are much faster.
    * For `radiusSearch()`, there is no need to make a call to determine the\
 number of points within the radius and then call it again to get the data.\
 By using STL containers for the output data, containers are automatically\
 resized.
    * Users can (optionally) set the problem dimensionality at compile-time\
 via a template argument, thus allowing the compiler to fully unroll loops.
    * `nanoflann` allows users to provide a precomputed bounding box of the\
 data, if available, to avoid recomputation.
    * Indices of data points have been converted from `int` to `size_t`,\
 which removes a limit when handling very large data sets.

  * **Memory efficiency**: Instead of making a copy of the entire dataset\
 into a custom `flann`-like matrix before building a KD-tree index,\
 `nanoflann` allows direct access to your data via an **adaptor interface**\
 which must be implemented in your class.

Refer to the examples below or to the C++ API of [nanoflann::KDTreeSingleInde\
xAdaptor<>](https://jlblancoc.github.io/nanoflann/classnanoflann_1_1KDTreeSin\
gleIndexAdaptor.html) for more info.


### 1.5. What can *nanoflann* do?

  * Building KD-trees with a single index (no randomized KD-trees, no\
 approximate searches).
  * Fast, thread-safe querying for closest neighbors on KD-trees. The entry\
 points are:
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::knnSearch()`
      * Finds the `num_closest` nearest neighbors to `query_point[0:dim-1]`.\
 Their indices are stored inside the result object. See an [example usage\
 code](https://github.com/jlblancoc/nanoflann/blob/master/examples/pointcloud\
_kdd_radius.cpp#L119).
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::radiusSearch()`
      * Finds all the neighbors to `query_point[0:dim-1]` within a maximum\
 radius. The output is given as a vector of pairs, of which the first element\
 is a point index and the second the corresponding distance. See an [example\
 usage code](https://github.com/jlblancoc/nanoflann/blob/master/examples/poin\
tcloud_kdd_radius.cpp#L141).
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::radiusSearchCustomC\
allback()`
	  * Can be used to receive a callback for each point found in range. This\
 may be more efficient in some situations instead of building a huge vector\
 of pairs with the results.
  * Working with 2D and 3D point clouds or N-dimensional data sets.
  * Working directly with `Eigen::Matrix<>` classes (matrices and\
 vectors-of-vectors).
  * Working with dynamic point clouds without a need to rebuild entire\
 kd-tree index.
  * Working with the distance metrics:
    * `R^N`: Euclidean spaces:
      * `L1` (Manhattan)
      * `L2` (**squared** Euclidean norm, favoring SSE2 optimization).
      * `L2_Simple` (**squared** Euclidean norm, for low-dimensionality data\
 sets like point clouds).
    * `SO(2)`: 2D rotational group
      * `metric_SO2`: Absolute angular diference.
    * `SO(3)`: 3D rotational group (better suppport to be provided in future\
 releases)
      * `metric_SO3`: Inner product between quaternions.
  * Saves and load the built indices to disk.
  * GUI based support for benchmarking multiple kd-tree libraries namely\
 nanoflann, flann, fastann and libkdtree.

### 1.6. What can't *nanoflann* do?

  * Use other distance metrics apart from L1, L2, SO2 and SO3.
  * Support for SE(3) groups.
  * Only the C++ interface exists: there is no support for C, MATLAB or\
 Python.
  * There is no automatic algorithm configuration (as described in the\
 original Muja & Lowe's paper).

### 1.7. Use in your project via CMake

You can directly drop the `nanoflann.hpp` file in your project. Alternatively,
the CMake standard method is also available:

  * Build and "install" nanoflann. Set `CMAKE_INSTALL_PREFIX` to a proper path
  and then execute `make install` (Linux, OSX) or build the `INSTALL`
  target (Visual Studio).
  * Then, add something like this to the CMake script of your project:

```
# Find nanoflannConfig.cmake:
find_package(nanoflann)

add_executable(my_project test.cpp)

# Make sure the include path is used:
target_link_libraries(my_project nanoflann::nanoflann)
```

### 1.8. Package Managers

You can download and install nanoflann using the [vcpkg](https://github.com/M\
icrosoft/vcpkg) dependency manager:

    git clone https://github.com/Microsoft/vcpkg.git
    cd vcpkg
    ./bootstrap-vcpkg.sh
    ./vcpkg integrate install
    ./vcpkg install nanoflann

The nanoflann port in vcpkg is kept up to date by Microsoft team members and\
 community contributors. If the version is out of date, please [create an\
 issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg\
 repository.


### 1.9. Compile time definitions

  * `NANOFLANN_FIRST_MATCH`: If defined and two points have the same\
 distance, the one with the lowest-index will be returned first. Otherwise\
 there is no particular order.
  * `NANOFLANN_NO_THREADS`: If defined, multithreading capabilities will be\
 disabled, so that the library can be used without linking with pthreads. If\
 one tries to use multiple threads, an exception will be thrown.

------

## 2. Any help choosing the KD-tree parameters?

### 2.1. `KDTreeSingleIndexAdaptorParams::leaf_max_size`

A KD-tree is... well, a tree :-). And as such it has a root node, a set of\
 intermediary nodes and finally, "leaf" nodes which are those without\
 children.

Points (or, properly, point indices) are only stored in leaf nodes. Each leaf\
 contains a list of which points fall within its range.

While building the tree, nodes are recursively divided until the number of\
 points inside is equal or below some threshold. **That is `leaf_max_size`**.\
 While doing queries, the  "tree algorithm" ends by selecting leaf nodes,\
 then performing linear search (one-by-one) for the closest point to the\
 query within all those in the leaf.

So, `leaf_max_size` must be set as a **tradeoff**:
  * Large values mean that the tree will be built faster (since the tree will\
 be smaller), but each query will be slower (since the linear search in the\
 leaf is to be done over more points).
  * Small values will build the tree much slower (there will be many tree\
 nodes), but queries will be faster... up to some point, since the\
 "tree-part" of the search (logarithmic complexity) still has a significant\
 cost.

What number to select really depends on the application and even on the size\
 of the processor cache memory, so ideally you should do some benchmarking\
 for maximizing efficiency.

But to help choosing a good value as a rule of thumb, I provide the following\
 two benchmarks. Each graph represents the tree build (horizontal) and query\
 (vertical) times for different `leaf_max_size` values between 1 and 10K (as\
 95% uncertainty ellipses, deformed due to the logarithmic scale).

  * A 100K point cloud, uniformly distributed (each point has (x,y,z) `float`\
 coordinates):

![perf5_1e5pts_time_vs_maxleaf](https://raw.githubusercontent.com/jlblancoc/n\
anoflann/master/doc/perf5_1e5pts_time_vs_maxleaf.png)

  * A ~150K point cloud from a real dataset (`scan_071_points.dat` from the\
 [Freiburg Campus 360 dataset](http://ais.informatik.uni-freiburg.de/projects\
/datasets/fr360/), each point has (x,y,z) `float` coordinates):

![perf5_1e5pts_time_vs_maxleaf_real_dataset](https://raw.githubusercontent.co\
m/jlblancoc/nanoflann/master/doc/perf5_1e5pts_time_vs_maxleaf_real_dataset.pn\
g)

So, it seems that a `leaf_max_size` **between 10 and 50** would be optimum in\
 applications where the cost of queries dominates (e.g. [ICP](http://en.wikip\
edia.org/wiki/Iterative_closest_point])). At present, its default value is 10.


### 2.2. `KDTreeSingleIndexAdaptorParams::checks`

This parameter is really ignored in `nanoflann`, but was kept for backward\
 compatibility with the original FLANN interface. Just ignore it.

### 2.3. `KDTreeSingleIndexAdaptorParams::n_thread_build`

This parameter determines the maximum number of threads that can be called\
 concurrently during the construction of the KD tree. The default value is 1.\
 When the parameter is set to 0, `nanoflann` automatically determines the\
 number of threads to use.

See [this pull request](https://github.com/jlblancoc/nanoflann/pull/236) for\
 some benchmarking showing that using the maximum number of threads is not\
 always the most efficient approach. Do benchmarking on your data!

-----

## 3. Performance

### 3.1. `nanoflann`: faster and less memory usage

Refer to the "Why a fork?" section above for the main optimization ideas\
 behind `nanoflann`.

Notice that there are no explicit SSE2/SSE3 optimizations in `nanoflann`, but\
 the intensive usage of `inline` and templates in practice turns into\
 automatically SSE-optimized code generated by the compiler.


### 3.2. Benchmark: original `flann` vs `nanoflann`

The most time-consuming part of many point cloud algorithms (like ICP) is\
 querying a KD-Tree for nearest neighbors. This operation is therefore the\
 most time critical.

`nanoflann` provides a ~50% time saving with respect to the original `flann`\
 implementation (times in this chart are in microseconds for each query):

![perf3_query](https://raw.githubusercontent.com/jlblancoc/nanoflann/master/d\
oc/perf3_query.small.png)

Although most of the gain comes from the queries (due to the large number of\
 them in any typical operation with point clouds), there is also some time\
 saved while building the KD-tree index, due to the templatized-code but also\
 for the avoidance of duplicating the data in an auxiliary matrix (times in\
 the next chart are in milliseconds):

![perf4_time_saved](https://raw.githubusercontent.com/jlblancoc/nanoflann/mas\
ter/doc/perf4_time_saved.small.png)

These performance tests are only representative of our testing. If you want\
 to repeat them, read the instructions in [perf-tests](https://github.com/jlb\
lancoc/nanoflann/tree/master/perf-tests)


----

## 4. Other KD-tree projects

  * [FLANN](http://www.cs.ubc.ca/research/flann/) - Marius Muja and David G.\
 Lowe (University of British Columbia).
  * [FASTANN](http://www.robots.ox.ac.uk/~vgg/software/fastann/) - James\
 Philbin (VGG, University of Oxford).
  * [ANN](http://www.cs.umd.edu/~mount/ANN/) - David M. Mount and Sunil Arya\
 (University of Maryland).
  * [libkdtree++](https://packages.debian.org/source/sid/libkdtree++) -\
 Martin F. Krafft & others.

<br>

*Note: The project logo is due to [CedarSeed](http://www.iconarchive.com/show\
/patisserie-icons-by-cedarseed/Flan-icon.html)*

**Contributors**

<a href="https://github.com/jlblancoc/nanoflann/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=jlblancoc/nanoflann" />
</a>


\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for nanoflann

This project builds and defines the build2 package for [nanoflann](https://gi\
thub.com/jlblancoc/nanoflann), a C++11 header-only library for Nearest\
 Neighbor (NN) search with KD-trees.

[![Official](https://img.shields.io/website/https/github.com/jlblancoc/nanofl\
ann.svg?down_message=offline&label=Official&style=for-the-badge&up_color=blue\
&up_message=online)](https://github.com/jlblancoc/nanoflann)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/n\
anoflann.svg?down_message=offline&label=build2&style=for-the-badge&up_color=b\
lue&up_message=online)](https://github.com/build2-packaging/nanoflann)
[![cppget.org](https://img.shields.io/website/https/cppget.org/nanoflann.svg?\
down_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_me\
ssage=online)](https://cppget.org/nanoflann)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/na\
noflann.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=f\
or-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/na\
noflann)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch the package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/nanoflann.git

Add the respective dependency in your project's `manifest` file to make the\
 package available for import.

    depends: nanoflann ^1.6.0

The library can be imported by the following declaration in a `buildfile`.

    import nanoflann = nanoflann%lib{nanoflann}

## Configuration
There are no configuration options available.

## Issues
- FreeBSD, Clang, static, optimized: Error may occur during tests or\
 installed tests:
    + `ld: error: undefined symbol: pthread_create`
    + It seems that `pthread` is not correctly linked in the examples.
- `linux_debian_11-emcc_3.1.6` error (test):
    + `em++` seems not to be able to compile `gtest`.
- Windows, MinGW, optimized: The `kdtree.SO2_vs_bruteforce` test may fail.

## Contributing
Thank you in advance for your help and contribution to keep this package\
 up-to-date.
Please, file an issue on [GitHub](https://github.com/build2-packaging/nanofla\
nn/issues) for questions, bug reports, or to recommend updating the package\
 version.
If you're making a pull request to fix bugs or update the package version\
 yourself, refer to the [`build2` Packaging Guidelines](https://build2.org/bu\
ild2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management).

\
package-description-type: text/markdown;variant=GFM
changes:
\
# nanoflann 1.6.0: Released Jul 11, 2024
 - BUG FIX: nanoflann::SearchParameters::sorted was ignored for\
 RadiusResultSet.
 - ResultSet classes now must implement a sort() method.
 - Added type IndexType to nanoflann:KDTreeBaseClass

# nanoflann 1.5.5: Released Mar 12, 2024
 - Potentially more efficient scheduling of multi-thread index building ([PR\
 #236](https://github.com/jlblancoc/nanoflann/pull/236))
 - Bump minimum required cmake version to 3.5 ([PR #230](https://github.com/j\
lblancoc/nanoflann/pull/230/))

# nanoflann 1.5.4: Released Jan 10, 2024
 - Fix outdated NANOFLANN_VERSION macro in header file
 - Fix poll-allocator alignment problems
 - Add NANOFLANN_USE_SYSTEM_GTEST option
 - Look for Threads dependency in CMake config script


# nanoflann 1.5.3: Released Dec 7, 2023
 * **Other changes**:
   - Save one redundant call to `computeMinMax()` in `middleSplit_`\
 ([PR#220](https://github.com/jlblancoc/nanoflann/pull/220) by\
 [qq422216549](https://github.com/qq422216549)).
     This saves *a lot* of time, up to 20% faster in a benchmark with small\
 (thousands) point clouds.

# nanoflann 1.5.2: Released Nov 29, 2023
 * **Other changes**:
   - Improve RKNN search efficiency ([PR#219](https://github.com/jlblancoc/na\
noflann/pull/219) by [kya8](https://github.com/kya8)).

# nanoflann 1.5.1: Released Nov 27, 2023
 * **API changes:**
   - Add new search method `rknnSearch()` for knn searches with a maximum\
 radius.
   - Add missing `SearchParameters` argument to `KDTreeSingleIndexDynamicAdap\
tor_::knnSearch()` ([PR#213](https://github.com/jlblancoc/nanoflann/pull/213)\
 by [ManosPapadakis95](https://github.com/ManosPapadakis95)).
   - Add missing method `KNNResultSet::empty()` for consistency with the\
 other result sets.
 * **Other changes**:
   - Add GUI examples for each search type:
     - `nanoflann_gui_example_R3_knn`
     - `nanoflann_gui_example_R3_radius`
     - `nanoflann_gui_example_R3_rknn`


# nanoflann 1.5.0: Released Jun 16, 2023
 * **API changes:**
   - Users of radius search should change their result placeholder type:
   `std::vector<std::pair<IndexType, DistanceType>>` => `std::vector<nanoflan\
n::ResultItem<IndexType, DistanceType>>`. (See [#166](https://github.com/jlbl\
ancoc/nanoflann/issues/166) for the motivation of this change).
   - More concise auxiliary (internal) type name:
     `array_or_vector_selector` -> `array_or_vector`.
   - Remove obsolete parameter `nChecks_IGNORED`. Removed from `SearchParams`
     constructor too, so that structure has been renamed `SearchParameters` to
     enforce users to update the code and avoid mistakes with the order of its
     ctor parameters.
   - Added method RadiusResultSet::empty()
   - Template argument rename: `AccesorType` => `IndexType` (does not\
 actually affect user code at all).
   - Added concurrent tree building support, refer to `KDTreeSingleIndexAdapt\
orParams::n_thread_build`.
 * **Other changes:**
   - Macros to avoid conflicts with X11 symbols.
   - Inline an auxiliary example function in case users want to use it and
    include the file in multiple translation units (Closes\
 [#182](https://github.com/jlblancoc/nanoflann/issues/182)).
   - Move all benchmarking code, data, and scripts to [its own\
 repository](https://github.com/MRPT/nanoflann-benchmark) to keep this repo\
 as clean as possible.
   - Fix "potentially uninitialized" GCC warning.
   - Clarified, even more, in docs and examples, that L2 distances are\
 **squared** distances.
   - Removed the (with modern compilers) now useless `inline` keyword in\
 class members.
   - Add examples with GUI (requires [mrpt-gui](https://docs.mrpt.org/referen\
ce/latest/group_mrpt_gui_grp.html)):
     - nanoflann_gui_example_R3: Radius search on R³ Euclidean space.
     - nanoflann_gui_example_bearings: NN search on non-Euclidean spaces.
 * BUGFIXES:
     - Avoid segfault if saving an empty index (Closes [#205](https://github.\
com/jlblancoc/nanoflann/issues/205)).

# nanoflann 1.4.3: Released Jul 24, 2022
 * Added flag SkipInitialBuildIndex to allow not wasting time building a tree\
 when it will be loaded from a file later on ([PR #171](https://github.com/jl\
blancoc/nanoflann/pull/171)).
 * Mark all constructors explicit, to avoid unintended creation of temporary\
 objects ([Issue #179](https://github.com/jlblancoc/nanoflann/issues/179)).
 * BUGFIX: avoid potential index out of bounds in KDTreeSingleIndexDynamicAda\
ptor ([PR #173](https://github.com/jlblancoc/nanoflann/pull/173))

# nanoflann 1.4.2: Released Jan 11, 2022
 * Install pkg-config .pc file under lib directory (Closes\
 [#161](https://github.com/jlblancoc/nanoflann/issues/161)).
 * Integrate AppVeyor CI.

# nanoflann 1.4.1: Released Jan 6, 2022
  * Fix incorrect install directory for cmake target & config files.
  * Do not install example binaries with `make install`.
  * Provide working examples for cmake and pkgconfig under\
 `examples/example_*` directories.

# nanoflann 1.4.0: Released Jan 2, 2022
  * nanoflann::KDTreeSingleIndexAdaptor() ctor now forwards additional\
 parameters to the metric class, enabling custom dynamic metrics.
  * Add and apply a `.clang-format` file (same one than used in MOLAorg/MOLA\
 projects).
  * Examples: clean up and code modernization.
  * CMake variables prefixed now with `NANOFLANN_` for easier integration of\
 nanoflann as a Git submodule.
  * Fixes for IndexType which are not of integral types [PR\
 #154](https://github.com/jlblancoc/nanoflann/pull/154)
  * save/load API upgraded from C `FILE*` to C++ file streams (By Dominic\
 Kempf, Heidelberg University, [PR](https://github.com/jlblancoc/nanoflann/pu\
ll/157)).

# nanoflann 1.3.2: Released Nov 5, 2020
  * Add optional argument for Eigen matrix layout [commit](https://github.com\
/jlblancoc/nanoflann/commit/40fa96badcfc4b1a2df38b40b8a368cf5521ace4).
  * Throw exception on malloc failure [PR #126](https://github.com/jlblancoc/\
nanoflann/pull/126).
  * Respect GNUInstallDirs in CMake install rules [PR #131](https://github.co\
m/jlblancoc/nanoflann/pull/131).

# nanoflann 1.3.1: Released Oct 11, 2019
  * Fixed bug in KDTreeSingleIndexDynamicAdaptor. See: https://github.com/jlb\
lancoc/nanoflann/commit/a066148517d16c173954dcde13c1527481b9fad3
  * Fix build in XCode.
  * Simplify CMakeLists for Eigen example (requires Eigen3Config.cmake now)
  * Avoid setting cmake global executable build path

# nanoflann 1.3.0: Released Aug 28, 2018
  * Instructions for `make install` for Linux and Windows (Closes #87).
  * Fix all (?) MSVC conversion warnings (Closes: #95).
  * Avoid need for _USE_MATH_DEFINES in MSVC (Closes: #96)
  * Eigen::Matrix datasets: now uses std::cref() to store a reference to\
 matrix.
  * GSOC2017 contributions by Pranjal Kumar Rai:
    * Support for dynamic datasets.
    * Support for non-Euclidean spaces: SO(2), SO(3)

# nanoflann 1.2.3: Released Dec 20, 2016
  * Fixed: split plane now correctly chooses the dimensions with the largest\
 span.
    Should lead to more optimal trees.

# nanoflann 1.2.2: Released Nov 10, 2016
  * knnSearch() now also returns the number of valid points found.

# nanoflann 1.2.1: Released Jun 1, 2016
  * Fix potential compiler warnings if `IndexType` is signed.
  * New unit tests comparing the results to those of brute force search.

# nanoflann 1.2.0: Released May 5, 2016
  * Fixed: many classes constructors get const ref arguments but stored const\
 values.

# nanoflann 1.1.9: Released Oct 2, 2015
  * Added KDTreeSingleIndexAdaptor::radiusSearchCustomCallback() (Based on a\
 suggestion by Yannick Morin-Rivest)
  * Better documentation in class headers.
  * Cleanup of unused code.
  * Parameter KDTreeSingleIndexAdaptorParams::dim has been removed since it\
 was redundant.

# nanoflann 1.1.8: Released May 2, 2014
  * Created hidden constructors in nanoflann class, to disallow unintentional\
 copies which will corrupt
    the internal pointers.
  * Fixed crash if trying to build an index of an empty dataset.

# nanoflann 1.1.7: Released Aug 24, 2013
  * Two internal containers are now automatically defined as fixed-size\
 arrays if the
    problem dimension is known at compile time, improving efficiency.
    The new/modified datatypes are: KDTreeSingleIndexAdaptor::BoundingBox,\
 KDTreeSingleIndexAdaptor::distance_vector_t
  * Fixed compilation with GCC 4.8 and C++11 enabled (Thanks to Simon\
 Praetorius).

# nanoflann 1.1.6: Released May 14, 2013
  * Fixed warnings about unused parameters.
  * Fixed L1_adaptor.accum_dist(), which implemented L2 instead (Closes #1)
  * Fixed wrong typedef in KDTreeEigenMatrixAdaptor<> for IndexType!=size_t\
 (Closes: #2)

# nanoflann 1.1.5: Released Mar 25, 2013
  * Fixed: Memory pool wasn't freed after each call to buildIndex()
  * GCC: Added -isystem flag to gtest headers to avoid pedantic warnings.

# nanoflann 1.1.4: Released Jan 11, 2013
  * Fixed compilation with Visual Studio 11 (MSVC 2012).
  * Fixed compilation of gtest with VS11 and its _VARIADIC_MAX "bug".
  * Added a security check to launch an exception if searches are attempted\
 before buildIndex().
  * New example to demonstrate save/load the index to files.
  * save/load methods exposed as public.

# nanoflann 1.1.3: Released Jun 6, 2012
  * GTest sources are now embedded, due to the changes in newer Ubuntu\
 packages which don't carry the precompiled libs.
  * Added asserts to detect whether the user passes NULL as query points.
  * New method RadiusResultSet::worst_item()
  * New method RadiusResultSet::set_radius_and_clear()
  * Avoid potential collision of min/max macros with <windows.h>
  * Removed unneeded #include's of std headers.
  * New sample code for vectors of vectors.
  * Fixed building of tests for MSVC in Windows.
  * Allow manually setting the path to Eigen3 (mainly for building examples\
 under Windows).

# nanoflann 1.1.2: Released May 2, 2012
  * Better documentation and added graphs of a benchmarking for helping\
 choosing "leaf_max_size".
  * Now KDTreeSingleIndexAdaptor::buildIndex() can be called several times
     even when the dataset size changes (Thanks to Rob McDonald for\
 reporting!)

# nanoflann 1.1.1: Released Feb 1, 2012
  * Some fixes to kd_tree index and L1/L2 metrics to allow distinct types
     in data elements and in the distances. This is mainly to permit elements
	 being vectors of integers (e.g. uint8_t) but distances being real numbers.
  * Examples and unit tests have been corrected to use template arguments
     instead of being hard-wired to "float" data types (Thanks Thomas Vincent
	 for noticing!).

# nanoflann 1.1.0: Released Dec 15, 2011
  * Fixed warnings for MSVC and for GCC with "-Wall -pedantic"
  * Updated performance tests to work with the final nanoflann code (they were
     written for a very early version).
  * All main classes now have new template arguments for the type of indice,
     which now defaults to "size_t" instead of "int". In case this breaks
     backward compatibility in user code, especify "int" to override the\
 default
     template arguments, although "size_t" it's recommended.

# nanoflann 1.0.0: Released Aug 30, 2011
  * Initial version

\
changes-type: text/markdown;variant=GFM
url: https://github.com/jlblancoc/nanoflann
doc-url: https://jlblancoc.github.io/nanoflann/
package-url: https://github.com/build2-packaging/nanoflann/
email: joseluisblancoc@gmail.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
tests: nanoflann-tests == 1.6.0
examples: nanoflann-examples == 1.6.0
bootstrap-build:
\
project = nanoflann

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

hxx{*}: cxx.importable = false

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: nanoflann/nanoflann-1.6.0.tar.gz
sha256sum: f2ef9312603643ea54350085e081e4bcac6afa8f6581449e92822248b4e35069
:
name: nanoflann
version: 1.7.1
type: lib,binless
language: c++
project: nanoflann
summary: Nearest-Neighbor (NN) search with KD-trees C++ library
license: BSD-2-Clause
description:
\
![nanoflann](https://raw.githubusercontent.com/jlblancoc/nanoflann/master/doc\
/logo.png)

# nanoflann
[![CI Linux](https://github.com/jlblancoc/nanoflann/actions/workflows/ci-linu\
x.yml/badge.svg)](https://github.com/jlblancoc/nanoflann/actions/workflows/ci\
-linux.yml)
[![CI Check clang-format](https://github.com/jlblancoc/nanoflann/actions/work\
flows/check-clang-format.yml/badge.svg)](https://github.com/jlblancoc/nanofla\
nn/actions/workflows/check-clang-format.yml)
[![CircleCI](https://circleci.com/gh/jlblancoc/nanoflann/tree/master.svg?styl\
e=svg)](https://circleci.com/gh/jlblancoc/nanoflann/tree/master)
[![Windows build status](https://ci.appveyor.com/api/projects/status/h8k1apfo\
gxyqhskd/branch/master?svg=true)](https://ci.appveyor.com/project/jlblancoc/n\
anoflann/branch/master)


## 1. About

*nanoflann* is a **C++11 [header-only](http://en.wikipedia.org/wiki/Header-on\
ly) library** for building KD-Trees of datasets with different topologies:\
 R<sup>2</sup>, R<sup>3</sup> (point clouds), SO(2) and SO(3) (2D and 3D\
 rotation groups). No support for approximate NN is provided. *nanoflann*\
 does not require compiling or installing. You just need to `#include\
 <nanoflann.hpp>` in your code.

This library is a *fork* of the [flann library](https://github.com/flann-lib/\
flann) by Marius Muja and David G. Lowe, and born as a child project of\
 [MRPT](https://www.mrpt.org/). Following the original license terms,\
 *nanoflann* is distributed under the BSD license. Please, for bugs use the\
 issues button or fork and open a pull request.

Cite as:
```
@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library\
 for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}
```

See the release [CHANGELOG](CHANGELOG.md) for a list of project changes.

### 1.1. Obtaining the code

* Easiest way: clone this GIT repository and take the `include/nanoflann.hpp`\
 file for use where you need it.
* Debian or Ubuntu ([21.04 or newer](https://packages.ubuntu.com/source/hirsu\
te/nanoflann)) users can install it simply with:
  ```bash 
  $ sudo apt install libnanoflann-dev
  ```
* macOS users can install `nanoflann` with [Homebrew](https://brew.sh) with:
  ```shell
  $ brew install brewsci/science/nanoflann
  ```
  or
  ```shell
  $ brew tap brewsci/science
  $ brew install nanoflann
  ```
  MacPorts users can use:
  ```shell
  $ sudo port install nanoflann
  ```
* Linux users can also install it with [Linuxbrew](https://docs.brew.sh/Homeb\
rew-on-Linux) with: `brew install homebrew/science/nanoflann`
* List of [**stable releases**](https://github.com/jlblancoc/nanoflann/releas\
es). Check out the [CHANGELOG](https://github.com/jlblancoc/nanoflann/blob/ma\
ster/CHANGELOG.md)

Although nanoflann itself doesn't have to be compiled, you can build some\
 examples and tests with:

```shell
$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test
```

### 1.2. C++ API reference

  * Browse the [Doxygen documentation](https://jlblancoc.github.io/nanoflann/\
).

  * **Important note:** If L2 norms are used, notice that search radius and\
 all passed and returned distances are actually *squared distances*.

### 1.3. Code examples

  * KD-tree look-up with `knnSearch()` and `radiusSearch()`:\
 [pointcloud_kdd_radius.cpp](https://github.com/jlblancoc/nanoflann/blob/mast\
er/examples/pointcloud_kdd_radius.cpp)
  * KD-tree look-up on a point cloud dataset: [pointcloud_example.cpp](https:\
//github.com/jlblancoc/nanoflann/blob/master/examples/pointcloud_example.cpp)
  * KD-tree look-up on a dynamic point cloud dataset: [dynamic_pointcloud_exa\
mple.cpp](https://github.com/jlblancoc/nanoflann/blob/master/examples/dynamic\
_pointcloud_example.cpp)
  * KD-tree look-up on a rotation group (SO2): [SO2_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/SO2_adaptor_example.cpp)
  * KD-tree look-up on a rotation group (SO3): [SO3_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/SO3_adaptor_example.cpp)
  * KD-tree look-up on a point cloud dataset with an external adaptor class:\
 [pointcloud_adaptor_example.cpp](https://github.com/jlblancoc/nanoflann/blob\
/master/examples/pointcloud_adaptor_example.cpp)
  * KD-tree look-up directly on an `Eigen::Matrix<>`: [matrix_example.cpp](ht\
tps://github.com/jlblancoc/nanoflann/blob/master/examples/matrix_example.cpp)
  * KD-tree look-up directly on `std::vector<std::vector<T> >` or\
 `std::vector<Eigen::VectorXd>`: [vector_of_vectors_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/vector_of_vectors_example.cpp)
  * Example with a `Makefile` for usage through `pkg-config` (for example,\
 after doing a "make install" or after installing from Ubuntu repositories):\
 [example_with_pkgconfig/](https://github.com/jlblancoc/nanoflann/blob/master\
/examples/example_with_pkgconfig/)
  * Example of how to build an index and save it to disk for later usage:\
 [saveload_example.cpp](https://github.com/jlblancoc/nanoflann/blob/master/ex\
amples/saveload_example.cpp)
  * GUI examples (requires `mrpt-gui`, e.g. `sudo apt install\
 libmrpt-gui-dev`):
    - [nanoflann_gui_example_R3](https://github.com/jlblancoc/nanoflann/blob/\
master/examples/examples_gui/nanoflann_gui_example_R3/nanoflann_gui_example_R\
3.cpp)

![nanoflann-demo-1](https://user-images.githubusercontent.com/5497818/2015504\
33-d561c5a9-4e87-453d-9cf8-8202d7876235.gif)



### 1.4. Why a fork?

  * **Execution time efficiency**:
    * The power of the original `flann` library comes from the possibility of\
 choosing between different ANN algorithms. The cost of this flexibility is\
 the declaration of pure virtual methods which (in some circumstances) impose\
 [run-time penalties](http://www.cs.cmu.edu/~gilpin/c%2B%2B/performance.html#\
virtualfunctions). In `nanoflann` all those virtual methods have been\
 replaced by a combination of the [Curiously Recurring Template\
 Pattern](http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern)\
 (CRTP) and inlined methods, which are much faster.
    * For `radiusSearch()`, there is no need to make a call to determine the\
 number of points within the radius and then call it again to get the data.\
 By using STL containers for the output data, containers are automatically\
 resized.
    * Users can (optionally) set the problem dimensionality at compile-time\
 via a template argument, thus allowing the compiler to fully unroll loops.
    * `nanoflann` allows users to provide a precomputed bounding box of the\
 data, if available, to avoid recomputation.
    * Indices of data points have been converted from `int` to `size_t`,\
 which removes a limit when handling very large data sets.

  * **Memory efficiency**: Instead of making a copy of the entire dataset\
 into a custom `flann`-like matrix before building a KD-tree index,\
 `nanoflann` allows direct access to your data via an **adaptor interface**\
 which must be implemented in your class.

Refer to the examples below or to the C++ API of [nanoflann::KDTreeSingleInde\
xAdaptor<>](https://jlblancoc.github.io/nanoflann/classnanoflann_1_1KDTreeSin\
gleIndexAdaptor.html) for more info.


### 1.5. What can *nanoflann* do?

  * Building KD-trees with a single index (no randomized KD-trees, no\
 approximate searches).
  * Fast, thread-safe querying for closest neighbors on KD-trees. The entry\
 points are:
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::knnSearch()`
      * Finds the `num_closest` nearest neighbors to `query_point[0:dim-1]`.\
 Their indices are stored inside the result object. See an [example usage\
 code](https://github.com/jlblancoc/nanoflann/blob/master/examples/pointcloud\
_kdd_radius.cpp#L119).
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::radiusSearch()`
      * Finds all the neighbors to `query_point[0:dim-1]` within a maximum\
 radius. The output is given as a vector of pairs, of which the first element\
 is a point index and the second the corresponding distance. See an [example\
 usage code](https://github.com/jlblancoc/nanoflann/blob/master/examples/poin\
tcloud_kdd_radius.cpp#L141).
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::radiusSearchCustomC\
allback()`
	  * Can be used to receive a callback for each point found in range. This\
 may be more efficient in some situations instead of building a huge vector\
 of pairs with the results.
  * Working with 2D and 3D point clouds or N-dimensional data sets.
  * Working directly with `Eigen::Matrix<>` classes (matrices and\
 vectors-of-vectors).
  * Working with dynamic point clouds without a need to rebuild entire\
 kd-tree index.
  * Working with the distance metrics:
    * `R^N`: Euclidean spaces:
      * `L1` (Manhattan)
      * `L2` (**squared** Euclidean norm, favoring SSE2 optimization).
      * `L2_Simple` (**squared** Euclidean norm, for low-dimensionality data\
 sets like point clouds).
    * `SO(2)`: 2D rotational group
      * `metric_SO2`: Absolute angular diference.
    * `SO(3)`: 3D rotational group (better suppport to be provided in future\
 releases)
      * `metric_SO3`: Inner product between quaternions.
  * Saves and load the built indices to disk.
  * GUI based support for benchmarking multiple kd-tree libraries namely\
 nanoflann, flann, fastann and libkdtree.

### 1.6. What can't *nanoflann* do?

  * Use other distance metrics apart from L1, L2, SO2 and SO3.
  * Support for SE(3) groups.
  * Only the C++ interface exists: there is no support for C, MATLAB or\
 Python.
  * There is no automatic algorithm configuration (as described in the\
 original Muja & Lowe's paper).

### 1.7. Use in your project via CMake

You can directly drop the `nanoflann.hpp` file in your project. Alternatively,
the CMake standard method is also available:

  * Build and "install" nanoflann. Set `CMAKE_INSTALL_PREFIX` to a proper path
  and then execute `make install` (Linux, OSX) or build the `INSTALL`
  target (Visual Studio).
  * Then, add something like this to the CMake script of your project:

```cmake
# Find nanoflannConfig.cmake:
find_package(nanoflann)

add_executable(my_project test.cpp)

# Make sure the include path is used:
target_link_libraries(my_project nanoflann::nanoflann)
```

### 1.8. Package Managers

#### Using `conan`

You can install pre-built binaries for `nanoflann` or build it from source\
 using [Conan](https://conan.io/). Use the following command to install\
 latest version:

```sh
$ conan install --requires="nanoflann/[*]" --build=missing
```

For detailed instructions on how to use Conan, please refer to the [Conan\
 documentation](https://docs.conan.io/2/).

The `nanoflann` Conan recipe is kept up to date by Conan maintainers and\
 community contributors.
If the version is out of date, please [create an issue or pull\
 request](https://github.com/conan-io/conan-center-index) on the\
 ConanCenterIndex repository.

#### Using `vcpkg`

You can download and install nanoflann using the [vcpkg](https://github.com/M\
icrosoft/vcpkg) dependency manager:

```sh
$ git clone https://github.com/Microsoft/vcpkg.git
$ cd vcpkg
$ ./bootstrap-vcpkg.sh
$ ./vcpkg integrate install
$ ./vcpkg install nanoflann
```

The nanoflann port in vcpkg is kept up to date by Microsoft team members and\
 community contributors. If the version is out of date, please [create an\
 issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg\
 repository.


### 1.9. Compile time definitions

  * `NANOFLANN_FIRST_MATCH`: If defined and two points have the same\
 distance, the one with the lowest-index will be returned first. Otherwise\
 there is no particular order.
  * `NANOFLANN_NO_THREADS`: If defined, multithreading capabilities will be\
 disabled, so that the library can be used without linking with pthreads. If\
 one tries to use multiple threads, an exception will be thrown.

------

## 2. Any help choosing the KD-tree parameters?

### 2.1. `KDTreeSingleIndexAdaptorParams::leaf_max_size`

A KD-tree is... well, a tree :-). And as such it has a root node, a set of\
 intermediary nodes and finally, "leaf" nodes which are those without\
 children.

Points (or, properly, point indices) are only stored in leaf nodes. Each leaf\
 contains a list of which points fall within its range.

While building the tree, nodes are recursively divided until the number of\
 points inside is equal or below some threshold. **That is `leaf_max_size`**.\
 While doing queries, the  "tree algorithm" ends by selecting leaf nodes,\
 then performing linear search (one-by-one) for the closest point to the\
 query within all those in the leaf.

So, `leaf_max_size` must be set as a **tradeoff**:
  * Large values mean that the tree will be built faster (since the tree will\
 be smaller), but each query will be slower (since the linear search in the\
 leaf is to be done over more points).
  * Small values will build the tree much slower (there will be many tree\
 nodes), but queries will be faster... up to some point, since the\
 "tree-part" of the search (logarithmic complexity) still has a significant\
 cost.

What number to select really depends on the application and even on the size\
 of the processor cache memory, so ideally you should do some benchmarking\
 for maximizing efficiency.

But to help choosing a good value as a rule of thumb, I provide the following\
 two benchmarks. Each graph represents the tree build (horizontal) and query\
 (vertical) times for different `leaf_max_size` values between 1 and 10K (as\
 95% uncertainty ellipses, deformed due to the logarithmic scale).

  * A 100K point cloud, uniformly distributed (each point has (x,y,z) `float`\
 coordinates):

![perf5_1e5pts_time_vs_maxleaf](https://raw.githubusercontent.com/jlblancoc/n\
anoflann/master/doc/perf5_1e5pts_time_vs_maxleaf.png)

  * A ~150K point cloud from a real dataset (`scan_071_points.dat` from the\
 [Freiburg Campus 360 dataset](http://ais.informatik.uni-freiburg.de/projects\
/datasets/fr360/), each point has (x,y,z) `float` coordinates):

![perf5_1e5pts_time_vs_maxleaf_real_dataset](https://raw.githubusercontent.co\
m/jlblancoc/nanoflann/master/doc/perf5_1e5pts_time_vs_maxleaf_real_dataset.pn\
g)

So, it seems that a `leaf_max_size` **between 10 and 50** would be optimum in\
 applications where the cost of queries dominates (e.g. [ICP](http://en.wikip\
edia.org/wiki/Iterative_closest_point])). At present, its default value is 10.


### 2.2. `KDTreeSingleIndexAdaptorParams::checks`

This parameter is really ignored in `nanoflann`, but was kept for backward\
 compatibility with the original FLANN interface. Just ignore it.

### 2.3. `KDTreeSingleIndexAdaptorParams::n_thread_build`

This parameter determines the maximum number of threads that can be called\
 concurrently during the construction of the KD tree. The default value is 1.\
 When the parameter is set to 0, `nanoflann` automatically determines the\
 number of threads to use.

See [this pull request](https://github.com/jlblancoc/nanoflann/pull/236) for\
 some benchmarking showing that using the maximum number of threads is not\
 always the most efficient approach. Do benchmarking on your data!

-----

## 3. Performance

### 3.1. `nanoflann`: faster and less memory usage

Refer to the "Why a fork?" section above for the main optimization ideas\
 behind `nanoflann`.

Notice that there are no explicit SSE2/SSE3 optimizations in `nanoflann`, but\
 the intensive usage of `inline` and templates in practice turns into\
 automatically SSE-optimized code generated by the compiler.


### 3.2. Benchmark: original `flann` vs `nanoflann`

The most time-consuming part of many point cloud algorithms (like ICP) is\
 querying a KD-Tree for nearest neighbors. This operation is therefore the\
 most time critical.

`nanoflann` provides a ~50% time saving with respect to the original `flann`\
 implementation (times in this chart are in microseconds for each query):

![perf3_query](https://raw.githubusercontent.com/jlblancoc/nanoflann/master/d\
oc/perf3_query.small.png)

Although most of the gain comes from the queries (due to the large number of\
 them in any typical operation with point clouds), there is also some time\
 saved while building the KD-tree index, due to the templatized-code but also\
 for the avoidance of duplicating the data in an auxiliary matrix (times in\
 the next chart are in milliseconds):

![perf4_time_saved](https://raw.githubusercontent.com/jlblancoc/nanoflann/mas\
ter/doc/perf4_time_saved.small.png)

These performance tests are only representative of our testing. If you want\
 to repeat them, read the instructions in [perf-tests](https://github.com/jlb\
lancoc/nanoflann/tree/master/perf-tests)


----

## 4. Other KD-tree projects

  * [FLANN](http://www.cs.ubc.ca/research/flann/) - Marius Muja and David G.\
 Lowe (University of British Columbia).
  * [FASTANN](http://www.robots.ox.ac.uk/~vgg/software/fastann/) - James\
 Philbin (VGG, University of Oxford).
  * [ANN](http://www.cs.umd.edu/~mount/ANN/) - David M. Mount and Sunil Arya\
 (University of Maryland).
  * [libkdtree++](https://packages.debian.org/source/sid/libkdtree++) -\
 Martin F. Krafft & others.

<br>

*Note: The project logo is due to [CedarSeed](http://www.iconarchive.com/show\
/patisserie-icons-by-cedarseed/Flan-icon.html)*

**Contributors**

<a href="https://github.com/jlblancoc/nanoflann/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=jlblancoc/nanoflann" />
</a>


\
description-type: text/markdown;variant=GFM
package-description:
\
# nanoflann - C++ Library for Nearest Neighbor Search with KD-Trees

This is the `build2` package for nanoflann, a C++11 header-only library for\
 Nearest Neighbor (NN) search with KD-trees.

# Usage
To use `nanoflann` in your project, add the following configurations to the\
 respective files after you have gained access to a `build2` package\
 repository that contains it.

### `manifest`
To make `nanoflann` available for import, add the following dependency to the\
 `manifest` of each package in your project that requires it, adjusting the\
 version constraint as appropriate.

    depends: nanoflann ^1.7.1

### `buildfile`
To import the contained library, use the following declaration in your\
 `buildfile`.

    import nanoflann = nanoflann%lib{nanoflann}

### C++ Header Inclusion
Finally, include the nanoflann header in your C++ source code.

```c++
#include <nanoflann.hpp>
```

\
package-description-type: text/markdown;variant=GFM
changes:
\
# nanoflann 1.7.1: Released Mar 15, 2025
 - ResultSets::worstDist(): Fix a potential access to negative index in array\
 (did not happen in practice, but static analysis tools correctly detected\
 this possibility).

# nanoflann 1.7.0: Released Feb 3, 2025
 - ResultSets::worstDist(): clarify the meaning of its return value, and made\
 to return the actual worst distance in the found set (only if set is full)

# nanoflann 1.6.3: Released Jan 7, 2025
 - cmake_required_version bumped to 3.10
 - clang-format version bumped to 14

# nanoflann 1.6.2: Released Nov 4, 2024
 - BUG FIX: Fix middleSplit_ for same points by @yzabalotski in\
 https://github.com/jlblancoc/nanoflann/pull/250
 - Fix build warnings.

# nanoflann 1.6.1: Released Aug 24, 2024
 - Add conan install instructions.
 - Add multiple thread kdtree build support for KDTreeEigenMatrixAdaptor ([PR\
 #246](https://github.com/jlblancoc/nanoflann/pull/246))

# nanoflann 1.6.0: Released Jul 11, 2024
 - BUG FIX: nanoflann::SearchParameters::sorted was ignored for\
 RadiusResultSet.
 - ResultSet classes now must implement a sort() method.
 - Added type IndexType to nanoflann:KDTreeBaseClass

# nanoflann 1.5.5: Released Mar 12, 2024
 - Potentially more efficient scheduling of multi-thread index building ([PR\
 #236](https://github.com/jlblancoc/nanoflann/pull/236))
 - Bump minimum required cmake version to 3.5 ([PR #230](https://github.com/j\
lblancoc/nanoflann/pull/230/))

# nanoflann 1.5.4: Released Jan 10, 2024
 - Fix outdated NANOFLANN_VERSION macro in header file
 - Fix poll-allocator alignment problems
 - Add NANOFLANN_USE_SYSTEM_GTEST option
 - Look for Threads dependency in CMake config script


# nanoflann 1.5.3: Released Dec 7, 2023
 * **Other changes**:
   - Save one redundant call to `computeMinMax()` in `middleSplit_`\
 ([PR#220](https://github.com/jlblancoc/nanoflann/pull/220) by\
 [qq422216549](https://github.com/qq422216549)).
     This saves *a lot* of time, up to 20% faster in a benchmark with small\
 (thousands) point clouds.

# nanoflann 1.5.2: Released Nov 29, 2023
 * **Other changes**:
   - Improve RKNN search efficiency ([PR#219](https://github.com/jlblancoc/na\
noflann/pull/219) by [kya8](https://github.com/kya8)).

# nanoflann 1.5.1: Released Nov 27, 2023
 * **API changes:**
   - Add new search method `rknnSearch()` for knn searches with a maximum\
 radius.
   - Add missing `SearchParameters` argument to `KDTreeSingleIndexDynamicAdap\
tor_::knnSearch()` ([PR#213](https://github.com/jlblancoc/nanoflann/pull/213)\
 by [ManosPapadakis95](https://github.com/ManosPapadakis95)).
   - Add missing method `KNNResultSet::empty()` for consistency with the\
 other result sets.
 * **Other changes**:
   - Add GUI examples for each search type:
     - `nanoflann_gui_example_R3_knn`
     - `nanoflann_gui_example_R3_radius`
     - `nanoflann_gui_example_R3_rknn`


# nanoflann 1.5.0: Released Jun 16, 2023
 * **API changes:**
   - Users of radius search should change their result placeholder type:
   `std::vector<std::pair<IndexType, DistanceType>>` => `std::vector<nanoflan\
n::ResultItem<IndexType, DistanceType>>`. (See [#166](https://github.com/jlbl\
ancoc/nanoflann/issues/166) for the motivation of this change).
   - More concise auxiliary (internal) type name:
     `array_or_vector_selector` -> `array_or_vector`.
   - Remove obsolete parameter `nChecks_IGNORED`. Removed from `SearchParams`
     constructor too, so that structure has been renamed `SearchParameters` to
     enforce users to update the code and avoid mistakes with the order of its
     ctor parameters.
   - Added method RadiusResultSet::empty()
   - Template argument rename: `AccesorType` => `IndexType` (does not\
 actually affect user code at all).
   - Added concurrent tree building support, refer to `KDTreeSingleIndexAdapt\
orParams::n_thread_build`.
 * **Other changes:**
   - Macros to avoid conflicts with X11 symbols.
   - Inline an auxiliary example function in case users want to use it and
    include the file in multiple translation units (Closes\
 [#182](https://github.com/jlblancoc/nanoflann/issues/182)).
   - Move all benchmarking code, data, and scripts to [its own\
 repository](https://github.com/MRPT/nanoflann-benchmark) to keep this repo\
 as clean as possible.
   - Fix "potentially uninitialized" GCC warning.
   - Clarified, even more, in docs and examples, that L2 distances are\
 **squared** distances.
   - Removed the (with modern compilers) now useless `inline` keyword in\
 class members.
   - Add examples with GUI (requires [mrpt-gui](https://docs.mrpt.org/referen\
ce/latest/group_mrpt_gui_grp.html)):
     - nanoflann_gui_example_R3: Radius search on R³ Euclidean space.
     - nanoflann_gui_example_bearings: NN search on non-Euclidean spaces.
 * BUGFIXES:
     - Avoid segfault if saving an empty index (Closes [#205](https://github.\
com/jlblancoc/nanoflann/issues/205)).

# nanoflann 1.4.3: Released Jul 24, 2022
 * Added flag SkipInitialBuildIndex to allow not wasting time building a tree\
 when it will be loaded from a file later on ([PR #171](https://github.com/jl\
blancoc/nanoflann/pull/171)).
 * Mark all constructors explicit, to avoid unintended creation of temporary\
 objects ([Issue #179](https://github.com/jlblancoc/nanoflann/issues/179)).
 * BUGFIX: avoid potential index out of bounds in KDTreeSingleIndexDynamicAda\
ptor ([PR #173](https://github.com/jlblancoc/nanoflann/pull/173))

# nanoflann 1.4.2: Released Jan 11, 2022
 * Install pkg-config .pc file under lib directory (Closes\
 [#161](https://github.com/jlblancoc/nanoflann/issues/161)).
 * Integrate AppVeyor CI.

# nanoflann 1.4.1: Released Jan 6, 2022
  * Fix incorrect install directory for cmake target & config files.
  * Do not install example binaries with `make install`.
  * Provide working examples for cmake and pkgconfig under\
 `examples/example_*` directories.

# nanoflann 1.4.0: Released Jan 2, 2022
  * nanoflann::KDTreeSingleIndexAdaptor() ctor now forwards additional\
 parameters to the metric class, enabling custom dynamic metrics.
  * Add and apply a `.clang-format` file (same one than used in MOLAorg/MOLA\
 projects).
  * Examples: clean up and code modernization.
  * CMake variables prefixed now with `NANOFLANN_` for easier integration of\
 nanoflann as a Git submodule.
  * Fixes for IndexType which are not of integral types [PR\
 #154](https://github.com/jlblancoc/nanoflann/pull/154)
  * save/load API upgraded from C `FILE*` to C++ file streams (By Dominic\
 Kempf, Heidelberg University, [PR](https://github.com/jlblancoc/nanoflann/pu\
ll/157)).

# nanoflann 1.3.2: Released Nov 5, 2020
  * Add optional argument for Eigen matrix layout [commit](https://github.com\
/jlblancoc/nanoflann/commit/40fa96badcfc4b1a2df38b40b8a368cf5521ace4).
  * Throw exception on malloc failure [PR #126](https://github.com/jlblancoc/\
nanoflann/pull/126).
  * Respect GNUInstallDirs in CMake install rules [PR #131](https://github.co\
m/jlblancoc/nanoflann/pull/131).

# nanoflann 1.3.1: Released Oct 11, 2019
  * Fixed bug in KDTreeSingleIndexDynamicAdaptor. See: https://github.com/jlb\
lancoc/nanoflann/commit/a066148517d16c173954dcde13c1527481b9fad3
  * Fix build in XCode.
  * Simplify CMakeLists for Eigen example (requires Eigen3Config.cmake now)
  * Avoid setting cmake global executable build path

# nanoflann 1.3.0: Released Aug 28, 2018
  * Instructions for `make install` for Linux and Windows (Closes #87).
  * Fix all (?) MSVC conversion warnings (Closes: #95).
  * Avoid need for _USE_MATH_DEFINES in MSVC (Closes: #96)
  * Eigen::Matrix datasets: now uses std::cref() to store a reference to\
 matrix.
  * GSOC2017 contributions by Pranjal Kumar Rai:
    * Support for dynamic datasets.
    * Support for non-Euclidean spaces: SO(2), SO(3)

# nanoflann 1.2.3: Released Dec 20, 2016
  * Fixed: split plane now correctly chooses the dimensions with the largest\
 span.
    Should lead to more optimal trees.

# nanoflann 1.2.2: Released Nov 10, 2016
  * knnSearch() now also returns the number of valid points found.

# nanoflann 1.2.1: Released Jun 1, 2016
  * Fix potential compiler warnings if `IndexType` is signed.
  * New unit tests comparing the results to those of brute force search.

# nanoflann 1.2.0: Released May 5, 2016
  * Fixed: many classes constructors get const ref arguments but stored const\
 values.

# nanoflann 1.1.9: Released Oct 2, 2015
  * Added KDTreeSingleIndexAdaptor::radiusSearchCustomCallback() (Based on a\
 suggestion by Yannick Morin-Rivest)
  * Better documentation in class headers.
  * Cleanup of unused code.
  * Parameter KDTreeSingleIndexAdaptorParams::dim has been removed since it\
 was redundant.

# nanoflann 1.1.8: Released May 2, 2014
  * Created hidden constructors in nanoflann class, to disallow unintentional\
 copies which will corrupt
    the internal pointers.
  * Fixed crash if trying to build an index of an empty dataset.

# nanoflann 1.1.7: Released Aug 24, 2013
  * Two internal containers are now automatically defined as fixed-size\
 arrays if the
    problem dimension is known at compile time, improving efficiency.
    The new/modified datatypes are: KDTreeSingleIndexAdaptor::BoundingBox,\
 KDTreeSingleIndexAdaptor::distance_vector_t
  * Fixed compilation with GCC 4.8 and C++11 enabled (Thanks to Simon\
 Praetorius).

# nanoflann 1.1.6: Released May 14, 2013
  * Fixed warnings about unused parameters.
  * Fixed L1_adaptor.accum_dist(), which implemented L2 instead (Closes #1)
  * Fixed wrong typedef in KDTreeEigenMatrixAdaptor<> for IndexType!=size_t\
 (Closes: #2)

# nanoflann 1.1.5: Released Mar 25, 2013
  * Fixed: Memory pool wasn't freed after each call to buildIndex()
  * GCC: Added -isystem flag to gtest headers to avoid pedantic warnings.

# nanoflann 1.1.4: Released Jan 11, 2013
  * Fixed compilation with Visual Studio 11 (MSVC 2012).
  * Fixed compilation of gtest with VS11 and its _VARIADIC_MAX "bug".
  * Added a security check to launch an exception if searches are attempted\
 before buildIndex().
  * New example to demonstrate save/load the index to files.
  * save/load methods exposed as public.

# nanoflann 1.1.3: Released Jun 6, 2012
  * GTest sources are now embedded, due to the changes in newer Ubuntu\
 packages which don't carry the precompiled libs.
  * Added asserts to detect whether the user passes NULL as query points.
  * New method RadiusResultSet::worst_item()
  * New method RadiusResultSet::set_radius_and_clear()
  * Avoid potential collision of min/max macros with <windows.h>
  * Removed unneeded #include's of std headers.
  * New sample code for vectors of vectors.
  * Fixed building of tests for MSVC in Windows.
  * Allow manually setting the path to Eigen3 (mainly for building examples\
 under Windows).

# nanoflann 1.1.2: Released May 2, 2012
  * Better documentation and added graphs of a benchmarking for helping\
 choosing "leaf_max_size".
  * Now KDTreeSingleIndexAdaptor::buildIndex() can be called several times
     even when the dataset size changes (Thanks to Rob McDonald for\
 reporting!)

# nanoflann 1.1.1: Released Feb 1, 2012
  * Some fixes to kd_tree index and L1/L2 metrics to allow distinct types
     in data elements and in the distances. This is mainly to permit elements
	 being vectors of integers (e.g. uint8_t) but distances being real numbers.
  * Examples and unit tests have been corrected to use template arguments
     instead of being hard-wired to "float" data types (Thanks Thomas Vincent
	 for noticing!).

# nanoflann 1.1.0: Released Dec 15, 2011
  * Fixed warnings for MSVC and for GCC with "-Wall -pedantic"
  * Updated performance tests to work with the final nanoflann code (they were
     written for a very early version).
  * All main classes now have new template arguments for the type of indice,
     which now defaults to "size_t" instead of "int". In case this breaks
     backward compatibility in user code, especify "int" to override the\
 default
     template arguments, although "size_t" it's recommended.

# nanoflann 1.0.0: Released Aug 30, 2011
  * Initial version

\
changes-type: text/markdown;variant=GFM
url: https://github.com/jlblancoc/nanoflann
doc-url: https://jlblancoc.github.io/nanoflann/
package-url: https://github.com/build2-packaging/nanoflann/
email: joseluisblancoc@gmail.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
tests: nanoflann-tests == 1.7.1
examples: nanoflann-examples == 1.7.1
bootstrap-build:
\
project = nanoflann

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

hxx{*}: cxx.importable = false

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: nanoflann/nanoflann-1.7.1.tar.gz
sha256sum: 511cb1df82899ef208d359716a76743a80f068e7db4809ecae8e8f79db27fcca
:
name: nanoflann-examples
version: 1.6.0
type: exe
language: c++
project: nanoflann
summary: Nearest-Neighbor (NN) search with KD-trees C++ library, examples
license: BSD-2-Clause
description:
\
![nanoflann](https://raw.githubusercontent.com/jlblancoc/nanoflann/master/doc\
/logo.png)

# nanoflann
[![CI Linux](https://github.com/jlblancoc/nanoflann/actions/workflows/ci-linu\
x.yml/badge.svg)](https://github.com/jlblancoc/nanoflann/actions/workflows/ci\
-linux.yml)
[![CI Check clang-format](https://github.com/jlblancoc/nanoflann/actions/work\
flows/check-clang-format.yml/badge.svg)](https://github.com/jlblancoc/nanofla\
nn/actions/workflows/check-clang-format.yml)
[![CircleCI](https://circleci.com/gh/jlblancoc/nanoflann/tree/master.svg?styl\
e=svg)](https://circleci.com/gh/jlblancoc/nanoflann/tree/master)
[![Windows build status](https://ci.appveyor.com/api/projects/status/h8k1apfo\
gxyqhskd/branch/master?svg=true)](https://ci.appveyor.com/project/jlblancoc/n\
anoflann/branch/master)


## 1. About

*nanoflann* is a **C++11 [header-only](http://en.wikipedia.org/wiki/Header-on\
ly) library** for building KD-Trees of datasets with different topologies:\
 R<sup>2</sup>, R<sup>3</sup> (point clouds), SO(2) and SO(3) (2D and 3D\
 rotation groups). No support for approximate NN is provided. *nanoflann*\
 does not require compiling or installing. You just need to `#include\
 <nanoflann.hpp>` in your code.

This library is a *fork* of the [flann library](https://github.com/flann-lib/\
flann) by Marius Muja and David G. Lowe, and born as a child project of\
 [MRPT](https://www.mrpt.org/). Following the original license terms,\
 *nanoflann* is distributed under the BSD license. Please, for bugs use the\
 issues button or fork and open a pull request.

Cite as:
```
@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library\
 for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}
```

See the release [CHANGELOG](CHANGELOG.md) for a list of project changes.

### 1.1. Obtaining the code

* Easiest way: clone this GIT repository and take the `include/nanoflann.hpp`\
 file for use where you need it.
* Debian or Ubuntu ([21.04 or newer](https://packages.ubuntu.com/source/hirsu\
te/nanoflann)) users can install it simply with:
  ```bash 
  sudo apt install libnanoflann-dev
  ```
* macOS users can install `nanoflann` with [Homebrew](https://brew.sh) with:
  ```shell
  $ brew install brewsci/science/nanoflann
  ```
  or
  ```shell
  $ brew tap brewsci/science
  $ brew install nanoflann
  ```
  MacPorts users can use:
  ```
  $ sudo port install nanoflann
  ```
* Linux users can also install it with [Linuxbrew](https://docs.brew.sh/Homeb\
rew-on-Linux) with: `brew install homebrew/science/nanoflann`
* List of [**stable releases**](https://github.com/jlblancoc/nanoflann/releas\
es). Check out the [CHANGELOG](https://github.com/jlblancoc/nanoflann/blob/ma\
ster/CHANGELOG.md)

Although nanoflann itself doesn't have to be compiled, you can build some\
 examples and tests with:

    sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
    mkdir build && cd build && cmake ..
    make && make test


### 1.2. C++ API reference

  * Browse the [Doxygen documentation](https://jlblancoc.github.io/nanoflann/\
).

  * **Important note:** If L2 norms are used, notice that search radius and\
 all passed and returned distances are actually *squared distances*.

### 1.3. Code examples

  * KD-tree look-up with `knnSearch()` and `radiusSearch()`:\
 [pointcloud_kdd_radius.cpp](https://github.com/jlblancoc/nanoflann/blob/mast\
er/examples/pointcloud_kdd_radius.cpp)
  * KD-tree look-up on a point cloud dataset: [pointcloud_example.cpp](https:\
//github.com/jlblancoc/nanoflann/blob/master/examples/pointcloud_example.cpp)
  * KD-tree look-up on a dynamic point cloud dataset: [dynamic_pointcloud_exa\
mple.cpp](https://github.com/jlblancoc/nanoflann/blob/master/examples/dynamic\
_pointcloud_example.cpp)
  * KD-tree look-up on a rotation group (SO2): [SO2_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/SO2_adaptor_example.cpp)
  * KD-tree look-up on a rotation group (SO3): [SO3_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/SO3_adaptor_example.cpp)
  * KD-tree look-up on a point cloud dataset with an external adaptor class:\
 [pointcloud_adaptor_example.cpp](https://github.com/jlblancoc/nanoflann/blob\
/master/examples/pointcloud_adaptor_example.cpp)
  * KD-tree look-up directly on an `Eigen::Matrix<>`: [matrix_example.cpp](ht\
tps://github.com/jlblancoc/nanoflann/blob/master/examples/matrix_example.cpp)
  * KD-tree look-up directly on `std::vector<std::vector<T> >` or\
 `std::vector<Eigen::VectorXd>`: [vector_of_vectors_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/vector_of_vectors_example.cpp)
  * Example with a `Makefile` for usage through `pkg-config` (for example,\
 after doing a "make install" or after installing from Ubuntu repositories):\
 [example_with_pkgconfig/](https://github.com/jlblancoc/nanoflann/blob/master\
/examples/example_with_pkgconfig/)
  * Example of how to build an index and save it to disk for later usage:\
 [saveload_example.cpp](https://github.com/jlblancoc/nanoflann/blob/master/ex\
amples/saveload_example.cpp)
  * GUI examples (requires `mrpt-gui`, e.g. `sudo apt install\
 libmrpt-gui-dev`):
    - [nanoflann_gui_example_R3](https://github.com/jlblancoc/nanoflann/blob/\
master/examples/examples_gui/nanoflann_gui_example_R3/nanoflann_gui_example_R\
3.cpp)

![nanoflann-demo-1](https://user-images.githubusercontent.com/5497818/2015504\
33-d561c5a9-4e87-453d-9cf8-8202d7876235.gif)



### 1.4. Why a fork?

  * **Execution time efficiency**:
    * The power of the original `flann` library comes from the possibility of\
 choosing between different ANN algorithms. The cost of this flexibility is\
 the declaration of pure virtual methods which (in some circumstances) impose\
 [run-time penalties](http://www.cs.cmu.edu/~gilpin/c%2B%2B/performance.html#\
virtualfunctions). In `nanoflann` all those virtual methods have been\
 replaced by a combination of the [Curiously Recurring Template\
 Pattern](http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern)\
 (CRTP) and inlined methods, which are much faster.
    * For `radiusSearch()`, there is no need to make a call to determine the\
 number of points within the radius and then call it again to get the data.\
 By using STL containers for the output data, containers are automatically\
 resized.
    * Users can (optionally) set the problem dimensionality at compile-time\
 via a template argument, thus allowing the compiler to fully unroll loops.
    * `nanoflann` allows users to provide a precomputed bounding box of the\
 data, if available, to avoid recomputation.
    * Indices of data points have been converted from `int` to `size_t`,\
 which removes a limit when handling very large data sets.

  * **Memory efficiency**: Instead of making a copy of the entire dataset\
 into a custom `flann`-like matrix before building a KD-tree index,\
 `nanoflann` allows direct access to your data via an **adaptor interface**\
 which must be implemented in your class.

Refer to the examples below or to the C++ API of [nanoflann::KDTreeSingleInde\
xAdaptor<>](https://jlblancoc.github.io/nanoflann/classnanoflann_1_1KDTreeSin\
gleIndexAdaptor.html) for more info.


### 1.5. What can *nanoflann* do?

  * Building KD-trees with a single index (no randomized KD-trees, no\
 approximate searches).
  * Fast, thread-safe querying for closest neighbors on KD-trees. The entry\
 points are:
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::knnSearch()`
      * Finds the `num_closest` nearest neighbors to `query_point[0:dim-1]`.\
 Their indices are stored inside the result object. See an [example usage\
 code](https://github.com/jlblancoc/nanoflann/blob/master/examples/pointcloud\
_kdd_radius.cpp#L119).
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::radiusSearch()`
      * Finds all the neighbors to `query_point[0:dim-1]` within a maximum\
 radius. The output is given as a vector of pairs, of which the first element\
 is a point index and the second the corresponding distance. See an [example\
 usage code](https://github.com/jlblancoc/nanoflann/blob/master/examples/poin\
tcloud_kdd_radius.cpp#L141).
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::radiusSearchCustomC\
allback()`
	  * Can be used to receive a callback for each point found in range. This\
 may be more efficient in some situations instead of building a huge vector\
 of pairs with the results.
  * Working with 2D and 3D point clouds or N-dimensional data sets.
  * Working directly with `Eigen::Matrix<>` classes (matrices and\
 vectors-of-vectors).
  * Working with dynamic point clouds without a need to rebuild entire\
 kd-tree index.
  * Working with the distance metrics:
    * `R^N`: Euclidean spaces:
      * `L1` (Manhattan)
      * `L2` (**squared** Euclidean norm, favoring SSE2 optimization).
      * `L2_Simple` (**squared** Euclidean norm, for low-dimensionality data\
 sets like point clouds).
    * `SO(2)`: 2D rotational group
      * `metric_SO2`: Absolute angular diference.
    * `SO(3)`: 3D rotational group (better suppport to be provided in future\
 releases)
      * `metric_SO3`: Inner product between quaternions.
  * Saves and load the built indices to disk.
  * GUI based support for benchmarking multiple kd-tree libraries namely\
 nanoflann, flann, fastann and libkdtree.

### 1.6. What can't *nanoflann* do?

  * Use other distance metrics apart from L1, L2, SO2 and SO3.
  * Support for SE(3) groups.
  * Only the C++ interface exists: there is no support for C, MATLAB or\
 Python.
  * There is no automatic algorithm configuration (as described in the\
 original Muja & Lowe's paper).

### 1.7. Use in your project via CMake

You can directly drop the `nanoflann.hpp` file in your project. Alternatively,
the CMake standard method is also available:

  * Build and "install" nanoflann. Set `CMAKE_INSTALL_PREFIX` to a proper path
  and then execute `make install` (Linux, OSX) or build the `INSTALL`
  target (Visual Studio).
  * Then, add something like this to the CMake script of your project:

```
# Find nanoflannConfig.cmake:
find_package(nanoflann)

add_executable(my_project test.cpp)

# Make sure the include path is used:
target_link_libraries(my_project nanoflann::nanoflann)
```

### 1.8. Package Managers

You can download and install nanoflann using the [vcpkg](https://github.com/M\
icrosoft/vcpkg) dependency manager:

    git clone https://github.com/Microsoft/vcpkg.git
    cd vcpkg
    ./bootstrap-vcpkg.sh
    ./vcpkg integrate install
    ./vcpkg install nanoflann

The nanoflann port in vcpkg is kept up to date by Microsoft team members and\
 community contributors. If the version is out of date, please [create an\
 issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg\
 repository.


### 1.9. Compile time definitions

  * `NANOFLANN_FIRST_MATCH`: If defined and two points have the same\
 distance, the one with the lowest-index will be returned first. Otherwise\
 there is no particular order.
  * `NANOFLANN_NO_THREADS`: If defined, multithreading capabilities will be\
 disabled, so that the library can be used without linking with pthreads. If\
 one tries to use multiple threads, an exception will be thrown.

------

## 2. Any help choosing the KD-tree parameters?

### 2.1. `KDTreeSingleIndexAdaptorParams::leaf_max_size`

A KD-tree is... well, a tree :-). And as such it has a root node, a set of\
 intermediary nodes and finally, "leaf" nodes which are those without\
 children.

Points (or, properly, point indices) are only stored in leaf nodes. Each leaf\
 contains a list of which points fall within its range.

While building the tree, nodes are recursively divided until the number of\
 points inside is equal or below some threshold. **That is `leaf_max_size`**.\
 While doing queries, the  "tree algorithm" ends by selecting leaf nodes,\
 then performing linear search (one-by-one) for the closest point to the\
 query within all those in the leaf.

So, `leaf_max_size` must be set as a **tradeoff**:
  * Large values mean that the tree will be built faster (since the tree will\
 be smaller), but each query will be slower (since the linear search in the\
 leaf is to be done over more points).
  * Small values will build the tree much slower (there will be many tree\
 nodes), but queries will be faster... up to some point, since the\
 "tree-part" of the search (logarithmic complexity) still has a significant\
 cost.

What number to select really depends on the application and even on the size\
 of the processor cache memory, so ideally you should do some benchmarking\
 for maximizing efficiency.

But to help choosing a good value as a rule of thumb, I provide the following\
 two benchmarks. Each graph represents the tree build (horizontal) and query\
 (vertical) times for different `leaf_max_size` values between 1 and 10K (as\
 95% uncertainty ellipses, deformed due to the logarithmic scale).

  * A 100K point cloud, uniformly distributed (each point has (x,y,z) `float`\
 coordinates):

![perf5_1e5pts_time_vs_maxleaf](https://raw.githubusercontent.com/jlblancoc/n\
anoflann/master/doc/perf5_1e5pts_time_vs_maxleaf.png)

  * A ~150K point cloud from a real dataset (`scan_071_points.dat` from the\
 [Freiburg Campus 360 dataset](http://ais.informatik.uni-freiburg.de/projects\
/datasets/fr360/), each point has (x,y,z) `float` coordinates):

![perf5_1e5pts_time_vs_maxleaf_real_dataset](https://raw.githubusercontent.co\
m/jlblancoc/nanoflann/master/doc/perf5_1e5pts_time_vs_maxleaf_real_dataset.pn\
g)

So, it seems that a `leaf_max_size` **between 10 and 50** would be optimum in\
 applications where the cost of queries dominates (e.g. [ICP](http://en.wikip\
edia.org/wiki/Iterative_closest_point])). At present, its default value is 10.


### 2.2. `KDTreeSingleIndexAdaptorParams::checks`

This parameter is really ignored in `nanoflann`, but was kept for backward\
 compatibility with the original FLANN interface. Just ignore it.

### 2.3. `KDTreeSingleIndexAdaptorParams::n_thread_build`

This parameter determines the maximum number of threads that can be called\
 concurrently during the construction of the KD tree. The default value is 1.\
 When the parameter is set to 0, `nanoflann` automatically determines the\
 number of threads to use.

See [this pull request](https://github.com/jlblancoc/nanoflann/pull/236) for\
 some benchmarking showing that using the maximum number of threads is not\
 always the most efficient approach. Do benchmarking on your data!

-----

## 3. Performance

### 3.1. `nanoflann`: faster and less memory usage

Refer to the "Why a fork?" section above for the main optimization ideas\
 behind `nanoflann`.

Notice that there are no explicit SSE2/SSE3 optimizations in `nanoflann`, but\
 the intensive usage of `inline` and templates in practice turns into\
 automatically SSE-optimized code generated by the compiler.


### 3.2. Benchmark: original `flann` vs `nanoflann`

The most time-consuming part of many point cloud algorithms (like ICP) is\
 querying a KD-Tree for nearest neighbors. This operation is therefore the\
 most time critical.

`nanoflann` provides a ~50% time saving with respect to the original `flann`\
 implementation (times in this chart are in microseconds for each query):

![perf3_query](https://raw.githubusercontent.com/jlblancoc/nanoflann/master/d\
oc/perf3_query.small.png)

Although most of the gain comes from the queries (due to the large number of\
 them in any typical operation with point clouds), there is also some time\
 saved while building the KD-tree index, due to the templatized-code but also\
 for the avoidance of duplicating the data in an auxiliary matrix (times in\
 the next chart are in milliseconds):

![perf4_time_saved](https://raw.githubusercontent.com/jlblancoc/nanoflann/mas\
ter/doc/perf4_time_saved.small.png)

These performance tests are only representative of our testing. If you want\
 to repeat them, read the instructions in [perf-tests](https://github.com/jlb\
lancoc/nanoflann/tree/master/perf-tests)


----

## 4. Other KD-tree projects

  * [FLANN](http://www.cs.ubc.ca/research/flann/) - Marius Muja and David G.\
 Lowe (University of British Columbia).
  * [FASTANN](http://www.robots.ox.ac.uk/~vgg/software/fastann/) - James\
 Philbin (VGG, University of Oxford).
  * [ANN](http://www.cs.umd.edu/~mount/ANN/) - David M. Mount and Sunil Arya\
 (University of Maryland).
  * [libkdtree++](https://packages.debian.org/source/sid/libkdtree++) -\
 Martin F. Krafft & others.

<br>

*Note: The project logo is due to [CedarSeed](http://www.iconarchive.com/show\
/patisserie-icons-by-cedarseed/Flan-icon.html)*

**Contributors**

<a href="https://github.com/jlblancoc/nanoflann/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=jlblancoc/nanoflann" />
</a>


\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for nanoflann

This project builds and defines the build2 package for [nanoflann](https://gi\
thub.com/jlblancoc/nanoflann), a C++11 header-only library for Nearest\
 Neighbor (NN) search with KD-trees.

[![Official](https://img.shields.io/website/https/github.com/jlblancoc/nanofl\
ann.svg?down_message=offline&label=Official&style=for-the-badge&up_color=blue\
&up_message=online)](https://github.com/jlblancoc/nanoflann)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/n\
anoflann.svg?down_message=offline&label=build2&style=for-the-badge&up_color=b\
lue&up_message=online)](https://github.com/build2-packaging/nanoflann)
[![cppget.org](https://img.shields.io/website/https/cppget.org/nanoflann.svg?\
down_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_me\
ssage=online)](https://cppget.org/nanoflann)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/na\
noflann.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=f\
or-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/na\
noflann)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch the package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/nanoflann.git

Add the respective dependency in your project's `manifest` file to make the\
 package available for import.

    depends: nanoflann ^1.6.0

The library can be imported by the following declaration in a `buildfile`.

    import nanoflann = nanoflann%lib{nanoflann}

## Configuration
There are no configuration options available.

## Issues
- FreeBSD, Clang, static, optimized: Error may occur during tests or\
 installed tests:
    + `ld: error: undefined symbol: pthread_create`
    + It seems that `pthread` is not correctly linked in the examples.
- `linux_debian_11-emcc_3.1.6` error (test):
    + `em++` seems not to be able to compile `gtest`.
- Windows, MinGW, optimized: The `kdtree.SO2_vs_bruteforce` test may fail.

## Contributing
Thank you in advance for your help and contribution to keep this package\
 up-to-date.
Please, file an issue on [GitHub](https://github.com/build2-packaging/nanofla\
nn/issues) for questions, bug reports, or to recommend updating the package\
 version.
If you're making a pull request to fix bugs or update the package version\
 yourself, refer to the [`build2` Packaging Guidelines](https://build2.org/bu\
ild2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management).

\
package-description-type: text/markdown;variant=GFM
changes:
\
# nanoflann 1.6.0: Released Jul 11, 2024
 - BUG FIX: nanoflann::SearchParameters::sorted was ignored for\
 RadiusResultSet.
 - ResultSet classes now must implement a sort() method.
 - Added type IndexType to nanoflann:KDTreeBaseClass

# nanoflann 1.5.5: Released Mar 12, 2024
 - Potentially more efficient scheduling of multi-thread index building ([PR\
 #236](https://github.com/jlblancoc/nanoflann/pull/236))
 - Bump minimum required cmake version to 3.5 ([PR #230](https://github.com/j\
lblancoc/nanoflann/pull/230/))

# nanoflann 1.5.4: Released Jan 10, 2024
 - Fix outdated NANOFLANN_VERSION macro in header file
 - Fix poll-allocator alignment problems
 - Add NANOFLANN_USE_SYSTEM_GTEST option
 - Look for Threads dependency in CMake config script


# nanoflann 1.5.3: Released Dec 7, 2023
 * **Other changes**:
   - Save one redundant call to `computeMinMax()` in `middleSplit_`\
 ([PR#220](https://github.com/jlblancoc/nanoflann/pull/220) by\
 [qq422216549](https://github.com/qq422216549)).
     This saves *a lot* of time, up to 20% faster in a benchmark with small\
 (thousands) point clouds.

# nanoflann 1.5.2: Released Nov 29, 2023
 * **Other changes**:
   - Improve RKNN search efficiency ([PR#219](https://github.com/jlblancoc/na\
noflann/pull/219) by [kya8](https://github.com/kya8)).

# nanoflann 1.5.1: Released Nov 27, 2023
 * **API changes:**
   - Add new search method `rknnSearch()` for knn searches with a maximum\
 radius.
   - Add missing `SearchParameters` argument to `KDTreeSingleIndexDynamicAdap\
tor_::knnSearch()` ([PR#213](https://github.com/jlblancoc/nanoflann/pull/213)\
 by [ManosPapadakis95](https://github.com/ManosPapadakis95)).
   - Add missing method `KNNResultSet::empty()` for consistency with the\
 other result sets.
 * **Other changes**:
   - Add GUI examples for each search type:
     - `nanoflann_gui_example_R3_knn`
     - `nanoflann_gui_example_R3_radius`
     - `nanoflann_gui_example_R3_rknn`


# nanoflann 1.5.0: Released Jun 16, 2023
 * **API changes:**
   - Users of radius search should change their result placeholder type:
   `std::vector<std::pair<IndexType, DistanceType>>` => `std::vector<nanoflan\
n::ResultItem<IndexType, DistanceType>>`. (See [#166](https://github.com/jlbl\
ancoc/nanoflann/issues/166) for the motivation of this change).
   - More concise auxiliary (internal) type name:
     `array_or_vector_selector` -> `array_or_vector`.
   - Remove obsolete parameter `nChecks_IGNORED`. Removed from `SearchParams`
     constructor too, so that structure has been renamed `SearchParameters` to
     enforce users to update the code and avoid mistakes with the order of its
     ctor parameters.
   - Added method RadiusResultSet::empty()
   - Template argument rename: `AccesorType` => `IndexType` (does not\
 actually affect user code at all).
   - Added concurrent tree building support, refer to `KDTreeSingleIndexAdapt\
orParams::n_thread_build`.
 * **Other changes:**
   - Macros to avoid conflicts with X11 symbols.
   - Inline an auxiliary example function in case users want to use it and
    include the file in multiple translation units (Closes\
 [#182](https://github.com/jlblancoc/nanoflann/issues/182)).
   - Move all benchmarking code, data, and scripts to [its own\
 repository](https://github.com/MRPT/nanoflann-benchmark) to keep this repo\
 as clean as possible.
   - Fix "potentially uninitialized" GCC warning.
   - Clarified, even more, in docs and examples, that L2 distances are\
 **squared** distances.
   - Removed the (with modern compilers) now useless `inline` keyword in\
 class members.
   - Add examples with GUI (requires [mrpt-gui](https://docs.mrpt.org/referen\
ce/latest/group_mrpt_gui_grp.html)):
     - nanoflann_gui_example_R3: Radius search on R³ Euclidean space.
     - nanoflann_gui_example_bearings: NN search on non-Euclidean spaces.
 * BUGFIXES:
     - Avoid segfault if saving an empty index (Closes [#205](https://github.\
com/jlblancoc/nanoflann/issues/205)).

# nanoflann 1.4.3: Released Jul 24, 2022
 * Added flag SkipInitialBuildIndex to allow not wasting time building a tree\
 when it will be loaded from a file later on ([PR #171](https://github.com/jl\
blancoc/nanoflann/pull/171)).
 * Mark all constructors explicit, to avoid unintended creation of temporary\
 objects ([Issue #179](https://github.com/jlblancoc/nanoflann/issues/179)).
 * BUGFIX: avoid potential index out of bounds in KDTreeSingleIndexDynamicAda\
ptor ([PR #173](https://github.com/jlblancoc/nanoflann/pull/173))

# nanoflann 1.4.2: Released Jan 11, 2022
 * Install pkg-config .pc file under lib directory (Closes\
 [#161](https://github.com/jlblancoc/nanoflann/issues/161)).
 * Integrate AppVeyor CI.

# nanoflann 1.4.1: Released Jan 6, 2022
  * Fix incorrect install directory for cmake target & config files.
  * Do not install example binaries with `make install`.
  * Provide working examples for cmake and pkgconfig under\
 `examples/example_*` directories.

# nanoflann 1.4.0: Released Jan 2, 2022
  * nanoflann::KDTreeSingleIndexAdaptor() ctor now forwards additional\
 parameters to the metric class, enabling custom dynamic metrics.
  * Add and apply a `.clang-format` file (same one than used in MOLAorg/MOLA\
 projects).
  * Examples: clean up and code modernization.
  * CMake variables prefixed now with `NANOFLANN_` for easier integration of\
 nanoflann as a Git submodule.
  * Fixes for IndexType which are not of integral types [PR\
 #154](https://github.com/jlblancoc/nanoflann/pull/154)
  * save/load API upgraded from C `FILE*` to C++ file streams (By Dominic\
 Kempf, Heidelberg University, [PR](https://github.com/jlblancoc/nanoflann/pu\
ll/157)).

# nanoflann 1.3.2: Released Nov 5, 2020
  * Add optional argument for Eigen matrix layout [commit](https://github.com\
/jlblancoc/nanoflann/commit/40fa96badcfc4b1a2df38b40b8a368cf5521ace4).
  * Throw exception on malloc failure [PR #126](https://github.com/jlblancoc/\
nanoflann/pull/126).
  * Respect GNUInstallDirs in CMake install rules [PR #131](https://github.co\
m/jlblancoc/nanoflann/pull/131).

# nanoflann 1.3.1: Released Oct 11, 2019
  * Fixed bug in KDTreeSingleIndexDynamicAdaptor. See: https://github.com/jlb\
lancoc/nanoflann/commit/a066148517d16c173954dcde13c1527481b9fad3
  * Fix build in XCode.
  * Simplify CMakeLists for Eigen example (requires Eigen3Config.cmake now)
  * Avoid setting cmake global executable build path

# nanoflann 1.3.0: Released Aug 28, 2018
  * Instructions for `make install` for Linux and Windows (Closes #87).
  * Fix all (?) MSVC conversion warnings (Closes: #95).
  * Avoid need for _USE_MATH_DEFINES in MSVC (Closes: #96)
  * Eigen::Matrix datasets: now uses std::cref() to store a reference to\
 matrix.
  * GSOC2017 contributions by Pranjal Kumar Rai:
    * Support for dynamic datasets.
    * Support for non-Euclidean spaces: SO(2), SO(3)

# nanoflann 1.2.3: Released Dec 20, 2016
  * Fixed: split plane now correctly chooses the dimensions with the largest\
 span.
    Should lead to more optimal trees.

# nanoflann 1.2.2: Released Nov 10, 2016
  * knnSearch() now also returns the number of valid points found.

# nanoflann 1.2.1: Released Jun 1, 2016
  * Fix potential compiler warnings if `IndexType` is signed.
  * New unit tests comparing the results to those of brute force search.

# nanoflann 1.2.0: Released May 5, 2016
  * Fixed: many classes constructors get const ref arguments but stored const\
 values.

# nanoflann 1.1.9: Released Oct 2, 2015
  * Added KDTreeSingleIndexAdaptor::radiusSearchCustomCallback() (Based on a\
 suggestion by Yannick Morin-Rivest)
  * Better documentation in class headers.
  * Cleanup of unused code.
  * Parameter KDTreeSingleIndexAdaptorParams::dim has been removed since it\
 was redundant.

# nanoflann 1.1.8: Released May 2, 2014
  * Created hidden constructors in nanoflann class, to disallow unintentional\
 copies which will corrupt
    the internal pointers.
  * Fixed crash if trying to build an index of an empty dataset.

# nanoflann 1.1.7: Released Aug 24, 2013
  * Two internal containers are now automatically defined as fixed-size\
 arrays if the
    problem dimension is known at compile time, improving efficiency.
    The new/modified datatypes are: KDTreeSingleIndexAdaptor::BoundingBox,\
 KDTreeSingleIndexAdaptor::distance_vector_t
  * Fixed compilation with GCC 4.8 and C++11 enabled (Thanks to Simon\
 Praetorius).

# nanoflann 1.1.6: Released May 14, 2013
  * Fixed warnings about unused parameters.
  * Fixed L1_adaptor.accum_dist(), which implemented L2 instead (Closes #1)
  * Fixed wrong typedef in KDTreeEigenMatrixAdaptor<> for IndexType!=size_t\
 (Closes: #2)

# nanoflann 1.1.5: Released Mar 25, 2013
  * Fixed: Memory pool wasn't freed after each call to buildIndex()
  * GCC: Added -isystem flag to gtest headers to avoid pedantic warnings.

# nanoflann 1.1.4: Released Jan 11, 2013
  * Fixed compilation with Visual Studio 11 (MSVC 2012).
  * Fixed compilation of gtest with VS11 and its _VARIADIC_MAX "bug".
  * Added a security check to launch an exception if searches are attempted\
 before buildIndex().
  * New example to demonstrate save/load the index to files.
  * save/load methods exposed as public.

# nanoflann 1.1.3: Released Jun 6, 2012
  * GTest sources are now embedded, due to the changes in newer Ubuntu\
 packages which don't carry the precompiled libs.
  * Added asserts to detect whether the user passes NULL as query points.
  * New method RadiusResultSet::worst_item()
  * New method RadiusResultSet::set_radius_and_clear()
  * Avoid potential collision of min/max macros with <windows.h>
  * Removed unneeded #include's of std headers.
  * New sample code for vectors of vectors.
  * Fixed building of tests for MSVC in Windows.
  * Allow manually setting the path to Eigen3 (mainly for building examples\
 under Windows).

# nanoflann 1.1.2: Released May 2, 2012
  * Better documentation and added graphs of a benchmarking for helping\
 choosing "leaf_max_size".
  * Now KDTreeSingleIndexAdaptor::buildIndex() can be called several times
     even when the dataset size changes (Thanks to Rob McDonald for\
 reporting!)

# nanoflann 1.1.1: Released Feb 1, 2012
  * Some fixes to kd_tree index and L1/L2 metrics to allow distinct types
     in data elements and in the distances. This is mainly to permit elements
	 being vectors of integers (e.g. uint8_t) but distances being real numbers.
  * Examples and unit tests have been corrected to use template arguments
     instead of being hard-wired to "float" data types (Thanks Thomas Vincent
	 for noticing!).

# nanoflann 1.1.0: Released Dec 15, 2011
  * Fixed warnings for MSVC and for GCC with "-Wall -pedantic"
  * Updated performance tests to work with the final nanoflann code (they were
     written for a very early version).
  * All main classes now have new template arguments for the type of indice,
     which now defaults to "size_t" instead of "int". In case this breaks
     backward compatibility in user code, especify "int" to override the\
 default
     template arguments, although "size_t" it's recommended.

# nanoflann 1.0.0: Released Aug 30, 2011
  * Initial version

\
changes-type: text/markdown;variant=GFM
url: https://github.com/jlblancoc/nanoflann
doc-url: https://jlblancoc.github.io/nanoflann/
package-url: https://github.com/build2-packaging/nanoflann/
email: joseluisblancoc@gmail.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: Eigen ^3.4.0
bootstrap-build:
\
project = nanoflann-examples

using version
using config
using test
using dist

# Disable installation of examples
# by dropping 'install' module.
#
# using install

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = h
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

hxx{*}: cxx.importable = false

exe{*}: test = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: nanoflann/nanoflann-examples-1.6.0.tar.gz
sha256sum: fa8ff60640dab3002e3079ace383871ffb4471a50a913110ee24c3caa0f73cb6
:
name: nanoflann-examples
version: 1.7.1
type: exe
language: c++
project: nanoflann
summary: Nearest-Neighbor (NN) search with KD-trees C++ library, examples
license: BSD-2-Clause
description:
\
![nanoflann](https://raw.githubusercontent.com/jlblancoc/nanoflann/master/doc\
/logo.png)

# nanoflann
[![CI Linux](https://github.com/jlblancoc/nanoflann/actions/workflows/ci-linu\
x.yml/badge.svg)](https://github.com/jlblancoc/nanoflann/actions/workflows/ci\
-linux.yml)
[![CI Check clang-format](https://github.com/jlblancoc/nanoflann/actions/work\
flows/check-clang-format.yml/badge.svg)](https://github.com/jlblancoc/nanofla\
nn/actions/workflows/check-clang-format.yml)
[![CircleCI](https://circleci.com/gh/jlblancoc/nanoflann/tree/master.svg?styl\
e=svg)](https://circleci.com/gh/jlblancoc/nanoflann/tree/master)
[![Windows build status](https://ci.appveyor.com/api/projects/status/h8k1apfo\
gxyqhskd/branch/master?svg=true)](https://ci.appveyor.com/project/jlblancoc/n\
anoflann/branch/master)


## 1. About

*nanoflann* is a **C++11 [header-only](http://en.wikipedia.org/wiki/Header-on\
ly) library** for building KD-Trees of datasets with different topologies:\
 R<sup>2</sup>, R<sup>3</sup> (point clouds), SO(2) and SO(3) (2D and 3D\
 rotation groups). No support for approximate NN is provided. *nanoflann*\
 does not require compiling or installing. You just need to `#include\
 <nanoflann.hpp>` in your code.

This library is a *fork* of the [flann library](https://github.com/flann-lib/\
flann) by Marius Muja and David G. Lowe, and born as a child project of\
 [MRPT](https://www.mrpt.org/). Following the original license terms,\
 *nanoflann* is distributed under the BSD license. Please, for bugs use the\
 issues button or fork and open a pull request.

Cite as:
```
@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library\
 for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}
```

See the release [CHANGELOG](CHANGELOG.md) for a list of project changes.

### 1.1. Obtaining the code

* Easiest way: clone this GIT repository and take the `include/nanoflann.hpp`\
 file for use where you need it.
* Debian or Ubuntu ([21.04 or newer](https://packages.ubuntu.com/source/hirsu\
te/nanoflann)) users can install it simply with:
  ```bash 
  $ sudo apt install libnanoflann-dev
  ```
* macOS users can install `nanoflann` with [Homebrew](https://brew.sh) with:
  ```shell
  $ brew install brewsci/science/nanoflann
  ```
  or
  ```shell
  $ brew tap brewsci/science
  $ brew install nanoflann
  ```
  MacPorts users can use:
  ```shell
  $ sudo port install nanoflann
  ```
* Linux users can also install it with [Linuxbrew](https://docs.brew.sh/Homeb\
rew-on-Linux) with: `brew install homebrew/science/nanoflann`
* List of [**stable releases**](https://github.com/jlblancoc/nanoflann/releas\
es). Check out the [CHANGELOG](https://github.com/jlblancoc/nanoflann/blob/ma\
ster/CHANGELOG.md)

Although nanoflann itself doesn't have to be compiled, you can build some\
 examples and tests with:

```shell
$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test
```

### 1.2. C++ API reference

  * Browse the [Doxygen documentation](https://jlblancoc.github.io/nanoflann/\
).

  * **Important note:** If L2 norms are used, notice that search radius and\
 all passed and returned distances are actually *squared distances*.

### 1.3. Code examples

  * KD-tree look-up with `knnSearch()` and `radiusSearch()`:\
 [pointcloud_kdd_radius.cpp](https://github.com/jlblancoc/nanoflann/blob/mast\
er/examples/pointcloud_kdd_radius.cpp)
  * KD-tree look-up on a point cloud dataset: [pointcloud_example.cpp](https:\
//github.com/jlblancoc/nanoflann/blob/master/examples/pointcloud_example.cpp)
  * KD-tree look-up on a dynamic point cloud dataset: [dynamic_pointcloud_exa\
mple.cpp](https://github.com/jlblancoc/nanoflann/blob/master/examples/dynamic\
_pointcloud_example.cpp)
  * KD-tree look-up on a rotation group (SO2): [SO2_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/SO2_adaptor_example.cpp)
  * KD-tree look-up on a rotation group (SO3): [SO3_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/SO3_adaptor_example.cpp)
  * KD-tree look-up on a point cloud dataset with an external adaptor class:\
 [pointcloud_adaptor_example.cpp](https://github.com/jlblancoc/nanoflann/blob\
/master/examples/pointcloud_adaptor_example.cpp)
  * KD-tree look-up directly on an `Eigen::Matrix<>`: [matrix_example.cpp](ht\
tps://github.com/jlblancoc/nanoflann/blob/master/examples/matrix_example.cpp)
  * KD-tree look-up directly on `std::vector<std::vector<T> >` or\
 `std::vector<Eigen::VectorXd>`: [vector_of_vectors_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/vector_of_vectors_example.cpp)
  * Example with a `Makefile` for usage through `pkg-config` (for example,\
 after doing a "make install" or after installing from Ubuntu repositories):\
 [example_with_pkgconfig/](https://github.com/jlblancoc/nanoflann/blob/master\
/examples/example_with_pkgconfig/)
  * Example of how to build an index and save it to disk for later usage:\
 [saveload_example.cpp](https://github.com/jlblancoc/nanoflann/blob/master/ex\
amples/saveload_example.cpp)
  * GUI examples (requires `mrpt-gui`, e.g. `sudo apt install\
 libmrpt-gui-dev`):
    - [nanoflann_gui_example_R3](https://github.com/jlblancoc/nanoflann/blob/\
master/examples/examples_gui/nanoflann_gui_example_R3/nanoflann_gui_example_R\
3.cpp)

![nanoflann-demo-1](https://user-images.githubusercontent.com/5497818/2015504\
33-d561c5a9-4e87-453d-9cf8-8202d7876235.gif)



### 1.4. Why a fork?

  * **Execution time efficiency**:
    * The power of the original `flann` library comes from the possibility of\
 choosing between different ANN algorithms. The cost of this flexibility is\
 the declaration of pure virtual methods which (in some circumstances) impose\
 [run-time penalties](http://www.cs.cmu.edu/~gilpin/c%2B%2B/performance.html#\
virtualfunctions). In `nanoflann` all those virtual methods have been\
 replaced by a combination of the [Curiously Recurring Template\
 Pattern](http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern)\
 (CRTP) and inlined methods, which are much faster.
    * For `radiusSearch()`, there is no need to make a call to determine the\
 number of points within the radius and then call it again to get the data.\
 By using STL containers for the output data, containers are automatically\
 resized.
    * Users can (optionally) set the problem dimensionality at compile-time\
 via a template argument, thus allowing the compiler to fully unroll loops.
    * `nanoflann` allows users to provide a precomputed bounding box of the\
 data, if available, to avoid recomputation.
    * Indices of data points have been converted from `int` to `size_t`,\
 which removes a limit when handling very large data sets.

  * **Memory efficiency**: Instead of making a copy of the entire dataset\
 into a custom `flann`-like matrix before building a KD-tree index,\
 `nanoflann` allows direct access to your data via an **adaptor interface**\
 which must be implemented in your class.

Refer to the examples below or to the C++ API of [nanoflann::KDTreeSingleInde\
xAdaptor<>](https://jlblancoc.github.io/nanoflann/classnanoflann_1_1KDTreeSin\
gleIndexAdaptor.html) for more info.


### 1.5. What can *nanoflann* do?

  * Building KD-trees with a single index (no randomized KD-trees, no\
 approximate searches).
  * Fast, thread-safe querying for closest neighbors on KD-trees. The entry\
 points are:
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::knnSearch()`
      * Finds the `num_closest` nearest neighbors to `query_point[0:dim-1]`.\
 Their indices are stored inside the result object. See an [example usage\
 code](https://github.com/jlblancoc/nanoflann/blob/master/examples/pointcloud\
_kdd_radius.cpp#L119).
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::radiusSearch()`
      * Finds all the neighbors to `query_point[0:dim-1]` within a maximum\
 radius. The output is given as a vector of pairs, of which the first element\
 is a point index and the second the corresponding distance. See an [example\
 usage code](https://github.com/jlblancoc/nanoflann/blob/master/examples/poin\
tcloud_kdd_radius.cpp#L141).
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::radiusSearchCustomC\
allback()`
	  * Can be used to receive a callback for each point found in range. This\
 may be more efficient in some situations instead of building a huge vector\
 of pairs with the results.
  * Working with 2D and 3D point clouds or N-dimensional data sets.
  * Working directly with `Eigen::Matrix<>` classes (matrices and\
 vectors-of-vectors).
  * Working with dynamic point clouds without a need to rebuild entire\
 kd-tree index.
  * Working with the distance metrics:
    * `R^N`: Euclidean spaces:
      * `L1` (Manhattan)
      * `L2` (**squared** Euclidean norm, favoring SSE2 optimization).
      * `L2_Simple` (**squared** Euclidean norm, for low-dimensionality data\
 sets like point clouds).
    * `SO(2)`: 2D rotational group
      * `metric_SO2`: Absolute angular diference.
    * `SO(3)`: 3D rotational group (better suppport to be provided in future\
 releases)
      * `metric_SO3`: Inner product between quaternions.
  * Saves and load the built indices to disk.
  * GUI based support for benchmarking multiple kd-tree libraries namely\
 nanoflann, flann, fastann and libkdtree.

### 1.6. What can't *nanoflann* do?

  * Use other distance metrics apart from L1, L2, SO2 and SO3.
  * Support for SE(3) groups.
  * Only the C++ interface exists: there is no support for C, MATLAB or\
 Python.
  * There is no automatic algorithm configuration (as described in the\
 original Muja & Lowe's paper).

### 1.7. Use in your project via CMake

You can directly drop the `nanoflann.hpp` file in your project. Alternatively,
the CMake standard method is also available:

  * Build and "install" nanoflann. Set `CMAKE_INSTALL_PREFIX` to a proper path
  and then execute `make install` (Linux, OSX) or build the `INSTALL`
  target (Visual Studio).
  * Then, add something like this to the CMake script of your project:

```cmake
# Find nanoflannConfig.cmake:
find_package(nanoflann)

add_executable(my_project test.cpp)

# Make sure the include path is used:
target_link_libraries(my_project nanoflann::nanoflann)
```

### 1.8. Package Managers

#### Using `conan`

You can install pre-built binaries for `nanoflann` or build it from source\
 using [Conan](https://conan.io/). Use the following command to install\
 latest version:

```sh
$ conan install --requires="nanoflann/[*]" --build=missing
```

For detailed instructions on how to use Conan, please refer to the [Conan\
 documentation](https://docs.conan.io/2/).

The `nanoflann` Conan recipe is kept up to date by Conan maintainers and\
 community contributors.
If the version is out of date, please [create an issue or pull\
 request](https://github.com/conan-io/conan-center-index) on the\
 ConanCenterIndex repository.

#### Using `vcpkg`

You can download and install nanoflann using the [vcpkg](https://github.com/M\
icrosoft/vcpkg) dependency manager:

```sh
$ git clone https://github.com/Microsoft/vcpkg.git
$ cd vcpkg
$ ./bootstrap-vcpkg.sh
$ ./vcpkg integrate install
$ ./vcpkg install nanoflann
```

The nanoflann port in vcpkg is kept up to date by Microsoft team members and\
 community contributors. If the version is out of date, please [create an\
 issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg\
 repository.


### 1.9. Compile time definitions

  * `NANOFLANN_FIRST_MATCH`: If defined and two points have the same\
 distance, the one with the lowest-index will be returned first. Otherwise\
 there is no particular order.
  * `NANOFLANN_NO_THREADS`: If defined, multithreading capabilities will be\
 disabled, so that the library can be used without linking with pthreads. If\
 one tries to use multiple threads, an exception will be thrown.

------

## 2. Any help choosing the KD-tree parameters?

### 2.1. `KDTreeSingleIndexAdaptorParams::leaf_max_size`

A KD-tree is... well, a tree :-). And as such it has a root node, a set of\
 intermediary nodes and finally, "leaf" nodes which are those without\
 children.

Points (or, properly, point indices) are only stored in leaf nodes. Each leaf\
 contains a list of which points fall within its range.

While building the tree, nodes are recursively divided until the number of\
 points inside is equal or below some threshold. **That is `leaf_max_size`**.\
 While doing queries, the  "tree algorithm" ends by selecting leaf nodes,\
 then performing linear search (one-by-one) for the closest point to the\
 query within all those in the leaf.

So, `leaf_max_size` must be set as a **tradeoff**:
  * Large values mean that the tree will be built faster (since the tree will\
 be smaller), but each query will be slower (since the linear search in the\
 leaf is to be done over more points).
  * Small values will build the tree much slower (there will be many tree\
 nodes), but queries will be faster... up to some point, since the\
 "tree-part" of the search (logarithmic complexity) still has a significant\
 cost.

What number to select really depends on the application and even on the size\
 of the processor cache memory, so ideally you should do some benchmarking\
 for maximizing efficiency.

But to help choosing a good value as a rule of thumb, I provide the following\
 two benchmarks. Each graph represents the tree build (horizontal) and query\
 (vertical) times for different `leaf_max_size` values between 1 and 10K (as\
 95% uncertainty ellipses, deformed due to the logarithmic scale).

  * A 100K point cloud, uniformly distributed (each point has (x,y,z) `float`\
 coordinates):

![perf5_1e5pts_time_vs_maxleaf](https://raw.githubusercontent.com/jlblancoc/n\
anoflann/master/doc/perf5_1e5pts_time_vs_maxleaf.png)

  * A ~150K point cloud from a real dataset (`scan_071_points.dat` from the\
 [Freiburg Campus 360 dataset](http://ais.informatik.uni-freiburg.de/projects\
/datasets/fr360/), each point has (x,y,z) `float` coordinates):

![perf5_1e5pts_time_vs_maxleaf_real_dataset](https://raw.githubusercontent.co\
m/jlblancoc/nanoflann/master/doc/perf5_1e5pts_time_vs_maxleaf_real_dataset.pn\
g)

So, it seems that a `leaf_max_size` **between 10 and 50** would be optimum in\
 applications where the cost of queries dominates (e.g. [ICP](http://en.wikip\
edia.org/wiki/Iterative_closest_point])). At present, its default value is 10.


### 2.2. `KDTreeSingleIndexAdaptorParams::checks`

This parameter is really ignored in `nanoflann`, but was kept for backward\
 compatibility with the original FLANN interface. Just ignore it.

### 2.3. `KDTreeSingleIndexAdaptorParams::n_thread_build`

This parameter determines the maximum number of threads that can be called\
 concurrently during the construction of the KD tree. The default value is 1.\
 When the parameter is set to 0, `nanoflann` automatically determines the\
 number of threads to use.

See [this pull request](https://github.com/jlblancoc/nanoflann/pull/236) for\
 some benchmarking showing that using the maximum number of threads is not\
 always the most efficient approach. Do benchmarking on your data!

-----

## 3. Performance

### 3.1. `nanoflann`: faster and less memory usage

Refer to the "Why a fork?" section above for the main optimization ideas\
 behind `nanoflann`.

Notice that there are no explicit SSE2/SSE3 optimizations in `nanoflann`, but\
 the intensive usage of `inline` and templates in practice turns into\
 automatically SSE-optimized code generated by the compiler.


### 3.2. Benchmark: original `flann` vs `nanoflann`

The most time-consuming part of many point cloud algorithms (like ICP) is\
 querying a KD-Tree for nearest neighbors. This operation is therefore the\
 most time critical.

`nanoflann` provides a ~50% time saving with respect to the original `flann`\
 implementation (times in this chart are in microseconds for each query):

![perf3_query](https://raw.githubusercontent.com/jlblancoc/nanoflann/master/d\
oc/perf3_query.small.png)

Although most of the gain comes from the queries (due to the large number of\
 them in any typical operation with point clouds), there is also some time\
 saved while building the KD-tree index, due to the templatized-code but also\
 for the avoidance of duplicating the data in an auxiliary matrix (times in\
 the next chart are in milliseconds):

![perf4_time_saved](https://raw.githubusercontent.com/jlblancoc/nanoflann/mas\
ter/doc/perf4_time_saved.small.png)

These performance tests are only representative of our testing. If you want\
 to repeat them, read the instructions in [perf-tests](https://github.com/jlb\
lancoc/nanoflann/tree/master/perf-tests)


----

## 4. Other KD-tree projects

  * [FLANN](http://www.cs.ubc.ca/research/flann/) - Marius Muja and David G.\
 Lowe (University of British Columbia).
  * [FASTANN](http://www.robots.ox.ac.uk/~vgg/software/fastann/) - James\
 Philbin (VGG, University of Oxford).
  * [ANN](http://www.cs.umd.edu/~mount/ANN/) - David M. Mount and Sunil Arya\
 (University of Maryland).
  * [libkdtree++](https://packages.debian.org/source/sid/libkdtree++) -\
 Martin F. Krafft & others.

<br>

*Note: The project logo is due to [CedarSeed](http://www.iconarchive.com/show\
/patisserie-icons-by-cedarseed/Flan-icon.html)*

**Contributors**

<a href="https://github.com/jlblancoc/nanoflann/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=jlblancoc/nanoflann" />
</a>


\
description-type: text/markdown;variant=GFM
package-description:
\
# nanoflann - C++ Library for Nearest Neighbor Search with KD-Trees

This is the `build2` package for nanoflann, a C++11 header-only library for\
 Nearest Neighbor (NN) search with KD-trees.

# Usage
To use `nanoflann` in your project, add the following configurations to the\
 respective files after you have gained access to a `build2` package\
 repository that contains it.

### `manifest`
To make `nanoflann` available for import, add the following dependency to the\
 `manifest` of each package in your project that requires it, adjusting the\
 version constraint as appropriate.

    depends: nanoflann ^1.7.1

### `buildfile`
To import the contained library, use the following declaration in your\
 `buildfile`.

    import nanoflann = nanoflann%lib{nanoflann}

### C++ Header Inclusion
Finally, include the nanoflann header in your C++ source code.

```c++
#include <nanoflann.hpp>
```

\
package-description-type: text/markdown;variant=GFM
changes:
\
# nanoflann 1.7.1: Released Mar 15, 2025
 - ResultSets::worstDist(): Fix a potential access to negative index in array\
 (did not happen in practice, but static analysis tools correctly detected\
 this possibility).

# nanoflann 1.7.0: Released Feb 3, 2025
 - ResultSets::worstDist(): clarify the meaning of its return value, and made\
 to return the actual worst distance in the found set (only if set is full)

# nanoflann 1.6.3: Released Jan 7, 2025
 - cmake_required_version bumped to 3.10
 - clang-format version bumped to 14

# nanoflann 1.6.2: Released Nov 4, 2024
 - BUG FIX: Fix middleSplit_ for same points by @yzabalotski in\
 https://github.com/jlblancoc/nanoflann/pull/250
 - Fix build warnings.

# nanoflann 1.6.1: Released Aug 24, 2024
 - Add conan install instructions.
 - Add multiple thread kdtree build support for KDTreeEigenMatrixAdaptor ([PR\
 #246](https://github.com/jlblancoc/nanoflann/pull/246))

# nanoflann 1.6.0: Released Jul 11, 2024
 - BUG FIX: nanoflann::SearchParameters::sorted was ignored for\
 RadiusResultSet.
 - ResultSet classes now must implement a sort() method.
 - Added type IndexType to nanoflann:KDTreeBaseClass

# nanoflann 1.5.5: Released Mar 12, 2024
 - Potentially more efficient scheduling of multi-thread index building ([PR\
 #236](https://github.com/jlblancoc/nanoflann/pull/236))
 - Bump minimum required cmake version to 3.5 ([PR #230](https://github.com/j\
lblancoc/nanoflann/pull/230/))

# nanoflann 1.5.4: Released Jan 10, 2024
 - Fix outdated NANOFLANN_VERSION macro in header file
 - Fix poll-allocator alignment problems
 - Add NANOFLANN_USE_SYSTEM_GTEST option
 - Look for Threads dependency in CMake config script


# nanoflann 1.5.3: Released Dec 7, 2023
 * **Other changes**:
   - Save one redundant call to `computeMinMax()` in `middleSplit_`\
 ([PR#220](https://github.com/jlblancoc/nanoflann/pull/220) by\
 [qq422216549](https://github.com/qq422216549)).
     This saves *a lot* of time, up to 20% faster in a benchmark with small\
 (thousands) point clouds.

# nanoflann 1.5.2: Released Nov 29, 2023
 * **Other changes**:
   - Improve RKNN search efficiency ([PR#219](https://github.com/jlblancoc/na\
noflann/pull/219) by [kya8](https://github.com/kya8)).

# nanoflann 1.5.1: Released Nov 27, 2023
 * **API changes:**
   - Add new search method `rknnSearch()` for knn searches with a maximum\
 radius.
   - Add missing `SearchParameters` argument to `KDTreeSingleIndexDynamicAdap\
tor_::knnSearch()` ([PR#213](https://github.com/jlblancoc/nanoflann/pull/213)\
 by [ManosPapadakis95](https://github.com/ManosPapadakis95)).
   - Add missing method `KNNResultSet::empty()` for consistency with the\
 other result sets.
 * **Other changes**:
   - Add GUI examples for each search type:
     - `nanoflann_gui_example_R3_knn`
     - `nanoflann_gui_example_R3_radius`
     - `nanoflann_gui_example_R3_rknn`


# nanoflann 1.5.0: Released Jun 16, 2023
 * **API changes:**
   - Users of radius search should change their result placeholder type:
   `std::vector<std::pair<IndexType, DistanceType>>` => `std::vector<nanoflan\
n::ResultItem<IndexType, DistanceType>>`. (See [#166](https://github.com/jlbl\
ancoc/nanoflann/issues/166) for the motivation of this change).
   - More concise auxiliary (internal) type name:
     `array_or_vector_selector` -> `array_or_vector`.
   - Remove obsolete parameter `nChecks_IGNORED`. Removed from `SearchParams`
     constructor too, so that structure has been renamed `SearchParameters` to
     enforce users to update the code and avoid mistakes with the order of its
     ctor parameters.
   - Added method RadiusResultSet::empty()
   - Template argument rename: `AccesorType` => `IndexType` (does not\
 actually affect user code at all).
   - Added concurrent tree building support, refer to `KDTreeSingleIndexAdapt\
orParams::n_thread_build`.
 * **Other changes:**
   - Macros to avoid conflicts with X11 symbols.
   - Inline an auxiliary example function in case users want to use it and
    include the file in multiple translation units (Closes\
 [#182](https://github.com/jlblancoc/nanoflann/issues/182)).
   - Move all benchmarking code, data, and scripts to [its own\
 repository](https://github.com/MRPT/nanoflann-benchmark) to keep this repo\
 as clean as possible.
   - Fix "potentially uninitialized" GCC warning.
   - Clarified, even more, in docs and examples, that L2 distances are\
 **squared** distances.
   - Removed the (with modern compilers) now useless `inline` keyword in\
 class members.
   - Add examples with GUI (requires [mrpt-gui](https://docs.mrpt.org/referen\
ce/latest/group_mrpt_gui_grp.html)):
     - nanoflann_gui_example_R3: Radius search on R³ Euclidean space.
     - nanoflann_gui_example_bearings: NN search on non-Euclidean spaces.
 * BUGFIXES:
     - Avoid segfault if saving an empty index (Closes [#205](https://github.\
com/jlblancoc/nanoflann/issues/205)).

# nanoflann 1.4.3: Released Jul 24, 2022
 * Added flag SkipInitialBuildIndex to allow not wasting time building a tree\
 when it will be loaded from a file later on ([PR #171](https://github.com/jl\
blancoc/nanoflann/pull/171)).
 * Mark all constructors explicit, to avoid unintended creation of temporary\
 objects ([Issue #179](https://github.com/jlblancoc/nanoflann/issues/179)).
 * BUGFIX: avoid potential index out of bounds in KDTreeSingleIndexDynamicAda\
ptor ([PR #173](https://github.com/jlblancoc/nanoflann/pull/173))

# nanoflann 1.4.2: Released Jan 11, 2022
 * Install pkg-config .pc file under lib directory (Closes\
 [#161](https://github.com/jlblancoc/nanoflann/issues/161)).
 * Integrate AppVeyor CI.

# nanoflann 1.4.1: Released Jan 6, 2022
  * Fix incorrect install directory for cmake target & config files.
  * Do not install example binaries with `make install`.
  * Provide working examples for cmake and pkgconfig under\
 `examples/example_*` directories.

# nanoflann 1.4.0: Released Jan 2, 2022
  * nanoflann::KDTreeSingleIndexAdaptor() ctor now forwards additional\
 parameters to the metric class, enabling custom dynamic metrics.
  * Add and apply a `.clang-format` file (same one than used in MOLAorg/MOLA\
 projects).
  * Examples: clean up and code modernization.
  * CMake variables prefixed now with `NANOFLANN_` for easier integration of\
 nanoflann as a Git submodule.
  * Fixes for IndexType which are not of integral types [PR\
 #154](https://github.com/jlblancoc/nanoflann/pull/154)
  * save/load API upgraded from C `FILE*` to C++ file streams (By Dominic\
 Kempf, Heidelberg University, [PR](https://github.com/jlblancoc/nanoflann/pu\
ll/157)).

# nanoflann 1.3.2: Released Nov 5, 2020
  * Add optional argument for Eigen matrix layout [commit](https://github.com\
/jlblancoc/nanoflann/commit/40fa96badcfc4b1a2df38b40b8a368cf5521ace4).
  * Throw exception on malloc failure [PR #126](https://github.com/jlblancoc/\
nanoflann/pull/126).
  * Respect GNUInstallDirs in CMake install rules [PR #131](https://github.co\
m/jlblancoc/nanoflann/pull/131).

# nanoflann 1.3.1: Released Oct 11, 2019
  * Fixed bug in KDTreeSingleIndexDynamicAdaptor. See: https://github.com/jlb\
lancoc/nanoflann/commit/a066148517d16c173954dcde13c1527481b9fad3
  * Fix build in XCode.
  * Simplify CMakeLists for Eigen example (requires Eigen3Config.cmake now)
  * Avoid setting cmake global executable build path

# nanoflann 1.3.0: Released Aug 28, 2018
  * Instructions for `make install` for Linux and Windows (Closes #87).
  * Fix all (?) MSVC conversion warnings (Closes: #95).
  * Avoid need for _USE_MATH_DEFINES in MSVC (Closes: #96)
  * Eigen::Matrix datasets: now uses std::cref() to store a reference to\
 matrix.
  * GSOC2017 contributions by Pranjal Kumar Rai:
    * Support for dynamic datasets.
    * Support for non-Euclidean spaces: SO(2), SO(3)

# nanoflann 1.2.3: Released Dec 20, 2016
  * Fixed: split plane now correctly chooses the dimensions with the largest\
 span.
    Should lead to more optimal trees.

# nanoflann 1.2.2: Released Nov 10, 2016
  * knnSearch() now also returns the number of valid points found.

# nanoflann 1.2.1: Released Jun 1, 2016
  * Fix potential compiler warnings if `IndexType` is signed.
  * New unit tests comparing the results to those of brute force search.

# nanoflann 1.2.0: Released May 5, 2016
  * Fixed: many classes constructors get const ref arguments but stored const\
 values.

# nanoflann 1.1.9: Released Oct 2, 2015
  * Added KDTreeSingleIndexAdaptor::radiusSearchCustomCallback() (Based on a\
 suggestion by Yannick Morin-Rivest)
  * Better documentation in class headers.
  * Cleanup of unused code.
  * Parameter KDTreeSingleIndexAdaptorParams::dim has been removed since it\
 was redundant.

# nanoflann 1.1.8: Released May 2, 2014
  * Created hidden constructors in nanoflann class, to disallow unintentional\
 copies which will corrupt
    the internal pointers.
  * Fixed crash if trying to build an index of an empty dataset.

# nanoflann 1.1.7: Released Aug 24, 2013
  * Two internal containers are now automatically defined as fixed-size\
 arrays if the
    problem dimension is known at compile time, improving efficiency.
    The new/modified datatypes are: KDTreeSingleIndexAdaptor::BoundingBox,\
 KDTreeSingleIndexAdaptor::distance_vector_t
  * Fixed compilation with GCC 4.8 and C++11 enabled (Thanks to Simon\
 Praetorius).

# nanoflann 1.1.6: Released May 14, 2013
  * Fixed warnings about unused parameters.
  * Fixed L1_adaptor.accum_dist(), which implemented L2 instead (Closes #1)
  * Fixed wrong typedef in KDTreeEigenMatrixAdaptor<> for IndexType!=size_t\
 (Closes: #2)

# nanoflann 1.1.5: Released Mar 25, 2013
  * Fixed: Memory pool wasn't freed after each call to buildIndex()
  * GCC: Added -isystem flag to gtest headers to avoid pedantic warnings.

# nanoflann 1.1.4: Released Jan 11, 2013
  * Fixed compilation with Visual Studio 11 (MSVC 2012).
  * Fixed compilation of gtest with VS11 and its _VARIADIC_MAX "bug".
  * Added a security check to launch an exception if searches are attempted\
 before buildIndex().
  * New example to demonstrate save/load the index to files.
  * save/load methods exposed as public.

# nanoflann 1.1.3: Released Jun 6, 2012
  * GTest sources are now embedded, due to the changes in newer Ubuntu\
 packages which don't carry the precompiled libs.
  * Added asserts to detect whether the user passes NULL as query points.
  * New method RadiusResultSet::worst_item()
  * New method RadiusResultSet::set_radius_and_clear()
  * Avoid potential collision of min/max macros with <windows.h>
  * Removed unneeded #include's of std headers.
  * New sample code for vectors of vectors.
  * Fixed building of tests for MSVC in Windows.
  * Allow manually setting the path to Eigen3 (mainly for building examples\
 under Windows).

# nanoflann 1.1.2: Released May 2, 2012
  * Better documentation and added graphs of a benchmarking for helping\
 choosing "leaf_max_size".
  * Now KDTreeSingleIndexAdaptor::buildIndex() can be called several times
     even when the dataset size changes (Thanks to Rob McDonald for\
 reporting!)

# nanoflann 1.1.1: Released Feb 1, 2012
  * Some fixes to kd_tree index and L1/L2 metrics to allow distinct types
     in data elements and in the distances. This is mainly to permit elements
	 being vectors of integers (e.g. uint8_t) but distances being real numbers.
  * Examples and unit tests have been corrected to use template arguments
     instead of being hard-wired to "float" data types (Thanks Thomas Vincent
	 for noticing!).

# nanoflann 1.1.0: Released Dec 15, 2011
  * Fixed warnings for MSVC and for GCC with "-Wall -pedantic"
  * Updated performance tests to work with the final nanoflann code (they were
     written for a very early version).
  * All main classes now have new template arguments for the type of indice,
     which now defaults to "size_t" instead of "int". In case this breaks
     backward compatibility in user code, especify "int" to override the\
 default
     template arguments, although "size_t" it's recommended.

# nanoflann 1.0.0: Released Aug 30, 2011
  * Initial version

\
changes-type: text/markdown;variant=GFM
url: https://github.com/jlblancoc/nanoflann
doc-url: https://jlblancoc.github.io/nanoflann/
package-url: https://github.com/build2-packaging/nanoflann/
email: joseluisblancoc@gmail.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: Eigen ^3.4.0
bootstrap-build:
\
project = nanoflann-examples

using version
using config
using test
using dist

# Disable installation of examples
# by dropping 'install' module.
#
# using install

\
root-build:
\
# Suppress warnings coming from external libraries.
#
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

hxx{*}: cxx.importable = false

exe{*}: test = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# Default Build Options
#
if ($cxx.target.system == 'win32-msvc')
  cxx.poptions += -D_CRT_SECURE_NO_WARNINGS

\
location: nanoflann/nanoflann-examples-1.7.1.tar.gz
sha256sum: 25f6711ab784c51ccc428c6a26edbb64f648e3414ce6b4fca8d12b9bdb29a29d
:
name: nanoflann-tests
version: 1.6.0
type: exe
language: c++
project: nanoflann
summary: Nearest-Neighbor (NN) search with KD-trees C++ library, tests
license: BSD-2-Clause
description:
\
![nanoflann](https://raw.githubusercontent.com/jlblancoc/nanoflann/master/doc\
/logo.png)

# nanoflann
[![CI Linux](https://github.com/jlblancoc/nanoflann/actions/workflows/ci-linu\
x.yml/badge.svg)](https://github.com/jlblancoc/nanoflann/actions/workflows/ci\
-linux.yml)
[![CI Check clang-format](https://github.com/jlblancoc/nanoflann/actions/work\
flows/check-clang-format.yml/badge.svg)](https://github.com/jlblancoc/nanofla\
nn/actions/workflows/check-clang-format.yml)
[![CircleCI](https://circleci.com/gh/jlblancoc/nanoflann/tree/master.svg?styl\
e=svg)](https://circleci.com/gh/jlblancoc/nanoflann/tree/master)
[![Windows build status](https://ci.appveyor.com/api/projects/status/h8k1apfo\
gxyqhskd/branch/master?svg=true)](https://ci.appveyor.com/project/jlblancoc/n\
anoflann/branch/master)


## 1. About

*nanoflann* is a **C++11 [header-only](http://en.wikipedia.org/wiki/Header-on\
ly) library** for building KD-Trees of datasets with different topologies:\
 R<sup>2</sup>, R<sup>3</sup> (point clouds), SO(2) and SO(3) (2D and 3D\
 rotation groups). No support for approximate NN is provided. *nanoflann*\
 does not require compiling or installing. You just need to `#include\
 <nanoflann.hpp>` in your code.

This library is a *fork* of the [flann library](https://github.com/flann-lib/\
flann) by Marius Muja and David G. Lowe, and born as a child project of\
 [MRPT](https://www.mrpt.org/). Following the original license terms,\
 *nanoflann* is distributed under the BSD license. Please, for bugs use the\
 issues button or fork and open a pull request.

Cite as:
```
@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library\
 for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}
```

See the release [CHANGELOG](CHANGELOG.md) for a list of project changes.

### 1.1. Obtaining the code

* Easiest way: clone this GIT repository and take the `include/nanoflann.hpp`\
 file for use where you need it.
* Debian or Ubuntu ([21.04 or newer](https://packages.ubuntu.com/source/hirsu\
te/nanoflann)) users can install it simply with:
  ```bash 
  sudo apt install libnanoflann-dev
  ```
* macOS users can install `nanoflann` with [Homebrew](https://brew.sh) with:
  ```shell
  $ brew install brewsci/science/nanoflann
  ```
  or
  ```shell
  $ brew tap brewsci/science
  $ brew install nanoflann
  ```
  MacPorts users can use:
  ```
  $ sudo port install nanoflann
  ```
* Linux users can also install it with [Linuxbrew](https://docs.brew.sh/Homeb\
rew-on-Linux) with: `brew install homebrew/science/nanoflann`
* List of [**stable releases**](https://github.com/jlblancoc/nanoflann/releas\
es). Check out the [CHANGELOG](https://github.com/jlblancoc/nanoflann/blob/ma\
ster/CHANGELOG.md)

Although nanoflann itself doesn't have to be compiled, you can build some\
 examples and tests with:

    sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
    mkdir build && cd build && cmake ..
    make && make test


### 1.2. C++ API reference

  * Browse the [Doxygen documentation](https://jlblancoc.github.io/nanoflann/\
).

  * **Important note:** If L2 norms are used, notice that search radius and\
 all passed and returned distances are actually *squared distances*.

### 1.3. Code examples

  * KD-tree look-up with `knnSearch()` and `radiusSearch()`:\
 [pointcloud_kdd_radius.cpp](https://github.com/jlblancoc/nanoflann/blob/mast\
er/examples/pointcloud_kdd_radius.cpp)
  * KD-tree look-up on a point cloud dataset: [pointcloud_example.cpp](https:\
//github.com/jlblancoc/nanoflann/blob/master/examples/pointcloud_example.cpp)
  * KD-tree look-up on a dynamic point cloud dataset: [dynamic_pointcloud_exa\
mple.cpp](https://github.com/jlblancoc/nanoflann/blob/master/examples/dynamic\
_pointcloud_example.cpp)
  * KD-tree look-up on a rotation group (SO2): [SO2_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/SO2_adaptor_example.cpp)
  * KD-tree look-up on a rotation group (SO3): [SO3_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/SO3_adaptor_example.cpp)
  * KD-tree look-up on a point cloud dataset with an external adaptor class:\
 [pointcloud_adaptor_example.cpp](https://github.com/jlblancoc/nanoflann/blob\
/master/examples/pointcloud_adaptor_example.cpp)
  * KD-tree look-up directly on an `Eigen::Matrix<>`: [matrix_example.cpp](ht\
tps://github.com/jlblancoc/nanoflann/blob/master/examples/matrix_example.cpp)
  * KD-tree look-up directly on `std::vector<std::vector<T> >` or\
 `std::vector<Eigen::VectorXd>`: [vector_of_vectors_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/vector_of_vectors_example.cpp)
  * Example with a `Makefile` for usage through `pkg-config` (for example,\
 after doing a "make install" or after installing from Ubuntu repositories):\
 [example_with_pkgconfig/](https://github.com/jlblancoc/nanoflann/blob/master\
/examples/example_with_pkgconfig/)
  * Example of how to build an index and save it to disk for later usage:\
 [saveload_example.cpp](https://github.com/jlblancoc/nanoflann/blob/master/ex\
amples/saveload_example.cpp)
  * GUI examples (requires `mrpt-gui`, e.g. `sudo apt install\
 libmrpt-gui-dev`):
    - [nanoflann_gui_example_R3](https://github.com/jlblancoc/nanoflann/blob/\
master/examples/examples_gui/nanoflann_gui_example_R3/nanoflann_gui_example_R\
3.cpp)

![nanoflann-demo-1](https://user-images.githubusercontent.com/5497818/2015504\
33-d561c5a9-4e87-453d-9cf8-8202d7876235.gif)



### 1.4. Why a fork?

  * **Execution time efficiency**:
    * The power of the original `flann` library comes from the possibility of\
 choosing between different ANN algorithms. The cost of this flexibility is\
 the declaration of pure virtual methods which (in some circumstances) impose\
 [run-time penalties](http://www.cs.cmu.edu/~gilpin/c%2B%2B/performance.html#\
virtualfunctions). In `nanoflann` all those virtual methods have been\
 replaced by a combination of the [Curiously Recurring Template\
 Pattern](http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern)\
 (CRTP) and inlined methods, which are much faster.
    * For `radiusSearch()`, there is no need to make a call to determine the\
 number of points within the radius and then call it again to get the data.\
 By using STL containers for the output data, containers are automatically\
 resized.
    * Users can (optionally) set the problem dimensionality at compile-time\
 via a template argument, thus allowing the compiler to fully unroll loops.
    * `nanoflann` allows users to provide a precomputed bounding box of the\
 data, if available, to avoid recomputation.
    * Indices of data points have been converted from `int` to `size_t`,\
 which removes a limit when handling very large data sets.

  * **Memory efficiency**: Instead of making a copy of the entire dataset\
 into a custom `flann`-like matrix before building a KD-tree index,\
 `nanoflann` allows direct access to your data via an **adaptor interface**\
 which must be implemented in your class.

Refer to the examples below or to the C++ API of [nanoflann::KDTreeSingleInde\
xAdaptor<>](https://jlblancoc.github.io/nanoflann/classnanoflann_1_1KDTreeSin\
gleIndexAdaptor.html) for more info.


### 1.5. What can *nanoflann* do?

  * Building KD-trees with a single index (no randomized KD-trees, no\
 approximate searches).
  * Fast, thread-safe querying for closest neighbors on KD-trees. The entry\
 points are:
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::knnSearch()`
      * Finds the `num_closest` nearest neighbors to `query_point[0:dim-1]`.\
 Their indices are stored inside the result object. See an [example usage\
 code](https://github.com/jlblancoc/nanoflann/blob/master/examples/pointcloud\
_kdd_radius.cpp#L119).
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::radiusSearch()`
      * Finds all the neighbors to `query_point[0:dim-1]` within a maximum\
 radius. The output is given as a vector of pairs, of which the first element\
 is a point index and the second the corresponding distance. See an [example\
 usage code](https://github.com/jlblancoc/nanoflann/blob/master/examples/poin\
tcloud_kdd_radius.cpp#L141).
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::radiusSearchCustomC\
allback()`
	  * Can be used to receive a callback for each point found in range. This\
 may be more efficient in some situations instead of building a huge vector\
 of pairs with the results.
  * Working with 2D and 3D point clouds or N-dimensional data sets.
  * Working directly with `Eigen::Matrix<>` classes (matrices and\
 vectors-of-vectors).
  * Working with dynamic point clouds without a need to rebuild entire\
 kd-tree index.
  * Working with the distance metrics:
    * `R^N`: Euclidean spaces:
      * `L1` (Manhattan)
      * `L2` (**squared** Euclidean norm, favoring SSE2 optimization).
      * `L2_Simple` (**squared** Euclidean norm, for low-dimensionality data\
 sets like point clouds).
    * `SO(2)`: 2D rotational group
      * `metric_SO2`: Absolute angular diference.
    * `SO(3)`: 3D rotational group (better suppport to be provided in future\
 releases)
      * `metric_SO3`: Inner product between quaternions.
  * Saves and load the built indices to disk.
  * GUI based support for benchmarking multiple kd-tree libraries namely\
 nanoflann, flann, fastann and libkdtree.

### 1.6. What can't *nanoflann* do?

  * Use other distance metrics apart from L1, L2, SO2 and SO3.
  * Support for SE(3) groups.
  * Only the C++ interface exists: there is no support for C, MATLAB or\
 Python.
  * There is no automatic algorithm configuration (as described in the\
 original Muja & Lowe's paper).

### 1.7. Use in your project via CMake

You can directly drop the `nanoflann.hpp` file in your project. Alternatively,
the CMake standard method is also available:

  * Build and "install" nanoflann. Set `CMAKE_INSTALL_PREFIX` to a proper path
  and then execute `make install` (Linux, OSX) or build the `INSTALL`
  target (Visual Studio).
  * Then, add something like this to the CMake script of your project:

```
# Find nanoflannConfig.cmake:
find_package(nanoflann)

add_executable(my_project test.cpp)

# Make sure the include path is used:
target_link_libraries(my_project nanoflann::nanoflann)
```

### 1.8. Package Managers

You can download and install nanoflann using the [vcpkg](https://github.com/M\
icrosoft/vcpkg) dependency manager:

    git clone https://github.com/Microsoft/vcpkg.git
    cd vcpkg
    ./bootstrap-vcpkg.sh
    ./vcpkg integrate install
    ./vcpkg install nanoflann

The nanoflann port in vcpkg is kept up to date by Microsoft team members and\
 community contributors. If the version is out of date, please [create an\
 issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg\
 repository.


### 1.9. Compile time definitions

  * `NANOFLANN_FIRST_MATCH`: If defined and two points have the same\
 distance, the one with the lowest-index will be returned first. Otherwise\
 there is no particular order.
  * `NANOFLANN_NO_THREADS`: If defined, multithreading capabilities will be\
 disabled, so that the library can be used without linking with pthreads. If\
 one tries to use multiple threads, an exception will be thrown.

------

## 2. Any help choosing the KD-tree parameters?

### 2.1. `KDTreeSingleIndexAdaptorParams::leaf_max_size`

A KD-tree is... well, a tree :-). And as such it has a root node, a set of\
 intermediary nodes and finally, "leaf" nodes which are those without\
 children.

Points (or, properly, point indices) are only stored in leaf nodes. Each leaf\
 contains a list of which points fall within its range.

While building the tree, nodes are recursively divided until the number of\
 points inside is equal or below some threshold. **That is `leaf_max_size`**.\
 While doing queries, the  "tree algorithm" ends by selecting leaf nodes,\
 then performing linear search (one-by-one) for the closest point to the\
 query within all those in the leaf.

So, `leaf_max_size` must be set as a **tradeoff**:
  * Large values mean that the tree will be built faster (since the tree will\
 be smaller), but each query will be slower (since the linear search in the\
 leaf is to be done over more points).
  * Small values will build the tree much slower (there will be many tree\
 nodes), but queries will be faster... up to some point, since the\
 "tree-part" of the search (logarithmic complexity) still has a significant\
 cost.

What number to select really depends on the application and even on the size\
 of the processor cache memory, so ideally you should do some benchmarking\
 for maximizing efficiency.

But to help choosing a good value as a rule of thumb, I provide the following\
 two benchmarks. Each graph represents the tree build (horizontal) and query\
 (vertical) times for different `leaf_max_size` values between 1 and 10K (as\
 95% uncertainty ellipses, deformed due to the logarithmic scale).

  * A 100K point cloud, uniformly distributed (each point has (x,y,z) `float`\
 coordinates):

![perf5_1e5pts_time_vs_maxleaf](https://raw.githubusercontent.com/jlblancoc/n\
anoflann/master/doc/perf5_1e5pts_time_vs_maxleaf.png)

  * A ~150K point cloud from a real dataset (`scan_071_points.dat` from the\
 [Freiburg Campus 360 dataset](http://ais.informatik.uni-freiburg.de/projects\
/datasets/fr360/), each point has (x,y,z) `float` coordinates):

![perf5_1e5pts_time_vs_maxleaf_real_dataset](https://raw.githubusercontent.co\
m/jlblancoc/nanoflann/master/doc/perf5_1e5pts_time_vs_maxleaf_real_dataset.pn\
g)

So, it seems that a `leaf_max_size` **between 10 and 50** would be optimum in\
 applications where the cost of queries dominates (e.g. [ICP](http://en.wikip\
edia.org/wiki/Iterative_closest_point])). At present, its default value is 10.


### 2.2. `KDTreeSingleIndexAdaptorParams::checks`

This parameter is really ignored in `nanoflann`, but was kept for backward\
 compatibility with the original FLANN interface. Just ignore it.

### 2.3. `KDTreeSingleIndexAdaptorParams::n_thread_build`

This parameter determines the maximum number of threads that can be called\
 concurrently during the construction of the KD tree. The default value is 1.\
 When the parameter is set to 0, `nanoflann` automatically determines the\
 number of threads to use.

See [this pull request](https://github.com/jlblancoc/nanoflann/pull/236) for\
 some benchmarking showing that using the maximum number of threads is not\
 always the most efficient approach. Do benchmarking on your data!

-----

## 3. Performance

### 3.1. `nanoflann`: faster and less memory usage

Refer to the "Why a fork?" section above for the main optimization ideas\
 behind `nanoflann`.

Notice that there are no explicit SSE2/SSE3 optimizations in `nanoflann`, but\
 the intensive usage of `inline` and templates in practice turns into\
 automatically SSE-optimized code generated by the compiler.


### 3.2. Benchmark: original `flann` vs `nanoflann`

The most time-consuming part of many point cloud algorithms (like ICP) is\
 querying a KD-Tree for nearest neighbors. This operation is therefore the\
 most time critical.

`nanoflann` provides a ~50% time saving with respect to the original `flann`\
 implementation (times in this chart are in microseconds for each query):

![perf3_query](https://raw.githubusercontent.com/jlblancoc/nanoflann/master/d\
oc/perf3_query.small.png)

Although most of the gain comes from the queries (due to the large number of\
 them in any typical operation with point clouds), there is also some time\
 saved while building the KD-tree index, due to the templatized-code but also\
 for the avoidance of duplicating the data in an auxiliary matrix (times in\
 the next chart are in milliseconds):

![perf4_time_saved](https://raw.githubusercontent.com/jlblancoc/nanoflann/mas\
ter/doc/perf4_time_saved.small.png)

These performance tests are only representative of our testing. If you want\
 to repeat them, read the instructions in [perf-tests](https://github.com/jlb\
lancoc/nanoflann/tree/master/perf-tests)


----

## 4. Other KD-tree projects

  * [FLANN](http://www.cs.ubc.ca/research/flann/) - Marius Muja and David G.\
 Lowe (University of British Columbia).
  * [FASTANN](http://www.robots.ox.ac.uk/~vgg/software/fastann/) - James\
 Philbin (VGG, University of Oxford).
  * [ANN](http://www.cs.umd.edu/~mount/ANN/) - David M. Mount and Sunil Arya\
 (University of Maryland).
  * [libkdtree++](https://packages.debian.org/source/sid/libkdtree++) -\
 Martin F. Krafft & others.

<br>

*Note: The project logo is due to [CedarSeed](http://www.iconarchive.com/show\
/patisserie-icons-by-cedarseed/Flan-icon.html)*

**Contributors**

<a href="https://github.com/jlblancoc/nanoflann/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=jlblancoc/nanoflann" />
</a>


\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for nanoflann

This project builds and defines the build2 package for [nanoflann](https://gi\
thub.com/jlblancoc/nanoflann), a C++11 header-only library for Nearest\
 Neighbor (NN) search with KD-trees.

[![Official](https://img.shields.io/website/https/github.com/jlblancoc/nanofl\
ann.svg?down_message=offline&label=Official&style=for-the-badge&up_color=blue\
&up_message=online)](https://github.com/jlblancoc/nanoflann)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/n\
anoflann.svg?down_message=offline&label=build2&style=for-the-badge&up_color=b\
lue&up_message=online)](https://github.com/build2-packaging/nanoflann)
[![cppget.org](https://img.shields.io/website/https/cppget.org/nanoflann.svg?\
down_message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_me\
ssage=online)](https://cppget.org/nanoflann)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/na\
noflann.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=f\
or-the-badge&up_color=orange&up_message=running)](https://queue.cppget.org/na\
noflann)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch the package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/nanoflann.git

Add the respective dependency in your project's `manifest` file to make the\
 package available for import.

    depends: nanoflann ^1.6.0

The library can be imported by the following declaration in a `buildfile`.

    import nanoflann = nanoflann%lib{nanoflann}

## Configuration
There are no configuration options available.

## Issues
- FreeBSD, Clang, static, optimized: Error may occur during tests or\
 installed tests:
    + `ld: error: undefined symbol: pthread_create`
    + It seems that `pthread` is not correctly linked in the examples.
- `linux_debian_11-emcc_3.1.6` error (test):
    + `em++` seems not to be able to compile `gtest`.
- Windows, MinGW, optimized: The `kdtree.SO2_vs_bruteforce` test may fail.

## Contributing
Thank you in advance for your help and contribution to keep this package\
 up-to-date.
Please, file an issue on [GitHub](https://github.com/build2-packaging/nanofla\
nn/issues) for questions, bug reports, or to recommend updating the package\
 version.
If you're making a pull request to fix bugs or update the package version\
 yourself, refer to the [`build2` Packaging Guidelines](https://build2.org/bu\
ild2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management).

\
package-description-type: text/markdown;variant=GFM
changes:
\
# nanoflann 1.6.0: Released Jul 11, 2024
 - BUG FIX: nanoflann::SearchParameters::sorted was ignored for\
 RadiusResultSet.
 - ResultSet classes now must implement a sort() method.
 - Added type IndexType to nanoflann:KDTreeBaseClass

# nanoflann 1.5.5: Released Mar 12, 2024
 - Potentially more efficient scheduling of multi-thread index building ([PR\
 #236](https://github.com/jlblancoc/nanoflann/pull/236))
 - Bump minimum required cmake version to 3.5 ([PR #230](https://github.com/j\
lblancoc/nanoflann/pull/230/))

# nanoflann 1.5.4: Released Jan 10, 2024
 - Fix outdated NANOFLANN_VERSION macro in header file
 - Fix poll-allocator alignment problems
 - Add NANOFLANN_USE_SYSTEM_GTEST option
 - Look for Threads dependency in CMake config script


# nanoflann 1.5.3: Released Dec 7, 2023
 * **Other changes**:
   - Save one redundant call to `computeMinMax()` in `middleSplit_`\
 ([PR#220](https://github.com/jlblancoc/nanoflann/pull/220) by\
 [qq422216549](https://github.com/qq422216549)).
     This saves *a lot* of time, up to 20% faster in a benchmark with small\
 (thousands) point clouds.

# nanoflann 1.5.2: Released Nov 29, 2023
 * **Other changes**:
   - Improve RKNN search efficiency ([PR#219](https://github.com/jlblancoc/na\
noflann/pull/219) by [kya8](https://github.com/kya8)).

# nanoflann 1.5.1: Released Nov 27, 2023
 * **API changes:**
   - Add new search method `rknnSearch()` for knn searches with a maximum\
 radius.
   - Add missing `SearchParameters` argument to `KDTreeSingleIndexDynamicAdap\
tor_::knnSearch()` ([PR#213](https://github.com/jlblancoc/nanoflann/pull/213)\
 by [ManosPapadakis95](https://github.com/ManosPapadakis95)).
   - Add missing method `KNNResultSet::empty()` for consistency with the\
 other result sets.
 * **Other changes**:
   - Add GUI examples for each search type:
     - `nanoflann_gui_example_R3_knn`
     - `nanoflann_gui_example_R3_radius`
     - `nanoflann_gui_example_R3_rknn`


# nanoflann 1.5.0: Released Jun 16, 2023
 * **API changes:**
   - Users of radius search should change their result placeholder type:
   `std::vector<std::pair<IndexType, DistanceType>>` => `std::vector<nanoflan\
n::ResultItem<IndexType, DistanceType>>`. (See [#166](https://github.com/jlbl\
ancoc/nanoflann/issues/166) for the motivation of this change).
   - More concise auxiliary (internal) type name:
     `array_or_vector_selector` -> `array_or_vector`.
   - Remove obsolete parameter `nChecks_IGNORED`. Removed from `SearchParams`
     constructor too, so that structure has been renamed `SearchParameters` to
     enforce users to update the code and avoid mistakes with the order of its
     ctor parameters.
   - Added method RadiusResultSet::empty()
   - Template argument rename: `AccesorType` => `IndexType` (does not\
 actually affect user code at all).
   - Added concurrent tree building support, refer to `KDTreeSingleIndexAdapt\
orParams::n_thread_build`.
 * **Other changes:**
   - Macros to avoid conflicts with X11 symbols.
   - Inline an auxiliary example function in case users want to use it and
    include the file in multiple translation units (Closes\
 [#182](https://github.com/jlblancoc/nanoflann/issues/182)).
   - Move all benchmarking code, data, and scripts to [its own\
 repository](https://github.com/MRPT/nanoflann-benchmark) to keep this repo\
 as clean as possible.
   - Fix "potentially uninitialized" GCC warning.
   - Clarified, even more, in docs and examples, that L2 distances are\
 **squared** distances.
   - Removed the (with modern compilers) now useless `inline` keyword in\
 class members.
   - Add examples with GUI (requires [mrpt-gui](https://docs.mrpt.org/referen\
ce/latest/group_mrpt_gui_grp.html)):
     - nanoflann_gui_example_R3: Radius search on R³ Euclidean space.
     - nanoflann_gui_example_bearings: NN search on non-Euclidean spaces.
 * BUGFIXES:
     - Avoid segfault if saving an empty index (Closes [#205](https://github.\
com/jlblancoc/nanoflann/issues/205)).

# nanoflann 1.4.3: Released Jul 24, 2022
 * Added flag SkipInitialBuildIndex to allow not wasting time building a tree\
 when it will be loaded from a file later on ([PR #171](https://github.com/jl\
blancoc/nanoflann/pull/171)).
 * Mark all constructors explicit, to avoid unintended creation of temporary\
 objects ([Issue #179](https://github.com/jlblancoc/nanoflann/issues/179)).
 * BUGFIX: avoid potential index out of bounds in KDTreeSingleIndexDynamicAda\
ptor ([PR #173](https://github.com/jlblancoc/nanoflann/pull/173))

# nanoflann 1.4.2: Released Jan 11, 2022
 * Install pkg-config .pc file under lib directory (Closes\
 [#161](https://github.com/jlblancoc/nanoflann/issues/161)).
 * Integrate AppVeyor CI.

# nanoflann 1.4.1: Released Jan 6, 2022
  * Fix incorrect install directory for cmake target & config files.
  * Do not install example binaries with `make install`.
  * Provide working examples for cmake and pkgconfig under\
 `examples/example_*` directories.

# nanoflann 1.4.0: Released Jan 2, 2022
  * nanoflann::KDTreeSingleIndexAdaptor() ctor now forwards additional\
 parameters to the metric class, enabling custom dynamic metrics.
  * Add and apply a `.clang-format` file (same one than used in MOLAorg/MOLA\
 projects).
  * Examples: clean up and code modernization.
  * CMake variables prefixed now with `NANOFLANN_` for easier integration of\
 nanoflann as a Git submodule.
  * Fixes for IndexType which are not of integral types [PR\
 #154](https://github.com/jlblancoc/nanoflann/pull/154)
  * save/load API upgraded from C `FILE*` to C++ file streams (By Dominic\
 Kempf, Heidelberg University, [PR](https://github.com/jlblancoc/nanoflann/pu\
ll/157)).

# nanoflann 1.3.2: Released Nov 5, 2020
  * Add optional argument for Eigen matrix layout [commit](https://github.com\
/jlblancoc/nanoflann/commit/40fa96badcfc4b1a2df38b40b8a368cf5521ace4).
  * Throw exception on malloc failure [PR #126](https://github.com/jlblancoc/\
nanoflann/pull/126).
  * Respect GNUInstallDirs in CMake install rules [PR #131](https://github.co\
m/jlblancoc/nanoflann/pull/131).

# nanoflann 1.3.1: Released Oct 11, 2019
  * Fixed bug in KDTreeSingleIndexDynamicAdaptor. See: https://github.com/jlb\
lancoc/nanoflann/commit/a066148517d16c173954dcde13c1527481b9fad3
  * Fix build in XCode.
  * Simplify CMakeLists for Eigen example (requires Eigen3Config.cmake now)
  * Avoid setting cmake global executable build path

# nanoflann 1.3.0: Released Aug 28, 2018
  * Instructions for `make install` for Linux and Windows (Closes #87).
  * Fix all (?) MSVC conversion warnings (Closes: #95).
  * Avoid need for _USE_MATH_DEFINES in MSVC (Closes: #96)
  * Eigen::Matrix datasets: now uses std::cref() to store a reference to\
 matrix.
  * GSOC2017 contributions by Pranjal Kumar Rai:
    * Support for dynamic datasets.
    * Support for non-Euclidean spaces: SO(2), SO(3)

# nanoflann 1.2.3: Released Dec 20, 2016
  * Fixed: split plane now correctly chooses the dimensions with the largest\
 span.
    Should lead to more optimal trees.

# nanoflann 1.2.2: Released Nov 10, 2016
  * knnSearch() now also returns the number of valid points found.

# nanoflann 1.2.1: Released Jun 1, 2016
  * Fix potential compiler warnings if `IndexType` is signed.
  * New unit tests comparing the results to those of brute force search.

# nanoflann 1.2.0: Released May 5, 2016
  * Fixed: many classes constructors get const ref arguments but stored const\
 values.

# nanoflann 1.1.9: Released Oct 2, 2015
  * Added KDTreeSingleIndexAdaptor::radiusSearchCustomCallback() (Based on a\
 suggestion by Yannick Morin-Rivest)
  * Better documentation in class headers.
  * Cleanup of unused code.
  * Parameter KDTreeSingleIndexAdaptorParams::dim has been removed since it\
 was redundant.

# nanoflann 1.1.8: Released May 2, 2014
  * Created hidden constructors in nanoflann class, to disallow unintentional\
 copies which will corrupt
    the internal pointers.
  * Fixed crash if trying to build an index of an empty dataset.

# nanoflann 1.1.7: Released Aug 24, 2013
  * Two internal containers are now automatically defined as fixed-size\
 arrays if the
    problem dimension is known at compile time, improving efficiency.
    The new/modified datatypes are: KDTreeSingleIndexAdaptor::BoundingBox,\
 KDTreeSingleIndexAdaptor::distance_vector_t
  * Fixed compilation with GCC 4.8 and C++11 enabled (Thanks to Simon\
 Praetorius).

# nanoflann 1.1.6: Released May 14, 2013
  * Fixed warnings about unused parameters.
  * Fixed L1_adaptor.accum_dist(), which implemented L2 instead (Closes #1)
  * Fixed wrong typedef in KDTreeEigenMatrixAdaptor<> for IndexType!=size_t\
 (Closes: #2)

# nanoflann 1.1.5: Released Mar 25, 2013
  * Fixed: Memory pool wasn't freed after each call to buildIndex()
  * GCC: Added -isystem flag to gtest headers to avoid pedantic warnings.

# nanoflann 1.1.4: Released Jan 11, 2013
  * Fixed compilation with Visual Studio 11 (MSVC 2012).
  * Fixed compilation of gtest with VS11 and its _VARIADIC_MAX "bug".
  * Added a security check to launch an exception if searches are attempted\
 before buildIndex().
  * New example to demonstrate save/load the index to files.
  * save/load methods exposed as public.

# nanoflann 1.1.3: Released Jun 6, 2012
  * GTest sources are now embedded, due to the changes in newer Ubuntu\
 packages which don't carry the precompiled libs.
  * Added asserts to detect whether the user passes NULL as query points.
  * New method RadiusResultSet::worst_item()
  * New method RadiusResultSet::set_radius_and_clear()
  * Avoid potential collision of min/max macros with <windows.h>
  * Removed unneeded #include's of std headers.
  * New sample code for vectors of vectors.
  * Fixed building of tests for MSVC in Windows.
  * Allow manually setting the path to Eigen3 (mainly for building examples\
 under Windows).

# nanoflann 1.1.2: Released May 2, 2012
  * Better documentation and added graphs of a benchmarking for helping\
 choosing "leaf_max_size".
  * Now KDTreeSingleIndexAdaptor::buildIndex() can be called several times
     even when the dataset size changes (Thanks to Rob McDonald for\
 reporting!)

# nanoflann 1.1.1: Released Feb 1, 2012
  * Some fixes to kd_tree index and L1/L2 metrics to allow distinct types
     in data elements and in the distances. This is mainly to permit elements
	 being vectors of integers (e.g. uint8_t) but distances being real numbers.
  * Examples and unit tests have been corrected to use template arguments
     instead of being hard-wired to "float" data types (Thanks Thomas Vincent
	 for noticing!).

# nanoflann 1.1.0: Released Dec 15, 2011
  * Fixed warnings for MSVC and for GCC with "-Wall -pedantic"
  * Updated performance tests to work with the final nanoflann code (they were
     written for a very early version).
  * All main classes now have new template arguments for the type of indice,
     which now defaults to "size_t" instead of "int". In case this breaks
     backward compatibility in user code, especify "int" to override the\
 default
     template arguments, although "size_t" it's recommended.

# nanoflann 1.0.0: Released Aug 30, 2011
  * Initial version

\
changes-type: text/markdown;variant=GFM
url: https://github.com/jlblancoc/nanoflann
doc-url: https://jlblancoc.github.io/nanoflann/
package-url: https://github.com/build2-packaging/nanoflann/
email: joseluisblancoc@gmail.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: gtest ^1.11.0
bootstrap-build:
\
project = nanoflann-tests

using version
using config
using test
using dist

# Disable installation of examples
# by dropping 'install' module.
#
# using install

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = h
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

hxx{*}: cxx.importable = false

exe{*}: test = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: nanoflann/nanoflann-tests-1.6.0.tar.gz
sha256sum: 12968b9619576b560893c7de62ef0858bd071708c3c34bddf76842f1bc1daf4c
:
name: nanoflann-tests
version: 1.7.1
type: exe
language: c++
project: nanoflann
summary: Nearest-Neighbor (NN) search with KD-trees C++ library, tests
license: BSD-2-Clause
description:
\
![nanoflann](https://raw.githubusercontent.com/jlblancoc/nanoflann/master/doc\
/logo.png)

# nanoflann
[![CI Linux](https://github.com/jlblancoc/nanoflann/actions/workflows/ci-linu\
x.yml/badge.svg)](https://github.com/jlblancoc/nanoflann/actions/workflows/ci\
-linux.yml)
[![CI Check clang-format](https://github.com/jlblancoc/nanoflann/actions/work\
flows/check-clang-format.yml/badge.svg)](https://github.com/jlblancoc/nanofla\
nn/actions/workflows/check-clang-format.yml)
[![CircleCI](https://circleci.com/gh/jlblancoc/nanoflann/tree/master.svg?styl\
e=svg)](https://circleci.com/gh/jlblancoc/nanoflann/tree/master)
[![Windows build status](https://ci.appveyor.com/api/projects/status/h8k1apfo\
gxyqhskd/branch/master?svg=true)](https://ci.appveyor.com/project/jlblancoc/n\
anoflann/branch/master)


## 1. About

*nanoflann* is a **C++11 [header-only](http://en.wikipedia.org/wiki/Header-on\
ly) library** for building KD-Trees of datasets with different topologies:\
 R<sup>2</sup>, R<sup>3</sup> (point clouds), SO(2) and SO(3) (2D and 3D\
 rotation groups). No support for approximate NN is provided. *nanoflann*\
 does not require compiling or installing. You just need to `#include\
 <nanoflann.hpp>` in your code.

This library is a *fork* of the [flann library](https://github.com/flann-lib/\
flann) by Marius Muja and David G. Lowe, and born as a child project of\
 [MRPT](https://www.mrpt.org/). Following the original license terms,\
 *nanoflann* is distributed under the BSD license. Please, for bugs use the\
 issues button or fork and open a pull request.

Cite as:
```
@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library\
 for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}
```

See the release [CHANGELOG](CHANGELOG.md) for a list of project changes.

### 1.1. Obtaining the code

* Easiest way: clone this GIT repository and take the `include/nanoflann.hpp`\
 file for use where you need it.
* Debian or Ubuntu ([21.04 or newer](https://packages.ubuntu.com/source/hirsu\
te/nanoflann)) users can install it simply with:
  ```bash 
  $ sudo apt install libnanoflann-dev
  ```
* macOS users can install `nanoflann` with [Homebrew](https://brew.sh) with:
  ```shell
  $ brew install brewsci/science/nanoflann
  ```
  or
  ```shell
  $ brew tap brewsci/science
  $ brew install nanoflann
  ```
  MacPorts users can use:
  ```shell
  $ sudo port install nanoflann
  ```
* Linux users can also install it with [Linuxbrew](https://docs.brew.sh/Homeb\
rew-on-Linux) with: `brew install homebrew/science/nanoflann`
* List of [**stable releases**](https://github.com/jlblancoc/nanoflann/releas\
es). Check out the [CHANGELOG](https://github.com/jlblancoc/nanoflann/blob/ma\
ster/CHANGELOG.md)

Although nanoflann itself doesn't have to be compiled, you can build some\
 examples and tests with:

```shell
$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test
```

### 1.2. C++ API reference

  * Browse the [Doxygen documentation](https://jlblancoc.github.io/nanoflann/\
).

  * **Important note:** If L2 norms are used, notice that search radius and\
 all passed and returned distances are actually *squared distances*.

### 1.3. Code examples

  * KD-tree look-up with `knnSearch()` and `radiusSearch()`:\
 [pointcloud_kdd_radius.cpp](https://github.com/jlblancoc/nanoflann/blob/mast\
er/examples/pointcloud_kdd_radius.cpp)
  * KD-tree look-up on a point cloud dataset: [pointcloud_example.cpp](https:\
//github.com/jlblancoc/nanoflann/blob/master/examples/pointcloud_example.cpp)
  * KD-tree look-up on a dynamic point cloud dataset: [dynamic_pointcloud_exa\
mple.cpp](https://github.com/jlblancoc/nanoflann/blob/master/examples/dynamic\
_pointcloud_example.cpp)
  * KD-tree look-up on a rotation group (SO2): [SO2_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/SO2_adaptor_example.cpp)
  * KD-tree look-up on a rotation group (SO3): [SO3_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/SO3_adaptor_example.cpp)
  * KD-tree look-up on a point cloud dataset with an external adaptor class:\
 [pointcloud_adaptor_example.cpp](https://github.com/jlblancoc/nanoflann/blob\
/master/examples/pointcloud_adaptor_example.cpp)
  * KD-tree look-up directly on an `Eigen::Matrix<>`: [matrix_example.cpp](ht\
tps://github.com/jlblancoc/nanoflann/blob/master/examples/matrix_example.cpp)
  * KD-tree look-up directly on `std::vector<std::vector<T> >` or\
 `std::vector<Eigen::VectorXd>`: [vector_of_vectors_example.cpp](https://gith\
ub.com/jlblancoc/nanoflann/blob/master/examples/vector_of_vectors_example.cpp)
  * Example with a `Makefile` for usage through `pkg-config` (for example,\
 after doing a "make install" or after installing from Ubuntu repositories):\
 [example_with_pkgconfig/](https://github.com/jlblancoc/nanoflann/blob/master\
/examples/example_with_pkgconfig/)
  * Example of how to build an index and save it to disk for later usage:\
 [saveload_example.cpp](https://github.com/jlblancoc/nanoflann/blob/master/ex\
amples/saveload_example.cpp)
  * GUI examples (requires `mrpt-gui`, e.g. `sudo apt install\
 libmrpt-gui-dev`):
    - [nanoflann_gui_example_R3](https://github.com/jlblancoc/nanoflann/blob/\
master/examples/examples_gui/nanoflann_gui_example_R3/nanoflann_gui_example_R\
3.cpp)

![nanoflann-demo-1](https://user-images.githubusercontent.com/5497818/2015504\
33-d561c5a9-4e87-453d-9cf8-8202d7876235.gif)



### 1.4. Why a fork?

  * **Execution time efficiency**:
    * The power of the original `flann` library comes from the possibility of\
 choosing between different ANN algorithms. The cost of this flexibility is\
 the declaration of pure virtual methods which (in some circumstances) impose\
 [run-time penalties](http://www.cs.cmu.edu/~gilpin/c%2B%2B/performance.html#\
virtualfunctions). In `nanoflann` all those virtual methods have been\
 replaced by a combination of the [Curiously Recurring Template\
 Pattern](http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern)\
 (CRTP) and inlined methods, which are much faster.
    * For `radiusSearch()`, there is no need to make a call to determine the\
 number of points within the radius and then call it again to get the data.\
 By using STL containers for the output data, containers are automatically\
 resized.
    * Users can (optionally) set the problem dimensionality at compile-time\
 via a template argument, thus allowing the compiler to fully unroll loops.
    * `nanoflann` allows users to provide a precomputed bounding box of the\
 data, if available, to avoid recomputation.
    * Indices of data points have been converted from `int` to `size_t`,\
 which removes a limit when handling very large data sets.

  * **Memory efficiency**: Instead of making a copy of the entire dataset\
 into a custom `flann`-like matrix before building a KD-tree index,\
 `nanoflann` allows direct access to your data via an **adaptor interface**\
 which must be implemented in your class.

Refer to the examples below or to the C++ API of [nanoflann::KDTreeSingleInde\
xAdaptor<>](https://jlblancoc.github.io/nanoflann/classnanoflann_1_1KDTreeSin\
gleIndexAdaptor.html) for more info.


### 1.5. What can *nanoflann* do?

  * Building KD-trees with a single index (no randomized KD-trees, no\
 approximate searches).
  * Fast, thread-safe querying for closest neighbors on KD-trees. The entry\
 points are:
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::knnSearch()`
      * Finds the `num_closest` nearest neighbors to `query_point[0:dim-1]`.\
 Their indices are stored inside the result object. See an [example usage\
 code](https://github.com/jlblancoc/nanoflann/blob/master/examples/pointcloud\
_kdd_radius.cpp#L119).
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::radiusSearch()`
      * Finds all the neighbors to `query_point[0:dim-1]` within a maximum\
 radius. The output is given as a vector of pairs, of which the first element\
 is a point index and the second the corresponding distance. See an [example\
 usage code](https://github.com/jlblancoc/nanoflann/blob/master/examples/poin\
tcloud_kdd_radius.cpp#L141).
    * [nanoflann::KDTreeSingleIndexAdaptor<>](https://jlblancoc.github.io/nan\
oflann/classnanoflann_1_1KDTreeSingleIndexAdaptor.html)`::radiusSearchCustomC\
allback()`
	  * Can be used to receive a callback for each point found in range. This\
 may be more efficient in some situations instead of building a huge vector\
 of pairs with the results.
  * Working with 2D and 3D point clouds or N-dimensional data sets.
  * Working directly with `Eigen::Matrix<>` classes (matrices and\
 vectors-of-vectors).
  * Working with dynamic point clouds without a need to rebuild entire\
 kd-tree index.
  * Working with the distance metrics:
    * `R^N`: Euclidean spaces:
      * `L1` (Manhattan)
      * `L2` (**squared** Euclidean norm, favoring SSE2 optimization).
      * `L2_Simple` (**squared** Euclidean norm, for low-dimensionality data\
 sets like point clouds).
    * `SO(2)`: 2D rotational group
      * `metric_SO2`: Absolute angular diference.
    * `SO(3)`: 3D rotational group (better suppport to be provided in future\
 releases)
      * `metric_SO3`: Inner product between quaternions.
  * Saves and load the built indices to disk.
  * GUI based support for benchmarking multiple kd-tree libraries namely\
 nanoflann, flann, fastann and libkdtree.

### 1.6. What can't *nanoflann* do?

  * Use other distance metrics apart from L1, L2, SO2 and SO3.
  * Support for SE(3) groups.
  * Only the C++ interface exists: there is no support for C, MATLAB or\
 Python.
  * There is no automatic algorithm configuration (as described in the\
 original Muja & Lowe's paper).

### 1.7. Use in your project via CMake

You can directly drop the `nanoflann.hpp` file in your project. Alternatively,
the CMake standard method is also available:

  * Build and "install" nanoflann. Set `CMAKE_INSTALL_PREFIX` to a proper path
  and then execute `make install` (Linux, OSX) or build the `INSTALL`
  target (Visual Studio).
  * Then, add something like this to the CMake script of your project:

```cmake
# Find nanoflannConfig.cmake:
find_package(nanoflann)

add_executable(my_project test.cpp)

# Make sure the include path is used:
target_link_libraries(my_project nanoflann::nanoflann)
```

### 1.8. Package Managers

#### Using `conan`

You can install pre-built binaries for `nanoflann` or build it from source\
 using [Conan](https://conan.io/). Use the following command to install\
 latest version:

```sh
$ conan install --requires="nanoflann/[*]" --build=missing
```

For detailed instructions on how to use Conan, please refer to the [Conan\
 documentation](https://docs.conan.io/2/).

The `nanoflann` Conan recipe is kept up to date by Conan maintainers and\
 community contributors.
If the version is out of date, please [create an issue or pull\
 request](https://github.com/conan-io/conan-center-index) on the\
 ConanCenterIndex repository.

#### Using `vcpkg`

You can download and install nanoflann using the [vcpkg](https://github.com/M\
icrosoft/vcpkg) dependency manager:

```sh
$ git clone https://github.com/Microsoft/vcpkg.git
$ cd vcpkg
$ ./bootstrap-vcpkg.sh
$ ./vcpkg integrate install
$ ./vcpkg install nanoflann
```

The nanoflann port in vcpkg is kept up to date by Microsoft team members and\
 community contributors. If the version is out of date, please [create an\
 issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg\
 repository.


### 1.9. Compile time definitions

  * `NANOFLANN_FIRST_MATCH`: If defined and two points have the same\
 distance, the one with the lowest-index will be returned first. Otherwise\
 there is no particular order.
  * `NANOFLANN_NO_THREADS`: If defined, multithreading capabilities will be\
 disabled, so that the library can be used without linking with pthreads. If\
 one tries to use multiple threads, an exception will be thrown.

------

## 2. Any help choosing the KD-tree parameters?

### 2.1. `KDTreeSingleIndexAdaptorParams::leaf_max_size`

A KD-tree is... well, a tree :-). And as such it has a root node, a set of\
 intermediary nodes and finally, "leaf" nodes which are those without\
 children.

Points (or, properly, point indices) are only stored in leaf nodes. Each leaf\
 contains a list of which points fall within its range.

While building the tree, nodes are recursively divided until the number of\
 points inside is equal or below some threshold. **That is `leaf_max_size`**.\
 While doing queries, the  "tree algorithm" ends by selecting leaf nodes,\
 then performing linear search (one-by-one) for the closest point to the\
 query within all those in the leaf.

So, `leaf_max_size` must be set as a **tradeoff**:
  * Large values mean that the tree will be built faster (since the tree will\
 be smaller), but each query will be slower (since the linear search in the\
 leaf is to be done over more points).
  * Small values will build the tree much slower (there will be many tree\
 nodes), but queries will be faster... up to some point, since the\
 "tree-part" of the search (logarithmic complexity) still has a significant\
 cost.

What number to select really depends on the application and even on the size\
 of the processor cache memory, so ideally you should do some benchmarking\
 for maximizing efficiency.

But to help choosing a good value as a rule of thumb, I provide the following\
 two benchmarks. Each graph represents the tree build (horizontal) and query\
 (vertical) times for different `leaf_max_size` values between 1 and 10K (as\
 95% uncertainty ellipses, deformed due to the logarithmic scale).

  * A 100K point cloud, uniformly distributed (each point has (x,y,z) `float`\
 coordinates):

![perf5_1e5pts_time_vs_maxleaf](https://raw.githubusercontent.com/jlblancoc/n\
anoflann/master/doc/perf5_1e5pts_time_vs_maxleaf.png)

  * A ~150K point cloud from a real dataset (`scan_071_points.dat` from the\
 [Freiburg Campus 360 dataset](http://ais.informatik.uni-freiburg.de/projects\
/datasets/fr360/), each point has (x,y,z) `float` coordinates):

![perf5_1e5pts_time_vs_maxleaf_real_dataset](https://raw.githubusercontent.co\
m/jlblancoc/nanoflann/master/doc/perf5_1e5pts_time_vs_maxleaf_real_dataset.pn\
g)

So, it seems that a `leaf_max_size` **between 10 and 50** would be optimum in\
 applications where the cost of queries dominates (e.g. [ICP](http://en.wikip\
edia.org/wiki/Iterative_closest_point])). At present, its default value is 10.


### 2.2. `KDTreeSingleIndexAdaptorParams::checks`

This parameter is really ignored in `nanoflann`, but was kept for backward\
 compatibility with the original FLANN interface. Just ignore it.

### 2.3. `KDTreeSingleIndexAdaptorParams::n_thread_build`

This parameter determines the maximum number of threads that can be called\
 concurrently during the construction of the KD tree. The default value is 1.\
 When the parameter is set to 0, `nanoflann` automatically determines the\
 number of threads to use.

See [this pull request](https://github.com/jlblancoc/nanoflann/pull/236) for\
 some benchmarking showing that using the maximum number of threads is not\
 always the most efficient approach. Do benchmarking on your data!

-----

## 3. Performance

### 3.1. `nanoflann`: faster and less memory usage

Refer to the "Why a fork?" section above for the main optimization ideas\
 behind `nanoflann`.

Notice that there are no explicit SSE2/SSE3 optimizations in `nanoflann`, but\
 the intensive usage of `inline` and templates in practice turns into\
 automatically SSE-optimized code generated by the compiler.


### 3.2. Benchmark: original `flann` vs `nanoflann`

The most time-consuming part of many point cloud algorithms (like ICP) is\
 querying a KD-Tree for nearest neighbors. This operation is therefore the\
 most time critical.

`nanoflann` provides a ~50% time saving with respect to the original `flann`\
 implementation (times in this chart are in microseconds for each query):

![perf3_query](https://raw.githubusercontent.com/jlblancoc/nanoflann/master/d\
oc/perf3_query.small.png)

Although most of the gain comes from the queries (due to the large number of\
 them in any typical operation with point clouds), there is also some time\
 saved while building the KD-tree index, due to the templatized-code but also\
 for the avoidance of duplicating the data in an auxiliary matrix (times in\
 the next chart are in milliseconds):

![perf4_time_saved](https://raw.githubusercontent.com/jlblancoc/nanoflann/mas\
ter/doc/perf4_time_saved.small.png)

These performance tests are only representative of our testing. If you want\
 to repeat them, read the instructions in [perf-tests](https://github.com/jlb\
lancoc/nanoflann/tree/master/perf-tests)


----

## 4. Other KD-tree projects

  * [FLANN](http://www.cs.ubc.ca/research/flann/) - Marius Muja and David G.\
 Lowe (University of British Columbia).
  * [FASTANN](http://www.robots.ox.ac.uk/~vgg/software/fastann/) - James\
 Philbin (VGG, University of Oxford).
  * [ANN](http://www.cs.umd.edu/~mount/ANN/) - David M. Mount and Sunil Arya\
 (University of Maryland).
  * [libkdtree++](https://packages.debian.org/source/sid/libkdtree++) -\
 Martin F. Krafft & others.

<br>

*Note: The project logo is due to [CedarSeed](http://www.iconarchive.com/show\
/patisserie-icons-by-cedarseed/Flan-icon.html)*

**Contributors**

<a href="https://github.com/jlblancoc/nanoflann/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=jlblancoc/nanoflann" />
</a>


\
description-type: text/markdown;variant=GFM
package-description:
\
# nanoflann - C++ Library for Nearest Neighbor Search with KD-Trees

This is the `build2` package for nanoflann, a C++11 header-only library for\
 Nearest Neighbor (NN) search with KD-trees.

# Usage
To use `nanoflann` in your project, add the following configurations to the\
 respective files after you have gained access to a `build2` package\
 repository that contains it.

### `manifest`
To make `nanoflann` available for import, add the following dependency to the\
 `manifest` of each package in your project that requires it, adjusting the\
 version constraint as appropriate.

    depends: nanoflann ^1.7.1

### `buildfile`
To import the contained library, use the following declaration in your\
 `buildfile`.

    import nanoflann = nanoflann%lib{nanoflann}

### C++ Header Inclusion
Finally, include the nanoflann header in your C++ source code.

```c++
#include <nanoflann.hpp>
```

\
package-description-type: text/markdown;variant=GFM
changes:
\
# nanoflann 1.7.1: Released Mar 15, 2025
 - ResultSets::worstDist(): Fix a potential access to negative index in array\
 (did not happen in practice, but static analysis tools correctly detected\
 this possibility).

# nanoflann 1.7.0: Released Feb 3, 2025
 - ResultSets::worstDist(): clarify the meaning of its return value, and made\
 to return the actual worst distance in the found set (only if set is full)

# nanoflann 1.6.3: Released Jan 7, 2025
 - cmake_required_version bumped to 3.10
 - clang-format version bumped to 14

# nanoflann 1.6.2: Released Nov 4, 2024
 - BUG FIX: Fix middleSplit_ for same points by @yzabalotski in\
 https://github.com/jlblancoc/nanoflann/pull/250
 - Fix build warnings.

# nanoflann 1.6.1: Released Aug 24, 2024
 - Add conan install instructions.
 - Add multiple thread kdtree build support for KDTreeEigenMatrixAdaptor ([PR\
 #246](https://github.com/jlblancoc/nanoflann/pull/246))

# nanoflann 1.6.0: Released Jul 11, 2024
 - BUG FIX: nanoflann::SearchParameters::sorted was ignored for\
 RadiusResultSet.
 - ResultSet classes now must implement a sort() method.
 - Added type IndexType to nanoflann:KDTreeBaseClass

# nanoflann 1.5.5: Released Mar 12, 2024
 - Potentially more efficient scheduling of multi-thread index building ([PR\
 #236](https://github.com/jlblancoc/nanoflann/pull/236))
 - Bump minimum required cmake version to 3.5 ([PR #230](https://github.com/j\
lblancoc/nanoflann/pull/230/))

# nanoflann 1.5.4: Released Jan 10, 2024
 - Fix outdated NANOFLANN_VERSION macro in header file
 - Fix poll-allocator alignment problems
 - Add NANOFLANN_USE_SYSTEM_GTEST option
 - Look for Threads dependency in CMake config script


# nanoflann 1.5.3: Released Dec 7, 2023
 * **Other changes**:
   - Save one redundant call to `computeMinMax()` in `middleSplit_`\
 ([PR#220](https://github.com/jlblancoc/nanoflann/pull/220) by\
 [qq422216549](https://github.com/qq422216549)).
     This saves *a lot* of time, up to 20% faster in a benchmark with small\
 (thousands) point clouds.

# nanoflann 1.5.2: Released Nov 29, 2023
 * **Other changes**:
   - Improve RKNN search efficiency ([PR#219](https://github.com/jlblancoc/na\
noflann/pull/219) by [kya8](https://github.com/kya8)).

# nanoflann 1.5.1: Released Nov 27, 2023
 * **API changes:**
   - Add new search method `rknnSearch()` for knn searches with a maximum\
 radius.
   - Add missing `SearchParameters` argument to `KDTreeSingleIndexDynamicAdap\
tor_::knnSearch()` ([PR#213](https://github.com/jlblancoc/nanoflann/pull/213)\
 by [ManosPapadakis95](https://github.com/ManosPapadakis95)).
   - Add missing method `KNNResultSet::empty()` for consistency with the\
 other result sets.
 * **Other changes**:
   - Add GUI examples for each search type:
     - `nanoflann_gui_example_R3_knn`
     - `nanoflann_gui_example_R3_radius`
     - `nanoflann_gui_example_R3_rknn`


# nanoflann 1.5.0: Released Jun 16, 2023
 * **API changes:**
   - Users of radius search should change their result placeholder type:
   `std::vector<std::pair<IndexType, DistanceType>>` => `std::vector<nanoflan\
n::ResultItem<IndexType, DistanceType>>`. (See [#166](https://github.com/jlbl\
ancoc/nanoflann/issues/166) for the motivation of this change).
   - More concise auxiliary (internal) type name:
     `array_or_vector_selector` -> `array_or_vector`.
   - Remove obsolete parameter `nChecks_IGNORED`. Removed from `SearchParams`
     constructor too, so that structure has been renamed `SearchParameters` to
     enforce users to update the code and avoid mistakes with the order of its
     ctor parameters.
   - Added method RadiusResultSet::empty()
   - Template argument rename: `AccesorType` => `IndexType` (does not\
 actually affect user code at all).
   - Added concurrent tree building support, refer to `KDTreeSingleIndexAdapt\
orParams::n_thread_build`.
 * **Other changes:**
   - Macros to avoid conflicts with X11 symbols.
   - Inline an auxiliary example function in case users want to use it and
    include the file in multiple translation units (Closes\
 [#182](https://github.com/jlblancoc/nanoflann/issues/182)).
   - Move all benchmarking code, data, and scripts to [its own\
 repository](https://github.com/MRPT/nanoflann-benchmark) to keep this repo\
 as clean as possible.
   - Fix "potentially uninitialized" GCC warning.
   - Clarified, even more, in docs and examples, that L2 distances are\
 **squared** distances.
   - Removed the (with modern compilers) now useless `inline` keyword in\
 class members.
   - Add examples with GUI (requires [mrpt-gui](https://docs.mrpt.org/referen\
ce/latest/group_mrpt_gui_grp.html)):
     - nanoflann_gui_example_R3: Radius search on R³ Euclidean space.
     - nanoflann_gui_example_bearings: NN search on non-Euclidean spaces.
 * BUGFIXES:
     - Avoid segfault if saving an empty index (Closes [#205](https://github.\
com/jlblancoc/nanoflann/issues/205)).

# nanoflann 1.4.3: Released Jul 24, 2022
 * Added flag SkipInitialBuildIndex to allow not wasting time building a tree\
 when it will be loaded from a file later on ([PR #171](https://github.com/jl\
blancoc/nanoflann/pull/171)).
 * Mark all constructors explicit, to avoid unintended creation of temporary\
 objects ([Issue #179](https://github.com/jlblancoc/nanoflann/issues/179)).
 * BUGFIX: avoid potential index out of bounds in KDTreeSingleIndexDynamicAda\
ptor ([PR #173](https://github.com/jlblancoc/nanoflann/pull/173))

# nanoflann 1.4.2: Released Jan 11, 2022
 * Install pkg-config .pc file under lib directory (Closes\
 [#161](https://github.com/jlblancoc/nanoflann/issues/161)).
 * Integrate AppVeyor CI.

# nanoflann 1.4.1: Released Jan 6, 2022
  * Fix incorrect install directory for cmake target & config files.
  * Do not install example binaries with `make install`.
  * Provide working examples for cmake and pkgconfig under\
 `examples/example_*` directories.

# nanoflann 1.4.0: Released Jan 2, 2022
  * nanoflann::KDTreeSingleIndexAdaptor() ctor now forwards additional\
 parameters to the metric class, enabling custom dynamic metrics.
  * Add and apply a `.clang-format` file (same one than used in MOLAorg/MOLA\
 projects).
  * Examples: clean up and code modernization.
  * CMake variables prefixed now with `NANOFLANN_` for easier integration of\
 nanoflann as a Git submodule.
  * Fixes for IndexType which are not of integral types [PR\
 #154](https://github.com/jlblancoc/nanoflann/pull/154)
  * save/load API upgraded from C `FILE*` to C++ file streams (By Dominic\
 Kempf, Heidelberg University, [PR](https://github.com/jlblancoc/nanoflann/pu\
ll/157)).

# nanoflann 1.3.2: Released Nov 5, 2020
  * Add optional argument for Eigen matrix layout [commit](https://github.com\
/jlblancoc/nanoflann/commit/40fa96badcfc4b1a2df38b40b8a368cf5521ace4).
  * Throw exception on malloc failure [PR #126](https://github.com/jlblancoc/\
nanoflann/pull/126).
  * Respect GNUInstallDirs in CMake install rules [PR #131](https://github.co\
m/jlblancoc/nanoflann/pull/131).

# nanoflann 1.3.1: Released Oct 11, 2019
  * Fixed bug in KDTreeSingleIndexDynamicAdaptor. See: https://github.com/jlb\
lancoc/nanoflann/commit/a066148517d16c173954dcde13c1527481b9fad3
  * Fix build in XCode.
  * Simplify CMakeLists for Eigen example (requires Eigen3Config.cmake now)
  * Avoid setting cmake global executable build path

# nanoflann 1.3.0: Released Aug 28, 2018
  * Instructions for `make install` for Linux and Windows (Closes #87).
  * Fix all (?) MSVC conversion warnings (Closes: #95).
  * Avoid need for _USE_MATH_DEFINES in MSVC (Closes: #96)
  * Eigen::Matrix datasets: now uses std::cref() to store a reference to\
 matrix.
  * GSOC2017 contributions by Pranjal Kumar Rai:
    * Support for dynamic datasets.
    * Support for non-Euclidean spaces: SO(2), SO(3)

# nanoflann 1.2.3: Released Dec 20, 2016
  * Fixed: split plane now correctly chooses the dimensions with the largest\
 span.
    Should lead to more optimal trees.

# nanoflann 1.2.2: Released Nov 10, 2016
  * knnSearch() now also returns the number of valid points found.

# nanoflann 1.2.1: Released Jun 1, 2016
  * Fix potential compiler warnings if `IndexType` is signed.
  * New unit tests comparing the results to those of brute force search.

# nanoflann 1.2.0: Released May 5, 2016
  * Fixed: many classes constructors get const ref arguments but stored const\
 values.

# nanoflann 1.1.9: Released Oct 2, 2015
  * Added KDTreeSingleIndexAdaptor::radiusSearchCustomCallback() (Based on a\
 suggestion by Yannick Morin-Rivest)
  * Better documentation in class headers.
  * Cleanup of unused code.
  * Parameter KDTreeSingleIndexAdaptorParams::dim has been removed since it\
 was redundant.

# nanoflann 1.1.8: Released May 2, 2014
  * Created hidden constructors in nanoflann class, to disallow unintentional\
 copies which will corrupt
    the internal pointers.
  * Fixed crash if trying to build an index of an empty dataset.

# nanoflann 1.1.7: Released Aug 24, 2013
  * Two internal containers are now automatically defined as fixed-size\
 arrays if the
    problem dimension is known at compile time, improving efficiency.
    The new/modified datatypes are: KDTreeSingleIndexAdaptor::BoundingBox,\
 KDTreeSingleIndexAdaptor::distance_vector_t
  * Fixed compilation with GCC 4.8 and C++11 enabled (Thanks to Simon\
 Praetorius).

# nanoflann 1.1.6: Released May 14, 2013
  * Fixed warnings about unused parameters.
  * Fixed L1_adaptor.accum_dist(), which implemented L2 instead (Closes #1)
  * Fixed wrong typedef in KDTreeEigenMatrixAdaptor<> for IndexType!=size_t\
 (Closes: #2)

# nanoflann 1.1.5: Released Mar 25, 2013
  * Fixed: Memory pool wasn't freed after each call to buildIndex()
  * GCC: Added -isystem flag to gtest headers to avoid pedantic warnings.

# nanoflann 1.1.4: Released Jan 11, 2013
  * Fixed compilation with Visual Studio 11 (MSVC 2012).
  * Fixed compilation of gtest with VS11 and its _VARIADIC_MAX "bug".
  * Added a security check to launch an exception if searches are attempted\
 before buildIndex().
  * New example to demonstrate save/load the index to files.
  * save/load methods exposed as public.

# nanoflann 1.1.3: Released Jun 6, 2012
  * GTest sources are now embedded, due to the changes in newer Ubuntu\
 packages which don't carry the precompiled libs.
  * Added asserts to detect whether the user passes NULL as query points.
  * New method RadiusResultSet::worst_item()
  * New method RadiusResultSet::set_radius_and_clear()
  * Avoid potential collision of min/max macros with <windows.h>
  * Removed unneeded #include's of std headers.
  * New sample code for vectors of vectors.
  * Fixed building of tests for MSVC in Windows.
  * Allow manually setting the path to Eigen3 (mainly for building examples\
 under Windows).

# nanoflann 1.1.2: Released May 2, 2012
  * Better documentation and added graphs of a benchmarking for helping\
 choosing "leaf_max_size".
  * Now KDTreeSingleIndexAdaptor::buildIndex() can be called several times
     even when the dataset size changes (Thanks to Rob McDonald for\
 reporting!)

# nanoflann 1.1.1: Released Feb 1, 2012
  * Some fixes to kd_tree index and L1/L2 metrics to allow distinct types
     in data elements and in the distances. This is mainly to permit elements
	 being vectors of integers (e.g. uint8_t) but distances being real numbers.
  * Examples and unit tests have been corrected to use template arguments
     instead of being hard-wired to "float" data types (Thanks Thomas Vincent
	 for noticing!).

# nanoflann 1.1.0: Released Dec 15, 2011
  * Fixed warnings for MSVC and for GCC with "-Wall -pedantic"
  * Updated performance tests to work with the final nanoflann code (they were
     written for a very early version).
  * All main classes now have new template arguments for the type of indice,
     which now defaults to "size_t" instead of "int". In case this breaks
     backward compatibility in user code, especify "int" to override the\
 default
     template arguments, although "size_t" it's recommended.

# nanoflann 1.0.0: Released Aug 30, 2011
  * Initial version

\
changes-type: text/markdown;variant=GFM
url: https://github.com/jlblancoc/nanoflann
doc-url: https://jlblancoc.github.io/nanoflann/
package-url: https://github.com/build2-packaging/nanoflann/
email: joseluisblancoc@gmail.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: gtest ^1.11.0
bootstrap-build:
\
project = nanoflann-tests

using version
using config
using test
using dist

# Disable installation of examples
# by dropping 'install' module.
#
# using install

\
root-build:
\
# Suppress warnings coming from external libraries.
#
cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

hxx{*}: cxx.importable = false

exe{*}: test = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# Default Build Options
#
if ($cxx.target.system == 'win32-msvc')
  cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_VARIADIC_MAX=10

\
location: nanoflann/nanoflann-tests-1.7.1.tar.gz
sha256sum: 93f64e60d9d4cee1f2fb39477c9d67c2867414ef4b851b85777162df4ec3c449
:
name: nasm
version: 2.16.3
language: c
project: nasm
summary: assembler & disassembler, targeting the Intel x86 series of\
 processors.
license: BSD-2-Clause; BSD 2-Clause "Simplified" License.
description:
\
NASM, the Netwide Assembler
===========================

[![master](https://travis-ci.org/netwide-assembler/nasm.svg?branch=master)](h\
ttps://travis-ci.org/netwide-assembler/nasm)

Many many developers all over the net respect NASM for what it is:
a widespread (thus netwide), portable (thus netwide!), very flexible
and mature assembler tool with support for many output formats (thus\
 netwide!!).

Now we have good news for you: NASM is licensed under the "simplified"
[(2-clause) BSD license](https://opensource.org/licenses/BSD-2-Clause).
This means its development is open to even wider society of programmers
wishing to improve their lovely assembler.

Visit our [nasm.us](https://www.nasm.us/) website for more details.

With best regards, the NASM crew.

\
description-type: text/markdown;variant=GFM
package-description:
\
# nasm - An executable

This is a `build2` package for the [`nasm`](https://www.nasm.us) &\
 [`ndisasm`](https://www.nasm.us) executables,
an assembler & disassembler targeting the Intel
x86 series of processors, with portable source.

## Usage

To start using `nasm` and/or `ndisasm` in your project, add the following\
 build-time
`depends` value to your `manifest`, adjusting the version constraint as
appropriate:

```
depends: * nasm ^2.16.3
```

Then import the executable in your `buildfile`:

```
import! [metadata] nasm    = nasm%exe{nasm}
import! [metadata] ndisasm = nasm%exe{ndisasm}
```


## Importable targets

This package provides the following importable targets:

```
exe{nasm}
exe{ndisasm}
```

The Netwide Assembler (`nasm`) is an assembler targeting the Intel x86
series of processors, with portable source.

The Netwide Disassembler (`ndisasm`) is a small companion program to the
Netwide Assembler, NASM.

\
package-description-type: text/markdown;variant=GFM
changes:
\
The revision history has moved to the file doc/changes.src, and
is now included in the documentation as Appendix C.

\
changes-type: text/plain
url: https://github.com/netwide-assembler/nasm.git
package-url: https://github.com/build2-packaging/build2-nasm
email: nasm-bugs@nasm.us; Mailing list.
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.18.0-
depends: * bpkg >= 0.18.0-
bootstrap-build:
\
project = nasm

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

# NOTE: See outform.h for all OF_XXX options.
# OF_ONLY                -- only include specified object formats
# OF_name                -- ensure that output format 'name' is included
# OF_NO_name             -- remove output format 'name'
# OF_DOS                 -- ensure that 'obj', 'bin', 'win32' & 'win64' are\
 included.
# OF_UNIX                -- ensure that 'aout', 'aoutb', 'coff', 'elf32' &\
 'elf64' are in.
# OF_OTHERS              -- ensure that 'bin', 'as86', 'rdf' 'macho32' &\
 'macho64' are in.
# OF_ALL                 -- ensure that all formats are included.
#                           note that this doesn't include 'dbg', which is
#                           only really useful if you're doing development
#                           work on NASM. Define OF_DBG if you want this.
#
# OF_DEFAULT=of_name     -- ensure that 'name' is the default format.
config [string] config.nasm.of_default ?= bin
config [string] config.nasm.of_name    ?=
config [string] config.nasm.of_no_name ?=

config [bool]   config.nasm.of_all     ?= true
config [bool]   config.nasm.of_only    ?= false
config [bool]   config.nasm.of_dos     ?= false
config [bool]   config.nasm.of_unix    ?= false
config [bool]   config.nasm.of_others  ?= false

\
location: nasm/nasm-2.16.3.tar.gz
sha256sum: ef243aa85973cbdcbb846ff50d23974e3f19a4652f16e9dbe3eda9ea0253d6a5
:
name: plf-colony
version: 7.44.0
upstream-version: 7.4.4
summary: PLF Colony library: An unordered C++ data container providing fast\
 iteration/insertion/erasure while maintaining pointer validity to non-erased\
 elements.
license: zLib
description:
\
PLF Colony - Build2 Package
===========================

This repository is only setting up the library and it's tests to be published\
 in https://cppget.org through [Build2](http://build2.org).
We use a git submodule targetting a specific version of the library for each\
 package version.

PLF Colony
----------

 - PLF Colony: https://plflib.org/colony.htm
    - Also contain the change history at the end of the page.
 - Repository: https://github.com/mattreecebentley/plf_colony/

## Note about the separate test package:

The separate test package exists because the tests of `plf-colony v6.x`\
 depended on `plf-rand` so to avoid additional dependencies for people\
 wanting to use `plf-colony` without the tests we split it in 2 packages, the\
 test one being the one depending on `plf-rand`, while `plf-colony` does not.
However tests in versions `7.x` of `plf-colony` do NOT have any dependencies,\
 which makes the separated test package more complicated than necessary as\
 the tests could be part of the `plf-colony` package.
However, to avoid complicated changes in this repository and to allow easilly\
 re-enabling dependencies in tests in the future, we will keep the separate\
 packages as before.


Package Maintainers
-------------------

- A. Joël Lamotte - mjklaim@gmail.com
\
description-type: text/markdown;variant=GFM
doc-url: https://plflib.org/colony.htm
src-url: https://github.com/mattreecebentley/plf_colony.git
email: mattreecebentley@gmail.com
package-email: mjklaim@gmail.com
depends: * build2 >= 0.15.0
depends: * bpkg >= 0.15.0
requires: c++ >= 20
tests: plf-colony-tests == 7.44.0
builds: latest experimental
build-exclude: **clang_13**; Requires C++20 with ranges
build-exclude: **clang_14**; Requires C++20 with ranges
build-exclude: **clang_15.*_libc++**; Requires C++20 with ranges
build-exclude: **clang_16.*_libc++**; Requires `lexicographical_compare_three\
_way`
build-exclude: linux_debian_12-clang_16**; clang16 doesnt compile gcc's\
 ranges library in that config
build-exclude: linux_debian_12-clang_15_libc++; `std::ranges::distance` is\
 not implemented
build-exclude: **msvc_16.11**; Requires C++20 with ranges
bootstrap-build:
\
project = plf-colony

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp


# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target


\
location: plf-colony/plf-colony-7.44.0.tar.gz
sha256sum: 2cca8c83ba3fc428ad49163a9a7e5e1f7d09ad532bd80d06255620dc06f0b97a
:
name: plf-colony-tests
version: 7.44.0
upstream-version: 7.4.4
project: plf-colony
summary: Tests for `plf-colony`
license: zLib
description:
\
# plf-colony-tests

Tests for the `plf-colony` package.

### Note

This package exists because the tests of `plf-colony v6.x` depended on\
 `plf-rand` so to avoid additional dependencies for people wanting to use\
 `plf-colony` without the tests we split it in 2 packages, the present one\
 being the one with the tests and depending on `plf-rand`.
Versions `7.x` of `plf-colony` do NOT have any dependencies however, which\
 makes this package more complicated than necessar as the tests can be part\
 of the `plf-colony` package.
However, to avoid complicated changes in this repository and to allow easilly\
 re-enabling dependencies in tests in the future, we will keep the separate\
 packages as here for now.


\
description-type: text/markdown;variant=GFM
doc-url: https://plflib.org/colony.htm
src-url: https://github.com/mattreecebentley/plf_colony.git
email: mattreecebentley@gmail.com
package-email: mjklaim@gmail.com
depends: * build2 >= 0.15.0
depends: * bpkg >= 0.15.0
requires: c++ >= 20
builds: latest experimental
build-exclude: **clang_13**; Requires C++20 with ranges
build-exclude: **clang_14**; Requires C++20 with ranges
build-exclude: **clang_15.*_libc++**; Requires C++20 with ranges
build-exclude: **clang_16.*_libc++**; Requires `lexicographical_compare_three\
_way`
build-exclude: linux_debian_12-clang_16**; clang16 doesnt compile gcc's\
 ranges library in that config
build-exclude: linux_debian_12-clang_15_libc++; `std::ranges::distance` is\
 not implemented
build-exclude: **msvc_16.11**; Requires C++20 with ranges
bootstrap-build:
\
project = plf-colony-tests

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: plf-colony/plf-colony-tests-7.44.0.tar.gz
sha256sum: 250b01a656d3ed89a1fa0a1fe1dff1fc63be0ed7697398b60bbe6a22a65be498
:
name: PoseLib
version: 2.0.5+1
type: lib
language: c++
summary: PoseLib provides a collection of minimal solvers for camera pose\
 estimation.
license: BSD 3-Clause
description:
\
![GitHub release (latest by date)](https://img.shields.io/github/v/release/Po\
seLib/PoseLib)
[![Conan Center](https://img.shields.io/conan/v/poselib)](https://conan.io/ce\
nter/recipes/poselib)
![PyPI](https://img.shields.io/pypi/v/poselib)

# PoseLib
This library provides a collection of minimal solvers for camera pose\
 estimation. The focus is on calibrated absolute pose estimation problems\
 from different types of correspondences (e.g. point-point, point-line,\
 line-point, line-line).

The goals of this project are to provide
* Fast and robust implementation of the current state-of-the-art solvers.
* Consistent calling interface between different solvers.
* Minimize dependencies, both external (currently only [Eigen](http://eigen.t\
uxfamily.org/)) and internal. Each solver is (mostly) stand-alone, making it\
 easy to extract only a specific solver to integrate into other frameworks.
* Robust estimators (based on LO-RANSAC) that just works out-of-the-box for\
 most cases.

# Robust Estimation and Non-linear Refinement
We provide robust estimators for the most common problems
* Absolute pose from points (and lines)
* Essential / Fundamental matrix
* Homography
* Generalized relative pose

It is fairly straight-forward to implement robust estimators for other\
 problems. See for example [absolute_pose.h](PoseLib/robust/estimators/absolu\
te_pose.h). If you implement estimators for other problems, please consider\
 submitting a pull-request.

In [robust.h](PoseLib/robust.h) we provide interfaces which normalizes the\
 data, calls the RANSAC and runs a post-RANSAC non-linear refinement. It is\
 also possible to directly call the individual components as well (see e.g.\
 [ransac.h](PoseLib/robust/ransac.h), [bundle.h](PoseLib/robust/bundle.h),\
 etc.). The RANSAC is straight-forward implementation of LO-RANSAC which\
 generate hypothesis with minimal solvers and relies on non-linear refinement\
 for refitting.

The robust estimator takes the following options
```c++
struct RansacOptions {
    size_t max_iterations = 100000;
    size_t min_iterations = 1000;
    double dyn_num_trials_mult = 3.0;
    double success_prob = 0.9999;
    double max_reproj_error = 12.0;  // used for 2D-3D matches
    double max_epipolar_error = 1.0; // used for 2D-2D matches
    unsigned long seed = 0;
    // If we should use PROSAC sampling. Assumes data is sorted
    bool progressive_sampling = false;
    size_t max_prosac_iterations = 100000;
    // Whether to use real focal length checking for F estimation:\
 https://arxiv.org/abs/2311.16304
    // Assumes that principal points of both cameras are at origin.
    bool real_focal_check = false;
    // Whether to treat the input 'best_model' as an initial model and score\
 it before running the main RANSAC loop
    bool score_initial_model = false;
};
```
and the non-linear refinement 
```c++
struct BundleOptions {
    size_t max_iterations = 100;
    enum LossType {
        TRIVIAL, TRUNCATED, HUBER, CAUCHY, TRUNCATED_LE_ZACH
    } loss_type = LossType::CAUCHY;
    double loss_scale = 1.0;
    double gradient_tol = 1e-8;
    double step_tol = 1e-8;
    double initial_lambda = 1e-3;
    double min_lambda = 1e-10;
    double max_lambda = 1e10;
    bool verbose = false;
};
```
Note that in [robust.h](PoseLib/robust.h) this is only used for the\
 post-RANSAC refinement.

In [bundle.h](PoseLib/robust/bundle.h) we provide non-linear refinement for\
 different problems. Mainly minimizing reprojection error and Sampson error\
 as these performed best in our internal evaluations. These are used in the\
 LO-RANSAC to perform non-linear refitting. Most estimators directly minimize\
 the MSAC score (using `loss_type = TRUNCATED` and `loss_scale = threshold`)\
 over all input correspondences. In practice we found that this works quite\
 well and avoids recursive LO where inliers are added in steps.

## Camera models
PoseLib use [COLMAP](https://colmap.github.io/cameras.html)-compatible camera\
 models. These are defined in [colmap_models.h](PoseLib/misc/colmap_models.h)\
. Currently we only support
* SIMPLE_PINHOLE
* PINHOLE
* SIMPLE_RADIAL
* RADIAL
* OPENCV
* OPENCV_FISHEYE

but it is relatively straight-forward to add other models. If you do so\
 please consider opening a pull-request. In contrast to COLMAP, we require\
 analytical jacobians for the distortion mappings which make it a bit more\
 work to port them.

The `Camera` struct currently contains `width`/`height` fields, however these\
 are not used anywhere in the code-base and are provided simply to be\
 consistent with COLMAP. The `Camera` class also provides the helper function\
 `initialize_from_txt(str)` which initializes the camera from a line given by\
 the `cameras.txt` file of a COLMAP reconstruction. 

The python bindings also expose the `poselib.Camera` class with `focal(),\
 focal_x(), focal_y(), model_name(), prinicipal_point()` read-only methods\
 and a read-write `params` property, but currently this is only used as a\
 return type for some methods. To supply camera information to robust\
 estimators you should use python `dicts` as shown below.

## Python bindings
The python bindings can be installed by running `pip install .`. The python\
 bindings expose all minimal solvers, e.g. `poselib.p3p(x,X)`, as well as all\
 robust estimators from [robust.h](PoseLib/robust.h). 

Examples of how the robust estimators can be called are
```python
camera = {'model': 'SIMPLE_PINHOLE', 'width': 1200, 'height': 800, 'params':\
 [960, 600, 400]}

pose, info = poselib.estimate_absolute_pose(p2d, p3d, camera,\
 {'max_reproj_error': 16.0}, {})
```
or
```python
F, info = poselib.estimate_fundamental_matrix(p2d_1, p2d_2,\
 {'max_epipolar_error': 0.75, 'progressive_sampling': True}, {})

```

The return value `info` is a dict containing information about the robust\
 estimation (inliers, iterations, etc). The last two options are dicts which\
 describe the `RansacOptions` and `BundleOptions`. Ommited values are set to\
 their default (see above), except for the `loss_scale` used for the Cauchy\
 loss which is set to half of the threshold used in RANSAC (which seems to be\
 a good heuristic). Dicts with the default options can be obtained as `opt =\
 poselib.RansacOptions()` or `poselib.BundleOptions()`.



Some of the available estimators are listed below, check [pyposelib.cpp](pybi\
nd/pyposelib.cc) and [robust.h](PoseLib/robust.h) for more details. The table\
 also shows which error threshold is used in the estimation\
 (`RansacOptions.max_reproj_error` or `RansacOptions.max_epipolar_error`).\
 All thresholds are given in pixels.

| Method | Arguments | (RansacOptions) Threshold |
| --- | --- | --- |
| <sub>`estimate_absolute_pose`</sub> | <sub> `(p2d, p3d, camera, ransac_opt,\
 bundle_opt, initial_pose=None)`</sub> | <sub>`max_reproj_error` </sub> |
| <sub>`estimate_absolute_pose_pnpl`</sub> | <sub>`(p2d, p3d, l2d_1, l2d_2,\
 l3d_1, l3d_2, camera, ransac_opt, bundle_opt, initial_pose=None)` </sub> |\
 <sub>`max_reproj_error` (points), `max_epipolar_error` (lines) |
| <sub>`estimate_generalized_absolute_pose` | <sub>`(p2ds, p3ds, camera_ext,\
 cameras, ransac_opt, bundle_opt, initial_pose=None)`</sub> |\
 <sub>`max_reproj_error`</sub> |
| <sub>`estimate_relative_pose`</sub> | <sub>`(x1, x2, camera1, camera2,\
 ransac_opt, bundle_opt, initial_pose=None)`</sub> | <sub>`max_epipolar_error\
` </sub>|
| <sub>`estimate_shared_focal_relative_pose`</sub> | <sub>`(x1, x2, pp,\
 ransac_opt, bundle_opt, initial_image_pair=None)`</sub> |\
 <sub>`max_epipolar_error` </sub>|
| <sub>`estimate_fundamental`</sub> | <sub>`(x1, x2, ransac_opt, bundle_opt,\
 initial_F=None)`</sub> | <sub>`max_epipolar_error`</sub> |
| <sub>`estimate_homography`</sub> | <sub>`(x1, x2, ransac_opt, bundle_opt,\
 initial_H=None)`</sub> | <sub>`max_reproj_error`</sub> |
| <sub>`estimate_generalized_relative_pose`</sub> | <sub>`(matches,\
 camera1_ext, cameras1, camera2_ext, cameras2, ransac_opt, bundle_opt,\
 initial_pose=None)`</sub> | <sub>`max_epipolar_error`</sub> |

### Storing poses and estimated camera parameters
To handle poses and cameras we provide the following classes: 

- `CameraPose`: This class is the return type for the most of the methods.\
 While the class internally represent the pose with `q` and `t`, it also\
 exposes `R` (3x3) and `Rt` (3x4) which are read/write, i.e. you can do\
 `pose.R = Rnew` and it will update the underlying quaternion `q`.
- `Image`: Following COLMAP, this class stores information about the camera\
 (`image.camera`) and its pose (`image.pose`) used to take an image.
- `ImagePair`: This class holds information about two cameras\
 (`image_pair.camera1`, `image_pair.camera2`) and their relative pose\
 (`image_pair.pose`). This class is used as the return type for the\
 `estimate_shared_focal_relative_pose` robust estimator.

All of these are also exposed via python bindings as: `poselib.CameraPose,\
 poselib.Image, poselib.ImagePair`.

### Benchmarking the robust estimators
To sanity-check the robust estimators we benchmark against the LO-RANSAC\
 implementation from [pycolmap](https://github.com/colmap/pycolmap).
    
<a href="https://user-images.githubusercontent.com/48490995/149815304-b3c1049\
a-ee64-4c14-be60-d4930535a3e7.png"><img src="https://user-images.githubuserco\
ntent.com/48490995/149815304-b3c1049a-ee64-4c14-be60-d4930535a3e7.png"\
 width="75%"></a>
    
For all of the metrics higher is better (except for runtime).

# Minimal Solvers
## Naming convention
For the solver names we use a slightly non-standard notation where we denote\
 the solver as

<pre>
p<b><i>X</i></b>p<b><i>Y</i></b>pl<b><i>Z</i></b>lp<b><i>W</i></b>ll
</pre>

where the number of correspondences required is given by
* <b><i>X</i></b>p - 2D point to 3D point,
* <b><i>Y</i></b>pl - 2D point to 3D line,
* <b><i>Z</i></b>lp - 2D line to 3D point,
* <b><i>W</i></b>ll - 2D line to 3D line.

The prefix with `u` is for upright solvers and  `g` for generalized camera\
 solvers. Solvers that estimate focal length have the postfix with `f` and\
 similarly `s` for solvers that estimate scale.

## Calling conventions
All solvers return their solutions as a vector of `CameraPose` structs, which\
 defined as
```c++
struct CameraPose {
   Eigen::Vector4d q;
   Eigen::Vector3d t;
};
```
where the rotation is representation as a quaternion `q` and the convention\
 is that `[R t]` maps from the world coordinate system into the camera\
 coordinate system.


For <b>2D point to 3D point</b> correspondences, the image points are\
 represented as unit-length bearings vectors. The returned camera poses\
 `(R,t)` then satisfies (for some `lambda`)
```c++
  lambda * x[i] = R * X[i] + t
```
where `x[i]` is the 2D point and `X[i]` is the 3D point.
<b>Note</b> that only the P3P solver filters solutions with negative `lambda`.

Solvers that use point-to-point constraints take one vector with bearing\
 vectors `x` and one vector with the corresponding 3D points `X`, e.g. for\
 the P3P solver the function declaration is

```c++
int p3p(const std::vector<Eigen::Vector3d> &x,
        const std::vector<Eigen::Vector3d> &X,
        std::vector<CameraPose> *output);
```
Each solver returns the number of real solutions found.

For constraints with <b>2D lines</b>, the lines are represented in\
 homogeneous coordinates. In the case of 2D line to 3D point constraints, the\
 returned camera poses then satisfies
```c++
  l[i].transpose() * (R * X[i] + t) = 0
```
where `l[i]` is the line and  `X[i]` is the 3D point.

For constraints with <b>3D lines</b>, the lines are represented by a 3D point\
 `X` and a bearing vector `V`. In the case of 2D point to 3D point constraints
```c++
  lambda * x[i] = R * (X[i] + mu * V[i]) + t
```
for some values of `lambda` and `mu`. Similarly, for line to line constraints\
 we have
```c++
  l[i].transpose() * (R * (X[i] + mu * V[i]) + t) = 0
```
### Generalized Cameras
For generalized cameras we represent the image rays similarly to the 3D lines\
 above, with an offset `p` and a bearing vector `x`. For example, in the case\
 of point-to-point correspondences we have
```c++
p[i] + lambda * x[i] = R * X[i] + t
```
In the case of unknown scale we also estimate `alpha` such that
```c++
alpha * p[i] + lambda * x[i] = R * X[i] + t
```
For example, the generalized pose and scale solver (from four points) has the\
 following signature
```c++
 int gp4ps(const std::vector<Eigen::Vector3d> &p, const std::vector<Eigen::Ve\
ctor3d> &x,
              const std::vector<Eigen::Vector3d> &X, std::vector<CameraPose>\
 *output);
```

### Upright Solvers
For the upright solvers it assumed that the rotation is around the y-axis,\
 i.e.
```c++
R = [a 0 -b; 0 1 0; b 0 a] 
```
To use these solvers it necessary to pre-rotate the input such that this is\
 satisfied.

## Implemented solvers
The following solvers are currently implemented.

### Absolute Pose
| Solver | Point-Point | Point-Line | Line-Point | Line-Line | Upright |\
 Generalized | Approx. runtime | Max. solutions | Comment |
| --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | --- |
| `p3p` | 3 | 0 | 0| 0|  |  | 250 ns | 4 | Ding et al., (CVPR23) |
| `gp3p` | 3 | 0 | 0| 0|  | :heavy_check_mark:  | 1.6 us | 8 | Kukelova et\
 al., E3Q3 (CVPR16) |
| `gp4ps` | 4 | 0 | 0| 0|  | :heavy_check_mark: | 1.8 us | 8 | Unknown\
 scale.<br> Kukelova et al., E3Q3 (CVPR16)<br>Camposeco et al.(ECCV16) |
| `p4pf` | 4 | 0 | 0| 0|  |  | 2.3 us | 8 | Unknown focal length.<br>\
 Kukelova et al., E3Q3 (CVPR16) |
| `p2p2pl` | 2 | 2 | 0| 0|  |  | 30 us | 16 | Josephson et al. (CVPR07) |
| `p6lp` | 0 | 0 | 6|  0| |  | 1.8 us | 8 | Kukelova et al., E3Q3 (CVPR16)  |
| `p5lp_radial` | 0 | 0 | 5|  0| |  | 1 us | 4 | Kukelova et al., (ICCV13)  |
| `p2p1ll` | 2 | 0 | 0 |  1| |  | 1.6 us | 8 | Kukelova et al., E3Q3\
 (CVPR16), Zhou et al. (ACCV18)  |
| `p1p2ll` | 1 | 0 | 0 |  2| |  | 1.7 us | 8 | Kukelova et al., E3Q3\
 (CVPR16), Zhou et al. (ACCV18)  |
| `p3ll` | 0 | 0 | 0 |  3| |  | 1.8 us | 8 | Kukelova et al., E3Q3 (CVPR16),\
 Zhou et al. (ACCV18)  |
| `up2p` | 2 | 0 | 0| 0| :heavy_check_mark: |  | 65 ns | 2 | Kukelova et al.\
 (ACCV10) |
| `ugp2p` | 2 | 0 | 0| 0| :heavy_check_mark: | :heavy_check_mark: | 65 ns | 2\
 | Adapted from Kukelova et al. (ACCV10)   |
| `ugp3ps` | 3 | 0 | 0| 0| :heavy_check_mark: | :heavy_check_mark: | 390 ns |\
 2 | Unknown scale. Adapted from Kukelova et al. (ACCV10)  |
| `up1p2pl` | 1 | 2 | 0| 0| :heavy_check_mark: |  | 370 ns | 4 |  |
| `up4pl` | 0 | 4 | 0| 0| :heavy_check_mark: |  | 1.4 us | 8 | Sweeney et al.\
 (3DV14) |
| `ugp4pl` | 0 | 4 | 0| 0| :heavy_check_mark: | :heavy_check_mark: | 1.4 us |\
 8 | Sweeney et al. (3DV14) |


### Relative Pose
| Solver | Point-Point | Upright | Planar | Generalized | Approx. runtime |\
 Max. solutions | Comment |
| --- | :---: | :---: | :---: | :---: | :---: | :---: | --- |
| `relpose_5pt` | 5 | | | | 5.5 us | 10 | Nister (PAMI 2004) |
| `relpose_8pt` | 8+ | | | | 2.2+ us | 1 |  |
| `relpose_upright_3pt` | 3 | :heavy_check_mark: | | | 210 ns | 4 | Ding et\
 al., (CVPR23)  | 
| `gen_relpose_upright_4pt` | 4 | :heavy_check_mark: | | :heavy_check_mark: \
 | 1.2 us | 6 | Sweeney et al. (3DV14)  | 
| `relpose_upright_planar_2pt` | 2 | :heavy_check_mark: | :heavy_check_mark:\
 | | 120 ns | 2 | Choi and Kim (IVC 2018)  | 
| `relpose_upright_planar_3pt` | 3 | :heavy_check_mark: | :heavy_check_mark:\
 | | 300 ns | 1 |  Choi and Kim (IVC 2018) | 
| `gen_relpose_5p1pt` | 5+1 |  | | :heavy_check_mark:  | 5.5 us | 10 | E +\
 1pt to fix scale  | 
| `relpose_6pt_shared_focal` | 6 |  | | | 33 us | 15 | Stewénius et al. (IVC\
 2008) |


## Decompositions

Poselib also provides methods and python bindings for decomposing fundamental\
 matrices to obtain the focal lengths of the cameras and a method for\
 decomposition of homography to poses and plane normals.

| Method | Arguments | Output | Comment |
|---|:---:|:---:|:---:|
| <sub>`focals_from_fundamental` </sub> | <sub>`(F, pp1, pp2)`</sub> |\
 <sub>`(cam1, cam2)`</sub> | Bougnoux (ICCV 1998) |
| <sub>`focals_from_fundamental_iterative`</sub> | <sub>`(F, cam1_prior,\
 cam2_prior, max_iters = 50, weights = {5e-4, 1.0, 5e-4, 1.0})`</sub> |\
 <sub>`(cam1, cam2, iters)`</sub> | Kocur et al. (CVPR 2024) |
| <sub>`motion_from_homography`</sub> | <sub>`(H)`</sub> | <sub>`(poses,\
 normals)`</sub> | Adapted from Ma et al. (Springer 2004) |

To obtain the focal lengths from the camera object you can use `focal =\
 cam.focal()`. Note that both focal length methods can produce very\
 inaccurate results and fail often such that the output focal lengths can be\
 NaNs or negative numbers. If you need to estimate a focal length shared by\
 both cameras (e.g. the same camera in both views) you should use\
 `estimate_shared_focal_relative_pose`.

If you use H obtained using correspondences in image coordinates from two\
 cameras you need to use `K2_inv * H * K1` as input to `motion_from_homograph\
y`.

## How to compile?

Getting the code:

    > git clone --recursive https://github.com/vlarsson/PoseLib.git
    > cd PoseLib

Example of a local installation:

    > mkdir _build && cd _build
    > cmake -DCMAKE_INSTALL_PREFIX=../_install ..
    > cmake --build . --target install -j 8
      (equivalent to  'make install -j8' in linux)

Installed files:

    > tree ../_install
      .
      ├── bin
      │   └── benchmark
      ├── include
      │   └── PoseLib
      │       ├── solvers/gp3p.h
      │       ├──  ...
      │       ├── poselib.h          <==  Library header (includes all the\
 rest)
      │       ├──  ...
      │       └── version.h
      └── lib
          ├── cmake
          │   └── PoseLib
          │       ├── PoseLibConfig.cmake
          │       ├── PoseLibConfigVersion.cmake
          │       ├── PoseLibTargets.cmake
          │       └── PoseLibTargets-release.cmake
          └── libPoseLib.a

Uninstall library:

    > make uninstall

## Installation

### Installing PoseLib using Conan

You can install pre-built binaries for PoseLib or build it from source using
[Conan](https://conan.io/). Use the following command:

```bash
conan install --requires="poselib/[*]" --build=missing
```

The PoseLib Conan recipe is kept up to date by Conan maintainers and community
contributors. If the version is out of date, please
[create an issue or pull request](https://github.com/conan-io/conan-center-in\
dex)
on the ConanCenterIndex repository.

## Benchmark

Conditional compilation of `benchmark` binary is controlled by\
 `WITH_BENCHMARK` option. Default if OFF (without benchmark).

Add `-DWITH_BENCHMARK=ON` to cmake to activate.

    > cmake -DWITH_BENCHMARK=ON ..



## Use library (as dependency) in an external project.

    cmake_minimum_required(VERSION 3.13)
    project(Foo)

    find_package(PoseLib REQUIRED)

    add_executable(foo foo.cpp)
    target_link_libraries(foo PRIVATE PoseLib::PoseLib)


## Citing
If you are using the library for (scientific) publications, please cite the\
 following source:
```
@misc{PoseLib,
  title = {{PoseLib - Minimal Solvers for Camera Pose Estimation}},
  author = {Viktor Larsson and contributors},
  URL = {https://github.com/vlarsson/PoseLib},
  year = {2020}
}
```
Please cite also the original publications of the different methods (see\
 table above).

## Changelog

2.0.4 - Aug 5th 2024
* Added implementation of OpenCVFisheye camera model
* Bumped pybind11 version which seems to fix some crashes
* Added cmake option to disable -march=native

2.0.3 - Jul. 2024
* Added decomposition methods for estimation of focal lengths from\
 fundamental matrices

2.0.2 - Apr. 2024
* Added solver and robust estimator for 6p relative pose with unknown shared\
 focal length
* Added Image, ImagePair classes with python bindings
* Exposed Camera via python bindings

2.0.1 - Sep. 2023
* Refactor pybind such that `pip install .` works. Moved pybind11 to\
 submodule.
* C++ alignment fixes. Should now work with Eigen 3.3 and the header should\
 be COLMAP compatible.

2.0 - Jan. 2022
* Added robust estimators (LO-RANSAC) and non-linear refinement
* Refactored CameraPose to use quaternion instead 3x3 matrix. Removed alpha.
* Implemented TR-IRLS  method from Le and Zach (3DV 2021)
* Restructured pybind11 interface
* Added support for PROSAC sampling
* Many minor fixes and improvements....

1.0 - Jan. 2020
* Initial release

## License
PoseLib is licensed under the BSD 3-Clause license. Please see\
 [License](https://github.com/vlarsson/PoseLib/blob/master/LICENSE) for\
 details.

## Acknowledgements
The RANSAC implementation is heavily inspired by [RansacLib](https://github.c\
om/tsattler/RansacLib) from Torsten Sattler.

\
description-type: text/markdown;variant=GFM
url: https://github.com/PoseLib/PoseLib
email: Emil.Rosenquist@gmail.com
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: Eigen ^3.4.0
builds: default
build-include: *-msvc*-static*
build-exclude: *-*msvc**; Builds only as static lib with msvc.
bootstrap-build:
\
project = PoseLib

using version
using config
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

using in

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cc

\
location: PoseLib/PoseLib-2.0.5+1.tar.gz
sha256sum: 3582b744715c6faf0b73088929fb6a642a972566dae4b12d027372015b86d996
:
name: PoseLib-benchmark
version: 2.0.5+1
language: c++
project: PoseLib
summary: PoseLib-benchmark C++ executable
license: BSD 3-Clause
description:
\
# PoseLib-benchmark - An executable

The `PoseLib-benchmark` executable is a <SUMMARY-OF-FUNCTIONALITY>.

Note that the `PoseLib-benchmark` executable in this package provides\
 `build2` metadata.


## Usage

To start using `PoseLib-benchmark` in your project, add the following\
 build-time
`depends` value to your `manifest`, adjusting the version constraint as
appropriate:

```
depends: * PoseLib-benchmark ^<VERSION>
```

Then import the executable in your `buildfile`:

```
import! [metadata] <TARGET> = PoseLib-benchmark%exe{<TARGET>}
```


## Importable targets

This package provides the following importable targets:

```
exe{<TARGET>}
```

<DESCRIPTION-OF-IMPORTABLE-TARGETS>


## Configuration variables

This package provides the following configuration variables:

```
[bool] config.PoseLib_benchmark.<VARIABLE> ?= false
```

<DESCRIPTION-OF-CONFIG-VARIABLES>

\
description-type: text/markdown;variant=GFM
url: https://github.com/PoseLib/PoseLib
email: Emil.Rosenquist@gmail.com
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
depends: PoseLib == 2.0.5
builds: default
build-include: *-msvc*-static*
build-exclude: *-*msvc**; Builds only as static lib with msvc.
bootstrap-build:
\
project = PoseLib-benchmark

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cc

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: PoseLib/PoseLib-benchmark-2.0.5+1.tar.gz
sha256sum: 215315b668917aaa93f9a31244a74b5f7f995837003cd59b010c321f30c4b5f5
:
name: sol2
version: 3.3.1+2
type: lib,binless
language: c++
project: sol2
summary: C++ library binding to Lua
license: MIT
description:
\
# sol2

[![Documentation Status](https://readthedocs.org/projects/sol2/badge/?version\
=latest)](http://sol2.readthedocs.io/en/latest/?badge=latest)



sol2 is a C++ library binding to Lua. It currently supports all Lua versions\
 5.1+ (LuaJIT 2.0+ and MoonJIT included). sol2 aims to be easy to use and\
 easy to add to a project. The library is header-only for easy integration\
 with projects, and a single header can be used for drag-and-drop start up.



## Sneak Peek

```cpp
#include <sol/sol.hpp>
#include <cassert>

int main() {
    sol::state lua;
    int x = 0;
    lua.set_function("beep", [&x]{ ++x; });
    lua.script("beep()");
    assert(x == 1);
}
```

```cpp
#include <sol/sol.hpp>
#include <cassert>

struct vars {
    int boop = 0;
};

int main() {
    sol::state lua;
    lua.new_usertype<vars>("vars", "boop", &vars::boop);
    lua.script("beep = vars.new()\n"
               "beep.boop = 1");
    assert(lua.get<vars>("beep").boop == 1);
}
```

More examples are given in the examples directory [here](https://github.com/T\
hePhD/sol2/tree/develop/examples). 


## Documentation

Find it [here](http://sol2.rtfd.io/). A run-through kind of tutorial is\
 [here](http://sol2.readthedocs.io/en/latest/tutorial/all-the-things.html)!\
 The API documentation goes over most cases (particularly, the "api/usertype"\
 and "api/table_proxy" and "api/function" sections) that should still get you\
 off your feet and going, and there's an examples directory\
 [here](https://github.com/ThePhD/sol2/tree/develop/examples) as well.




# "I need X Feature or Fix, Right Now™"

Find the support option that's right for you, [here](https://github.com/ThePh\
D/.github/blob/main/SUPPORT.md)! If you're happy to wait, you can just file a\
 boring issue and we'll get to it Whenever There Is Time™.



## I want to donate to help!

You can find [donation and sponorship options here](https://github.com/ThePhD\
/.github/blob/main/SUPPORT.md#support-in-general) and from the little heart\
 button near the top of this repository that will take you to a bevy of links\
 in which you can donate and show support for this project and others!




# Features

- [Fastest in the land](http://sol2.readthedocs.io/en/latest/benchmarks.html)\
 (see: sol2 bar in graph).
- Supports retrieval and setting of multiple types including: 
  * `std::string`, `std::wstring`, `std::u16string` and `std::u32string`\
 support (and for views).
  * understands and works with containers such as `std::map/unordered_map`,\
 c-style arrays, vectors, non-standard custom containers and more.
  * user-defined types, with or **without** registering that type 
  * `std::unique_ptr`, `std::shared_ptr`, and optional support of other\
 pointer types like `boost::shared_ptr`.
  * custom `optional<T>` that works with references, and support for the\
 inferior `std::optional`.
  * C++17 support for variants and similar new types.
- Lambda, function, and member function bindings are supported.
- Intermediate type for checking if a variable exists.
- Simple API that completely abstracts away the C stack API, including\
 `protected_function` with the ability to use an error-handling function.
- `operator[]`-style manipulation of tables
- C++ type representations in Lua userdata as `usertype`s with guaranteed\
 cleanup.
- Customization points to allow your C++ objects to be pushed and retrieved\
 from Lua as multiple consecutive objects, or anything else you desire!
- Overloaded function calls: `my_function(1); my_function("Hello")` in the\
 same Lua script route to different function calls based on parameters
- Support for tables, nested tables, table iteration with `table.for_each` /\
 `begin()` and `end()` iterators.
- Zero string overhead for usertype function lookup.



## Supported Compilers

sol2 makes use of C++17 features. GCC 7.x.x and Clang 3.9.x (with\
 `-std=c++1z` and appropriate standard library) or higher should be able to\
 compile without problems. However, the officially supported and CI-tested\
 compilers are:

- GCC 7.x.x+ (MinGW 7.x.x+)
- Clang 3.9.x+
- Visual Studio 2017 Community (Visual C++ 15.0)+

Please make sure you use the `-std=c++2a`, `-std=c++1z`, `-std=c++17` or\
 better standard flags 
(some of these flags are the defaults in later versions of GCC, such as 7+\
 and better).

If you would like support for an older compiler (at the cost of some\
 features), use the latest tagged sol2 branch. If you would like support for\
 an even older compiler, feel free to contact me for a Custom Solution.

sol2 is checked by-hand for other platforms as well, including Android-based\
 builds with GCC and iOS-based builds out of XCode with Apple-clang. It\
 should work on both of these platforms, so long as you have the proper\
 standards flags. If something doesn't work or you need special options, you\
 may need to look into the different ways to support the project to have it\
 done for you!



## Creating a single header

You can grab a single header (and the single forward header) out of the\
 library [here](https://github.com/ThePhD/sol2/tree/develop/single). For\
 stable version, check the releases tab on GitHub for a provided single\
 header file for maximum ease of use. A script called [`single.py`](https://g\
ithub.com/ThePhD/sol2/blob/develop/single/single.py) is provided in the\
 repository if there's some bleeding edge change that hasn't been published\
 on the releases page. You can run this script to create a single file\
 version of the library so you can only include that part of it. Check\
 `single.py --help` for more info.

If you use CMake, you can also configure and generate a project that will\
 generate the `sol2_single_header` for you. You can also include the project\
 using CMake. Run CMake for more details. Thanks @Nava2, @alkino,\
 @mrgreywater and others for help with making the CMake build a reality.




# Testing

Testing turns on certain CI-only variables in the CMake to test a myriad of\
 configuration options. You can generate the tests by running CMake and\
 configuring `SOL2_TESTS`, `SOL2_TESTS_SINGLE`, `SOL2_TESTS_EXAMPLES`, and\
 `SOL2_EXAMPLES` to be on. Make sure `SOL2_SINGLE` is also on.

You will need any flavor of python3 and an available compiler. The testing\
 suite will build its own version of Lua and LuaJIT, so you do not have to\
 provide one (you may provide one with the `LUA_LOCAL_DIR` variable).



# Presentations

"A Sun For the Moon - A Zero-Overhead Lua Abstraction using C++"  
ThePhD
Lua Workshop 2016 - Mashape, San Francisco, CA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2016.10\
.14%20-%20ThePhD%20-%20No%20Overhead%20C%20Abstraction.pdf)

"Wrapping Lua C in C++ - Efficiently, Nicely, and with a Touch of Magic"  
ThePhD
Boston C++ Meetup November 2017 - CiC (Milk Street), Boston, MA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2017.11\
.08%20-%20ThePhD%20-%20Wrapping%20Lua%20C%20in%20C%2B%2B.pdf)

"Biting the CMake Bullet"  
ThePhD
Boston C++ Meetup February 2018 - CiC (Main Street), Cambridge, MA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.02\
.06%20-%20ThePhD%20-%20Biting%20the%20CMake%20Bullet.pdf)

"Compile Fast, Run Faster, Scale Forever: A look into the sol2 Library"  
ThePhD
C++Now 2018 - Hudson Commons, Aspen Physics Center, Aspen, Colorado  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.05\
.10%20-%20ThePhD%20-%20Compile%20Fast%2C%20Run%20Faster%2C%20Scale%20Forever.\
pdf)

"Scripting at the Speed of Thought: Using Lua in C++ with sol2"  
ThePhD
CppCon 2018 - 404 Keystone, Meydenbauer Center, Aspen, Colorado  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.09\
.28%20-%20ThePhD%20-%20Scripting%20at%20the%20Speed%20of%20Thought.pdf)

"The Plan for Tomorrow: Compile-Time Extension Points in C++"
ThePhD
C++Now 2019 - Flug Auditorium, Aspen Physics Center, Aspen, Colorado
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2019.05\
.10%20-%20ThePhD%20-%20The%20Plan%20for%20Tomorrow%20-%20Compile-Time%20Exten\
sion%20Points%20in%20C%2b%2b.pdf)




# License

sol2 is distributed with an MIT License. You can see LICENSE.txt for more\
 info.

If you need a custom solution, [feel free to reach out](https://soasis.org/co\
ntact/opensource/).

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for Sol2/3

This project is a [build2](https://build2.org) package repository that\
 provides access to [Sol2/3](https://github.com/ThePhD/sol2), a C++ library\
 binding to Lua.

[![Official](https://img.shields.io/website/https/github.com/ThePhD/sol2.svg?\
down_message=offline&label=Official&style=for-the-badge&up_color=blue&up_mess\
age=online)](https://github.com/ThePhD/sol2)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/s\
ol2.svg?down_message=offline&label=build2&style=for-the-badge&up_color=blue&u\
p_message=online)](https://github.com/build2-packaging/sol2)
[![cppget.org](https://img.shields.io/website/https/cppget.org/sol2.svg?down_\
message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_message\
=online)](https://cppget.org/sol2)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/so\
l2.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=for-th\
e-badge&up_color=orange&up_message=running)](https://queue.cppget.org/sol2)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch the package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/sol2.git

Add the respective dependency in your project's `manifest` file to make the\
 package available for import.

    depends: sol2 ^3.3.1

Then use the following line in your `buildfile` to import the library.

    import sol2 = sol2%lib{sol2}

## Configuration
There are no configuration options available.

## Issues and Notes
- So far, preprocessor directives are not provided as configuration variables\
 to allow for dependency negotiation and API/API-compatible builds.\
 Consistent library configuration across multiple packages must be ensured by\
 the consumer itself.
- The `sol2-tests` package is currently provided as an independent test\
 package that depends on `sol2` to reduce false-negative compilation results.\
 The tests require the Catch2 library which currently doesn't build with\
 Clang.
- The `sol2-examples` package that compiles and runs the basic examples from\
 sol2's documentation and tutorials is declared as an example package of\
 `sol2` and is also used for testing. While it does not require any other\
 dependencies, it still is provided as an external package to reduce the size\
 of the overall `sol2` package archive.
- Currently, upstream omits the run time tests directory as these are not\
 working. For the next release, check whether these tests are enabled again.
- So far, examples in `customization` and `interop` are not included in the\
 `sol2-examples` package.
- According to [sol2/issues/1581](https://github.com/ThePhD/sol2/issues/1581)\
, a bug in Clang 18 prevents the tests and examples from being successfully\
 compiled in Clang-based target configurations. The issue's workaround has\
 been applied to `sol/function_types_stateless.hpp` with the original file\
 located at `sol/function_types_stateless.hpp.orig`. A future release of\
 Clang or Sol2 may fix this issue.
- Sol2 also supports LuaJIT. However, LuaJIT is currently not offered as a\
 build2 package by `cppget.org` and, as a consequence, cannot be used with\
 this package.

## Contributing
Thank you in advance for your help and contribution to keep this package\
 up-to-date.
Please, file an issue on [GitHub](https://github.com/build2-packaging/sol2/is\
sues) for questions, bug reports, or to recommend updating the package\
 version.
If you're making a pull request to fix bugs or update the package version\
 yourself, refer to the [`build2` Packaging Guidelines](https://build2.org/bu\
ild2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management).

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/ThePhD/sol2
doc-url: https://sol2.readthedocs.io/en/latest/
src-url: https://github.com/ThePhD/sol2
package-url: https://github.com/build2-packaging/sol2
email: phdofthehouse@gmail.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: lua ^5.1.0
examples: sol2-examples == 3.3.1
bootstrap-build:
\
project = sol2

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.std = latest

using cxx
using c

h{*}: extension = h

hxx{*}: extension = hpp
cxx{*}: extension = cpp

hxx{*}: cxx.importable = false

test.target = $cxx.target

\
location: sol2/sol2-3.3.1+2.tar.gz
sha256sum: ca9c93d85bb68aabff9c50ca844517341ebe8304f5b46f03ac5f9aca34c1e9a8
:
name: sol2
version: 3.5.0+3
type: lib,binless
language: c++
project: sol2
summary: C++ library binding to Lua
license: MIT
description:
\
# sol2

[![Documentation Status](https://readthedocs.org/projects/sol2/badge/?version\
=latest)](http://sol2.readthedocs.io/en/latest/?badge=latest)



sol2 is a C++ library binding to Lua. It currently supports all Lua versions\
 5.1+ (LuaJIT 2.0+ and MoonJIT included). sol2 aims to be easy to use and\
 easy to add to a project. The library is header-only for easy integration\
 with projects, and a single header can be used for drag-and-drop start up.



## Sneak Peek

```cpp
#include <sol/sol.hpp>
#include <cassert>

int main() {
    sol::state lua;
    int x = 0;
    lua.set_function("beep", [&x]{ ++x; });
    lua.script("beep()");
    assert(x == 1);
}
```

```cpp
#include <sol/sol.hpp>
#include <cassert>

struct vars {
    int boop = 0;
};

int main() {
    sol::state lua;
    lua.new_usertype<vars>("vars", "boop", &vars::boop);
    lua.script("beep = vars.new()\n"
               "beep.boop = 1");
    assert(lua.get<vars>("beep").boop == 1);
}
```

More examples are given in the examples directory [here](https://github.com/T\
hePhD/sol2/tree/develop/examples). 


## Documentation

Find it [here](http://sol2.rtfd.io/). A run-through kind of tutorial is\
 [here](http://sol2.readthedocs.io/en/latest/tutorial/all-the-things.html)!\
 The API documentation goes over most cases (particularly, the "api/usertype"\
 and "api/table_proxy" and "api/function" sections) that should still get you\
 off your feet and going, and there's an examples directory\
 [here](https://github.com/ThePhD/sol2/tree/develop/examples) as well.




# "I need X Feature or Fix, Right Now™"

Find the support option that's right for you, [here](https://github.com/ThePh\
D/.github/blob/main/SUPPORT.md)! If you're happy to wait, you can just file a\
 boring issue and we'll get to it Whenever There Is Time™.



## I want to donate to help!

You can find [donation and sponorship options here](https://github.com/ThePhD\
/.github/blob/main/SUPPORT.md#support-in-general) and from the little heart\
 button near the top of this repository that will take you to a bevy of links\
 in which you can donate and show support for this project and others!




# Features

- [Fastest in the land](http://sol2.readthedocs.io/en/latest/benchmarks.html)\
 (see: sol2 bar in graph).
- Supports retrieval and setting of multiple types including: 
  * `std::string`, `std::wstring`, `std::u16string` and `std::u32string`\
 support (and for views).
  * understands and works with containers such as `std::map/unordered_map`,\
 c-style arrays, vectors, non-standard custom containers and more.
  * user-defined types, with or **without** registering that type 
  * `std::unique_ptr`, `std::shared_ptr`, and optional support of other\
 pointer types like `boost::shared_ptr`.
  * custom `optional<T>` that works with references, and support for the\
 inferior `std::optional`.
  * C++17 support for variants and similar new types.
- Lambda, function, and member function bindings are supported.
- Intermediate type for checking if a variable exists.
- Simple API that completely abstracts away the C stack API, including\
 `protected_function` with the ability to use an error-handling function.
- `operator[]`-style manipulation of tables
- C++ type representations in Lua userdata as `usertype`s with guaranteed\
 cleanup.
- Customization points to allow your C++ objects to be pushed and retrieved\
 from Lua as multiple consecutive objects, or anything else you desire!
- Overloaded function calls: `my_function(1); my_function("Hello")` in the\
 same Lua script route to different function calls based on parameters
- Support for tables, nested tables, table iteration with `table.for_each` /\
 `begin()` and `end()` iterators.
- Zero string overhead for usertype function lookup.



## Supported Compilers

sol2 makes use of C++17 features. GCC 7.x.x and Clang 3.9.x (with\
 `-std=c++1z` and appropriate standard library) or higher should be able to\
 compile without problems. However, the officially supported and CI-tested\
 compilers are:

- GCC 7.x.x+ (MinGW 7.x.x+)
- Clang 3.9.x+
- Visual Studio 2017 Community (Visual C++ 15.0)+

Please make sure you use the `-std=c++2a`, `-std=c++1z`, `-std=c++17` or\
 better standard flags 
(some of these flags are the defaults in later versions of GCC, such as 7+\
 and better).

If you would like support for an older compiler (at the cost of some\
 features), use the latest tagged sol2 branch. If you would like support for\
 an even older compiler, feel free to contact me for a Custom Solution.

sol2 is checked by-hand for other platforms as well, including Android-based\
 builds with GCC and iOS-based builds out of XCode with Apple-clang. It\
 should work on both of these platforms, so long as you have the proper\
 standards flags. If something doesn't work or you need special options, you\
 may need to look into the different ways to support the project to have it\
 done for you!



## Creating a single header

You can grab a single header (and the single forward header) out of the\
 library [here](https://github.com/ThePhD/sol2/tree/develop/single). For\
 stable version, check the releases tab on GitHub for a provided single\
 header file for maximum ease of use. A script called [`single.py`](https://g\
ithub.com/ThePhD/sol2/blob/develop/single/single.py) is provided in the\
 repository if there's some bleeding edge change that hasn't been published\
 on the releases page. You can run this script to create a single file\
 version of the library so you can only include that part of it. Check\
 `single.py --help` for more info.

If you use CMake, you can also configure and generate a project that will\
 generate the `sol2_single_header` for you. You can also include the project\
 using CMake. Run CMake for more details. Thanks @Nava2, @alkino,\
 @mrgreywater and others for help with making the CMake build a reality.




# Testing

Testing turns on certain CI-only variables in the CMake to test a myriad of\
 configuration options. You can generate the tests by running CMake and\
 configuring `SOL2_TESTS`, `SOL2_TESTS_SINGLE`, `SOL2_TESTS_EXAMPLES`, and\
 `SOL2_EXAMPLES` to be on. Make sure `SOL2_SINGLE` is also on.

You will need any flavor of python3 and an available compiler. The testing\
 suite will build its own version of Lua and LuaJIT, so you do not have to\
 provide one (you may provide one with the `LUA_LOCAL_DIR` variable).



# Presentations

"A Sun For the Moon - A Zero-Overhead Lua Abstraction using C++"  
ThePhD
Lua Workshop 2016 - Mashape, San Francisco, CA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2016.10\
.14%20-%20ThePhD%20-%20No%20Overhead%20C%20Abstraction.pdf)

"Wrapping Lua C in C++ - Efficiently, Nicely, and with a Touch of Magic"  
ThePhD
Boston C++ Meetup November 2017 - CiC (Milk Street), Boston, MA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2017.11\
.08%20-%20ThePhD%20-%20Wrapping%20Lua%20C%20in%20C%2B%2B.pdf)

"Biting the CMake Bullet"  
ThePhD
Boston C++ Meetup February 2018 - CiC (Main Street), Cambridge, MA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.02\
.06%20-%20ThePhD%20-%20Biting%20the%20CMake%20Bullet.pdf)

"Compile Fast, Run Faster, Scale Forever: A look into the sol2 Library"  
ThePhD
C++Now 2018 - Hudson Commons, Aspen Physics Center, Aspen, Colorado  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.05\
.10%20-%20ThePhD%20-%20Compile%20Fast%2C%20Run%20Faster%2C%20Scale%20Forever.\
pdf)

"Scripting at the Speed of Thought: Using Lua in C++ with sol2"  
ThePhD
CppCon 2018 - 404 Keystone, Meydenbauer Center, Aspen, Colorado  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.09\
.28%20-%20ThePhD%20-%20Scripting%20at%20the%20Speed%20of%20Thought.pdf)

"The Plan for Tomorrow: Compile-Time Extension Points in C++"
ThePhD
C++Now 2019 - Flug Auditorium, Aspen Physics Center, Aspen, Colorado
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2019.05\
.10%20-%20ThePhD%20-%20The%20Plan%20for%20Tomorrow%20-%20Compile-Time%20Exten\
sion%20Points%20in%20C%2b%2b.pdf)




# License

sol2 is distributed with an MIT License. You can see LICENSE.txt for more\
 info.

If you need a custom solution, [feel free to reach out](https://soasis.org/co\
ntact/opensource/).

\
description-type: text/markdown;variant=GFM
package-description:
\
# sol2 - C++ Library Binding to Lua

This is the `build2` package for the sol2 library.
sol2 is a C++ library binding to Lua that aims to be easy to use and easy to\
 add to a project.

## Usage
To use `sol2` in your project, add the following configurations to the\
 respective files after you have gained access to a `build2` package\
 repository that contains it.

### `manifest`
To make `sol2` available for import, add the following dependency to the\
 `manifest` of each package in your project that requires it, adjusting the\
 version constraint as appropriate.

    depends: sol2 ^3.5.0

### `buildfile`
To import the contained library, use the following declaration in your\
 `buildfile`.

    import sol2 = sol2%lib{sol2}

For maximum safety and consistency, define the `SOL_ALL_SAFETIES_ON` macro\
 for any target that uses sol2.
This ensures all source files are compiled with the library's built-in safety\
 checks enabled.

    cxx.poptions += -DSOL_ALL_SAFETIES_ON=1

### C++ Header Inclusion
Finally, include the necessary sol2 headers in your C++ source code.
If you configured the safety macro in your buildfile as recommended, no other\
 steps are needed.
Otherwise, you should define the `SOL_ALL_SAFETIES_ON` macro manually before\
 the include directive.

```c++
// The following line is only necessary if SOL_ALL_SAFETIES_ON
// was not defined in your project's buildfile already.
#define SOL_ALL_SAFETIES_ON 1
#include <sol/sol.hpp>
```

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/ThePhD/sol2
doc-url: https://sol2.readthedocs.io/en/latest/
src-url: https://github.com/ThePhD/sol2
package-url: https://github.com/build2-packaging/sol2
email: phdofthehouse@gmail.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: liblua ^5.4.8
tests: sol2-tests == 3.5.0
examples: sol2-examples == 3.5.0
bootstrap-build:
\
project = sol2

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.std = latest

using cxx
using c

h{*}: extension = h

hxx{*}: extension = hpp
cxx{*}: extension = cpp

hxx{*}: cxx.importable = false

test.target = $cxx.target

\
location: sol2/sol2-3.5.0+3.tar.gz
sha256sum: cf569b800728e837799189f6e7ae28c13a77c2426b7b5333334639718d6fd21e
:
name: sol2-examples
version: 3.3.1+2
type: exe
language: c++
project: sol2
summary: C++ library binding to Lua, examples
license: MIT
description:
\
# sol2

[![Documentation Status](https://readthedocs.org/projects/sol2/badge/?version\
=latest)](http://sol2.readthedocs.io/en/latest/?badge=latest)



sol2 is a C++ library binding to Lua. It currently supports all Lua versions\
 5.1+ (LuaJIT 2.0+ and MoonJIT included). sol2 aims to be easy to use and\
 easy to add to a project. The library is header-only for easy integration\
 with projects, and a single header can be used for drag-and-drop start up.



## Sneak Peek

```cpp
#include <sol/sol.hpp>
#include <cassert>

int main() {
    sol::state lua;
    int x = 0;
    lua.set_function("beep", [&x]{ ++x; });
    lua.script("beep()");
    assert(x == 1);
}
```

```cpp
#include <sol/sol.hpp>
#include <cassert>

struct vars {
    int boop = 0;
};

int main() {
    sol::state lua;
    lua.new_usertype<vars>("vars", "boop", &vars::boop);
    lua.script("beep = vars.new()\n"
               "beep.boop = 1");
    assert(lua.get<vars>("beep").boop == 1);
}
```

More examples are given in the examples directory [here](https://github.com/T\
hePhD/sol2/tree/develop/examples). 


## Documentation

Find it [here](http://sol2.rtfd.io/). A run-through kind of tutorial is\
 [here](http://sol2.readthedocs.io/en/latest/tutorial/all-the-things.html)!\
 The API documentation goes over most cases (particularly, the "api/usertype"\
 and "api/table_proxy" and "api/function" sections) that should still get you\
 off your feet and going, and there's an examples directory\
 [here](https://github.com/ThePhD/sol2/tree/develop/examples) as well.




# "I need X Feature or Fix, Right Now™"

Find the support option that's right for you, [here](https://github.com/ThePh\
D/.github/blob/main/SUPPORT.md)! If you're happy to wait, you can just file a\
 boring issue and we'll get to it Whenever There Is Time™.



## I want to donate to help!

You can find [donation and sponorship options here](https://github.com/ThePhD\
/.github/blob/main/SUPPORT.md#support-in-general) and from the little heart\
 button near the top of this repository that will take you to a bevy of links\
 in which you can donate and show support for this project and others!




# Features

- [Fastest in the land](http://sol2.readthedocs.io/en/latest/benchmarks.html)\
 (see: sol2 bar in graph).
- Supports retrieval and setting of multiple types including: 
  * `std::string`, `std::wstring`, `std::u16string` and `std::u32string`\
 support (and for views).
  * understands and works with containers such as `std::map/unordered_map`,\
 c-style arrays, vectors, non-standard custom containers and more.
  * user-defined types, with or **without** registering that type 
  * `std::unique_ptr`, `std::shared_ptr`, and optional support of other\
 pointer types like `boost::shared_ptr`.
  * custom `optional<T>` that works with references, and support for the\
 inferior `std::optional`.
  * C++17 support for variants and similar new types.
- Lambda, function, and member function bindings are supported.
- Intermediate type for checking if a variable exists.
- Simple API that completely abstracts away the C stack API, including\
 `protected_function` with the ability to use an error-handling function.
- `operator[]`-style manipulation of tables
- C++ type representations in Lua userdata as `usertype`s with guaranteed\
 cleanup.
- Customization points to allow your C++ objects to be pushed and retrieved\
 from Lua as multiple consecutive objects, or anything else you desire!
- Overloaded function calls: `my_function(1); my_function("Hello")` in the\
 same Lua script route to different function calls based on parameters
- Support for tables, nested tables, table iteration with `table.for_each` /\
 `begin()` and `end()` iterators.
- Zero string overhead for usertype function lookup.



## Supported Compilers

sol2 makes use of C++17 features. GCC 7.x.x and Clang 3.9.x (with\
 `-std=c++1z` and appropriate standard library) or higher should be able to\
 compile without problems. However, the officially supported and CI-tested\
 compilers are:

- GCC 7.x.x+ (MinGW 7.x.x+)
- Clang 3.9.x+
- Visual Studio 2017 Community (Visual C++ 15.0)+

Please make sure you use the `-std=c++2a`, `-std=c++1z`, `-std=c++17` or\
 better standard flags 
(some of these flags are the defaults in later versions of GCC, such as 7+\
 and better).

If you would like support for an older compiler (at the cost of some\
 features), use the latest tagged sol2 branch. If you would like support for\
 an even older compiler, feel free to contact me for a Custom Solution.

sol2 is checked by-hand for other platforms as well, including Android-based\
 builds with GCC and iOS-based builds out of XCode with Apple-clang. It\
 should work on both of these platforms, so long as you have the proper\
 standards flags. If something doesn't work or you need special options, you\
 may need to look into the different ways to support the project to have it\
 done for you!



## Creating a single header

You can grab a single header (and the single forward header) out of the\
 library [here](https://github.com/ThePhD/sol2/tree/develop/single). For\
 stable version, check the releases tab on GitHub for a provided single\
 header file for maximum ease of use. A script called [`single.py`](https://g\
ithub.com/ThePhD/sol2/blob/develop/single/single.py) is provided in the\
 repository if there's some bleeding edge change that hasn't been published\
 on the releases page. You can run this script to create a single file\
 version of the library so you can only include that part of it. Check\
 `single.py --help` for more info.

If you use CMake, you can also configure and generate a project that will\
 generate the `sol2_single_header` for you. You can also include the project\
 using CMake. Run CMake for more details. Thanks @Nava2, @alkino,\
 @mrgreywater and others for help with making the CMake build a reality.




# Testing

Testing turns on certain CI-only variables in the CMake to test a myriad of\
 configuration options. You can generate the tests by running CMake and\
 configuring `SOL2_TESTS`, `SOL2_TESTS_SINGLE`, `SOL2_TESTS_EXAMPLES`, and\
 `SOL2_EXAMPLES` to be on. Make sure `SOL2_SINGLE` is also on.

You will need any flavor of python3 and an available compiler. The testing\
 suite will build its own version of Lua and LuaJIT, so you do not have to\
 provide one (you may provide one with the `LUA_LOCAL_DIR` variable).



# Presentations

"A Sun For the Moon - A Zero-Overhead Lua Abstraction using C++"  
ThePhD
Lua Workshop 2016 - Mashape, San Francisco, CA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2016.10\
.14%20-%20ThePhD%20-%20No%20Overhead%20C%20Abstraction.pdf)

"Wrapping Lua C in C++ - Efficiently, Nicely, and with a Touch of Magic"  
ThePhD
Boston C++ Meetup November 2017 - CiC (Milk Street), Boston, MA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2017.11\
.08%20-%20ThePhD%20-%20Wrapping%20Lua%20C%20in%20C%2B%2B.pdf)

"Biting the CMake Bullet"  
ThePhD
Boston C++ Meetup February 2018 - CiC (Main Street), Cambridge, MA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.02\
.06%20-%20ThePhD%20-%20Biting%20the%20CMake%20Bullet.pdf)

"Compile Fast, Run Faster, Scale Forever: A look into the sol2 Library"  
ThePhD
C++Now 2018 - Hudson Commons, Aspen Physics Center, Aspen, Colorado  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.05\
.10%20-%20ThePhD%20-%20Compile%20Fast%2C%20Run%20Faster%2C%20Scale%20Forever.\
pdf)

"Scripting at the Speed of Thought: Using Lua in C++ with sol2"  
ThePhD
CppCon 2018 - 404 Keystone, Meydenbauer Center, Aspen, Colorado  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.09\
.28%20-%20ThePhD%20-%20Scripting%20at%20the%20Speed%20of%20Thought.pdf)

"The Plan for Tomorrow: Compile-Time Extension Points in C++"
ThePhD
C++Now 2019 - Flug Auditorium, Aspen Physics Center, Aspen, Colorado
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2019.05\
.10%20-%20ThePhD%20-%20The%20Plan%20for%20Tomorrow%20-%20Compile-Time%20Exten\
sion%20Points%20in%20C%2b%2b.pdf)




# License

sol2 is distributed with an MIT License. You can see LICENSE.txt for more\
 info.

If you need a custom solution, [feel free to reach out](https://soasis.org/co\
ntact/opensource/).

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for Sol2/3

This project is a [build2](https://build2.org) package repository that\
 provides access to [Sol2/3](https://github.com/ThePhD/sol2), a C++ library\
 binding to Lua.

[![Official](https://img.shields.io/website/https/github.com/ThePhD/sol2.svg?\
down_message=offline&label=Official&style=for-the-badge&up_color=blue&up_mess\
age=online)](https://github.com/ThePhD/sol2)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/s\
ol2.svg?down_message=offline&label=build2&style=for-the-badge&up_color=blue&u\
p_message=online)](https://github.com/build2-packaging/sol2)
[![cppget.org](https://img.shields.io/website/https/cppget.org/sol2.svg?down_\
message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_message\
=online)](https://cppget.org/sol2)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/so\
l2.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=for-th\
e-badge&up_color=orange&up_message=running)](https://queue.cppget.org/sol2)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch the package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/sol2.git

Add the respective dependency in your project's `manifest` file to make the\
 package available for import.

    depends: sol2 ^3.3.1

Then use the following line in your `buildfile` to import the library.

    import sol2 = sol2%lib{sol2}

## Configuration
There are no configuration options available.

## Issues and Notes
- So far, preprocessor directives are not provided as configuration variables\
 to allow for dependency negotiation and API/API-compatible builds.\
 Consistent library configuration across multiple packages must be ensured by\
 the consumer itself.
- The `sol2-tests` package is currently provided as an independent test\
 package that depends on `sol2` to reduce false-negative compilation results.\
 The tests require the Catch2 library which currently doesn't build with\
 Clang.
- The `sol2-examples` package that compiles and runs the basic examples from\
 sol2's documentation and tutorials is declared as an example package of\
 `sol2` and is also used for testing. While it does not require any other\
 dependencies, it still is provided as an external package to reduce the size\
 of the overall `sol2` package archive.
- Currently, upstream omits the run time tests directory as these are not\
 working. For the next release, check whether these tests are enabled again.
- So far, examples in `customization` and `interop` are not included in the\
 `sol2-examples` package.
- According to [sol2/issues/1581](https://github.com/ThePhD/sol2/issues/1581)\
, a bug in Clang 18 prevents the tests and examples from being successfully\
 compiled in Clang-based target configurations. The issue's workaround has\
 been applied to `sol/function_types_stateless.hpp` with the original file\
 located at `sol/function_types_stateless.hpp.orig`. A future release of\
 Clang or Sol2 may fix this issue.
- Sol2 also supports LuaJIT. However, LuaJIT is currently not offered as a\
 build2 package by `cppget.org` and, as a consequence, cannot be used with\
 this package.

## Contributing
Thank you in advance for your help and contribution to keep this package\
 up-to-date.
Please, file an issue on [GitHub](https://github.com/build2-packaging/sol2/is\
sues) for questions, bug reports, or to recommend updating the package\
 version.
If you're making a pull request to fix bugs or update the package version\
 yourself, refer to the [`build2` Packaging Guidelines](https://build2.org/bu\
ild2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management).

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/ThePhD/sol2
doc-url: https://sol2.readthedocs.io/en/latest/
src-url: https://github.com/ThePhD/sol2
package-url: https://github.com/build2-packaging/sol2
email: phdofthehouse@gmail.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = sol2-examples

using version
using config
using test
using dist

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = hpp
cxx{*}: extension = cpp

hxx{*}: cxx.importable = false

test.target = $cxx.target

exe{*}: test = true

# Import Sol2 by default.
#
import sol2 = sol2%lib{sol2}

# Default Build Options
#
cxx.poptions += -DSOL_PRINT_ERRORS=1
if ($cxx.target.system != 'win32-msvc')
  cxx.libs += -pthread

\
location: sol2/sol2-examples-3.3.1+2.tar.gz
sha256sum: 4ebc53162814f657515fedf8bf1ea16a00bdfc61d6a4669dfef73ae1ec7bf0fd
:
name: sol2-examples
version: 3.5.0+3
type: exe
language: c++
project: sol2
summary: C++ library binding to Lua, examples
license: MIT
description:
\
# sol2

[![Documentation Status](https://readthedocs.org/projects/sol2/badge/?version\
=latest)](http://sol2.readthedocs.io/en/latest/?badge=latest)



sol2 is a C++ library binding to Lua. It currently supports all Lua versions\
 5.1+ (LuaJIT 2.0+ and MoonJIT included). sol2 aims to be easy to use and\
 easy to add to a project. The library is header-only for easy integration\
 with projects, and a single header can be used for drag-and-drop start up.



## Sneak Peek

```cpp
#include <sol/sol.hpp>
#include <cassert>

int main() {
    sol::state lua;
    int x = 0;
    lua.set_function("beep", [&x]{ ++x; });
    lua.script("beep()");
    assert(x == 1);
}
```

```cpp
#include <sol/sol.hpp>
#include <cassert>

struct vars {
    int boop = 0;
};

int main() {
    sol::state lua;
    lua.new_usertype<vars>("vars", "boop", &vars::boop);
    lua.script("beep = vars.new()\n"
               "beep.boop = 1");
    assert(lua.get<vars>("beep").boop == 1);
}
```

More examples are given in the examples directory [here](https://github.com/T\
hePhD/sol2/tree/develop/examples). 


## Documentation

Find it [here](http://sol2.rtfd.io/). A run-through kind of tutorial is\
 [here](http://sol2.readthedocs.io/en/latest/tutorial/all-the-things.html)!\
 The API documentation goes over most cases (particularly, the "api/usertype"\
 and "api/table_proxy" and "api/function" sections) that should still get you\
 off your feet and going, and there's an examples directory\
 [here](https://github.com/ThePhD/sol2/tree/develop/examples) as well.




# "I need X Feature or Fix, Right Now™"

Find the support option that's right for you, [here](https://github.com/ThePh\
D/.github/blob/main/SUPPORT.md)! If you're happy to wait, you can just file a\
 boring issue and we'll get to it Whenever There Is Time™.



## I want to donate to help!

You can find [donation and sponorship options here](https://github.com/ThePhD\
/.github/blob/main/SUPPORT.md#support-in-general) and from the little heart\
 button near the top of this repository that will take you to a bevy of links\
 in which you can donate and show support for this project and others!




# Features

- [Fastest in the land](http://sol2.readthedocs.io/en/latest/benchmarks.html)\
 (see: sol2 bar in graph).
- Supports retrieval and setting of multiple types including: 
  * `std::string`, `std::wstring`, `std::u16string` and `std::u32string`\
 support (and for views).
  * understands and works with containers such as `std::map/unordered_map`,\
 c-style arrays, vectors, non-standard custom containers and more.
  * user-defined types, with or **without** registering that type 
  * `std::unique_ptr`, `std::shared_ptr`, and optional support of other\
 pointer types like `boost::shared_ptr`.
  * custom `optional<T>` that works with references, and support for the\
 inferior `std::optional`.
  * C++17 support for variants and similar new types.
- Lambda, function, and member function bindings are supported.
- Intermediate type for checking if a variable exists.
- Simple API that completely abstracts away the C stack API, including\
 `protected_function` with the ability to use an error-handling function.
- `operator[]`-style manipulation of tables
- C++ type representations in Lua userdata as `usertype`s with guaranteed\
 cleanup.
- Customization points to allow your C++ objects to be pushed and retrieved\
 from Lua as multiple consecutive objects, or anything else you desire!
- Overloaded function calls: `my_function(1); my_function("Hello")` in the\
 same Lua script route to different function calls based on parameters
- Support for tables, nested tables, table iteration with `table.for_each` /\
 `begin()` and `end()` iterators.
- Zero string overhead for usertype function lookup.



## Supported Compilers

sol2 makes use of C++17 features. GCC 7.x.x and Clang 3.9.x (with\
 `-std=c++1z` and appropriate standard library) or higher should be able to\
 compile without problems. However, the officially supported and CI-tested\
 compilers are:

- GCC 7.x.x+ (MinGW 7.x.x+)
- Clang 3.9.x+
- Visual Studio 2017 Community (Visual C++ 15.0)+

Please make sure you use the `-std=c++2a`, `-std=c++1z`, `-std=c++17` or\
 better standard flags 
(some of these flags are the defaults in later versions of GCC, such as 7+\
 and better).

If you would like support for an older compiler (at the cost of some\
 features), use the latest tagged sol2 branch. If you would like support for\
 an even older compiler, feel free to contact me for a Custom Solution.

sol2 is checked by-hand for other platforms as well, including Android-based\
 builds with GCC and iOS-based builds out of XCode with Apple-clang. It\
 should work on both of these platforms, so long as you have the proper\
 standards flags. If something doesn't work or you need special options, you\
 may need to look into the different ways to support the project to have it\
 done for you!



## Creating a single header

You can grab a single header (and the single forward header) out of the\
 library [here](https://github.com/ThePhD/sol2/tree/develop/single). For\
 stable version, check the releases tab on GitHub for a provided single\
 header file for maximum ease of use. A script called [`single.py`](https://g\
ithub.com/ThePhD/sol2/blob/develop/single/single.py) is provided in the\
 repository if there's some bleeding edge change that hasn't been published\
 on the releases page. You can run this script to create a single file\
 version of the library so you can only include that part of it. Check\
 `single.py --help` for more info.

If you use CMake, you can also configure and generate a project that will\
 generate the `sol2_single_header` for you. You can also include the project\
 using CMake. Run CMake for more details. Thanks @Nava2, @alkino,\
 @mrgreywater and others for help with making the CMake build a reality.




# Testing

Testing turns on certain CI-only variables in the CMake to test a myriad of\
 configuration options. You can generate the tests by running CMake and\
 configuring `SOL2_TESTS`, `SOL2_TESTS_SINGLE`, `SOL2_TESTS_EXAMPLES`, and\
 `SOL2_EXAMPLES` to be on. Make sure `SOL2_SINGLE` is also on.

You will need any flavor of python3 and an available compiler. The testing\
 suite will build its own version of Lua and LuaJIT, so you do not have to\
 provide one (you may provide one with the `LUA_LOCAL_DIR` variable).



# Presentations

"A Sun For the Moon - A Zero-Overhead Lua Abstraction using C++"  
ThePhD
Lua Workshop 2016 - Mashape, San Francisco, CA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2016.10\
.14%20-%20ThePhD%20-%20No%20Overhead%20C%20Abstraction.pdf)

"Wrapping Lua C in C++ - Efficiently, Nicely, and with a Touch of Magic"  
ThePhD
Boston C++ Meetup November 2017 - CiC (Milk Street), Boston, MA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2017.11\
.08%20-%20ThePhD%20-%20Wrapping%20Lua%20C%20in%20C%2B%2B.pdf)

"Biting the CMake Bullet"  
ThePhD
Boston C++ Meetup February 2018 - CiC (Main Street), Cambridge, MA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.02\
.06%20-%20ThePhD%20-%20Biting%20the%20CMake%20Bullet.pdf)

"Compile Fast, Run Faster, Scale Forever: A look into the sol2 Library"  
ThePhD
C++Now 2018 - Hudson Commons, Aspen Physics Center, Aspen, Colorado  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.05\
.10%20-%20ThePhD%20-%20Compile%20Fast%2C%20Run%20Faster%2C%20Scale%20Forever.\
pdf)

"Scripting at the Speed of Thought: Using Lua in C++ with sol2"  
ThePhD
CppCon 2018 - 404 Keystone, Meydenbauer Center, Aspen, Colorado  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.09\
.28%20-%20ThePhD%20-%20Scripting%20at%20the%20Speed%20of%20Thought.pdf)

"The Plan for Tomorrow: Compile-Time Extension Points in C++"
ThePhD
C++Now 2019 - Flug Auditorium, Aspen Physics Center, Aspen, Colorado
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2019.05\
.10%20-%20ThePhD%20-%20The%20Plan%20for%20Tomorrow%20-%20Compile-Time%20Exten\
sion%20Points%20in%20C%2b%2b.pdf)




# License

sol2 is distributed with an MIT License. You can see LICENSE.txt for more\
 info.

If you need a custom solution, [feel free to reach out](https://soasis.org/co\
ntact/opensource/).

\
description-type: text/markdown;variant=GFM
package-description:
\
# sol2 - C++ Library Binding to Lua

This is the `build2` package for the sol2 library.
sol2 is a C++ library binding to Lua that aims to be easy to use and easy to\
 add to a project.

## Usage
To use `sol2` in your project, add the following configurations to the\
 respective files after you have gained access to a `build2` package\
 repository that contains it.

### `manifest`
To make `sol2` available for import, add the following dependency to the\
 `manifest` of each package in your project that requires it, adjusting the\
 version constraint as appropriate.

    depends: sol2 ^3.5.0

### `buildfile`
To import the contained library, use the following declaration in your\
 `buildfile`.

    import sol2 = sol2%lib{sol2}

For maximum safety and consistency, define the `SOL_ALL_SAFETIES_ON` macro\
 for any target that uses sol2.
This ensures all source files are compiled with the library's built-in safety\
 checks enabled.

    cxx.poptions += -DSOL_ALL_SAFETIES_ON=1

### C++ Header Inclusion
Finally, include the necessary sol2 headers in your C++ source code.
If you configured the safety macro in your buildfile as recommended, no other\
 steps are needed.
Otherwise, you should define the `SOL_ALL_SAFETIES_ON` macro manually before\
 the include directive.

```c++
// The following line is only necessary if SOL_ALL_SAFETIES_ON
// was not defined in your project's buildfile already.
#define SOL_ALL_SAFETIES_ON 1
#include <sol/sol.hpp>
```

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/ThePhD/sol2
doc-url: https://sol2.readthedocs.io/en/latest/
src-url: https://github.com/ThePhD/sol2
package-url: https://github.com/build2-packaging/sol2
email: phdofthehouse@gmail.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
bootstrap-build:
\
project = sol2-examples

using version
using config
using test
using dist

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = hpp
cxx{*}: extension = cpp

hxx{*}: cxx.importable = false

test.target = $cxx.target

# Executables are tests by default.
#
exe{*}: test = true

# Import sol2 by default.
#
import sol2 = sol2%lib{sol2}

# Default Build Config
#
cxx.poptions += -DSOL_PRINT_ERRORS=1 -DSOL_ALL_SAFETIES_ON=1
if ($cxx.target.system != 'win32-msvc')
  cxx.libs += -pthread

\
location: sol2/sol2-examples-3.5.0+3.tar.gz
sha256sum: 12dd73aa04376c81ba1c61e3d3571b6c48f89770570263b81236fae4363749d6
:
name: sol2-tests
version: 3.3.1+2
type: exe
language: c++
project: sol2
summary: C++ library binding to Lua, tests
license: MIT
description:
\
# sol2

[![Documentation Status](https://readthedocs.org/projects/sol2/badge/?version\
=latest)](http://sol2.readthedocs.io/en/latest/?badge=latest)



sol2 is a C++ library binding to Lua. It currently supports all Lua versions\
 5.1+ (LuaJIT 2.0+ and MoonJIT included). sol2 aims to be easy to use and\
 easy to add to a project. The library is header-only for easy integration\
 with projects, and a single header can be used for drag-and-drop start up.



## Sneak Peek

```cpp
#include <sol/sol.hpp>
#include <cassert>

int main() {
    sol::state lua;
    int x = 0;
    lua.set_function("beep", [&x]{ ++x; });
    lua.script("beep()");
    assert(x == 1);
}
```

```cpp
#include <sol/sol.hpp>
#include <cassert>

struct vars {
    int boop = 0;
};

int main() {
    sol::state lua;
    lua.new_usertype<vars>("vars", "boop", &vars::boop);
    lua.script("beep = vars.new()\n"
               "beep.boop = 1");
    assert(lua.get<vars>("beep").boop == 1);
}
```

More examples are given in the examples directory [here](https://github.com/T\
hePhD/sol2/tree/develop/examples). 


## Documentation

Find it [here](http://sol2.rtfd.io/). A run-through kind of tutorial is\
 [here](http://sol2.readthedocs.io/en/latest/tutorial/all-the-things.html)!\
 The API documentation goes over most cases (particularly, the "api/usertype"\
 and "api/table_proxy" and "api/function" sections) that should still get you\
 off your feet and going, and there's an examples directory\
 [here](https://github.com/ThePhD/sol2/tree/develop/examples) as well.




# "I need X Feature or Fix, Right Now™"

Find the support option that's right for you, [here](https://github.com/ThePh\
D/.github/blob/main/SUPPORT.md)! If you're happy to wait, you can just file a\
 boring issue and we'll get to it Whenever There Is Time™.



## I want to donate to help!

You can find [donation and sponorship options here](https://github.com/ThePhD\
/.github/blob/main/SUPPORT.md#support-in-general) and from the little heart\
 button near the top of this repository that will take you to a bevy of links\
 in which you can donate and show support for this project and others!




# Features

- [Fastest in the land](http://sol2.readthedocs.io/en/latest/benchmarks.html)\
 (see: sol2 bar in graph).
- Supports retrieval and setting of multiple types including: 
  * `std::string`, `std::wstring`, `std::u16string` and `std::u32string`\
 support (and for views).
  * understands and works with containers such as `std::map/unordered_map`,\
 c-style arrays, vectors, non-standard custom containers and more.
  * user-defined types, with or **without** registering that type 
  * `std::unique_ptr`, `std::shared_ptr`, and optional support of other\
 pointer types like `boost::shared_ptr`.
  * custom `optional<T>` that works with references, and support for the\
 inferior `std::optional`.
  * C++17 support for variants and similar new types.
- Lambda, function, and member function bindings are supported.
- Intermediate type for checking if a variable exists.
- Simple API that completely abstracts away the C stack API, including\
 `protected_function` with the ability to use an error-handling function.
- `operator[]`-style manipulation of tables
- C++ type representations in Lua userdata as `usertype`s with guaranteed\
 cleanup.
- Customization points to allow your C++ objects to be pushed and retrieved\
 from Lua as multiple consecutive objects, or anything else you desire!
- Overloaded function calls: `my_function(1); my_function("Hello")` in the\
 same Lua script route to different function calls based on parameters
- Support for tables, nested tables, table iteration with `table.for_each` /\
 `begin()` and `end()` iterators.
- Zero string overhead for usertype function lookup.



## Supported Compilers

sol2 makes use of C++17 features. GCC 7.x.x and Clang 3.9.x (with\
 `-std=c++1z` and appropriate standard library) or higher should be able to\
 compile without problems. However, the officially supported and CI-tested\
 compilers are:

- GCC 7.x.x+ (MinGW 7.x.x+)
- Clang 3.9.x+
- Visual Studio 2017 Community (Visual C++ 15.0)+

Please make sure you use the `-std=c++2a`, `-std=c++1z`, `-std=c++17` or\
 better standard flags 
(some of these flags are the defaults in later versions of GCC, such as 7+\
 and better).

If you would like support for an older compiler (at the cost of some\
 features), use the latest tagged sol2 branch. If you would like support for\
 an even older compiler, feel free to contact me for a Custom Solution.

sol2 is checked by-hand for other platforms as well, including Android-based\
 builds with GCC and iOS-based builds out of XCode with Apple-clang. It\
 should work on both of these platforms, so long as you have the proper\
 standards flags. If something doesn't work or you need special options, you\
 may need to look into the different ways to support the project to have it\
 done for you!



## Creating a single header

You can grab a single header (and the single forward header) out of the\
 library [here](https://github.com/ThePhD/sol2/tree/develop/single). For\
 stable version, check the releases tab on GitHub for a provided single\
 header file for maximum ease of use. A script called [`single.py`](https://g\
ithub.com/ThePhD/sol2/blob/develop/single/single.py) is provided in the\
 repository if there's some bleeding edge change that hasn't been published\
 on the releases page. You can run this script to create a single file\
 version of the library so you can only include that part of it. Check\
 `single.py --help` for more info.

If you use CMake, you can also configure and generate a project that will\
 generate the `sol2_single_header` for you. You can also include the project\
 using CMake. Run CMake for more details. Thanks @Nava2, @alkino,\
 @mrgreywater and others for help with making the CMake build a reality.




# Testing

Testing turns on certain CI-only variables in the CMake to test a myriad of\
 configuration options. You can generate the tests by running CMake and\
 configuring `SOL2_TESTS`, `SOL2_TESTS_SINGLE`, `SOL2_TESTS_EXAMPLES`, and\
 `SOL2_EXAMPLES` to be on. Make sure `SOL2_SINGLE` is also on.

You will need any flavor of python3 and an available compiler. The testing\
 suite will build its own version of Lua and LuaJIT, so you do not have to\
 provide one (you may provide one with the `LUA_LOCAL_DIR` variable).



# Presentations

"A Sun For the Moon - A Zero-Overhead Lua Abstraction using C++"  
ThePhD
Lua Workshop 2016 - Mashape, San Francisco, CA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2016.10\
.14%20-%20ThePhD%20-%20No%20Overhead%20C%20Abstraction.pdf)

"Wrapping Lua C in C++ - Efficiently, Nicely, and with a Touch of Magic"  
ThePhD
Boston C++ Meetup November 2017 - CiC (Milk Street), Boston, MA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2017.11\
.08%20-%20ThePhD%20-%20Wrapping%20Lua%20C%20in%20C%2B%2B.pdf)

"Biting the CMake Bullet"  
ThePhD
Boston C++ Meetup February 2018 - CiC (Main Street), Cambridge, MA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.02\
.06%20-%20ThePhD%20-%20Biting%20the%20CMake%20Bullet.pdf)

"Compile Fast, Run Faster, Scale Forever: A look into the sol2 Library"  
ThePhD
C++Now 2018 - Hudson Commons, Aspen Physics Center, Aspen, Colorado  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.05\
.10%20-%20ThePhD%20-%20Compile%20Fast%2C%20Run%20Faster%2C%20Scale%20Forever.\
pdf)

"Scripting at the Speed of Thought: Using Lua in C++ with sol2"  
ThePhD
CppCon 2018 - 404 Keystone, Meydenbauer Center, Aspen, Colorado  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.09\
.28%20-%20ThePhD%20-%20Scripting%20at%20the%20Speed%20of%20Thought.pdf)

"The Plan for Tomorrow: Compile-Time Extension Points in C++"
ThePhD
C++Now 2019 - Flug Auditorium, Aspen Physics Center, Aspen, Colorado
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2019.05\
.10%20-%20ThePhD%20-%20The%20Plan%20for%20Tomorrow%20-%20Compile-Time%20Exten\
sion%20Points%20in%20C%2b%2b.pdf)




# License

sol2 is distributed with an MIT License. You can see LICENSE.txt for more\
 info.

If you need a custom solution, [feel free to reach out](https://soasis.org/co\
ntact/opensource/).

\
description-type: text/markdown;variant=GFM
package-description:
\
# build2 Package for Sol2/3

This project is a [build2](https://build2.org) package repository that\
 provides access to [Sol2/3](https://github.com/ThePhD/sol2), a C++ library\
 binding to Lua.

[![Official](https://img.shields.io/website/https/github.com/ThePhD/sol2.svg?\
down_message=offline&label=Official&style=for-the-badge&up_color=blue&up_mess\
age=online)](https://github.com/ThePhD/sol2)
[![build2](https://img.shields.io/website/https/github.com/build2-packaging/s\
ol2.svg?down_message=offline&label=build2&style=for-the-badge&up_color=blue&u\
p_message=online)](https://github.com/build2-packaging/sol2)
[![cppget.org](https://img.shields.io/website/https/cppget.org/sol2.svg?down_\
message=offline&label=cppget.org&style=for-the-badge&up_color=blue&up_message\
=online)](https://cppget.org/sol2)
[![queue.cppget.org](https://img.shields.io/website/https/queue.cppget.org/so\
l2.svg?down_message=empty&down_color=blue&label=queue.cppget.org&style=for-th\
e-badge&up_color=orange&up_message=running)](https://queue.cppget.org/sol2)

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch the package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/stable
    # trust: ...

If the stable section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/sol2.git

Add the respective dependency in your project's `manifest` file to make the\
 package available for import.

    depends: sol2 ^3.3.1

Then use the following line in your `buildfile` to import the library.

    import sol2 = sol2%lib{sol2}

## Configuration
There are no configuration options available.

## Issues and Notes
- So far, preprocessor directives are not provided as configuration variables\
 to allow for dependency negotiation and API/API-compatible builds.\
 Consistent library configuration across multiple packages must be ensured by\
 the consumer itself.
- The `sol2-tests` package is currently provided as an independent test\
 package that depends on `sol2` to reduce false-negative compilation results.\
 The tests require the Catch2 library which currently doesn't build with\
 Clang.
- The `sol2-examples` package that compiles and runs the basic examples from\
 sol2's documentation and tutorials is declared as an example package of\
 `sol2` and is also used for testing. While it does not require any other\
 dependencies, it still is provided as an external package to reduce the size\
 of the overall `sol2` package archive.
- Currently, upstream omits the run time tests directory as these are not\
 working. For the next release, check whether these tests are enabled again.
- So far, examples in `customization` and `interop` are not included in the\
 `sol2-examples` package.
- According to [sol2/issues/1581](https://github.com/ThePhD/sol2/issues/1581)\
, a bug in Clang 18 prevents the tests and examples from being successfully\
 compiled in Clang-based target configurations. The issue's workaround has\
 been applied to `sol/function_types_stateless.hpp` with the original file\
 located at `sol/function_types_stateless.hpp.orig`. A future release of\
 Clang or Sol2 may fix this issue.
- Sol2 also supports LuaJIT. However, LuaJIT is currently not offered as a\
 build2 package by `cppget.org` and, as a consequence, cannot be used with\
 this package.

## Contributing
Thank you in advance for your help and contribution to keep this package\
 up-to-date.
Please, file an issue on [GitHub](https://github.com/build2-packaging/sol2/is\
sues) for questions, bug reports, or to recommend updating the package\
 version.
If you're making a pull request to fix bugs or update the package version\
 yourself, refer to the [`build2` Packaging Guidelines](https://build2.org/bu\
ild2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management).

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/ThePhD/sol2
doc-url: https://sol2.readthedocs.io/en/latest/
src-url: https://github.com/ThePhD/sol2
package-url: https://github.com/build2-packaging/sol2
email: phdofthehouse@gmail.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: sol2 == 3.3.1
depends: catch2 ^3.3.2
bootstrap-build:
\
project = sol2-tests

using version
using config
using test
using dist

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = hpp
cxx{*}: extension = cpp

hxx{*}: cxx.importable = false

test.target = $cxx.target

exe{*}: test = true

# Import Sol2 by default.
#
import sol2 = sol2%lib{sol2}

# Import Catch2 by default.
#
import catch2 = catch2%lib{catch2}

# Default Build Options
#
cxx.poptions += -DSOL_PRINT_ERRORS=1 -DSOL_ALL_SAFETIES_ON=1
if ($cxx.target.system != 'win32-msvc')
  cxx.libs += -pthread

\
location: sol2/sol2-tests-3.3.1+2.tar.gz
sha256sum: 3b2b9cdac4288993d0f75d5c9cd98a54a04910cfa5bad0e069eae155748a9170
:
name: sol2-tests
version: 3.5.0+3
type: exe
language: c++
project: sol2
summary: C++ library binding to Lua, tests
license: MIT
description:
\
# sol2

[![Documentation Status](https://readthedocs.org/projects/sol2/badge/?version\
=latest)](http://sol2.readthedocs.io/en/latest/?badge=latest)



sol2 is a C++ library binding to Lua. It currently supports all Lua versions\
 5.1+ (LuaJIT 2.0+ and MoonJIT included). sol2 aims to be easy to use and\
 easy to add to a project. The library is header-only for easy integration\
 with projects, and a single header can be used for drag-and-drop start up.



## Sneak Peek

```cpp
#include <sol/sol.hpp>
#include <cassert>

int main() {
    sol::state lua;
    int x = 0;
    lua.set_function("beep", [&x]{ ++x; });
    lua.script("beep()");
    assert(x == 1);
}
```

```cpp
#include <sol/sol.hpp>
#include <cassert>

struct vars {
    int boop = 0;
};

int main() {
    sol::state lua;
    lua.new_usertype<vars>("vars", "boop", &vars::boop);
    lua.script("beep = vars.new()\n"
               "beep.boop = 1");
    assert(lua.get<vars>("beep").boop == 1);
}
```

More examples are given in the examples directory [here](https://github.com/T\
hePhD/sol2/tree/develop/examples). 


## Documentation

Find it [here](http://sol2.rtfd.io/). A run-through kind of tutorial is\
 [here](http://sol2.readthedocs.io/en/latest/tutorial/all-the-things.html)!\
 The API documentation goes over most cases (particularly, the "api/usertype"\
 and "api/table_proxy" and "api/function" sections) that should still get you\
 off your feet and going, and there's an examples directory\
 [here](https://github.com/ThePhD/sol2/tree/develop/examples) as well.




# "I need X Feature or Fix, Right Now™"

Find the support option that's right for you, [here](https://github.com/ThePh\
D/.github/blob/main/SUPPORT.md)! If you're happy to wait, you can just file a\
 boring issue and we'll get to it Whenever There Is Time™.



## I want to donate to help!

You can find [donation and sponorship options here](https://github.com/ThePhD\
/.github/blob/main/SUPPORT.md#support-in-general) and from the little heart\
 button near the top of this repository that will take you to a bevy of links\
 in which you can donate and show support for this project and others!




# Features

- [Fastest in the land](http://sol2.readthedocs.io/en/latest/benchmarks.html)\
 (see: sol2 bar in graph).
- Supports retrieval and setting of multiple types including: 
  * `std::string`, `std::wstring`, `std::u16string` and `std::u32string`\
 support (and for views).
  * understands and works with containers such as `std::map/unordered_map`,\
 c-style arrays, vectors, non-standard custom containers and more.
  * user-defined types, with or **without** registering that type 
  * `std::unique_ptr`, `std::shared_ptr`, and optional support of other\
 pointer types like `boost::shared_ptr`.
  * custom `optional<T>` that works with references, and support for the\
 inferior `std::optional`.
  * C++17 support for variants and similar new types.
- Lambda, function, and member function bindings are supported.
- Intermediate type for checking if a variable exists.
- Simple API that completely abstracts away the C stack API, including\
 `protected_function` with the ability to use an error-handling function.
- `operator[]`-style manipulation of tables
- C++ type representations in Lua userdata as `usertype`s with guaranteed\
 cleanup.
- Customization points to allow your C++ objects to be pushed and retrieved\
 from Lua as multiple consecutive objects, or anything else you desire!
- Overloaded function calls: `my_function(1); my_function("Hello")` in the\
 same Lua script route to different function calls based on parameters
- Support for tables, nested tables, table iteration with `table.for_each` /\
 `begin()` and `end()` iterators.
- Zero string overhead for usertype function lookup.



## Supported Compilers

sol2 makes use of C++17 features. GCC 7.x.x and Clang 3.9.x (with\
 `-std=c++1z` and appropriate standard library) or higher should be able to\
 compile without problems. However, the officially supported and CI-tested\
 compilers are:

- GCC 7.x.x+ (MinGW 7.x.x+)
- Clang 3.9.x+
- Visual Studio 2017 Community (Visual C++ 15.0)+

Please make sure you use the `-std=c++2a`, `-std=c++1z`, `-std=c++17` or\
 better standard flags 
(some of these flags are the defaults in later versions of GCC, such as 7+\
 and better).

If you would like support for an older compiler (at the cost of some\
 features), use the latest tagged sol2 branch. If you would like support for\
 an even older compiler, feel free to contact me for a Custom Solution.

sol2 is checked by-hand for other platforms as well, including Android-based\
 builds with GCC and iOS-based builds out of XCode with Apple-clang. It\
 should work on both of these platforms, so long as you have the proper\
 standards flags. If something doesn't work or you need special options, you\
 may need to look into the different ways to support the project to have it\
 done for you!



## Creating a single header

You can grab a single header (and the single forward header) out of the\
 library [here](https://github.com/ThePhD/sol2/tree/develop/single). For\
 stable version, check the releases tab on GitHub for a provided single\
 header file for maximum ease of use. A script called [`single.py`](https://g\
ithub.com/ThePhD/sol2/blob/develop/single/single.py) is provided in the\
 repository if there's some bleeding edge change that hasn't been published\
 on the releases page. You can run this script to create a single file\
 version of the library so you can only include that part of it. Check\
 `single.py --help` for more info.

If you use CMake, you can also configure and generate a project that will\
 generate the `sol2_single_header` for you. You can also include the project\
 using CMake. Run CMake for more details. Thanks @Nava2, @alkino,\
 @mrgreywater and others for help with making the CMake build a reality.




# Testing

Testing turns on certain CI-only variables in the CMake to test a myriad of\
 configuration options. You can generate the tests by running CMake and\
 configuring `SOL2_TESTS`, `SOL2_TESTS_SINGLE`, `SOL2_TESTS_EXAMPLES`, and\
 `SOL2_EXAMPLES` to be on. Make sure `SOL2_SINGLE` is also on.

You will need any flavor of python3 and an available compiler. The testing\
 suite will build its own version of Lua and LuaJIT, so you do not have to\
 provide one (you may provide one with the `LUA_LOCAL_DIR` variable).



# Presentations

"A Sun For the Moon - A Zero-Overhead Lua Abstraction using C++"  
ThePhD
Lua Workshop 2016 - Mashape, San Francisco, CA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2016.10\
.14%20-%20ThePhD%20-%20No%20Overhead%20C%20Abstraction.pdf)

"Wrapping Lua C in C++ - Efficiently, Nicely, and with a Touch of Magic"  
ThePhD
Boston C++ Meetup November 2017 - CiC (Milk Street), Boston, MA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2017.11\
.08%20-%20ThePhD%20-%20Wrapping%20Lua%20C%20in%20C%2B%2B.pdf)

"Biting the CMake Bullet"  
ThePhD
Boston C++ Meetup February 2018 - CiC (Main Street), Cambridge, MA  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.02\
.06%20-%20ThePhD%20-%20Biting%20the%20CMake%20Bullet.pdf)

"Compile Fast, Run Faster, Scale Forever: A look into the sol2 Library"  
ThePhD
C++Now 2018 - Hudson Commons, Aspen Physics Center, Aspen, Colorado  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.05\
.10%20-%20ThePhD%20-%20Compile%20Fast%2C%20Run%20Faster%2C%20Scale%20Forever.\
pdf)

"Scripting at the Speed of Thought: Using Lua in C++ with sol2"  
ThePhD
CppCon 2018 - 404 Keystone, Meydenbauer Center, Aspen, Colorado  
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2018.09\
.28%20-%20ThePhD%20-%20Scripting%20at%20the%20Speed%20of%20Thought.pdf)

"The Plan for Tomorrow: Compile-Time Extension Points in C++"
ThePhD
C++Now 2019 - Flug Auditorium, Aspen Physics Center, Aspen, Colorado
[Deck](https://github.com/ThePhD/sol2/blob/develop/docs/presentations/2019.05\
.10%20-%20ThePhD%20-%20The%20Plan%20for%20Tomorrow%20-%20Compile-Time%20Exten\
sion%20Points%20in%20C%2b%2b.pdf)




# License

sol2 is distributed with an MIT License. You can see LICENSE.txt for more\
 info.

If you need a custom solution, [feel free to reach out](https://soasis.org/co\
ntact/opensource/).

\
description-type: text/markdown;variant=GFM
package-description:
\
# sol2 - C++ Library Binding to Lua

This is the `build2` package for the sol2 library.
sol2 is a C++ library binding to Lua that aims to be easy to use and easy to\
 add to a project.

## Usage
To use `sol2` in your project, add the following configurations to the\
 respective files after you have gained access to a `build2` package\
 repository that contains it.

### `manifest`
To make `sol2` available for import, add the following dependency to the\
 `manifest` of each package in your project that requires it, adjusting the\
 version constraint as appropriate.

    depends: sol2 ^3.5.0

### `buildfile`
To import the contained library, use the following declaration in your\
 `buildfile`.

    import sol2 = sol2%lib{sol2}

For maximum safety and consistency, define the `SOL_ALL_SAFETIES_ON` macro\
 for any target that uses sol2.
This ensures all source files are compiled with the library's built-in safety\
 checks enabled.

    cxx.poptions += -DSOL_ALL_SAFETIES_ON=1

### C++ Header Inclusion
Finally, include the necessary sol2 headers in your C++ source code.
If you configured the safety macro in your buildfile as recommended, no other\
 steps are needed.
Otherwise, you should define the `SOL_ALL_SAFETIES_ON` macro manually before\
 the include directive.

```c++
// The following line is only necessary if SOL_ALL_SAFETIES_ON
// was not defined in your project's buildfile already.
#define SOL_ALL_SAFETIES_ON 1
#include <sol/sol.hpp>
```

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/ThePhD/sol2
doc-url: https://sol2.readthedocs.io/en/latest/
src-url: https://github.com/ThePhD/sol2
package-url: https://github.com/build2-packaging/sol2
email: phdofthehouse@gmail.com
package-email: packaging@build2.org
depends: * build2 >= 0.17.0
depends: * bpkg >= 0.17.0
depends: catch2 ^3.3.2
bootstrap-build:
\
project = sol2-tests

using version
using config
using test
using dist

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = hpp
cxx{*}: extension = cpp

hxx{*}: cxx.importable = false

test.target = $cxx.target

exe{*}: test = true

\
location: sol2/sol2-tests-3.5.0+3.tar.gz
sha256sum: a90a62d5f0987e66e8db02259d0a34f5e4046407a19c87dd02dae40c215ba3ae
:
name: sqlite3
version: 3.51.3
project: sqlite
summary: SQLite database engine shell program
license: blessing; SQLite Blessing.
topics: SQLite, SQL, relational database
description:
\
SQLite is a C library that implements an in-process SQL database engine. A
complete database is stored in a single file on disk. The code for SQLite is
in the public domain. For more information see:

https://sqlite.org/

This package contains the original SQLite shell program source code overlaid
with the build2-based build system and packaged for the build2 package manager
(bpkg).

See the INSTALL file for the prerequisites and installation instructions.

Send questions, bug reports, or any other feedback about the program itself to
the SQLite mailing lists. Send build system and packaging-related feedback to
the packaging@build2.org mailing list (see https://lists.build2.org for
posting guidelines, etc).

The packaging of SQLite for build2 is tracked in a Git repository at:

https://git.build2.org/cgit/packaging/sqlite/

\
description-type: text/plain
url: https://sqlite.org/
doc-url: https://sqlite.org/cli.html
src-url: https://git.build2.org/cgit/packaging/sqlite/sqlite/tree/sqlite3/
package-url: https://git.build2.org/cgit/packaging/sqlite/
email: sqlite-users@mailinglists.sqlite.org; Mailing list.
package-email: packaging@build2.org; Mailing list.
build-error-email: builds@build2.org
depends: * build2 >= 0.15.0
depends: * bpkg >= 0.15.0
depends: libsqlite3 == 3.51.3
depends: libz ^1.2.1100
builds: all
builds: -wasm
bootstrap-build:
\
# file      : build/bootstrap.build
# copyright : not copyrighted - public domain

project = sqlite3

using version
using config
using dist
using test
using install

\
root-build:
\
# file      : build/root.build
# copyright : not copyrighted - public domain

using c

h{*}: extension = h
c{*}: extension = c

if ($c.target.system == 'win32-msvc')
  c.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS

if ($c.class == 'msvc')
  c.coptions += /wd4251 /wd4275 /wd4800

# Specify the test target for cross-testing.
#
test.target = $c.target

\
location: sqlite/sqlite3-3.51.3.tar.gz
sha256sum: 3b91a8c0d26eda1e546d4f45ed0760f02e2f737c91ea2ad4c654fd67a835ebfb
:
name: tl-expected
version: 1.3.1
project: tl
summary: C++11/14/17 std::expected with functional-style extensions
license: CC0-1.0 Universal; Creative Commons Zero v1.0 Universal
description:
\
# expected
Single header implementation of `std::expected` with functional-style\
 extensions.

[![Documentation Status](https://readthedocs.org/projects/tl-docs/badge/?vers\
ion=latest)](https://tl.tartanllama.xyz/en/latest/?badge=latest)
Clang + GCC: [![Linux Build Status](https://github.com/TartanLlama/expected/a\
ctions/workflows/cmake.yml/badge.svg)](https://github.com/TartanLlama/expecte\
d/actions/workflows/cmake.yml)
MSVC: [![Windows Build Status](https://ci.appveyor.com/api/projects/status/k5\
x00xa11y3s5wsg?svg=true)](https://ci.appveyor.com/project/TartanLlama/expecte\
d)

Available on [Vcpkg](https://github.com/microsoft/vcpkg/tree/master/ports/tl-\
expected), [Conan](https://github.com/yipdw/conan-tl-expected) and\
 [`build2`](https://cppget.org/tl-expected).

[`std::expected`](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p03\
23r3.pdf) is proposed as the preferred way to represent object which will\
 either have an expected value, or an unexpected value giving information\
 about why something failed. Unfortunately, chaining together many\
 computations which may fail can be verbose, as error-checking code will be\
 mixed in with the actual programming logic. This implementation provides a\
 number of utilities to make coding with `expected` cleaner.

For example, instead of writing this code:

```cpp
std::expected<image,fail_reason> get_cute_cat (const image& img) {
    auto cropped = crop_to_cat(img);
    if (!cropped) {
      return cropped;
    }

    auto with_tie = add_bow_tie(*cropped);
    if (!with_tie) {
      return with_tie;
    }

    auto with_sparkles = make_eyes_sparkle(*with_tie);
    if (!with_sparkles) {
       return with_sparkles;
    }

    return add_rainbow(make_smaller(*with_sparkles));
}
```

You can do this:

```cpp
tl::expected<image,fail_reason> get_cute_cat (const image& img) {
    return crop_to_cat(img)
           .and_then(add_bow_tie)
           .and_then(make_eyes_sparkle)
           .map(make_smaller)
           .map(add_rainbow);
}
```

The interface is the same as `std::expected` as proposed in\
 [p0323r3](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0323r3.pd\
f), but the following member functions are also defined. Explicit types are\
 for clarity.

- `map`: carries out some operation on the stored object if there is one.
  * `tl::expected<std::size_t,std::error_code> s = exp_string.map(&std::strin\
g::size);`
- `map_error`: carries out some operation on the unexpected object if there\
 is one.
  * `my_error_code translate_error (std::error_code);`
  * `tl::expected<int,my_error_code> s = exp_int.map_error(translate_error);`
- `and_then`: like `map`, but for operations which return a `tl::expected`.
  * `tl::expected<ast, fail_reason> parse (const std::string& s);`
  * `tl::expected<ast, fail_reason> exp_ast = exp_string.and_then(parse);`
- `or_else`: calls some function if there is no value stored.
  * `exp.or_else([] { throw std::runtime_error{"oh no"}; });`

p0323r3 specifies calling `.error()` on an expected value, or using the `*`\
 or `->` operators on an unexpected value, to be undefined behaviour. In this\
 implementation it causes an assertion failure. The implementation of\
 assertions can be overridden by defining the macro `TL_ASSERT(boolean_condit\
ion)` before #including <tl/expected.hpp>; by default, `assert(boolean_condit\
ion)` from the `<cassert>` header is used. Note that correct code would not\
 rely on these assertions.

### Compiler support

Tested on:

- Linux
  * clang++ 3.5, 3.6, 3.7, 3.8, 3.9, 4, 5, 6, 7, 8, 9, 10, 11
  * g++ 4.8, 4.9, 5.5, 6.4, 7.5, 8, 9, 10 
- Windows
  * MSVC 2015, 2017, 2019, 2022

----------

[![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png)]("http://creativec\
ommons.org/publicdomain/zero/1.0/")

To the extent possible under law, [Sy Brand](https://twitter.com/TartanLlama)\
 has waived all copyright and related or neighboring rights to the `expected`\
 library. This work is published from: United Kingdom.

\
description-type: text/markdown;variant=GFM
url: https://github.com/TartanLlama/expected
doc-url: https://tl.tartanllama.xyz/en/latest/
package-url: https://github.com/build2-packaging/build2-tl
package-email: wmbat-dev@protonmail.com
depends: * build2 >= 0.14.0
depends: * bpkg >= 0.14.0
requires: c++ >= 11
tests: tl-expected-tests == 1.3.1
bootstrap-build:
\
project = tl-expected

using version
using config
using install
using dist
using test

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

\
location: tl/tl-expected-1.3.1.tar.gz
sha256sum: 61329fe26d32a84a49a5a8e17862710a1ef06ae107a68ab67230f73a101de6ce
:
name: tl-expected-tests
version: 1.3.1
project: tl
summary: C++11/14/17 std::optional with functional-style extensions and\
 reference support
license: CC0 1.0 Universal; Creative Commons Zero v1.0 Universal
description:
\
# expected
Single header implementation of `std::expected` with functional-style\
 extensions.

[![Documentation Status](https://readthedocs.org/projects/tl-docs/badge/?vers\
ion=latest)](https://tl.tartanllama.xyz/en/latest/?badge=latest)
Clang + GCC: [![Linux Build Status](https://github.com/TartanLlama/expected/a\
ctions/workflows/cmake.yml/badge.svg)](https://github.com/TartanLlama/expecte\
d/actions/workflows/cmake.yml)
MSVC: [![Windows Build Status](https://ci.appveyor.com/api/projects/status/k5\
x00xa11y3s5wsg?svg=true)](https://ci.appveyor.com/project/TartanLlama/expecte\
d)

Available on [Vcpkg](https://github.com/microsoft/vcpkg/tree/master/ports/tl-\
expected), [Conan](https://github.com/yipdw/conan-tl-expected) and\
 [`build2`](https://cppget.org/tl-expected).

[`std::expected`](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p03\
23r3.pdf) is proposed as the preferred way to represent object which will\
 either have an expected value, or an unexpected value giving information\
 about why something failed. Unfortunately, chaining together many\
 computations which may fail can be verbose, as error-checking code will be\
 mixed in with the actual programming logic. This implementation provides a\
 number of utilities to make coding with `expected` cleaner.

For example, instead of writing this code:

```cpp
std::expected<image,fail_reason> get_cute_cat (const image& img) {
    auto cropped = crop_to_cat(img);
    if (!cropped) {
      return cropped;
    }

    auto with_tie = add_bow_tie(*cropped);
    if (!with_tie) {
      return with_tie;
    }

    auto with_sparkles = make_eyes_sparkle(*with_tie);
    if (!with_sparkles) {
       return with_sparkles;
    }

    return add_rainbow(make_smaller(*with_sparkles));
}
```

You can do this:

```cpp
tl::expected<image,fail_reason> get_cute_cat (const image& img) {
    return crop_to_cat(img)
           .and_then(add_bow_tie)
           .and_then(make_eyes_sparkle)
           .map(make_smaller)
           .map(add_rainbow);
}
```

The interface is the same as `std::expected` as proposed in\
 [p0323r3](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0323r3.pd\
f), but the following member functions are also defined. Explicit types are\
 for clarity.

- `map`: carries out some operation on the stored object if there is one.
  * `tl::expected<std::size_t,std::error_code> s = exp_string.map(&std::strin\
g::size);`
- `map_error`: carries out some operation on the unexpected object if there\
 is one.
  * `my_error_code translate_error (std::error_code);`
  * `tl::expected<int,my_error_code> s = exp_int.map_error(translate_error);`
- `and_then`: like `map`, but for operations which return a `tl::expected`.
  * `tl::expected<ast, fail_reason> parse (const std::string& s);`
  * `tl::expected<ast, fail_reason> exp_ast = exp_string.and_then(parse);`
- `or_else`: calls some function if there is no value stored.
  * `exp.or_else([] { throw std::runtime_error{"oh no"}; });`

p0323r3 specifies calling `.error()` on an expected value, or using the `*`\
 or `->` operators on an unexpected value, to be undefined behaviour. In this\
 implementation it causes an assertion failure. The implementation of\
 assertions can be overridden by defining the macro `TL_ASSERT(boolean_condit\
ion)` before #including <tl/expected.hpp>; by default, `assert(boolean_condit\
ion)` from the `<cassert>` header is used. Note that correct code would not\
 rely on these assertions.

### Compiler support

Tested on:

- Linux
  * clang++ 3.5, 3.6, 3.7, 3.8, 3.9, 4, 5, 6, 7, 8, 9, 10, 11
  * g++ 4.8, 4.9, 5.5, 6.4, 7.5, 8, 9, 10 
- Windows
  * MSVC 2015, 2017, 2019, 2022

----------

[![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png)]("http://creativec\
ommons.org/publicdomain/zero/1.0/")

To the extent possible under law, [Sy Brand](https://twitter.com/TartanLlama)\
 has waived all copyright and related or neighboring rights to the `expected`\
 library. This work is published from: United Kingdom.

\
description-type: text/markdown;variant=GFM
doc-url: https://tl.tartanllama.xyz/en/latest/
package-url: https://github.com/build2-packaging/build2-tl
package-email: wmbat-dev@protonmail.com
depends: * build2 >= 0.14.0
depends: * bpkg >= 0.14.0
depends: catch2 ^2.13.7
requires: c++ >= 11
bootstrap-build:
\
project = tl-expected-tests

using version
using config
using test
using install
using dist
using test

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = hpp
ixx{*}: extension = ipp
txx{*}: extension = tpp
cxx{*}: extension = cpp

# Assume headers are importable unless stated otherwise.
#
hxx{*}: cxx.importable = true

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

# In this package, all executables are tests.
exe{*} : test = true

\
location: tl/tl-expected-tests-1.3.1.tar.gz
sha256sum: b569a924dbccf1e9aa134176456266d87a7e02126ac89739e95c247ae5a0f597
