Closed valentinbreiz closed 8 months ago
first problem i see is "no-runtime" mode not support classes 🤔
It can be done, did you take a look at https://github.com/Michael-Kelley/RoseOS ?
It can be done, did you take a look at https://github.com/Michael-Kelley/RoseOS ?
So, I don't see any non-static\non-abstract custom classes (except CoreLib) 🤔
Yeah it doesn't seem like it supports .NET runtime classes. But, maybe we could make a modified version of it to support classes?
modified version
Seem like a bad idea, reimplementation runtime without os-bindings maybe very hard. But it possibly still additional functional for future 🤔
But still, using C# as a C-like structure-based language to develop an operating system using full (almost) C# syntax sounds very cool
But still, using C# as a C-like structure-based language to develop an operating system using full (almost) C# syntax sounds very cool
It can be cool yes but it will change everything in Cosmos, we need to keep classes, for the project architecture and Cosmos users
Edit: @MishaTY, @0xF6 I tried the zerosharp repo and classes are working without runtime.
Source code: https://github.com/CosmosOS/Cosmos/blob/feature/NativeAOT/source/Kernel-NativeAOT/zerosharp.cs#L179
I mean .NET framework classes like Console class.
Why not use stivale2 instead of multiboot2? It has SMP support
I think you need to hack dotnet/runtime a bit, and provide alternative to Runtime.WorkstationGC or maybe for Boostrap. I think if you provide custom C runtime, which can allocate things using EFI api. That unlocks a lot of things IMO
'UEFI Cosmos Project'
Closing this for now
NativeAOT is the ahead-of-time (AOT) toolchain that can compile .NET application into a native (architecture specific) single-file executable. We currently use IL2CPU as our CIL to assembly "compiler". This new way to compile CIL code to binary executable could bring a lot of a features to the Cosmos project:
A proof of concept from our IL2CPU compiler to NativeAOT should be done. If this works, IL2CPU will be discontinued.
Must-have for a Cosmos port:
Four possible option for a .NET runtime use with NativeAOT:
1. Write the runtime from scratch-> Useless work.4. Some how use ILStubs https://github.com/dotnet/runtimelab/blob/feature/NativeAOT/docs/design/coreclr/botr/ilc-architecture.md#compiler-generated-method-bodies to generate all the code we need-> Is this possible?Resources: Dev branch: https://github.com/CosmosOS/Cosmos/tree/feature/NativeAOT Variant efi no runtime runtime lab - aot branch