| Crates.io | async-tftp |
| lib.rs | async-tftp |
| version | 0.4.2 |
| created_at | 2019-11-14 16:30:20.178752+00 |
| updated_at | 2025-12-02 10:45:47.597626+00 |
| description | Executor agnostic async TFTP implementation |
| homepage | |
| repository | https://github.com/oblique/async-tftp-rs |
| max_upload_size | |
| id | 181277 |
| size | 114,628 |
Executor agnostic async TFTP implementation, written with smol building blocks. Currently it implements only server side.
The following RFCs are implemented:
Features:
timeout. This is useful for faster
file transfer in unstable environments.Handler for more advance cases than
just serving a directory. Check tftpd-targz.rs for an example.use async_tftp::server::TftpServerBuilder;
use async_tftp::Result;
#[tokio::main] // or any other runtime/executor
async fn main() -> Result<()> {
let tftpd = TftpServerBuilder::with_dir_ro(".")?.build().await?;
tftpd.serve().await?;
Ok(())
}
Add in Cargo.toml:
[dependencies]
async-tftp = "0.4"
# or any other runtime/executor
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
There are some examples included with this crate. You can run them from a source checkout with cargo:
$ cargo run --example tftpd-dir
TFTP directory: ...
Listening on: 0.0.0.0:6969
^C
$ cargo run --example tftpd-targz <archive-path>
Listening on: 0.0.0.0:6969
^C