Installation

Library

Graphersal is primarily provided as a library and can be easily incorporated into your Rust project by adding it as a dependency.

To include Graphersal as a dependency in your Rust project's Cargo.toml file, refer to the following example:

[dependencies]
graphersal = "0.1"

Supported Features

Graphersal comes with the several key features.

FeatureDescription
ioReads and writes graph files: GraphSON 3.0 (TinkerPop's format; values keep their types, dates and other types Graphersal cannot hold are skipped with a report) and GraphML. GraphML values are written as their plain text (a UUID as its canonical string, arrays and objects as JSON text); logical types (uuid, array, object) are restored on import only from the schema stored in the target graph, so set the schema first. GraphML never carries the schema; it travels as its own JSON.
serdeConverts between plain JSON and Graphersal values (a UUID is written as its canonical string), and reads/writes schema files.
scriptGraphersal also supports a Domain Specific Language (DSL) for scripting based on the Rhai library. The math() step does not need it: its equations run on Graphersal's own expression engine in every build (see Math Expressions).
persistGraphersal's own lossless binary format: packed snapshots (.gsnap), a write-ahead journal with recovery, and the Store (one directory or one .gstore file = one graph, durable commits, point in time, fork, rollback, backups, repair). See Persistence.
persist-zstdzstd-compressed snapshot chunks on top of persist (pure Rust).
persist-zipZIP backup archives of a Store on top of persist.

CLI Application

The command-line tool graphersal (crate graphersal-cli: the REPL, a one-shot query runner, the dev server and the graphersal store commands) is built from the repository:

cargo build -p graphersal-cli --release      # target/release/graphersal
target/release/graphersal --help

Every command of the tool is on the Command Cheat Sheet.

WEB Playground

Graphersal also runs in the browser: the web playground is a static page with the engine compiled to WebAssembly, so there is nothing to install on a server. Build it from the repository with playground/build.sh and serve the playground/ directory, as described in the WEB Playground chapter.