bonsaidb-client

Crates.iobonsaidb-client
lib.rsbonsaidb-client
version0.5.0
sourcesrc
created_at2022-01-19 17:53:55.032597
updated_at2023-10-05 17:59:57.833358
descriptionClient for accessing BonsaiDb servers.
homepagehttps://bonsaidb.io/
repositoryhttps://github.com/khonsulabs/bonsaidb
max_upload_size
id516977
size115,567
Publishers (github:khonsulabs:publishers)

documentation

README

BonsaiDb Client

Networked client for bonsaidb-server.

This crate supports two methods for accessing a BonsaiDb server: QUIC and WebSockets.

QUIC is a new protocol built atop UDP. It is designed to operate more reliably than TCP, and features TLS built-in at the protocol level. WebSockets are an established protocol built atop TCP and HTTP.

BlockingClient provides access to BonsaiDb by implementing the StorageConnection trait. AsyncClient provides access to BonsaiDb by implementing the AsyncStorageConnection trait.

Minimum Supported Rust Version (MSRV)

While this project is alpha, we are actively adopting the current version of Rust. The current minimum version is 1.70.

WASM Support

This crate supports compiling to WebAssembly. When using WebAssembly, the only protocol available is WebSockets.

Testing Websockets in a Browser

We have a fully deployed example application available that can be downloaded and run locally. This example is confirmed to work using Firefox on a local machine, or any modern browser when accessing https://minority-game.gooey.rs/.

  • Ensure that the browser is able to talk to the IP/port that you're bound to. Browsers try to prevent malicious scripts. You may need to bind 0.0.0.0 instead of localhost, for example, to circumvent these protections.
  • All Chrome-based browsers require secure websockets over localhost. This makes Chrome not a great candidate for testing WASM applications locally, as installing a valid certificate in a test/dev environment can be tricky and/or annoying.

Feature Flags

By default, the full feature is enabled.

  • full: Enables trusted-dns and websockets
  • trusted-dns: Enables using trust-dns for DNS resolution. If not enabled, all DNS resolution is done with the OS's default name resolver.
  • websockets: Enables WebSocket support for bonsaidb-client.
  • password-hashing: Enables the ability to use password authentication using Argon2.
  • token-authentication: Enables the ability to authenticate using authentication tokens, which are similar to API keys.
  • tracing: Enables tracing annotations on some functions and dependencies.

Open-source Licenses

This project, like all projects from Khonsu Labs, is open-source. This repository is available under the MIT License or the Apache License 2.0.

To learn more about contributing, please see CONTRIBUTING.md.

Commit count: 1100

cargo fmt