Fost 5 release now out

Created 22nd March, 2020 06:24 (UTC), last edited 23rd March, 2020 03:41 (UTC)

There is a new library now, Makham, which is at the moment a basic coroutines library offering asynchronous task execution with ties through futures to non-coroutine code. This sits on top of the coroutines TS and is currently only usable from Clang.

There has also been more progress towards being able to move to immutable shared strings and away from the old fostlib::string interface, with more changes coming. A small change to the JSON parser has been shipped that gives a considerable performance boost (up to 30%) in some circumstances.

There is a new HTTP client library that supports testing through setting expectations which is part of the fost-internet library. Client code in the rest of the libraries will be migrated to it, which will improve testing capabilities for Fostgres and Odin.

Building on Linux & Mac

You should install Boost development packages using your package manager or brew to safe you from having to build them.

git clone --branch= --recursive
cd fost-hello
mkdir build.tmp
cd build.tmp
cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX=../dist
ninja install/strip
export LD_LIBRARY_PATH=../dist/lib

On the Mac you will need to set DYLD_LIBRARY_PATH before running hello

export DYLD_LIBRARY_PATH=../dist/lib

Download locations


  • fost-hello — Sample seed project —
  • fost-meta — All libraries and applications in one wrapper —
  • mengmon — Stand alone web server —
  • test-android — Android application that runs Fost unit tests —
  • test-ios — iOS application that runs Fost unit tests —
  • wright — Experimental build system —


  • cord — First version of a new string library with compile time string and Unicode support —
  • fost-aws — Amazon AWS and OpenStack —
  • 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-postgres — PostgreSQL —
  • fost-web — Web server libraries —
  • fost-wright — Experiment in a build system —
  • json-schema — JSON Schema validation —
  • makham — Coroutines —
  • threading — Preview of the first Fost 5 library which includes help for threading —

Detailed change log


  • json can now be constructed from u16 literals.
  • Coercion should now always work if the to type is constructible from the from type.
  • Add conversions between std and boost shared_ptrs.
  • Improve the digester interface to take more string types.
  • Have json store the string directly rather than as a shared_ptr. This is a breaking change on json visitors.
  • Add source file and line/column numbers to parse_error.
  • Improve the jcursor API so it can mutate json more efficiently.
  • Remove -e (print arguments/environment) support from command line.


  • Can now set exceptions as expected outcomes from the HTTP cache.
  • Add high level user agent with test expectation support.


  • Add middleware that can replace response text with fixed strings or setting values.
  • Deprecate use of view instances.
  • Add a reverse proxy view that allows for changes in request and response.


  • Improve the display of test failures from fostgres-test.
  • Add sending of cookie values from testserver.cookies to fostgres-test.
  • Add rm-path to test scripts so we can remove JSON from variable values.
  • Test scripts can now have the view JSON directly in the GET, PUT etc. calls.


  • allow link between two app user in
  • Facebook and Google user with same email will merged as same user when register, and can login by both method
  • Add support changing non app jwt to app jwt when renewing.


  • tsmap::alter added so a found member can be changed in-situ.
  • tsmap::add_if_not_found miss lambda can now mutate the found item.