Skip to content

C5T/Current

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Current C++ MIT license

tests cmake

As of April 2024, Current has seen 1000 pull requests. And counting!

cmake

As of 2024, we are making Current more cmake-friendly.

The core paradigms of Current stay the same, namely:

  • Make it easy to develop in C++ with current.
  • The code should be self-explicable and hard to make a mistake in.

In practical terms, the trasition to cmake means even easier integration for user code. For an example, consider this one. The TL;DR: on how to start a Current-first C++ project in a few minutes is:

  • Start a repository.
  • Grab the Makefile into its root cirectory, copying it from C5T/Current/stable/cmake/Makefile.
  • Add a .gitognore file, with ``CMakeLists.txt, current/`, `googletest/`, and `.current/` + `.current_debug/`.
  • Put your *.cc source files under src/, and
  • Just make would do the job.

This approach is a bit unorthodox, since it invokes make to run a cmake-based build. On the other hand, this default Makefile will grab the latest CMakeLists.txt from C5T/Current, this default Makefile offers all the standard debug/release/clean/test targets, including a few other useful ones such as fmt, and this default Makefile makes vim the natural IDE of choice for C++ projects! =)

Components

The type system used in Current framework. Built in reflection (even for templates!) while staying compatible with the native C++ data structures.

JSON and binary serialization, string manipulation library, command line flags library, low-level system wrappers, and other core pieces.

HTTP server and client, efficient in-memory message queue, persistence layer, streaming API interface.

Structured, append-only, immutable data persistence layer with publish-subscribe.

Super easy to use in-memory transactional object store with Stream-based persistence. Simple pub-sub powered distributed system scaling via eventually consistent read-only replicas.

Compact and autogenerated C++ framework to evolve objects from one type hierarchy into another type hierarchy while remaining fully within the strong typing paradigm.

The language to define continuous data pipelines.

An efficient convex optimization engine.

Low-level compact persistence layer with 1+ GB/s throughput.

An extensible event collecting HTTP server.

Contribution

Welcome, contributors! Please start here by signing the CLA.

Quick Start

Install the development dependencies

  • nasm for FnCAS.
    • macOS: brew install nasm
  • geninfo from lcov for coverage report.
    • macOS: brew install lcov
  • clang-format-10 for code formatting (make indent).
    • TODO(dkorolev) On macOS no clang-format-3.6 was availably, and the trick was to use clang-format-3.8 and symlink it: brew install [email protected] && ln -s /usr/local/bin/clang-format-3.6 /usr/local/opt/[email protected]/bin/clang-format, double-checking.

Clean the output of the previous builds

make clean

Run the tests

Builds and runs all the tests as a single binary. Slow, eats up tons of CPU, but measures coverage. Consider make individual_tests or make test within individual directories to run the subset of tests.

make test

Builds and runs the tests for each module separately:

make individual_tests

Builds and runs the tests for one of the modules (e.g. blocks/http):

(cd blocks/http && make test)

Verify the code

"Builds" all header files individually, twice each header file, and "links" these pairs together. Ensures no symbols are exported, and the ODR will not be violated when linking together two objects, each of which is independently using Current.

make check