Most probably, if you you are looking for a way to build vmods with rust, you want vmod-rs-template.
However, if you are into archeology and want an example on how you could build a toy vmod in rust for varnish 4.1 (long deprecated now), you can look at vmod-pupa, which was written to support this article.