Using D within a rust codebase
Ali Çehreli
acehreli at yahoo.com
Mon Jul 27 11:48:51 UTC 2020
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_constructor)
> extern (C)
> int lib_init() {
> return Runtime.initialize() ? 0 : 1;
> }
Ok, now I learned that my bool-to-int conversion is already taken care
of by rt_init(). Cool. :)
Ali
More information about the Digitalmars-d-learn
mailing list