Open Darksonn opened 3 months ago
I am a beginner in open source contributions and am very interested in Tokio. I think the issue is not particularly complex, mainly involving documentation improvements. Could you guide me through making my first contribution to an open source project? @Darksonn
Yes. Please contact me through our discord server. You can also reach out via my email address in my github profile if that doesn't work for you.
Hello @lixiang365 @Darksonn. Is this still unattended? I want to drop a PR and fix this.
I've written a few examples and will provide additional explanations. I'll submit it today.It might not be perfect.
Hello @Darksonn I dropped a PR on this. https://github.com/tokio-rs/tokio/pull/6815 Please can you check on it? I want to know if there is anything else needed to add.
It looks like there are two PRs: #6813 and #6815. I'll have to look over both and decide on a way forward.
Often when people try to use
SyncIoBridge
, there is a better alternative. We should improve the documentation to explain this and provide some alternatives. We should also provide an example of how to use it correctly withspawn_blocking
.As an example, if you wish to hash some data with
blake3
, then you should not do this:instead you should do this:
or this:
Here are some ways we can improve the documentation:
SyncIoBridge
to a non-async compression library)Vec<u8>
and usefrom_slice
instead of attempting to usefrom_reader
withSyncIoBridge
)std::fs
insidespawn_blocking
instead of combiningtokio::fs::File
withSyncIoBridge
. (seetokio::fs
module docs)SyncIoBridge
insidespawn_blocking
.tokio::io::copy
could use a note about this, since people often look here.Once we've added the examples to
SyncIoBridge
, we will probably copy them into a new topic page.This is a good first issue. Contact me for mentoring. I'm also open to other examples than the ones I mentioned; they're just my ideas. It is perfectly okay to submit a PR that only partially resolves this issue, e.g. by adding just one example.