I have an existing rust project, and I'm trying to rewrite part
of it in D. However, I'm not sure how to get rust -> dlang
interop working. I've looked into rust -> c -> dlang interop, but
I'm not sure how to get c -> dlang interop working either.
On Sunday, 26 July 2020 at 21:18:19 UTC, powerboat9 wrote:
I have an existing rust project, and I'm trying to rewrite part
of it in D. However, I'm not sure how to get rust -> dlang
interop working. I've looked into rust -> c -> dlang interop,
but I'm not sure how to get c -> dlang interop work
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://dl
On 7/27/20 3:50 AM, Jacob Carlborg wrote:> 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] ht
On 7/27/20 4:43 AM, Ali Çehreli wrote:
On 7/27/20 3:50 AM, Jacob Carlborg wrote:> On 2020-07-27 03:03, Paul
> 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
[...]
pragma (crt_const
On 2020-07-27 13:43, Ali Çehreli wrote:
They should be taken care of when the program is linked with a D compiler.
Just linking with a D compiler is not sufficient. There needs to be a D
main function for the runtime to automatically be initialized. If you
make the D code a bit more complica