TreeLDR Quickstart

This quickstart covers the installation of TreeLDR on Linux and macOS, the definition of a simple TreeLDR schema with the creation of a JSON Schema and JSON-LD context derived from it, and finally its integration in a Rust program.

Installation

Requirements:

Both can be installed using rustup.

Notes:

  • You can check your current version of Rust by running:

rustc --version

  • You can update your existing Rust version by running:

rustup update

TreeLDR can be installed by first cloning the git repository which contains the different libraries composing the TreeLDR language, the compiler library, and its modules. After that, you can use cargo to build and install the compiler from the directory:

git clone https://github.com/spruceid/treeldr.git
cd treeldr
cargo install --path tldrc

This will install the TreeLDR compiler inside your $HOME/.cargo/bin folder by default. Make sure to add this folder to your $PATH before running tldrc. You can check that TreeLDR is correctly installed and accessible by calling tldrc:

tldrc --help

Last updated