Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 642 Bytes

README.md

File metadata and controls

27 lines (21 loc) · 642 Bytes

dlfat - a c# wrapper generator for D

Dflat is an application and library to generate boilerplate and dlls to bind to C# code.

public class Class1
{
int a;
public Class1(int aa) { a = aa; }
public void foo() { a = 42; }
public override string ToString() { return a.ToString(); }
}
auto a = Class1.make(314);
a.toString().fromStringz.writeln; // 314
a.foo();
a.toString().fromStringz.writeln; // 42
a.unpin(); // Objects created with make need their c# GC references unpinned manually to avoid leaking

see the tests for more details.

Building

You will need the Mono runtime, including Mono.Cecil and derelict-util