Lauri Virtanen
a7100d8e9b
Autofix clippy issues with cargo fix --clippy
2024-11-24 20:24:47 +02:00
Pekka Enberg
e1b2d043be
Limbo 0.0.8
2024-11-20 19:16:11 +02:00
Pekka Enberg
229e62704b
bindings/python: Add Python example
2024-11-20 19:10:02 +02:00
Pekka Enberg
a18f33f93b
bindings/wasm: Add example using Drizzle ORM
2024-11-20 18:20:39 +02:00
Pekka Enberg
81b68b7047
Limbo 0.0.7
2024-11-20 18:15:36 +02:00
Pekka Enberg
20340038a5
bindings/wasm: Add integration tests
2024-11-20 11:54:34 +02:00
Pekka Enberg
bfce49c7eb
bindings/wasm: Fix conversion to JsValue
2024-11-20 11:54:34 +02:00
Pekka Enberg
b65d0a72ba
bindings/wasm: Implement Statement.raw()
2024-11-20 11:47:28 +02:00
Pekka Enberg
0fb1e59c9a
Limbo 0.0.6
2024-11-18 19:16:15 +02:00
Pekka Enberg
e818bdb3ef
Merge 'open file in append mode' from Pere Diaz Bou
...
Closes #409
2024-11-18 19:15:05 +02:00
Pere Diaz Bou
2cc89f712e
open file in append mode
2024-11-18 18:06:01 +01:00
Pekka Enberg
a83e62f6f4
Limbo 0.0.5
2024-11-18 14:57:00 +02:00
Pekka Enberg
8efeb16b82
Merge 'bindings/wasm: "SELECT 1" benchmark' from Pekka Enberg
...
This adds a benchmark for "SELECT 1" that essentially just evaluates the
overhead of calling into the library. Looks like WebAssembly adds 2.5x
overhead compared to native code...
```
penberg@vonneumann perf % node perf-limbo.js
cpu: Apple M1
runtime: node v18.19.0 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p999
------------------------------------------------- -----------------------------
• Statement
------------------------------------------------- -----------------------------
SELECT 1 771 ns/iter (624 ns … 2'183 µs) 750 ns 1'085 ns 1'750 ns
summary for Statement
SELECT 1
penberg@vonneumann perf % node perf-better-sqlite3.js
cpu: Apple M1
runtime: node v18.19.0 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p999
------------------------------------------------- -----------------------------
• Statement
------------------------------------------------- -----------------------------
SELECT 1 302 ns/iter (166 ns … 779 µs) 292 ns 375 ns 1'000 ns
summary for Statement
SELECT 1
```
Reviewed-by: Pere Diaz Bou <pere-altea@homail.com >
Closes #394
2024-11-16 19:00:39 +02:00
Pekka Enberg
60cc8c0347
bindings/wasm: "SELECT 1" benchmark
...
This adds a benchmark for "SELECT 1" that essentially just evaluates the
overhead of calling into the library. Looks like WebAssembly adds 2.5x
overhead compared to native code...
```
penberg@vonneumann perf % node perf-limbo.js
cpu: Apple M1
runtime: node v18.19.0 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p999
------------------------------------------------- -----------------------------
• Statement
------------------------------------------------- -----------------------------
SELECT 1 771 ns/iter (624 ns … 2'183 µs) 750 ns 1'085 ns 1'750 ns
summary for Statement
SELECT 1
penberg@vonneumann perf % node perf-better-sqlite3.js
cpu: Apple M1
runtime: node v18.19.0 (arm64-darwin)
benchmark time (avg) (min … max) p75 p99 p999
------------------------------------------------- -----------------------------
• Statement
------------------------------------------------- -----------------------------
SELECT 1 302 ns/iter (166 ns … 779 µs) 292 ns 375 ns 1'000 ns
summary for Statement
SELECT 1
```
2024-11-16 13:10:23 +02:00
Pekka Enberg
82ec900b07
bindings/wasm: Fix VFS.sync() function signature
...
We don't expect any return value from the underlying `fsync()` so fix
the function signature accordingly.
Fixes the following obscure error:
```
TypeError: Cannot convert undefined to a BigInt
at wasm://wasm/00942492:wasm-function[1501]:0x1c4dc1
at wasm://wasm/00942492:wasm-function[694]:0x189586
at wasm://wasm/00942492:wasm-function[50]:0x143d7
at wasm://wasm/00942492:wasm-function[60]:0x3f91a
at new Database (/Users/penberg/src/penberg/limbo/bindings/wasm/pkg/limbo_wasm.js:162:26)
at file:///Users/penberg/src/penberg/limbo/bindings/wasm/perf/perf-limbo.js:5:12
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:336:24)
at async loadESM (node:internal/process/esm_loader:34:7)
at async handleMainPromise (node:internal/modules/run_main:106:12)
```
2024-11-16 13:07:32 +02:00
Pekka Enberg
851ea65530
Bump PyO3 dependency
...
Github's bot reports a use-after-free issue so let's bump up the
version:
https://github.com/penberg/limbo/security/dependabot/4
2024-11-15 16:14:34 +02:00
Pere Diaz Bou
6cd0f03643
core: create databases from limbo
2024-11-15 12:09:07 +01:00
Pere Diaz Bou
87c80b2a07
use core wal file for wasm
2024-11-14 17:54:20 +01:00
Pere Diaz Bou
71ac1eacb7
Merge 'btree: cursor with lineal stack structure' from Pere Diaz Bou
...
Removed MemPage from the code in favor of an array to encode the stack
of the cursor. This is both simpler and better in terms of memory
access.
O_DIRECT was removed from WAL file as it introduces alignment
constraints that are too hard to follow in regular appends. Maybe in the
future?
Closes #378
2024-11-13 18:23:31 +01:00
Pere Diaz Bou
e2276c2e9d
O_DIRECT disable on WAL
2024-11-13 13:45:42 +00:00
Pekka Enberg
b7ca2c9823
bindings/wasm: Add Database.prepare() and Statement.all()
...
This adds `Database.prepare()` and `Statement.all()` APIs to the Wasm
bindings so that you can actually get something useful out of the
library.
2024-11-13 12:22:35 +02:00
Pekka Enberg
40f517b03f
Fix Wasm packaging
...
The `wasm-pack` too has a known bug where it forgets to add snippets to
`package.json`:
https://github.com/rustwasm/wasm-pack/issues/1206
Let's fix that with some bash magic.
2024-11-13 11:28:22 +02:00
Pere Diaz Bou
19f1a00ca4
bindings/python: update bindings requirements-dev
2024-11-12 17:09:41 +01:00
Pere Diaz Bou
ce8378793e
btree: run until finished or IO + bug fixes
2024-11-11 17:03:15 +01:00
Pere Diaz Bou
ce1367b76a
move wal creation
2024-11-07 13:51:02 +01:00
Pere Diaz Bou
0b46648c0e
write wal header on init
2024-11-07 13:29:57 +01:00
Pere Diaz Bou
8eb3c89227
wasm,sim fixes
2024-11-05 15:41:30 +01:00
Pere Diaz Bou
f43e53a815
fix wasm and simulator wal impl
2024-11-05 15:29:54 +01:00
Pere Diaz Bou
f66e3925f3
fix imports
2024-11-05 15:29:54 +01:00
Pere Diaz Bou
f009eb35c6
suspendable checkpoint
2024-11-05 15:29:54 +01:00
Pere Diaz Bou
c0e51c4ca6
wip wal
2024-11-05 15:29:53 +01:00
Lauri Virtanen
aa526f4cb3
Add support for Python 3.13 and drop support for Python 3.8
2024-10-12 15:16:14 +03:00
gandeevanr
be94138a5a
Add coverage to development dependencies in pyproject.toml and requirements-dev.txt.
2024-10-09 19:00:53 -07:00
김선우
28884181be
Fix clippy
2024-09-15 16:23:27 +09:00
Lauri Virtanen
a09c6ef493
Add Makefile for Python bindings
2024-09-01 16:11:00 +03:00
Lauri Virtanen
9cb2164bfa
Remove black and isort (replaced with Ruff)
2024-09-01 16:10:59 +03:00
Lauri Virtanen
826a2629d1
Check requirements.txt files in Python workflow
2024-09-01 16:10:59 +03:00
Lauri Virtanen
6bd1d28e26
Format Python bindings code using Ruff
...
- Use double quotes (Ruff/Black default)
- Configure some set of linters to use with Ruff
2024-09-01 16:10:59 +03:00
Lauri Virtanen
c5218e2f79
Run Python tests for versions 3.8 to 3.12
...
Match Python versions in GitHub workflow and pyproject.toml.
Format workflow YAML and rename steps.
Checkout using `actions/checkout@v4`.
Disable pip version checking in Python workflow to suppress warnings on
older Python versions.
2024-09-01 13:28:38 +03:00
Pekka Enberg
1aa7a7c52c
Merge 'ci: added python' from Jean Arhancet
...
Added a GitHub CI action for the Python bindings with Maturin for
building, Ruff for formatting checks, and pytest for running tests. This
is related to #248
Closes #298
2024-08-30 17:34:43 +03:00
JeanArhancet
fc2962e04e
ci: integrate pyo3
...
ci: add manylinux
fix: maturin build error
ci: add wheels upload
ci: use venv
2024-08-25 21:47:17 +02:00
mazchew
671b61ba19
add time querying to io trait
2024-08-25 22:55:15 +08:00
mazchew
156005694a
added rng to io trait for simulation
2024-08-22 23:24:02 +08:00
JeanArhancet
7c362b129f
feat: impl python binding
...
refactor: pep-0249
refactor: rust comment and requirements-dev.txt
fix: name conflict
2024-08-11 08:58:18 +02:00
Pekka Enberg
933bf89bb9
wasm: VFS interface to use Node filesystem API
...
This adds a basic VFS interface to use Node filesystem API from Rust
code. Not a lot, but parses the SQLite database file header and
completes database open without errors.
2024-08-04 11:12:21 +03:00
Pekka Enberg
7df979cd3a
wasm: Enable console.error() panic hook
...
Makes debugging a little bit easier...
2024-08-04 09:45:27 +03:00
Pekka Enberg
ed4116e7c2
core: Introduce Wal trait
...
We're going to need it for WebAssembly anyway, which does not have
standard filesystem support.
2024-08-03 12:34:10 +03:00
Pekka Enberg
3f7c788e5b
core: Rename DatabaseStorage methods
...
Let's call them read_page() and write_page().
2024-08-03 10:35:14 +03:00
Pekka Enberg
8a54e31803
core: Rename PageIO to DatabaseStorage
2024-08-03 10:33:52 +03:00
Pekka Enberg
4349b946e5
core: Eliminate PageSource wrapper
...
The PageSource wrapper is useless. Let's inline it and use PageIO
directly.
2024-08-03 10:27:20 +03:00