Skip to content

Conversation

@VendettaReborn
Copy link
Contributor

🤔 This is a ...

  • Code style optimization

🔗 Related issue link

#733

💡 Background and solution

  • rename rustls into watfaq-rustls, rename tokio-rustls into tokio-watfaq-rustls

@VendettaReborn

This comment was marked as off-topic.

@Itsusinn
Copy link
Member

Itsusinn commented Feb 24, 2025

can this a be small crate?we can use
rustls = { path =... package = watfaq-rustls } in its cargo.toml without chaning its imports

@VendettaReborn
Copy link
Contributor Author

can this a be small crate?we can use rustls = { path =... package = watfaq-rustls } in its cargo.toml without chaning its imports

you mean replace rustls with watfaq-rustls with this declare of package = "watfaq-rustls" but not let them co-exist? this approach won't compile

@VendettaReborn
Copy link
Contributor Author

VendettaReborn commented Feb 24, 2025

binary size increase on my x86 linux.

$ /usr/bin/ls -al ./target/release/clash-rs # before
-rwxr-xr-x 2 root root 15448224 Feb 24 17:30 ./target/release/clash-rs

$ /usr/bin/ls -al ./target/release/clash-rs # after
-rwxr-xr-x 2 root root 15757672 Feb 24 17:25 ./target/release/clash-rs

@Itsusinn
Copy link
Member

Itsusinn commented Feb 24, 2025

can this a be small crate?we can use rustls = { path =... package = watfaq-rustls } in its cargo.toml without chaning its imports

you mean replace rustls with watfaq-rustls with this declare of package = "watfaq-rustls" but not let them co-exist? this approach won't compile

nope package=.... Is some kinda of alias

@VendettaReborn
Copy link
Contributor Author

i know, but since it's only used by shadow-tls, i donnot think it necessary to use the alias. better to keep the usage explicit, i think.

Copy link
Member

@ibigbug ibigbug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty! this should help us avoid potential issues upgrading tls and dealing with crates that has rustls as a dependenty

@VendettaReborn VendettaReborn merged commit 89e87d6 into Watfaq:master Feb 24, 2025
29 checks passed
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.

3 participants