Without a Rust toolchain, start the server with the movies demo graph loaded:
docker run --rm -p 127.0.0.1:7475:7475 -p 127.0.0.1:7687:7687 ghcr.io/janvencl/graphbuff --demo movies
HTTP/JSON is then on http://127.0.0.1:7475 and Bolt on bolt://127.0.0.1:7687; see
Install without Rust for prebuilt binaries and durable data.
From source:
cargo run --release -p graphbuff-cli # interactive shell
cargo run --release -p graphbuff-cli -- -i examples/movies.cypher # load a script, then stay interactive
cargo run --release -p graphbuff-cli -- --data ./data # durable databases in ./data
cargo run --release -p graphbuff-cli -- --data ./data --persistent # ... in disk-resident storage
cargo run --release -p graphbuff-cli -- --demo movies # shell with the built-in movies graph
cargo run --release -p graphbuff-server # HTTP/JSON server on 127.0.0.1:7475
cargo run --release -p graphbuff-server -- --demo movies # ... with the built-in movies graph
cargo run --release -p graphbuff-server -- --bolt 127.0.0.1:7687 # ... plus Bolt for Neo4j drivers
cargo test --workspace
As a library:
use graphbuff::{Database, params};
let db = Database::in_memory();
db.execute("CREATE (:Person {name: 'Ann'})-[:KNOWS]->(:Person {name: 'Bob'})")?;
let r = db.execute_with_params(
"MATCH (a:Person {name: $name})-[:KNOWS]->(b) RETURN b.name AS friend",
¶ms! { "name" => "Ann" },
)?;
println!("{}", r.to_table());
Try it on your machine: one command starts the server with the movies graph. Needs Docker.
$ docker run --rm -p 127.0.0.1:7475:7475 -p 127.0.0.1:7687:7687 ghcr.io/janvencl/graphbuff --demo moviesThen follow Getting started.