Rust
To install and use GlueSQL in your Rust project, you'll first need to add it as a dependency from crates.io. You can do this by adding the following lines to your Cargo.toml
file:
[dependencies]
gluesql = "0.15"
By default, all available storage features are included with GlueSQL. Here's a list of the available features:
gluesql_sled_storage
- Storage based on the persistent key-value database called sledgluesql_memory_storage
- Simple in-memory storagegluesql-shared-memory-storage
- A wrapper around memory-storage for easy use in multi-threaded environmentsgluesql-json-storage
- Storage that allows you to analyze and modify JSON or JSONL files using SQLgluesql-composite-storage
- A storage feature that enables joining and processing data from multiple storage types simultaneouslygluesql-web-storage
- Storage supporting localStorage and sessionStorage, available only in web assembly buildsgluesql-idb-storage
- IndexedDB-based storage, available only in web assembly builds
If you don't need all the default storage features, you can disable them and select only the ones you require. To do this, update your Cargo.toml
file with the following lines:
[dependencies.gluesql]
version = "0.15"
default-features = false
features = ["gluesql_memory_storage", "gluesql-json-storage"]
This configuration will disable the default storage features and only include the gluesql_memory_storage
and gluesql-json-storage
features in your project.