mirror of
https://github.com/mailscope/kumomta.git
synced 2026-09-09 12:02:14 +00:00
A bit of a big commit because I wanted sqlite queries to run async and there isn't a sane way to tell in mlua whether a given context is safe to yield for an await, which meant making every case where we call into lua be fully async. This adds a simple but powerful binding to sqlite that performs its IO in a blocking tokio thread pool, and returns the results back to lua. There is no implicit caching of queries, and no implicit connection pooling.
15 lines
384 B
TOML
15 lines
384 B
TOML
[package]
|
|
name = "mod-sqlite"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[dependencies]
|
|
anyhow = "1.0"
|
|
config = {path="../config"}
|
|
mlua = {version="0.8", features=["vendored", "lua54", "async", "send", "serialize"]}
|
|
serde_json = "1.0"
|
|
sqlite = "0.30"
|
|
tokio = {version="1.25", features=["rt"]}
|