Fost 5 release now out

Created 23rd September, 2017 03:51 (UTC), last edited 23rd September, 2017 04:12 (UTC)

The layout changes to fostlib::json have now landed. Previously the atomic parts of JSON (bool, int, double, string etc.) where stored in a separate variant to the one that handled the atomic, array and object parts. By bringing this all into one variant the type is smaller and dealing with atomic types is faster.

As part of this change we also changed the object and array to being stored by a shared_ptr rather than directly. This was always the intended design, and means that now taking a copy of a json is significantly cheaper. We have some more changes coming now that we have this base that should make the type smaller still and further improve performance.

We're also still moving towards improving string handling with a few new immutable string types in the pipeline and a move towards using immutable string views in many more places.

It's also about time that we get serious with Python 3 support. All of our projects are now using this and we need to be able to support bindings for it correctly. There's still some debate about whether that should be a branch in fost-py or a separate library. In any case the entirety of the Python 2 version will be replaced with something completely new.

Building on Linux

You will need a C++14 compiler. Recent versions of either gcc or clang are suitable.

git clone --branch= --recursive
cd fost-hello

Download locations


  • beanbag — Stand alone transactional JSON database server —
  • beanbag-seed — Seed project for giving you a starting point to develop web applications using Beanbag —
  • fost-hello — Sample seed project —
  • mengmon — Stand alone web server —
  • wright — Experimental build system —


  • f5-cord — First version of a new string library with compile time string and Unicode support —
  • f5-threading — Preview of the first Fost 5 library which includes help for threading —
  • fost-aws — Amazon AWS and OpenStack —
  • fost-android — Eclipse project for Android that allows Fost 4 and Beanbags to be used on mobile devices —
  • fost-android-ndk — The native code for Android. Includes required parts of Boost configured to use the standard Android build system.
  • fost-beanbag — Transactional JSON database —
  • fost-base — Build system and core libraries —
  • fost-internet — Internet protocols, servers & clients —
  • fost-meta — All libraries in one wrapper —
  • fost-orm — Object/Relational mapping —
  • fost-postgres — PostgreSQL —
  • fost-py — Python (2.x) bindings —
  • fost-web — Web server libraries —
  • fost-wright — Experiment in a build system —

Detailed change log


  • Add a _t literal for creating tstring instances. This allows us to deprecate the vstring template.
  • Added iostream output for lstring.


  • Add -h and -U options to fostgres-test to control how to access the database.


  • Fix generation of log messages from JSON where the modules are an array.
  • Count the number of times an exception has been absorbed.
  • Remove variant for storing atoms in json
  • Don't print empty objects in the log stream.
  • Load the global logging configuration much later so it can be changed using the -i or -j command line switches.
  • Better integrate utf::u8_view and string.
  • Make array_view sliceable.
  • There is now an explicit constructor from std::string for the u8_view.
  • Make dates fully comparable.
  • Improve error report when coercing JSON to strings fails.
  • The unexpected_eof error can now take a boost::system::error_code for use with socket errors.


  • Ampersands, single quote and dollar symbol added to allowed URL path characters.
  • The conversion of HTTP request file paths to strings now works for a wider range of inputs. The conversion to boost::filesystem::wpath is problematic with Boost versions prior to 1.64 due to the way they use codecvt.


  • Improve error report when a beanbag update precondition wasn't met.


  • Make it possible to iterate over the columns in the row.
  • Change libpqxx paths for latest code.
  • Implement assignment and pre-increment for recordset::const_iterator


  • The spider always outputs a test.txt file with all results in it.


  • The template middleware now uses the headers from the wrapped view instead of throwing them away.
  • Logging middleware also records the processing duration.