picovolt 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # PicoVolt (PVDB)
2
2
 
3
3
  [![CI](https://github.com/MiniJe/picovolt/actions/workflows/ci.yml/badge.svg)](https://github.com/MiniJe/picovolt/actions/workflows/ci.yml)
4
- [![Version](https://img.shields.io/badge/version-0.3.0-blue.svg)](CHANGELOG.md)
4
+ [![Version](https://img.shields.io/badge/version-0.4.0-blue.svg)](CHANGELOG.md)
5
5
  [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
6
6
  ![Status: experimental](https://img.shields.io/badge/status-experimental-orange.svg)
7
7
 
@@ -54,6 +54,7 @@ Linux and Windows. Changes are tracked in [CHANGELOG.md](CHANGELOG.md).
54
54
  | [`engine/query.rs`](src/engine/query.rs) | SQL front-end (CREATE/INSERT/UPDATE/DELETE/DROP, `SELECT` with projection and aggregates, `WHERE` predicates, `BEFORE`, `ORDER BY`, `LIMIT`) |
55
55
  | [`engine/compliance.rs`](src/engine/compliance.rs) | optional, app-driven usage-policy hook (not a license requirement) |
56
56
  | [`db.rs`](src/db.rs) | the `Database` surface that ties it together |
57
+ | [`ffi.rs`](src/ffi.rs) | C ABI (the `capi` feature): a panic-safe, C-callable surface wrapping the engine for Go, Python, and C bindings |
57
58
 
58
59
  ### Engineering notes
59
60
 
@@ -126,14 +127,21 @@ no concurrency.
126
127
 
127
128
  | Target | How |
128
129
  |--------|-----|
129
- | **Rust** (crates.io) | `cargo add picovolt` (once published) |
130
- | **JavaScript / npm** (WebAssembly, browser and Node) | `wasm-pack build --target bundler --release -- --features wasm` |
130
+ | **Rust** (crates.io) | `cargo add picovolt` |
131
+ | **JavaScript / npm** (WebAssembly, browser and Node) | `npm install picovolt` |
132
+ | **C / Go / Python** (native, via the C ABI) | `cargo build --release --features capi`, then see [`bindings/`](bindings) |
131
133
  | **In-memory** (native, no filesystem) | `Database::open_memory()`, export with `bake_to_bytes()` |
132
134
 
133
135
  PicoVolt runs in the browser through its in-memory backend. Build the WebAssembly
134
- package with the command above, then `import { Db } from "picovolt"` and run SQL
135
- with `db.query(...)`. See [src/wasm_api.rs](src/wasm_api.rs) for the JavaScript
136
- surface.
136
+ package with `wasm-pack build --target bundler --release -- --features wasm`, then
137
+ `import { Db } from "picovolt"` and run SQL with `db.query(...)`. See
138
+ [src/wasm_api.rs](src/wasm_api.rs) for the JavaScript surface.
139
+
140
+ For native languages, the `capi` feature builds a shared library exposing a C ABI
141
+ ([include/picovolt.h](include/picovolt.h), [src/ffi.rs](src/ffi.rs)). The
142
+ [`bindings/`](bindings) directory wraps it for **Go** (cgo) and **Python**
143
+ (ctypes); both return query results as the same JSON shape as the JavaScript
144
+ binding. The bindings suit embedded use, not a concurrent server's primary store.
137
145
 
138
146
  ## Extending PicoVolt
139
147
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "picovolt",
3
3
  "type": "module",
4
4
  "description": "PicoVolt (PVDB): a polymorphic embedded database engine in Rust.",
5
- "version": "0.3.0",
5
+ "version": "0.4.0",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",
package/picovolt_bg.wasm CHANGED
Binary file