-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Insertion ORM w/ prepared statements works (#966)
* fix diesel function registration * query building works * try insert with orml * compile with sqlite default fix * compile but still ahve static lifetimes * fix unimplemented traits * ORM compiles! * some cleanup, setup tracing in wasm for test * readme * upgrade wa-sqlite version * temp DebugQuery to help with debugging * make debug query unsafe * progress on statement issue * progress for destructor order * logs/fix async drop for BoundStatement * remove task spawn for statementfactory
- Loading branch information
Showing
26 changed files
with
2,001 additions
and
574 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
# Custom Diesel Backend for Wasm wa-sqlite | ||
|
||
#### Bundle the javascript in `package.js` to rust | ||
### Compile rust code without creating a npm package | ||
|
||
`yarn run build` | ||
`cargo build --target wasm32-unknown-unknown` | ||
|
||
#### Build the JS WASM interface | ||
#### Build the JS WASM interfaces | ||
|
||
`wasm-pack build` | ||
|
||
#### Run the Wasm Tests | ||
|
||
wasm-pack test --chrome --headless | ||
wasm-pack test --chrome | ||
|
||
navigate to `http://localhost:8000` to observe test output | ||
|
||
(headless tests don't work yet) | ||
|
||
# TODO | ||
|
||
- [ ] wa-sqlite should be included in `pkg` build w/o manual copy (wasm-pack | ||
issue?) | ||
- [ ] OPFS | ||
|
||
# Notes | ||
# Setting up the project in VSCode | ||
|
||
- rust-analyzer doesn't like crates with different targets in the same | ||
workspace. If you want this to work well with your LSP, open | ||
`diesel-wasm-sqlite` as it's own project. | ||
rust-analyzer does not like crates with different targets in the same workspace. | ||
If you want this to work well with your LSP, open `diesel-wasm-sqlite` as it's | ||
own project in VSCode. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
"build": "rollup -c" | ||
}, | ||
"dependencies": { | ||
"@xmtp/wa-sqlite": "^1.0.1" | ||
"@xmtp/wa-sqlite": ">=1.0.3" | ||
}, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.