RfC: port C# tooling to Python and remove mono dependency

We would like to propose removing the C#/Mono dependency by porting the actor compiler and other C# components to Python.

Our team at Monogon is building an open-source datacenter operating system. We are currently adding build infrastructure for FoundationDB to our core platform, which has a tightly controlled supply chain: everything is built from source and reproducible, including custom-built, static cross-capable toolchains for many different architectures and platforms.

Both Mono and .NET Core are very large and complex dependencies. They’re hard to bootstrap, cross-compile and package. We spent a long time trying to fit a square peg into a round hole, and finally decided that it might be less work to instead remove the dependency.

The C# code is self-contained and stable, and the task seems feasible.

We feel like removing a major dependency could be beneficial to other users, including those with less onerous supply chain constraints.

My colleague Hendrik opened two initial PRs here:

They’re direct ports of the existing C# code, meant to be bug-for-bug compatible with the existing code. C# maps well to Python, which is widely available on all platforms and is already used extensively in other parts of the code base.

Sonnet 4.5 was used for the bulk of the translation - it seems like a good fit for the task at hand, given that the results are verifiable and the important architectural decisions were already made. Both PRs were reviewed and tested by humans. We think it turned out quite well.

Please let us know how you feel about this effort and whether we should continue porting (and PRing) more components.

1 Like