Using D within a rust codebase

Jacob Carlborg doob at me.com
Mon Jul 27 10:50:43 UTC 2020


On 2020-07-27 03:03, Paul Backus wrote:

> extern(C) void hello()
> {
>      import std.stdio: writeln;
>      writeln("Hello from D!");
> }

The D runtime needs to be initialized first [1]. Then it should be 
terminated as well [2].

[1] https://dlang.org/phobos/core_runtime.html#.rt_init
[2] https://dlang.org/phobos/core_runtime.html#.rt_term

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list