Skip to main content

Crate surrealdb_server

Crate surrealdb_server 

Source
Expand description

Library entrypoints for embedding SurrealDB server inside another Rust application. Exposes the same init() used by the surreal binary so external apps can start SurrealDB within their own main().

Unstable!

This crate is SurrealDB internal API. It does not adhere to SemVer and its API is free to change and break code even between patch versions. If you are looking for a stable interface to the SurrealDB library please have a look at the Rust SDK.

Modules§

core
Re-export core for convenience so embedders can use surreal::core::....
ntw
Make ntw public so embedders can access RouterFactory and related networking definitions when running SurrealDB as a library.
rpc
Make rpc public so embedders can access RpcState and related router definitions when running SurrealDB as a library.
sdk
This library provides a low-level database library implementation, a remote client and a query language definition, for SurrealDB, the ultimate cloud database for tomorrow’s applications. SurrealDB is a scalable, distributed, collaborative, document-graph database for the realtime web.

Structs§

Config
RpcState
Re-export RpcState for convenience so embedders can use surreal::RpcState.

Traits§

ConfigCheck
Trait for validating configuration before system initialization.
ConfigCheckRequirements
RouterFactory
Re-export RouterFactory for convenience so embedders can use surreal::RouterFactory. Factory for constructing the top-level Axum Router used by the HTTP server.

Functions§

init
Initialize SurrealDB CLI/server with the same behavior as the surreal binary. This spins up a Tokio runtime with a larger stack size and then runs the CLI entrypoint (which starts the server when the start subcommand is used).