vezel-dev / cathode

A terminal-centric replacement for the .NET console APIs.
https://docs.vezel.dev/cathode
BSD Zero Clause License
91 stars 7 forks source link

Switch to a native library for driver implementations #43

Closed alexrp closed 8 months ago

alexrp commented 2 years ago

This would have a number of benefits:

The native library would probably be written in Zig or C. For this to be as painless as possible, we would need alexrp/zig-msbuild-sdk#8 (and by extension dotnet/sdk#19929) to be implemented first.

alexrp commented 1 year ago

Experience from Celerity and Ruptura shows that this should be fairly straightforward to do even in the short term.

The main annoyance will be working around dotnet/sdk#19929. We need to package the compiled native libraries in runtimes/<rid> folders in the Vezel.Cathode package; we do something similar for analyzers already, so this isn't too hard. We would also need some hacks to include the native libraries when building the sample projects.

alexrp commented 1 year ago

(The native library will be written in C initially and ported to Zig once Zig reaches 1.0.)

alexrp commented 9 months ago

This will run into the same problem as vezel-dev/celerity#101. Or not.

alexrp commented 8 months ago

This will mean temporarily dropping support for musl-based systems (e.g. Alpine) due to https://github.com/vezel-dev/zig-sdk/issues/83, but that's probably not the end of the world. I doubt many people would use Cathode in Docker containers or whatever.

alexrp commented 8 months ago

Turns out I was wrong about SIGCONT; that race condition just cannot be fixed.

https://stackoverflow.com/a/75084598