How to start the Dlang druntime in Dart?

I manage to compile and link the Dlang with Dart and I translated the sample_extension to D.
It all works fine except that the D-runtime function is not started this means that the GC and static this() in D is not called and this is because the D function core.runtime.rt_init() needs to be called pre-runtime.

So my question is very simple how do I do this from Dart.
My test platform is Linux
Linux starship 4.15.0-1079-oem #89-Ubuntu SMP Fri Mar 27 05:22:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
I used the dart2native to link everything to one binary and the druntime + phobos is shared libs.

Note.
Dart calls the Dlang ResolveName correctly.
So I just need to know how to call rt_init before without using ResolveName.

Thank you

(I don’t know anything about Dart and its linking)

Try to add pointer to core.runtime.rt_init() into .init_array section.
For example, this D code does same thing with initMainStackSize() function:

// Init FreeRTOS main task stack size:
import ldc.attributes;

@section(".init_array")
immutable initMainStackSize_ptr = &initMainStackSize;

void initMainStackSize()
{
import external.rt.dmain: mainTaskProperties;

mainTaskProperties.taskStackSizeWords = 25 * 1024 / 4;

}