[BUG] http feature is not additive
Is there an existing issue for this?
- [X] I have searched the existing issues
What version of workers-rs are you using?
0.0.21
What version of wrangler are you using?
3.37.0
Describe the bug
The http feature is not additive, which is necessary for feature unification to work. This prevents, e.g. multiple workers in the same workspace from using different feature sets.
Steps To Reproduce
- Create a Cargo workspace with two workers
- In one worker, use the
httpfeature - In another worker, do not use the
httpfeature. - Observe that the non-http worker cannot compile.
I'm not sure if this will be possible, there are a few APIs that we are wanting to change in place which prevents a purely additive feature. I did run into this issue with the axum example.
@crestonbunch It was not supposed to work that way, but you can use the axum-cloudflare-adapter
https://github.com/logankeenan/axum-cloudflare-adapter
There you have instructions on how to do it.
That's why we are maintaining the adapter.
But pretty much, you don't enable the http feature till you are done migration, instead you use the adapter.
If you have issues, they are likely also present on workers-rs with http enabled.
Anyway you can find people on discord on #rust-on-workers that have or are going through that migration.