6 ms·
This is pretty wild. I hadn't realized that there were easy ways to work with EFI in higher-level languages than C. Other languages: Rust: https://medium.com/
by mmastrac 8y ago
This is pretty wild. I hadn't realized that there were easy ways to work with EFI in higher-level languages than C.
Other languages:
Rust: https://medium.com/@gil0mendes/an-efi-app-a-bit-rusty-82c36b745f49 https://medium.com/@gil0mendes/an-efi-app-a-bit-rusty-82c36b...
Wasn't able to find an example for Go, but seems likely it's out there.
- blattimwind 8y ago> Wasn't able to find an example for Go, but seems likely it's out there. NERF/LinuxBoot has a lot of Go components though as I remember it the EFI application is actually the Linux kernel, with the userland (i.e. init) being written in Go.
- vetrom 8y agoThe kexec paradigm makes this execution vector rather more useful than most people realize. It's also what powers inline kernel crash dumps.
- int_19h 8y agoC# is higher-level in aggregate, but if you look at individual features, it lets you go as low as C in most respects - raw pointers with arithmetic, unions, stack allocations, you name it. It seems that this EFI project uses it at that level, and higher-level features that would require e.g. GC aren't supported.
- amluto 8y agoGo has segmented stacks, which could make it awkward to use in a bare-metal environment like this. I’m sure it’s possible, but it might be quite tedious to get working.
- qalmakka 8y agoC# with boatloads of `unsafe` is by no means an higher level language; it's pretty much the same level of C/C++ or Rust. You're just using a more sophisticated complier and a stricter language, which can be great if used correctly, but if you dereference a null pointer, it's still going to crash and burn; this also applies to unsafe Rust.
- pjmlp 8y agoFollowing the footsteps of system languages like PL/S or Mesa/Cedar, just to cite two quite old examples. The good part is that the unsafe bits can be easily constrained, instead of hidding away in every single line of code.