[kata-dev] For developers: Rusty on rust?

Hunt, James O james.o.hunt at intel.com
Tue Aug 18 08:06:31 UTC 2020


Hi All,

# TL;DR

- The new agent is written in rust [2].
- We need the community to be more familiar with the rust language.
- I've written some brief notes on rust, along with a very simple program
written in both golang and rust (to allow you to "diff the
implementations") for educational purposes. See [6].


# The Kata agent

As you may be aware, the current Kata agent is written in golang [1]. But
we also have a newer agent written in rust [2]. That implies we need more
rust programmers in the community to:

- Work on rust PRs.
- Write new tests in rust (our test advice document explains how to write
tests in both golang and rust [3]).
- Have some rust knowledge to help ask awkward questions [4] on the code
when they review PRs ;)


# Is this you?

Since much of the container ecosystem is currently written in golang, you
may not be familiar with rust yet. Or maybe you looked at learning rust
ages ago and gave up in frustration whilst also wondering what all the fuss
was about?


# Rust docs

There is a lot of material on rust available including the
excellent official documentation [5]. However, it can all be a little
overwhelming initially due to the sheer size and scope of available
material.

If you already know golang and want a very quick "jump start", my (very
brief and incomplete) notes plus example program written in go and rust may
be useful [6]. Usual caveats apply [7].


# Learning rust

I think all those who have learnt or are currently learning rust will
concede that it is not an easy language to become fully comfortable with.
It requires a significant investment in time to learn, but, like many
difficult things in life, it really is worth the effort! As usual,
perseverance pays off. Read and write as much rust as possible!


Cheers,

James

[1] - https://github.com/kata-containers/agent
[2] -
https://github.com/kata-containers/kata-containers/tree/2.0-dev/src/agent
[3] -
https://github.com/kata-containers/tests/blob/master/Unit-Test-Advice.md
[4] -
https://github.com/kata-containers/community/blob/master/PR-Review-Guide.md
[5] - https://www.rust-lang.org/learn
[6] - https://github.com/jamesodhunt/go-vs-rust
[7] -  The notes are in *no way comprehensive* and the example code isn't
using fully idiomatic rust, but hopefully does provide a framework for
experimentation and education. Blah, blah, blah.

---
https://katacontainers.io/ | https://github.com/kata-containers
<https://github.com/clearcontainers>
Open Source Technology Center
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3
1RJ.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.katacontainers.io/pipermail/kata-dev/attachments/20200818/508fc10d/attachment.html>


More information about the kata-dev mailing list