C++ Python C Assembly CMake Objective-C++
Permalink
Failed to load latest commit information.
.patches Boost: Pacify more warnings. Jan 13, 2017
_build drake: Remove the use of the cryptography's legacy mode. Nov 23, 2016
docs/static_files readme: Add logo. Feb 20, 2017
drake @ 823e441 das.cli: don't pass `true` as default value to non Boolean options Apr 25, 2017
examples elle.reactor: rename tcp-server/tcp-socket as TCPServer/TCPSocket Apr 26, 2017
farm farm: also accept xenial Apr 20, 2017
licenses licenses: Add licenses for open source software. Jul 26, 2016
src reactor.network: clean up Socket Apr 26, 2017
tests/elle elle.reactor: rename tcp-server/tcp-socket as TCPServer/TCPSocket Apr 26, 2017
.clang-format elle.athena.paxos: fix indentation and space issues Feb 23, 2017
.gitignore Add DS_Store to gitignore Apr 4, 2013
.gitlab-ci.yml CI: fix alpine Apr 25, 2017
.gitmodules .gitmodules: Use relative paths for submodules. Feb 28, 2017
LICENSE.md Rename LICENSE to LICENSE.md to comply to GitHub licensing and broken… Apr 25, 2017
boost.py boost: Install each version of boost in a versioned directory. Mar 21, 2016
buildenv Merge master into feature/documentation. Mar 20, 2017
drake-utils.py drake-utils: Recompute git version if production_build changed. Mar 4, 2016
drakefile <string>: stou Apr 16, 2017
elle.el Emacs: don't force font size. Oct 18, 2016
etags Add etags generation script. Oct 18, 2016
readme.md readme: Mention the wiki. Apr 5, 2017
valgrind.suppr valgrind: Add suppressions for dOpenSSL. Nov 28, 2016

readme.md

Elle, the coroutine-based asynchronous C++ development framework.

Logo - Elle

Elle is a collection of libraries, written in modern C++ (C++14). It contains a rich set of highly reusable concepts, algorithms, API wrappers, ...

Elle is split into different specialized sub-libraries to provide elegant ways to approach asynchronism (using coroutines), networking, formatting, serialization, logging, RPCs, etc.

Notes:

  • Elle is under development, used and maintained by Infinit as a core library. APIs, structures and concepts may change over time. You can use it as is but we don't guarantee any API backward compatibility.
  • Elle has a sub-library also called elle, which might change name in a near future.

Example

Here is an example showing an asynchronous HTTP operation in a natural form (no callbacks) and basic JSON serialization.

// Initialize the HTTP Request.
elle::reactor::http::Request r("https://en.wikipedia.org/w/api.php",
                               elle::reactor::http::Method::GET);
r.query_string({
  {"format", "json"},
  {"action", "query"},
  {"prop", "extracts"},
  {"explaintext", ""},
  {"exintro", ""},
  {"titles", "JSON"}
});
// Perform the HTTP request and yield until response is available.
r.finalize();
// Deserialize the json response.
std::cout << elle::json::pretty_print(elle::json::read(r)) << std::endl;

Getting Elle.

To download the source code and build Elle by yourself, get it from GitHub.

git clone https://github.com/infinit/elle --recursive # Clone elle and its submodules.

Note: If you cloned it using the GitHub "clone" button, do not forget to run git submodules update --init --recursive!

Structure

As mentioned earlier, Elle is composed of a set of sub-libraries, designed to ease C++ development through robust and flexible implementations, including:

  • elle: Utilities including serialization, logs, buffer, formatting, ...
  • reactor: An asynchronous framework using a coroutines scheduler
  • cryptography: Object-oriented cryptography wrapper around OpenSSL
  • protocol: Network communication designed to support RPCs
  • das: Symbol-based introspection
  • athena: Byzantine environment algorithms (Paxos)
  • service/aws: reactorified AWS API wrapper
  • service/dropbox: reactorified Dropbox API wrapper

How to build Elle (or parts of Elle)

Requirements

Build system

Elle uses Drake and has it as a submodule.

How to compile

For a detailed procedure, visit our wiki: How to build.

First you need to install drakes requirements.

sudo pip3 install elle/drake/requirements.txt # Install Drake dependencies.

Note: If you don't want Drake dependencies to be installed system-wide, you should consider using virtualenv.

Change directory to elle/_build/<architecture> where you can find a generic Drake configuration script.

GNU/Linux

cd elle/_build/linux64
./drake //build -j 2 # Build all libraries using 2 jobs.

macOS

cd elle/_build/osx
./drake //build -j 2 # Build all libraries using 2 jobs.

Because Elle was designed to be modular, you can build specific parts of Elle by running ./drake //<module>/build:

./drake //src/elle/cryptography/build -j 2 # To build libcryptography and its dependencies.
./drake //src/elle/reactor/build -j 2 # To build the libreactor and its dependencies.
./drake //src/elle/protocol/build -j 2 # To build the libprotocol and its dependencies.
./drake //...

It will result on <module>/lib/libelle_<module>.so and its dependencies on GNU/Linux, <module>/lib/lib<module>.dylib on macOS, ...

Dependencies

Elle depends on a few libraries which are automatically downloaded and built for your system by Drake if needed.

List of projects using Elle

Wiki

Consult Elle's wiki for more information about Elle.

Maintainers