sqlx
sqlx copied to clipboard
Hard dependency of TLS implementation makes SQLx unbuildable on some platforms
I know this is an duplicate of #914, but it seems that you guys are not aware that having to build rustls
can be such a headache, in the meantime, development on the next
branch seems have stalled.
I am trying to build a project that is intended to be used in an embedded MIPS platform, on which ring
(one of rustls
's core dependencies, a crypto library) does not build (briansmith/ring#562).
$ cross build --target=mipsel-unknown-linux-gnu --release
...
error: failed to run custom build command for `ring v0.16.20`
Caused by:
process didn't exit successfully: `/target/release/build/ring-66379d5e27511bd7/build-script-build` (exit status: 101)
--- stderr
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/ring-0.16.20/build.rs:358:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
Making matters worse, the target device is extremely space constrained and we do not want to include OpenSSL because it simply does not fit. The target device only uses SQLite and does not connect to the Internet, including any TLS implementation would be a waste of space and memory.
We are working to make the runtime and TLS features orthogonal so you can disable TLS if you don't need it. That work isn't on the next
branch, it's going to be in standalone crates that aren't public yet.
Not being able to disable tls is my only regret, hopefully this will be fixed soon.
This would be wonderful for dockerized apps, and for sqlite apps. Please add this.
Yes, I'm working with sqlite and do not need tls feature enabled. Please add the seperated feature flags back, thx.
I can't build for wasm32-wasi
because of the ring
dependency. I don't need TLS so having a feature flag to disable it would be very useful.
Building for the WASI target is also interesting for us. Anything the community (happy to contribute!) can do to help move this along?
It's been possible to build SQLx without a TLS backend since 0.7.0. Just use runtime-tokio
or runtime-async-std
without a TLS suffix.