seL4 / microkit

Microkit - A simple operating system framework for the seL4 microkernel
Other
68 stars 37 forks source link

Rewrite the tool #126

Closed Ivan-Velickovic closed 1 month ago

Ivan-Velickovic commented 1 month ago

This PR rewrites the entire Microkit tool from Python to Rust.

This was done for the following reasons:

This rewrite, while not significantly reducing our dependencies in general, does improve the situation. We are no longer dependent on pyoxidizer, which was causing most of the issues with the tool.

We introduce a dependency on the Rust toolchain. The tool itself has two dependencies (for XML parsing). No other dependencies are needed, and it was a conscious decision to re-invent the wheel where the Rust standard library was lacking (compared to the Python standard library).

The other programming languages considered for the rewrite were Zig and Go. While they both have their benefits and costs (as does Rust), they were not chosen due to them not being in any other seL4 Foundation supported projects meaning that it could have been difficult to continue maintaining them in the future.

The main cost of rewriting the tool in Rust is that it has become slightly more complicated and harder to understand. This could potentially result in a higher barrier to entry for contributors. However, most contributions such as adding platform support will not need to touch the tool.

Ivan-Velickovic commented 1 month ago

It should be noted that for the example programs that are in the repository, the rewritten tool produces the same binary as the current tool.

The only observable differences between the new tool and the current one is various bug fixes and improvements to error messages.

Other than that, there should be no observable differences to users.