https://github.com/thewilsonator/dflat
C#/.NET wrapper library for the D programming language
https://github.com/thewilsonator/dflat
csharp dlang dotnet wrapper-library
Last synced: 11 months ago
JSON representation
C#/.NET wrapper library for the D programming language
- Host: GitHub
- URL: https://github.com/thewilsonator/dflat
- Owner: thewilsonator
- Created: 2019-04-16T09:07:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-24T18:00:00.000Z (about 6 years ago)
- Last Synced: 2025-04-13T05:44:24.168Z (11 months ago)
- Topics: csharp, dlang, dotnet, wrapper-library
- Language: D
- Size: 118 KB
- Stars: 14
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dlfat - a c# wrapper generator for D
Dflat is an application and library to generate boilerplate and dlls to bind to C# code.
```c#
public class Class1
{
int a;
public Class1(int aa) { a = aa; }
public void foo() { a = 42; }
public override string ToString() { return a.ToString(); }
}
```
```d
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