Expand description
Embedded database instance
SurrealDB
itself can be embedded in this library, allowing you to query it using the same
crate and API that you would use when connecting to it remotely via WebSockets or HTTP.
All storage engines are supported but you have to activate their feature
flags first.
NB: Some storage engines like TiKV
and RocksDB
depend on non-Rust libraries so you need
to install those libraries before you can build this crate when you activate their feature
flags. Please refer to these instructions
for more details on how to install them. If you are on Linux and you use
the Nix package manager
you can just run
nix develop github:surrealdb/surrealdb
which will drop you into a shell with all the dependencies available. One tip you may find
useful is to only enable the in-memory engine (kv-mem
) during development. Besides letting you not
worry about those dependencies on your dev machine, it allows you to keep compile times low
during development while allowing you to test your code fully.