Our great sponsors
-
LjTools
LuaJIT 2.0 bytecode parser, viewer, assembler and test VM. Lua 5.1 parser, IDE and debugger.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
The CLR has a built-in type system with some predefined types based on which you build your own; the CLR makes a difference between heap and stack allocated types, the former descendants of System.Object, the latter of System.Value; your numbers are likely value types. If you want to understand the CLR start with the standard; I usually use ISO 23271:2012 3rd edition, which corresponds to ECMA-335 5th edition (see https://www.ecma-international.org/publications-and-standards/standards/ecma-335/); I can also recommend the book by Lidin (see https://link.springer.com/book/10.1007/978-1-4302-6760-7). If you want to implement your own runtime library which your compiler generates code for you can write it e.g. in C#, but of course also in IL assembler; and depending on whether you want your runtime to depend on full .NET or just the minimum (mscorlib.dll), you have to take care that your library doesn't depend on things in .NET you don't want to deploy. Have a look on how I did it for Oberon: https://github.com/rochus-keller/Oberon/tree/master/runtime; the directory includes the same runtime written in Lua, C# and C.
Most of my languages have VM backends; see e.g. https://github.com/rochus-keller/Oberon; I implemented different backends generating LuaJIT bytecode; a year ago I switched to Mono which is based on ECMA-335; here is a discussion why I switched: https://github.com/rochus-keller/Oberon/releases/tag/IDEv0.9.0; I implemented utility libraries for both LuaJIT and CIL bytecode; see https://github.com/rochus-keller/LjTools/, https://github.com/rochus-keller/Pelib/ and https://github.com/rochus-keller/MonoTools/. I evaluated many VMs and think the mentioned ones are best suited. There were a lot of challenges with both technologies, what is to be expected, and too much to describe here.
Most of my languages have VM backends; see e.g. https://github.com/rochus-keller/Oberon; I implemented different backends generating LuaJIT bytecode; a year ago I switched to Mono which is based on ECMA-335; here is a discussion why I switched: https://github.com/rochus-keller/Oberon/releases/tag/IDEv0.9.0; I implemented utility libraries for both LuaJIT and CIL bytecode; see https://github.com/rochus-keller/LjTools/, https://github.com/rochus-keller/Pelib/ and https://github.com/rochus-keller/MonoTools/. I evaluated many VMs and think the mentioned ones are best suited. There were a lot of challenges with both technologies, what is to be expected, and too much to describe here.
Most of my languages have VM backends; see e.g. https://github.com/rochus-keller/Oberon; I implemented different backends generating LuaJIT bytecode; a year ago I switched to Mono which is based on ECMA-335; here is a discussion why I switched: https://github.com/rochus-keller/Oberon/releases/tag/IDEv0.9.0; I implemented utility libraries for both LuaJIT and CIL bytecode; see https://github.com/rochus-keller/LjTools/, https://github.com/rochus-keller/Pelib/ and https://github.com/rochus-keller/MonoTools/. I evaluated many VMs and think the mentioned ones are best suited. There were a lot of challenges with both technologies, what is to be expected, and too much to describe here.
However, .NET 6 OS/Hardware support is worse than for Mono. If this is important, it is better to use Mono.