async-tftp-rs icon indicating copy to clipboard operation
async-tftp-rs copied to clipboard

Provide binary

Open alexmaco opened this issue 5 years ago • 7 comments

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:

  • the binary name: could probably be tftp-server, or serve-tftp, to reserve space for a future tftp-client

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

alexmaco avatar May 01 '20 08:05 alexmaco

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?

oblique avatar May 01 '20 09:05 oblique

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.

alexmaco avatar May 01 '20 14:05 alexmaco

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

oblique avatar May 01 '20 18:05 oblique

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

oblique avatar May 01 '20 18:05 oblique

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.

spod avatar Dec 31 '20 06:12 spod

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?

oblique avatar Jan 01 '21 12:01 oblique