Skip to content

TomatOrg/TomatoDotNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyDotNet

A dotnet runtime designed to be more light weight and also work on embedded (inside pentagon more specifically) but also has a linux runtime for ease of development and use.

In addition to attempting to be small, it also attempts to fully verify the CIL that is being run on top of it to be fully memory safe, this allows for proper Type isolation and security, but does prevent some of the more advanced and unsafe features of C# to not be usable (for example stackalloc).

Another bonus with this design is that porting to new kernels and hosted environments should not be too hard alongside the ability to embed inside programs as something more light weight than mono.

Progress

Right now the main work is on the runtime itself, the main features of the runtime:

  • On-the-fly Garbage Collector for pause free garbage collection
    • Including support for finalization and reviving
    • A really cheap write-barrier
  • Full support for reference types
    • With abstract/virtual methods support
    • Upcasting fully implemented
  • Full support for exceptions
    • Done using generated control flow
  • Full support for integer and floating point types
  • Full support for array types
    • Including IEnumerable
    • Missing ICollection/IList
  • Full support for struct types
  • Full support for interface types
    • Implemented using Fat-Pointers and implicitly casting as needed
    • Casting down from one interface/object to another is essentially zero cost (offseting the vtable of the parent)
  • Full support for managed references
    • Supports locals, fields and array elements
  • Full support for boxing/unboxing
    • Including Nullable
  • Full support for Generics (Type and Methods)
  • Full support for delegates and multicast delegates
    • Missing some corelib methods to make them fully work
  • Most common CIL instructions implemented
  • Visibility and Accessibility checking
  • Full attribute support
  • Support for ThreadStatic attribute

Note that the runtime is still not stable and even tho the features are implemented bugs are likely to be found, we try to fix anything we find.

Corelib support

The corelib is now part of a separate project that can be found here.

Main missing features

  • Overflow math (will come once MIR supports them)
  • Stack trace (will need some form of JIT support)

About

A small and lightweight implementation of dotnet runtime

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published