oblique / async-tftp-rs

Executor agnostic async TFTP implementation
MIT License
26 stars 11 forks source link

Provide binary #9

Open alexmaco opened 4 years ago

alexmaco commented 4 years ago

For convenient use, providing an executable binary (available via cargo install async-tftp-rs for instance) from this crate would be great. This would make it immediately useful for most use cases that just want to serve tftp, and are not looking to embed tftp in a larger application.

I think this crate would work great as an application since it implements most of the TFTP-related RFCs.

BIkeshedding topics:

I'm willing to add the binary wrapper implementation and make a PR if you're willing to merge it.

oblique commented 4 years ago

To be honest I never thought that someone will use this as an application instead of other tftp servers such as atftp. Do you prefer it because it can be easily build into a single binary? Or is there any other reason?

alexmaco commented 4 years ago

All (or most) else being equal, I would prefer to use networking applications written in rust for the reliability and security. In the past I used a fork of tftp_server (the binary), to which I added implementations for a few RFCs. However, this library already supports async, so i'd rather contribute to this over using my own.

oblique commented 4 years ago

Hm cool. Yes I'm willing to accept your PR.

oblique commented 4 years ago

I'm not sure about the binary names, but we can decide later.

spod commented 3 years ago

I was about to open a pull request to add a simple binary when reading cargo docs I spotted it's possible to run the included examples as binaries 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

Hopefully they are adequate for you @alexmaco - if you think more is needed let me know and I'll spin up a branch with the binary I started on and we can work on it together.

oblique commented 3 years ago

Since there is a demand, I can do it if @alexmaco didn't start yet.

@spod What features do you expect to see in the cli?