aatxe / irc

the irc crate – usable, async IRC for Rust
Mozilla Public License 2.0
528 stars 97 forks source link

Discussion: Make 'client' an optional feature? #163

Closed FauxFaux closed 5 years ago

FauxFaux commented 5 years ago

This PR enables using just the irc::proto part of the crate, without building the irc::client part.

This allows dropping >70% of the deps, including native-tls which fails horribly to build on anything fun.

The changes are noisy, but there are zero logic changes:

.travis.yml is already configured to check --no-default-features, and it passes.

I did not make the code warning-clean with test --no-default-features, this would (simply!) involve adding more cfg( everywhere. In my opinion, it is unlikely that it would be possible to move more stuff into the "client" module, to reduce the size of this change. Perhaps the lineproto stuff? Not super relevant.

(I'm writing a server-like-thing, if that wasn't obvious.)

Are you willing to carry this feature?

aatxe commented 5 years ago

Thanks for the pull request!

I'm not sure that I want to merge this given that the 0.14 branch has already split the protocol parts into its own crate (which I think is a more appropriate way of dealing with this). The irc-proto crate even has a tokio feature for enabling or disabling those parts of the code.

FauxFaux commented 5 years ago

Right. I totally failed to understand that development was proceeding like that. I was thinking of making an irc-proto crate myself. I am happy with the alternative crate. Let's try it.

FauxFaux commented 5 years ago

That seems to do exactly what I want, bar fixes that are in develop but not in 0.14. Guess I should look at getting 0.14 released.

aatxe commented 5 years ago

The main blocker is fewer-allocations which I was working on in the hopes of finally closing #32, but I'm not convinced that we necessarily need that urgently (or that it wouldn't make the APIs too cumbersome). The other notable thing is restoring some of the stuff that got accidentally wiped out on the 0.14 branch due to a messed up merge (e.g. as noted here).