Skip to content
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

Hard dependency of TLS implementation makes SQLx unbuildable on some platforms #1750

Closed
kmod-midori opened this issue Mar 13, 2022 · 7 comments

Comments

@kmod-midori
Copy link

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.

@abonander
Copy link
Collaborator

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.

@kekeimiku
Copy link

Not being able to disable tls is my only regret, hopefully this will be fixed soon.

@randomairborne
Copy link

This would be wonderful for dockerized apps, and for sqlite apps.
Please add this.

@lightsing
Copy link

lightsing commented Oct 1, 2022

Yes, I'm working with sqlite and do not need tls feature enabled. Please add the seperated feature flags back, thx.

@marziply
Copy link

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.

breard-r added a commit to breard-r/opensmtpd-filter-dkimout that referenced this issue Apr 10, 2023
Rustls uses ring, which does not declare an SPDX license. Because of
that, cargo deny signals this license as incompatible.

The correct change would be to completely disable TLS since it is
neither used nor needed, however `sqlx` does not currently support that.

launchbadge/sqlx#914
launchbadge/sqlx#1750
@ianthetechie
Copy link

Building for the WASI target is also interesting for us. Anything the community (happy to contribute!) can do to help move this along?

@abonander
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants