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

[BUG] http feature is not additive #491

Open
1 task done
crestonbunch opened this issue Mar 24, 2024 · 2 comments
Open
1 task done

[BUG] http feature is not additive #491

crestonbunch opened this issue Mar 24, 2024 · 2 comments

Comments

@crestonbunch
Copy link

Is there an existing issue for this?

  • 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

  1. Create a Cargo workspace with two workers
  2. In one worker, use the http feature
  3. In another worker, do not use the http feature.
  4. Observe that the non-http worker cannot compile.
@kflansburg
Copy link
Member

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.

@spigaz
Copy link
Contributor

spigaz commented Mar 24, 2024

@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.

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

3 participants