Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bare minimum wasm sqlite backend #905

Merged
merged 31 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
441a0d4
bare minimum wasm sqlite backend
insipx Jul 17, 2024
797b1bd
make the wasm sqlite backend its own crate
insipx Jul 17, 2024
5981d65
cleanup + crate
insipx Jul 17, 2024
afca323
try to get wa-sqlite to compile with rust wasm
insipx Jul 19, 2024
655d8f7
try using esbuild
insipx Jul 19, 2024
709a8d1
latest
insipx Jul 22, 2024
d220522
WIP
rygine Jul 22, 2024
365c96f
non-OPFS/vfs connection works
insipx Jul 22, 2024
c7a3731
embed wasm in rollup JS and pass it to module instantiation
insipx Jul 23, 2024
d145da6
add connection files, compile a few fns in raw connection
insipx Jul 25, 2024
f374b7e
wasm-bindgen test runs in web worker!
insipx Jul 25, 2024
5c198d0
opening with OPFS works
insipx Jul 25, 2024
45a8175
register fn
insipx Jul 31, 2024
8b9f533
porting stmt, then sqlite_value
insipx Aug 5, 2024
8a2aafa
restore xmtp_mls Cargo.toml
insipx Aug 5, 2024
613c84f
rename bundle
insipx Aug 5, 2024
920619a
Merge branch 'main' of github.com:xmtp/libxmtp into insipx/web-to-lib…
insipx Aug 5, 2024
74638b2
finish stmt
insipx Aug 5, 2024
f784415
remove binds_to_free as it is unused
insipx Aug 5, 2024
e18369b
compiles
insipx Aug 6, 2024
b992287
replace placeholders with real values
insipx Aug 6, 2024
272fce2
Merge branch 'main' of github.com:xmtp/libxmtp into insipx/web-to-lib…
insipx Aug 6, 2024
4dc9e1f
compile w/o prepared statements or SQLite custom fns
insipx Aug 12, 2024
bd73a18
test
insipx Aug 12, 2024
71fdcff
async drop for RawConnection
insipx Aug 12, 2024
746aeec
Drop for Statement
insipx Aug 12, 2024
35faacb
prepared statements
insipx Aug 13, 2024
eae8461
diesel trigger
insipx Aug 13, 2024
0a3189c
cleanup a little
insipx Aug 13, 2024
dc3b588
make sure to always `throw error` in JS
insipx Aug 13, 2024
7a07a7a
Merge branch 'main' of github.com:xmtp/libxmtp into insipx/web-to-lib…
insipx Aug 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ members = [
"xmtp_user_preferences",
"xmtp_v2",
"xmtp_mls",
"xmtp_id",
"xmtp_id"
]

exclude = [
"bindings_ffi",
"bindings_wasm",
"xmtp_api_grpc_gateway",
"bindings_node",
"diesel-wasm-sqlite"
]

# Make the feature resolver explicit.
Expand Down
8 changes: 8 additions & 0 deletions diesel-wasm-sqlite/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
32 changes: 32 additions & 0 deletions diesel-wasm-sqlite/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"rust-analyzer": {
"cargo": {
"sysroot": "discover",
"allTargets": false,
"target": "wasm32-unknown-unknown"
},
"procMacro": {
"enable": true,
"attributes.enable": true,
"ignored": {
"async-trait": ["async_trait"],
"napi-derive": ["napi"],
"async-recursion": ["async_recursion"],
"ctor": ["ctor"],
"tokio": ["test"]
}
}
},
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
7 changes: 7 additions & 0 deletions diesel-wasm-sqlite/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
compressionLevel: mixed

enableGlobalCache: false

enableTelemetry: false

nodeLinker: node-modules
Loading