Rust implementation status
dpx.infinity at gmail.com
Mon Mar 13 00:09:43 CET 2017
I'm a Rust programmer, and I really like that there is now a Rust
implementation of the Wireguard daemon!
I have a few question and suggestions.
1. Instead of hand-rolling your own error management implementation,
consider using the error-chain crate. It seems that many popular
crates now depend on it. It would make the Wireguard crate more
interoperable and more readable for those who is already accustomed
with error-chain. On the first glance, your custom implementation
resembles error-chain very much.
2. Consider publishing the project on some hosting service like Github
or Gitlab or something else, which would allow easier community
participation. I would very much like to help with its development, but
I never participated in any mailing-list based projects and I
personally find it very inconvenient, and I think that the pull
requests mechanics is greatly superior. Also, almost all Rust ecosystem
lives on Github, so lots of Rust developers are quite accustomed to it,
and you will most certainly attract more contributors that way.
3. On a related note, consider publishing a link to this project in the
Rust community, in particular, in the Rust subreddit and maybe on
The Rust Programming Language Forum. I think that many people there
will be very interested in a project like this, because it is network-
related, it is pretty low level, and it will probably depend on the
current "hot" crates in the Rust community, like tokio.
4. I think it would be quite idiomatic to split the interface to WG
into a separate library crate, which the main binary would depend on.
5. I wonder, is it really necessary to perform daemonization manually?
As far as I understand the current situation in the daemon writing and
init systems, it is expected that daemons won't fork themselves and
will continue working in foreground when started, while service
management systems like systemd or launchd will take care of keeping
them alive, collecting logs, starting, restarting, etc. Daemonizing
also seems quite unidiomatic on Windows. I also personally think that
avoiding manual daemonization will make the code and architecture
simpler and more manageable.
6. Have you decided which cryptographic libraries you are going to use?
Or are you planning to implement the necessary primitives in this
I'm really looking forward to the further development of this project,
and I'm willing to participate in it if you're looking for
More information about the WireGuard