penumbra23 / pura

Easy to use, extendable, OCI-compliant container runtime written in pure Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ask for help

Yuan-Zhuo opened this issue · comments

How did you write this project? And is there any guidance material? I also want to write a container runtime from scratch for learning, can you help me?

Hi @Yuan-Zhuo ! Thanks for asking!

This project is a code reference for a "tutorial" series I wrote on Medium (here is the link for the first part). It's a minimum detail article series focusing on the big picture, but it gives you a closer insight into the implementation details.

I've first started writing the runtime in Bash, but due to non-maintainability and lack of constructs that modern languages have, I've kinda postponed that project (but not abandoned). I'm already working in Rust a year ago and the close-to-hardware libraries of Rust really seemed like a good option to start with Rust (although there is a already production runtime in Rust called Youki which has everything a runtime should have).

The greatest references were runc and containerd. These projects are the de-facto runtime implementations on the market today, so definitely start there.

But the most important reference was the OCI runtime spec which is (mostly) concise and precise about each OCI operation and what it affects, both on the host and container side.

If you have any other questions, contact me on my email, I'm more than glad to help you!

commented

Sorry for replying in this instead of opening a new one.
@penumbra23 Just want to say thank you, the articles are excellent, keep doing this! It could be an awesome series like the https://os.phil-opp.com, though the topic of Container in Rust may receives much less attention. Maybe you can try GitHub Sponsors, Patreon or something else to get some support on your work.

@xjvs Thanks for joining the chat!

I've read and went through Phill's Rust OS tutorials, it's a very detailed and insightful article and I'm glad that Rust gets its deserved attention.

Currently I'm not looking for sponsors or financial support, I'm already full-time emloyed and do this out of love for low-level programming and the awesome rustlang. Getting exactly these comments from the community helps more than enough 😃