• Stars
    star
    1,479
  • Rank 31,787 (Top 0.7 %)
  • Language
    C++
  • License
    Other
  • Created about 5 years ago
  • Updated 29 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Unified Executors

Overview

The 'libunifex' project is a prototype implementation of the C++ sender/receiver async programming model that is currently being considered for standardisation.

This project contains implementations of the following:

  • Schedulers
  • Timers
  • Asynchronous I/O (Linux w/ io_uring)
  • Algorithms that encapsulate certain concurrency patterns
  • Async streams
  • Cancellation
  • Coroutine integration

Status

This project is still evolving and should be considered experimental in nature. No guarantee is made for API or ABI stability.

Build status

  • on Github Actions: GitHub Actions Status

Documentation

Requirements

A recent compiler that supports C++17 or later. Libunifex is known to work with the following compilers:

  • GCC, 9.x and later
  • Clang, 10.x and later
  • MSVC 2019.6 and later

This library also supports C++20 coroutines. You will need to compile with coroutine support enabled if you want to use the coroutine integrations. This generally means adding -std=c++2a or -fcoroutines-ts on Clang (see "Configuring" below).

Linux

The io_uring support on Linux requires a recent kernel version (5.6 or later).

See http://git.kernel.dk/cgit/linux-block/log/?h=for-5.5/io_uring

The io_uring support depends on liburing: https://github.com/axboe/liburing/

Windows

windows_thread_pool executor requires Windows Vista or later.

Building

This project can be built using CMake.

The examples below assume using the Ninja build system. You can use other build systems supported by CMake.

Configuring

First generate the build files under the ./build subdirectory.

From the libunifex project root:

cmake -G Ninja -H. -Bbuild \
      -DCMAKE_CXX_COMPILER:PATH=/path/to/compiler

By default, this builds libunifex in C++17 without coroutines. If you want to turn on coroutines with clang, add:

      -DCMAKE_CXX_FLAGS:STRING=-fcoroutines-ts

To use libc++ with clang, which has coroutine support, you should also add:

      -DCMAKE_CXX_FLAGS:STRING=-stdlib=libc++ \
      -DCMAKE_EXE_LINKER_FLAGS:STRING="-L/path/to/libc++/lib"

If you want to build libunifex as C++20, add:

      -DCMAKE_CXX_STANDARD:STRING=20

Building Library + Running Tests

To build the library and tests.

From the ./build subdirectory run:

ninja

Once the tests have been built you can run them.

From the ./build subdirectory run:

ninja test

License

This project is made available under the Apache License, version 2.0, with LLVM Exceptions.

See LICENSE.txt for details.

See also:

References

C++ standardisation papers:

More Repositories

1

Recoil

Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.
JavaScript
19,610
star
2

hermit

Hermit launches linux x86_64 programs in a special, hermetically isolated sandbox to control their execution. Hermit translates normal, nondeterministic behavior, into deterministic, repeatable behavior. This can be used for various applications, including replay-debugging, reproducible artifacts, chaos mode concurrency testing and bug analysis.
Rust
1,189
star
3

Robyn

Robyn is an experimental, AI/ML-powered and open sourced Marketing Mix Modeling (MMM) package from Meta Marketing Science. Our mission is to democratise modeling knowledge, inspire the industry through innovation, reduce human bias in the modeling process & build a strong open source marketing science community.
Jupyter Notebook
1,104
star
4

MIRAI

Rust mid-level IR Abstract Interpreter
Rust
1,004
star
5

reverie

An ergonomic and safe syscall interception framework for Linux.
Rust
544
star
6

ExtendedAndroidTools

Extended Android Tools is a place to host and maintain a build environment and makefiles cross compiling Linux tools we all love for Android.
Python
174
star
7

object-introspection

Object Introspection (OI) enables on-demand, hierarchical profiling of objects in arbitrary C/C++ programs with no recompilation.
C++
153
star
8

resctl-demo

Demonstrate and benchmark various features of Linux resource control in a self-contained package.
Rust
149
star
9

allocative

Library and proc macro to analyze memory usage of data structures in rust.
Rust
125
star
10

rust-shed

Repository containing Rust crates common between other Facebook open source projects (like Mononoke or Eden).
Rust
102
star
11

go-media-webtransport-server

WebTransport media server that enables ultra low latency live streaming over QUIC (also VOD and rewind)
Go
94
star
12

webcodecs-capture-play

Live streaming low latency experimentation platform in the browser (using WebCodecs)
JavaScript
88
star
13

moq-encoder-player

This project is provides a minimal implementation (inside the browser) of a live video and audio encoder and video / audio player creating and consuming IETF MOQ stream. The goal is to provide a minimal live platform components that helps testing IETF MOQ interop
HTML
50
star
14

siMMMulator

siMMMulator is an open source R-package that helps users to generate simulated data to plug into Marketing Mix Models (MMMs). The package features a variety of functions to help users build a data set from scratch.
R
45
star
15

moq-go-server

This is an experimental relay (optimized for low latency media transfers) that implements IETF MOQ protocol
Go
43
star
16

MemorySnapshotAnalyzer

Analysis tooling for memory snapshots of managed code runtimes, specifically, Unity Memory Snapshots.
C#
31
star
17

protoquant

Prototype routines for GPU quantization written using PyTorch.
Python
19
star
18

moxygen

Implementation of IETF MOQ protocol
Python
15
star
19

kperf

TCP and TLS performance testing tool.
C
11
star
20

edencommon

Shared library for Watchman and Eden projects.
C++
11
star
21

propellint

A tool joining profile information with static analysis.
C++
5
star
22

r8

Customized version of the D8 dexer and R8 shrinker
Java
5
star
23

usb-video

Android library and app for streaming content from USB Video Class (UVC) devices.
C++
4
star
24

CARL

Classical Action Recognition Library
C++
4
star
25

WMG

Serverless Application Model (SAM) project to deploy a Cloudformation insfrastructure capable of measuring signals in WhatsApp conversations.
JavaScript
3
star
26

iot-session-manager

The IoT Session Manager is an application that provides a reliable and scalable device to device messaging network with simple setup. The system is deployable locally on a machine or on a cloud server and provides extensible methods for device authentication and control automation.
Python
3
star
27

free-threading-benchmarking

Benchmark results for free-threaded builds of Python
3
star
28

xrpa

Xrpa (pronounced "zerpa") is a platform architecture framework for building experimental XR experiences.
C++
3
star
29

fnob

Open source Fnob (Command-line Dynamic Random Generator) package;
SystemVerilog
2
star
30

Rmdkernel

This is a very simple fork of https//github.com/IRkernel/IRkernel to provide an rmarkdown (rather than R) jupyter kernel.
Jupyter Notebook
2
star
31

ndctl

A "device memory" enabling project encompassing tools and libraries for CXL, NVDIMMs, DAX, memory tiering and other platform memory device topics. Forked from https://github.com/pmem/ndctl
C
2
star
32

csproj_benchmark

A tool that generates Visual Studio C# projects and measures IDE startup performance
C#
1
star