https://github.com/kizzycode/sqlite-tiny-rust
A minimalistic SQLite crate which ships the amalgamation variant and provides a tiny Rust API
https://github.com/kizzycode/sqlite-tiny-rust
Last synced: about 2 months ago
JSON representation
A minimalistic SQLite crate which ships the amalgamation variant and provides a tiny Rust API
- Host: GitHub
- URL: https://github.com/kizzycode/sqlite-tiny-rust
- Owner: KizzyCode
- Created: 2024-02-18T23:25:07.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-19T00:31:54.000Z (over 1 year ago)
- Last Synced: 2024-04-20T13:35:45.759Z (about 1 year ago)
- Language: Rust
- Size: 2.35 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE BSD 2-CLAUSE.md
Awesome Lists containing this project
README
[](https://opensource.org/licenses/BSD-2-Clause)
[](https://opensource.org/licenses/MIT)
[](https://ci.appveyor.com/project/KizzyCode/sqlite-tiny-rust)
[](https://docs.rs/sqlite-tiny)
[](https://crates.io/crates/sqlite-tiny)
[](https://crates.io/crates/sqlite-tiny)
[](https://deps.rs/crate/sqlite-tiny)# `sqlite-tiny`
Welcome to `sqlite-tiny` 🎉This crate is minimalistic SQLite library crate which ships the amalgamation variant and provides a tiny Rust API. If
you just want the embedded SQLite library plus the generated C bindings, you can disable the `api`-feature (enabled by
default).## Performance Considerations
For the sake of simplicity, this crate operates under the following assumption: `malloc` is cheap. To keep the code
clean and readable, we are quite liberal with allocating memory and copying data to avoid overly complex life-time
juggling.Some locations where we do this are (non-exhaustive):
- Binding values: Since some values require a temporary intermediate representation before they can be bound, and
statements should be able to outlive a passed argument, we instruct SQLite to copy the values into an internal buffer
- Reading values: To avoid lifetime troubles, we always copy a value from a row/column out of the SQLite context into
Rust-managed memory immediately on access## Distriuted SQLite Version
For simplicity, this crate does not link to external SQLite versions, but exclusively builds and embeds the amalgamation
in the [`dist`-folder](dist/). For more information see [`dist/README.md`](dist/README.md).