dotnet / LLVMSharp

LLVM bindings for .NET Standard written in C# using ClangSharp
MIT License
846 stars 97 forks source link

Print and read input functions with LLVMSharp #133

Open michalchecinski opened 4 years ago

michalchecinski commented 4 years ago

I write compiler for my own language using LLVMSharp. Currently I want to make print to standard output and read from standard input.

I tried looking into other projects but found nothing. One thing that I came up with is using printf from C or other language. But I don't know how to embed stdio.h

davidelettieri commented 1 year ago

I created a sample calling C# Console.WriteLine and Console.ReadLine from LLVM IR.

https://github.com/davidelettieri/LLVMSharp.Samples