Add sqlite stub library
This commit is contained in:
13
crates/lb_sqlite/Cargo.toml
Normal file
13
crates/lb_sqlite/Cargo.toml
Normal file
@@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "lb_sqlite"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
authors.workspace = true
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[dependencies]
|
||||
lb = { path = "../lb", features = ["time"] }
|
||||
luaffi = { version = "0.0.1", path = "../luaffi" }
|
||||
rusqlite = { version = "0.36.0", features = ["bundled", "load_extension", "backup", "blob", "limits", "window", "series", "session", "collation", "serialize"] }
|
||||
3
crates/lb_sqlite/src/lib.rs
Normal file
3
crates/lb_sqlite/src/lib.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
//! luby SQLite library.
|
||||
#[path = "mod.rs"]
|
||||
pub mod sqlite;
|
||||
27
crates/lb_sqlite/src/mod.rs
Normal file
27
crates/lb_sqlite/src/mod.rs
Normal file
@@ -0,0 +1,27 @@
|
||||
//! SQLite library.
|
||||
//!
|
||||
//! The `lb:sqlite` library provides an interface to SQLite databases.
|
||||
//!
|
||||
//! ## Exports
|
||||
//!
|
||||
//! See [`lb_sqlitelib`] for items exported by this library.
|
||||
use luaffi::{cdef, metatype};
|
||||
|
||||
/// Items exported by the `lb:sqlite` library.
|
||||
///
|
||||
/// This library can be acquired by calling
|
||||
/// [`require("lb:sqlite")`](https://www.lua.org/manual/5.1/manual.html#pdf-require).
|
||||
///
|
||||
/// ```lua
|
||||
/// local sqlite = require("lb:sqlite");
|
||||
/// ```
|
||||
#[cdef(module = "lb:time")]
|
||||
pub struct lb_sqlitelib;
|
||||
|
||||
#[metatype]
|
||||
impl lb_sqlitelib {
|
||||
#[new]
|
||||
extern "Lua-C" fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user