Diesel: Possible to bundle sqlite in binary?

Created on 20 Sep 2018  路  5Comments  路  Source: diesel-rs/diesel

Problem Description

I'm looking at the various rust bindings for sqlite in rust for a personal project. I see that diesel uses libsqlite3-sys for sqlite. Is it possible to compile sqlite into my final binary with diesel as can be done with rusqlite?

Most helpful comment

Just add libsqlite3-sys = { version = ">=0.8.0, <0.13.0", optional = true, features = ["bundled"] } to your Cargo.toml.

All 5 comments

@sgrif That sqlite-bundled feature is in diesel_cli, not diesel. Is there an equivalent way to do this with the actual Diesel library?

Just add libsqlite3-sys = { version = ">=0.8.0, <0.13.0", optional = true, features = ["bundled"] } to your Cargo.toml.

@weiznich Right, but what about when Diesel changes the version range? Optimally we would not have to change anything.

@Mcat12 Diesel will not bump the minimal supported version of any dependency without of a major version bump of diesel. Sot that's not a big concern.
Also we cannot and will not export any feature flag of any of our dependencies. That won't scale.

Was this page helpful?
0 / 5 - 0 ratings