Skip to main content

wasm_dbms_api/
lib.rs

1#![crate_name = "wasm_dbms_api"]
2#![crate_type = "lib"]
3#![cfg_attr(docsrs, feature(doc_cfg))]
4#![deny(clippy::print_stdout)]
5#![deny(clippy::print_stderr)]
6
7//! # WASM DBMS API
8//!
9//! Runtime-agnostic API types and traits for the wasm-dbms engine.
10//!
11//! This crate provides all shared types, traits, and abstractions needed
12//! to interact with a wasm-dbms instance. It is independent of any specific
13//! WASM runtime (IC, WASI, Wasmtime, etc.).
14//!
15//! Import all useful types and traits via the prelude:
16//!
17//! ```rust
18//! use wasm_dbms_api::prelude::*;
19//! ```
20//!
21//! ## Feature flags
22//!
23//! | name     | description                                                                        | default |
24//! |----------|------------------------------------------------------------------------------------|---------|
25//! | `candid` | Derives `CandidType` on all public types for Candid API boundaries.                |         |
26//! | `sql`    | Exposes the shared SQL types (`SqlError`, `SqlResult`, `SqlRow`) in `dbms::sql`.   |         |
27
28#![doc(html_playground_url = "https://play.rust-lang.org")]
29
30// Makes the crate accessible as `wasm_dbms_api` in macros.
31extern crate self as wasm_dbms_api;
32
33pub mod dbms;
34pub mod error;
35pub mod memory;
36pub mod prelude;
37#[cfg(test)]
38mod test_alloc;
39#[cfg(test)]
40mod tests;
41pub mod utils;