-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Better implementation using sqlite-wasm-rs #4474
Conversation
725cf1b
to
d7244c2
Compare
❤️ Any suggestions? @weiznich |
Thanks for opening this PR. There is generally no need to ping me after having a PR open for a day. If I don't response imitatively that usually means I have no capacity to deal with a PR/question/whatever now. I often answer soon, but sometimes I'm just away on holidays or have other things to do and an answer can take time then. Pinging me doesn't make this faster in any way, often it makes things slower as I have yet another notification to deal with, so please don't do that in the future, at least not after a day. That means I will look into this possibly later this week or next week. If you don't hear something until then feel free to ping me again. |
So I had some time to look into this. The change on diesels slide looks ok for me. I also had a look at the changes in
All of that is no hard stopper for merging this, but something I would like to see discussed. Maybe there are hard reasons why all of this is required, in which case it would be great to see that documented somewhere. |
|
I hope this answers your questions. |
Thanks for providing these answers. There is a huge problem with including these binary data and link them afterwards: As a downstream consumer you cannot review what is linked into an application. That's a huge security problem and that is something I'm not comfortable with shipping in a released diesel version. I can understand that setting up the emscripten toolchain is complicated, but I personally would consider security to be more important than easy to use. I'm open for a opt-in way to use precompiled versions as long as there is documentation that explains how exactly these binaries can be reproduced and how can be ensured that a binary build according to these instructions can be used to verify that the prebuild binary is the same. The default needs to be building everything from source. |
I'll think about how to do it. |
I made changes to my code and can now compile locally using bundled instead of pre-compiled products (which require emcc). In addition, the pre-compiled products have been compiled and committed through Github Actions, and the products can be traced. Spxg/sqlite-wasm-rs@4c6d908 Artifacts can be downloaded and compared. https://github.com/Spxg/sqlite-wasm-rs/actions/runs/13313741293 |
The document also explains the compilation and pre-compilation products. If it is acceptable, I will release a new version. |
Thanks for the update ❤️. I've gone through the changes and left some comments there. Overall that's a huge step in the right direction. It already mostly addresses my concerns around the prebuild What I would like to see still changed is the default from using the prebuild binaries to using the bundled feature flags. All the other comments are mostly ideas for making things more robust. |
Thanks! All comments fixed, and the |
Because of breaking changes, sqlite-wasm-rs is updated to 0.3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update and sorry for taking that long to review. I've been busy with other things.
That's nearly what we want here. The only thing that need to be changed is the enabled features for sqlite-wasm-rs
As discussed before we shouldn't enable the precompiled
feature by default.
Do diesel's test and diesel_tests crate need to specify precompiled by default? |
I would prefer to use the |
Solved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
It seems that the CI failed because of the compiler upgrade. Do I need to wait for this #4502 commit to be merged and then rebase? |
Yes, that just means that #4502 needs to be merged first. I can take care of the rebase afterwards, that shouldn't be a problem. |
bb8f2e7
to
63f6b10
Compare
sqlite-wasm-rs has been updated to a major version, providing a better implementation. For details, see #4473
There are some breaking changes, such as no longer exporting
init_sqlite()
. But I realized that the last merged commit has not been released yet, and I think it is appropriate to merge it now.