Skip to content

breaking: make offline optional to allow building without serde#4077

Merged
abonander merged 3 commits intolaunchbadge:mainfrom
CathalMullan:serde-dev
Feb 6, 2026
Merged

breaking: make offline optional to allow building without serde#4077
abonander merged 3 commits intolaunchbadge:mainfrom
CathalMullan:serde-dev

Conversation

@CathalMullan
Copy link
Contributor

This ties the offline feature to the macros feature, allowing for builds without serde.

I opted to make the Executor::describe function feature gated on offline. This seemed like the simplest option, assuming it only exists to serve the macro feature. But I'd understand if you'd wanted to go with a different approach.

Outside of the feature cfg additions, I also had to remove the use of serde_urlencoded from sqlx-sqlite, manually encoding the key/values instead.

One issue is that the CI currently doesn't test building without the macros feature at all.

In terms of compile time performance, running LIBSQLITE3_SYS_USE_PKG_CONFIG=1 cargo build --release --no-default-features --features runtime-smol,migrate,all-databases resulted in a drop from 28s to 21s with these changes.

Does your PR solve an issue?

Fixes #4070

Is this a breaking change?

Yes, due to altering features at the sqlx level.
Though this will only impact anyone setting default-features = false.

And due to changing the executor sqlx-core API by adding the feature gate.

@abonander abonander merged commit 7248f64 into launchbadge:main Feb 6, 2026
146 checks passed
@CathalMullan CathalMullan deleted the serde-dev branch February 6, 2026 01:44
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

Successfully merging this pull request may close these issues.

Ability to use sqlx without serde (and potentially syn)

2 participants

Comments