www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - dflat - v0.1

After getting waylaid by jet lag, family, health, and debugging, 
I'm happy to finally announce v0.1 of dflat, a wrapping 

boilerplate needed to drive the CoreCLR (cross platform .Net 
implementation).

This release features:

* cross platform support by using Mono.Cecil
* the ability to call instance methods on classes
* simplified API - no need to use classes with auto-implement

The code is still very early (and liable to break) but it should 
be useable:


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

references unpinned manually to avoid leaking
```

It probably easiest to build it with `dub test -- 
/path/tocsharpcompiler/ /path/to/cecil/bin/ 
/path/to/derelict-util/source [dmd|ldc2...]`, until I figure out 

runtimeconfig.json

Please don't hesitate to file bug reports or feature requests!

This work has been sponsored by Symmetry Investments.

https://github.com/thewilsonator/dflat/
https://github.com/thewilsonator/dflat/releases/tag/v0.1-alpha1 
(best to use master though)
Jun 25 2019