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

Add "bundled" feature like rusqlite #1647

Closed
spease opened this Issue Apr 18, 2018 · 7 comments

Comments

Projects
None yet
5 participants
@spease

spease commented Apr 18, 2018

I recently migrated from tql to diesel, as tql didn't appear to have a very complete mapping of commands to SQL.

Right now using diesel on Windows is a real pain involving multiple workarounds:
#487

It'd be ideal if diesel could offer a "bundled" feature like rusqlite:
https://github.com/jgallagher/rusqlite

This made builds on Windows virtually painless.

Thanks.

@spease

This comment has been minimized.

spease commented Apr 18, 2018

Just realized this is probably easier than i thought - the "bundled" feature is actually on libsqlite3-sys. So you can do

libsqlite3-sys = { version = "0.9.1", features = ["bundled"] }

Would still be nice if this was a diesel feature for convenience purposes (not sure if it could apply to postgresql if it's enabled, but that would make sense). It should definitely be documented somewhere.

@akatechis

This comment has been minimized.

akatechis commented Apr 20, 2018

Running into similar issues on windows. I managed to get diesel_cli to install, after using lib.exe to convert the sqlite3.dll into sqlite3.lib, put it in rust's lib path, and get started. However, I then face issue where running diesel setup breaks looking for api-ms-win-crt-heap-l1-1-0.dll. A bundled feature would be great, especially since I'm planning to package sqlite along with my app.

@spease

This comment has been minimized.

spease commented Apr 20, 2018

Take a look at my post just above yours. If you include that in your Cargo.toml in addition to diesel, diesel will use libsqlite3-sys with the bundled feature and it should obviate the need for messing with the DLLs and libs. That's what I used to get diesel working with our CI system.

@stahlstift

This comment has been minimized.

stahlstift commented Apr 24, 2018

It would be nice if this feature will be added to diesel (especially diesel_cli) for windows users...
The workaround from @spease works for diesel as a dep but not for diesel_cli because it's not possible to install a lib (as far as I know) system wide. So it should be easy to implement and it will have a huge benefit for windows users!

@weiznich

This comment has been minimized.

Contributor

weiznich commented Apr 24, 2018

@stahlstift It is not required to add this as a feature to diesel itself, because one could easily specify the bundled linking there using @spease method. (Adding a feature flag for this wouldn't make it easier…)

For diesel-cli there is already #1302, which needs someone to fix the remaining review comments.

@stahlstift

This comment has been minimized.

stahlstift commented Apr 24, 2018

Well I am not an expert with the rust ecosystem - but why not add a feature for it (e.G. sqlite-bundle)?
This should prevent us for version conflicts in Cargo and my app will use the version of libsqlite3-sys diesel wants to use.

Update: ok #1302 has the same idea with sqlite-bundle

@sgrif

This comment has been minimized.

Member

sgrif commented May 22, 2018

Fixed by #1672

@sgrif sgrif closed this May 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment