Getting Started 🔗

Unicorn is a lightweight, embeddable implementation of essential Unicode® algorithms written in C99.

Unicorn is compliant with the MISRA C:2012 coding standard. It’s perfect for resource constrained devices like microcontrollers and IoT devices.

Building from Source 🔗

Building Unicorn requires Python 3.10 or newer and a C99 compiler.

To build Unicorn, Download the latest version from the releases page and build with

$ ./configure
$ make
$ make install

or build with CMake

$ cmake -B build
$ cmake --build build
$ cmake --install build

To customize which features Unicorn is built with, edit the features.json file found in the source distribution. The schema for this file is defined in the Feature Customization guide.

When Unicorn is built with a provided build system (e.g. CMake), changes to features.json are detected automatically as part of the build process.

Custom Features File 🔗

The standard build instructions for Unicorn recommend you edit the features.json file directly in the root directory of the Unicorn source distribution. However, you might prefer to host and maintain a separate copy of the file in your own project structure.

To do this, copy the features.json file into your own project directory and then configure Unicorn like so

$ ./configure --with-unicorn-config=/path/to/your/features.json

and with CMake

$ cmake -B build -DUNICORN_CONFIG=/path/to/your/features.json

Then build as described in the previous section. This approach means you don’t have to modify files in the Unicorn source directory.

Versioning Notice 🔗

Unicorn follows semantic versioning with one deviation: the result of a function may change between minor version bumps. For example, the function uni_is might return a different value for a Unicode character between minor releases.

This deviation exists because Unicorn relies on the Unicode Standard, and updates to Unicode may cause functions to return different results. Changes to the Unicode Standard are outside of Railgun Labs’ control, so while we strive to maintain backward compatibility, function results may change due to updates in Unicode.

Under normal circumstances, Railgun will only bump the major version if the C API is changed (e.g. a function signature is altered or a function is removed). In the event of a major version bump due to changes in Unicode, Railgun may offer free license upgrades to all current licensees, depending on the extent of the changes. Licensees will be notified of free upgrades through private communication channels and a public announcement post.