https://github.com/vzarytovskii/interactive-ilkernel
IL Kernel for .NET Interactive
https://github.com/vzarytovskii/interactive-ilkernel
cil dotnet dotnet-core dotnet-interactive msil
Last synced: 6 months ago
JSON representation
IL Kernel for .NET Interactive
- Host: GitHub
- URL: https://github.com/vzarytovskii/interactive-ilkernel
- Owner: vzarytovskii
- License: mit
- Created: 2021-12-03T17:22:51.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-27T11:07:49.000Z (over 2 years ago)
- Last Synced: 2025-03-24T07:39:11.921Z (7 months ago)
- Topics: cil, dotnet, dotnet-core, dotnet-interactive, msil
- Language: C#
- Homepage:
- Size: 21.5 KB
- Stars: 16
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IL Kernel for .NET Interactive
## Description
An experimental preview verision of [MSIL/CIL](https://en.wikipedia.org/wiki/Common_Intermediate_Language) kernel for the [.NET Interactive](https://github.com/dotnet/interactive), using [@kkokosa](https://github.com/kkokosa)'s [Mobius.ILasm](https://github.com/kkokosa/Mobius.ILasm) as an IL compiler.
## Usage
First, new kernel should be loaded into the interactive session:
```csharp
// Optional, uncomment the following line, if you need to include additional paths to reference libraries from, for example, if you're building it locally.
// #i "C:\Users\user\Downloads"
#r "nuget:DotNet.Interactive.Extensions.ILKernel,0.1.0-pre"
```You should now be able to run IL, for example:
```csharp
#!il
.assembly ConsoleApp
{
}.class public auto ansi abstract sealed beforefieldinit Program
extends System.Object
{
.method public hidebysig static
void Main () cil managed
{
.entrypoint
.maxstack 8ldstr "Hello, world from IL!"
call void[System.Console]System.Console::Write(string)
ret
}
}
```## Example of running code above:
