Skip to content

rustls in default features #352

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

Closed
fafhrd91 opened this issue Nov 28, 2024 · 18 comments
Closed

rustls in default features #352

fafhrd91 opened this issue Nov 28, 2024 · 18 comments

Comments

@fafhrd91
Copy link
Contributor

rustls is not certified and couldn't be used in strict environment, at the moment I am not sure how to disable rustls in ntex-compio.

@Berrysoft
Copy link
Member

I have released 0.13.2 to fix it: #351

@fafhrd91
Copy link
Contributor Author

fafhrd91 commented Nov 28, 2024

"polling" feature includes ring and rustls

@Berrysoft Berrysoft reopened this Nov 28, 2024
@fafhrd91
Copy link
Contributor Author

I can drop direct dependency to "compio" create and build my own list of deps

@Berrysoft
Copy link
Member

"polling" feature includes ring and rustls

It shouldn't be... I'll investigate it.

@fafhrd91
Copy link
Contributor Author

quinn-proto depends on "ring" and compio-quic depends on rustls

@Berrysoft
Copy link
Member

Oh yes, compio-quic need rustls. But it seems that ntex doesn't need QUIC, and "quic" feature is disabled by default.

@fafhrd91
Copy link
Contributor Author

i include following features: io, runtime, macros, io-uring, polling

@Berrysoft
Copy link
Member

Would you paste the output of cargo tree -i rustls here? I tried to run it and it seemed that rustls is not introduced by compio:

rustls v0.23.19
├── ntex v2.8.0 (D:\Straw\Documents\Git\ntex\ntex)
│   [dev-dependencies]
│   ├── ntex-bytes v0.1.27 (D:\Straw\Documents\Git\ntex\ntex-bytes)
│   │   ├── ntex v2.8.0 (D:\Straw\Documents\Git\ntex\ntex) (*)
│   │   ├── ntex-async-std v0.5.1 (D:\Straw\Documents\Git\ntex\ntex-async-std)
│   │   ├── ntex-codec v0.6.2 (D:\Straw\Documents\Git\ntex\ntex-codec)
│   │   │   ├── ntex v2.8.0 (D:\Straw\Documents\Git\ntex\ntex) (*)
│   │   │   ├── ntex-h2 v1.4.2
│   │   │   │   └── ntex v2.8.0 (D:\Straw\Documents\Git\ntex\ntex) (*)
│   │   │   └── ntex-io v2.8.3 (D:\Straw\Documents\Git\ntex\ntex-io)
│   │   │       ├── ntex v2.8.0 (D:\Straw\Documents\Git\ntex\ntex) (*)
│   │   │       ├── ntex-async-std v0.5.1 (D:\Straw\Documents\Git\ntex\ntex-async-std)
│   │   │       ├── ntex-compio v0.2.2 (D:\Straw\Documents\Git\ntex\ntex-compio)
│   │   │       ├── ntex-glommio v0.5.2 (D:\Straw\Documents\Git\ntex\ntex-glommio)
│   │   │       ├── ntex-h2 v1.4.2 (*)
│   │   │       ├── ntex-net v2.4.0 (D:\Straw\Documents\Git\ntex\ntex-net)
│   │   │       │   ├── ntex v2.8.0 (D:\Straw\Documents\Git\ntex\ntex) (*)
│   │   │       │   ├── ntex-h2 v1.4.2 (*)
│   │   │       │   ├── ntex-server v2.5.0 (D:\Straw\Documents\Git\ntex\ntex-server)
│   │   │       │   │   └── ntex v2.8.0 (D:\Straw\Documents\Git\ntex\ntex) (*)
│   │   │       │   └── ntex-tls v2.3.0 (D:\Straw\Documents\Git\ntex\ntex-tls)
│   │   │       │       └── ntex v2.8.0 (D:\Straw\Documents\Git\ntex\ntex) (*)
│   │   │       ├── ntex-tls v2.3.0 (D:\Straw\Documents\Git\ntex\ntex-tls) (*)
│   │   │       └── ntex-tokio v0.5.3 (D:\Straw\Documents\Git\ntex\ntex-tokio)
│   │   ├── ntex-compio v0.2.2 (D:\Straw\Documents\Git\ntex\ntex-compio)
│   │   ├── ntex-glommio v0.5.2 (D:\Straw\Documents\Git\ntex\ntex-glommio)
│   │   ├── ntex-h2 v1.4.2 (*)
│   │   ├── ntex-http v0.1.12 (D:\Straw\Documents\Git\ntex\ntex-http)
│   │   │   ├── ntex v2.8.0 (D:\Straw\Documents\Git\ntex\ntex) (*)
│   │   │   ├── ntex-h2 v1.4.2 (*)
│   │   │   └── ntex-net v2.4.0 (D:\Straw\Documents\Git\ntex\ntex-net) (*)
│   │   ├── ntex-io v2.8.3 (D:\Straw\Documents\Git\ntex\ntex-io) (*)
│   │   ├── ntex-net v2.4.0 (D:\Straw\Documents\Git\ntex\ntex-net) (*)
│   │   ├── ntex-router v0.5.3 (D:\Straw\Documents\Git\ntex\ntex-router)
│   │   │   └── ntex v2.8.0 (D:\Straw\Documents\Git\ntex\ntex) (*)
│   │   ├── ntex-server v2.5.0 (D:\Straw\Documents\Git\ntex\ntex-server) (*)
│   │   ├── ntex-tls v2.3.0 (D:\Straw\Documents\Git\ntex\ntex-tls) (*)
│   │   └── ntex-tokio v0.5.3 (D:\Straw\Documents\Git\ntex\ntex-tokio)
│   │   [dev-dependencies]
│   │   └── ntex-bytes v0.1.27 (D:\Straw\Documents\Git\ntex\ntex-bytes) (*)
│   ├── ntex-io v2.8.3 (D:\Straw\Documents\Git\ntex\ntex-io) (*)
│   ├── ntex-macros v0.1.3 (proc-macro) (D:\Straw\Documents\Git\ntex\ntex-macros)
│   │   └── ntex v2.8.0 (D:\Straw\Documents\Git\ntex\ntex) (*)
│   │   [dev-dependencies]
│   │   ├── ntex-server v2.5.0 (D:\Straw\Documents\Git\ntex\ntex-server) (*)
│   │   └── ntex-util v2.6.1 (D:\Straw\Documents\Git\ntex\ntex-util)
│   │       ├── ntex v2.8.0 (D:\Straw\Documents\Git\ntex\ntex) (*)
│   │       ├── ntex-async-std v0.5.1 (D:\Straw\Documents\Git\ntex\ntex-async-std)
│   │       ├── ntex-compio v0.2.2 (D:\Straw\Documents\Git\ntex\ntex-compio)
│   │       ├── ntex-glommio v0.5.2 (D:\Straw\Documents\Git\ntex\ntex-glommio)
│   │       ├── ntex-h2 v1.4.2 (*)
│   │       ├── ntex-io v2.8.3 (D:\Straw\Documents\Git\ntex\ntex-io) (*)
│   │       ├── ntex-net v2.4.0 (D:\Straw\Documents\Git\ntex\ntex-net) (*)
│   │       ├── ntex-server v2.5.0 (D:\Straw\Documents\Git\ntex\ntex-server) (*)
│   │       ├── ntex-tls v2.3.0 (D:\Straw\Documents\Git\ntex\ntex-tls) (*)
│   │       └── ntex-tokio v0.5.3 (D:\Straw\Documents\Git\ntex\ntex-tokio)
│   │       [dev-dependencies]
│   │       └── ntex-service v3.3.3 (D:\Straw\Documents\Git\ntex\ntex-service)
│   │           ├── ntex v2.8.0 (D:\Straw\Documents\Git\ntex\ntex) (*)
│   │           ├── ntex-h2 v1.4.2 (*)
│   │           ├── ntex-io v2.8.3 (D:\Straw\Documents\Git\ntex\ntex-io) (*)
│   │           ├── ntex-net v2.4.0 (D:\Straw\Documents\Git\ntex\ntex-net) (*)
│   │           ├── ntex-server v2.5.0 (D:\Straw\Documents\Git\ntex\ntex-server) (*)
│   │           ├── ntex-tls v2.3.0 (D:\Straw\Documents\Git\ntex\ntex-tls) (*)
│   │           └── ntex-util v2.6.1 (D:\Straw\Documents\Git\ntex\ntex-util) (*)
│   ├── ntex-net v2.4.0 (D:\Straw\Documents\Git\ntex\ntex-net) (*)
│   ├── ntex-server v2.5.0 (D:\Straw\Documents\Git\ntex\ntex-server) (*)
│   ├── ntex-service v3.3.3 (D:\Straw\Documents\Git\ntex\ntex-service) (*)
│   ├── ntex-tls v2.3.0 (D:\Straw\Documents\Git\ntex\ntex-tls) (*)
│   └── ntex-util v2.6.1 (D:\Straw\Documents\Git\ntex\ntex-util) (*)
└── ntex-tls v2.3.0 (D:\Straw\Documents\Git\ntex\ntex-tls) (*)
[dev-dependencies]
├── ntex v2.8.0 (D:\Straw\Documents\Git\ntex\ntex) (*)
└── ntex-tls v2.3.0 (D:\Straw\Documents\Git\ntex\ntex-tls) (*)

@fafhrd91
Copy link
Contributor Author

fafhrd91 commented Nov 28, 2024

I found dep, it was internal dependency. thanks!

@fafhrd91
Copy link
Contributor Author

fafhrd91 commented Dec 2, 2024

for some reason, I don't see compio-quic in "cargo tree" output but it is still in Cargo.lock

@Berrysoft
Copy link
Member

Is it still there after running cargo update?

@fafhrd91
Copy link
Contributor Author

fafhrd91 commented Dec 2, 2024

seems those dependencies do not get compiled, but they sit in Cargo.lock

I dropped compio dependency from ntex-compio and added dependencies to individual packages. that helped

@AsakuraMizu
Copy link
Collaborator

but it is still in Cargo.lock

This seems to be a limitation of cargo. See rust-lang/cargo#10801.

@Berrysoft
Copy link
Member

seems those dependencies do not get compiled, but they sit in Cargo.lock

I don't think it's a problem. Anyway it is not compiled into the binary, and even not downloaded.

added dependencies to individual packages

Well that's not recommended. Be careful about the features...

@fafhrd91
Copy link
Contributor Author

fafhrd91 commented Dec 2, 2024

direct dependency is not an option. various tools use cargo.lock file for dependency detection, ring is just very big red flag.

@Berrysoft
Copy link
Member

I think that's the problem of the tools. Cargo.lock sometimes contains dependencies that is not compiled.

Furthermore, ntex itself seems depend on rustls and ring. I don't think it's a problem. At least it shouldn't be a problem that I, as the maintainer of compio, need to resolve. I cannot remove the ring feature of compio-quic because it need rustls; I cannot remove quic feature from compio. I have done my best to remove ring as the default feature, and if the users would like, they would not compile ring and rustls at all.

@fafhrd91
Copy link
Contributor Author

fafhrd91 commented Dec 2, 2024

you can turn off ring in ntex completely. as for tools, lock file is good approximation of all dependencies, and ring is often forbidden in commercial development. in any case individual dependencies work for now.

@Berrysoft
Copy link
Member

I can understand the commercial limitations, but tbh I have to say it is foolish and irresponsible to simply check the lock file instead of investigating if it really compiles in with cargo tree -i.

Anyway it's fantastic to see that you're satisfied now.

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