Repository navigation
Added feature "bundled" to provide a fully self-contained cross-platform build. - #176
Conversation
|
@jgallagher is this something you would be interested in merging in? I'm asking because it is by far the simplest way to allow sqlite to be used with Rust in windows, and I'd love to see this make it in; and keeping it behind the bundled feature seems like a neat way to allow for this. I ask this not trivializing the work it'd be to maintain, and totally understanding if you'd like to keep this complexity out. But the work here done by @photex seems pretty great, and would likely allow Windows users (and other platform as well) get up and running with Rust and sqlite insanely quickly. I'd be willing to help maintain if either of you need the help. |
|
Maybe you can regenerate the /path/to/bindgen -builtins -l sqlite3 -o /path/to/libsqlite3-sys/src/bindgen.rs /path/to/sqlite3.h
# or /path/to/bindgen -builtins -l sqlite3 -o /path/to/libsqlite3-sys/src/bindgen.rs /path/to/sqlite3ext.hRegards |
|
Hi @gwenn , couple of questions. Are you providing that as a recommendation of an alternative to bundling sqlite3 but allowing to use it windows, or as a necessary step to include this in the PR? Either way, I tried multiple ways to get this working on windows, and was not able to. It may entirely be because I'm still pretty new to Rust and it's tool chain. These are the things I tried:
If this was meant as an alternative to bundling sqlite3, then it seems it might be a good deal more complicated than bundling. I don't doubt that the failure is entirely on my unfamiliarity with the tool chain, but surely seems a good deal more complicated than bundling if bundling is still a viable option. If you meant that we need to provide the bindings to be able to merge this in, could you point me to some more reading where I could find out how to do this? Could you also provide some context as to why this would be needed as part of this merge? Thanks in advance! |
|
@chamakits It is not mandatory and may have negative impact for code using an old sqlite3 library provided by the system. |
|
Ah I see, that makes sense. Okay, will try on Linux. Thanks! |
Added manually to the bindgens a type entry for 'Struct_sqlite3' pointing to sqlite3 to prevent changing multiple files. Reran bindgens as: bindgen --builtins --link=sqlite3 --output=./libsqlite3-sys/src/bindgen.rs ./libsqlite3-sys/sqlite3/sqlite3.h
|
@gwenn that was RIDICULOUSLY easy on Linux. Should have tried that before. Created a PR for @photex 's master branch to include the bindgen changes and some other minor changes. Can be seen here: Let me know if either see any issues with it, or if I should change anything. |
|
I don't understand why the |
Regenerate bindgen based on bundled sqlite
|
Yeah I didn't add that intentionally. Merged your PR @chamakits |
|
@chamakits Maybe the compilation options ?
? |
|
Sure, I can look into that. Are you saying that these should be used by default, or that they should be configurable as part of the features, or that we should investigate which ones make sense? |
|
@photex @gwenn Any guidance as to which flags we would want to include? I'm seeing there are 28 flags, do we want to include them all? A good deal of them have parameters as well, any guidance as to how to choose which parameter in the case that they do? |
|
No particular guidance but take a look at compile options used by: |
|
Okay, will take a look at those, and come up with some flags based on that. |
|
Flags look good to me. Incorporated them into #197. |
Howdy!
In reference to #46 and #89 I'm submitting this PR which adds a feature "bundled" that will build and link with a static libsqlite3 from the included amalgamation.
If you don't want the amalgamation bundled then I'm happy to toss that and come up with another solution too.