Closed complexspaces closed 2 years ago
The build times between the two branches are about as expected given the size of
tokio
vsasync-std
There may be a confusion here still. zbus does not depend on async-std
. It makes use of the smol-rs crates though, which are designed to be as small and self-contained as possible.
I would not consider these changes a win for compile times despite the lower dependency count.
This doesn't surprise me really. If you recall, I did try and make a point about this in #42. Practically speaking, this won't bring any significant benefits to the table, even if I removed the remaining smol-rs dep: async-broadcast
.
I would not consider these changes a win for compile times despite the lower dependency count.
This doesn't surprise me really. If you recall, I did try and make a point about this in #42. Practically speaking, this won't bring any significant benefits to the table, even if I removed the remaining smol-rs dep:
async-broadcast
.
This is not to say 3.0 doesn't bring real benefits for tokio users. 3.0 does bring tighter integration with the runtime itself so all the tokio tools will work out of the box with zbus now. E.g all internal tasks are now tokio tasks launched in whatever application runtime zbus API is used with.
These benefits are unrelated to lowered dependencies though.
There may be a confusion here still. zbus does not depend on async-std. It makes use of the smol-rs crates though, which are designed to be as small and self-contained as possible.
Sorry, that was poorly worded on my part. In my mind the async-*
crate ecosystem makes up "async-std" and that was what I was referring to via the async-io
feature of zbus
. I understand that zbus
does not literally depend on that crate.
This doesn't surprise me really. If you recall, I did try and make a point about this in https://github.com/hwchen/secret-service-rs/issues/42. Practically speaking, this won't bring any significant benefits to the table, even if I removed the remaining smol-rs dep: async-broadcast.
This is not to say 3.0 doesn't bring real benefits for tokio users. 3.0 does bring tighter integration with the runtime itself so all the tokio tools will work out of the box with zbus now. E.g all internal tasks are not tokio tasks launched in whatever application runtime zbus API is used with.
These benefits are unrelated to lowered dependencies though.
I'm with you on those points 💯. The lowered dependencies is nice for auditing processes and the better integration is great because it avoids more cases where you'll get panics if you try using Tokio-specific utilities.
E.g all internal tasks are not tokio tasks launched in whatever application runtime zbus API is used with.
Just to be clear, the "not" here was a typo. It's "now". :)
This PR starts the process of updating to the upcoming version of
zbus
3.0. The most notable change made in the new major version is much tighter integration withtokio
with the relevant feature, which significantly reduces the number of dependencies required to usezbus
in a Tokio-centric build tree.Dependencies built invoking
cargo test --no-default-features --features tokio
: 3.0:143
2.0:154
The build times between the two branches are about as expected given the size of
tokio
vsasync-std
. I would not consider these changes a win for compile times despite the lower dependency count.All tests pass on Ubuntu 22.04.
Closes #42