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

Be able to opt-out the feature "hyper/tcp" #116

Open
kvinwang opened this issue Jun 8, 2022 · 0 comments
Open

Be able to opt-out the feature "hyper/tcp" #116

kvinwang opened this issue Jun 8, 2022 · 0 comments

Comments

@kvinwang
Copy link

kvinwang commented Jun 8, 2022

We are building web services targeting to wasm with hyper and a custom TcpStream. The feature "hyper/tcp" is a trouble because it would enable some dependencies doesn't compile when targeting to wasm.

error[E0583]: file not found for module `sys`
   --> /home/kvin/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/lib.rs:124:1
    |
124 | mod sys;
    | ^^^^^^^^
    |
    = help: to create the module `sys`, create file "/home/kvin/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/sys.rs" or "/home/kvin/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/sys/mod.rs"

error: Socket2 doesn't support the compile target
   --> /home/kvin/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/lib.rs:127:1
    |
127 | compile_error!("Socket2 doesn't support the compile target");

It would be good if routerify allow to opt-out the "hyper/tcp" (disable RouterService by a feature gate). Or better make the RouterService more generic, like let the user decide how to get the remote_addr?

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 a pull request may close this issue.

1 participant