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 +14 -6
- package/package.json +1 -1
- package/picovolt_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# PicoVolt (PVDB)
|
|
2
2
|
|
|
3
3
|
[](https://github.com/MiniJe/picovolt/actions/workflows/ci.yml)
|
|
4
|
-
[](CHANGELOG.md)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|

|
|
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`
|
|
130
|
-
| **JavaScript / npm** (WebAssembly, browser and Node) | `
|
|
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
|
|
135
|
-
with `db.query(...)`. See
|
|
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
package/picovolt_bg.wasm
CHANGED
|
Binary file
|