Maybe D runtime / GC should initialize and exit every time the function is called, so that it doesn’t help to add small do-very-little functions like string to lower, urlencode, etc. I don't know how this works, but I wrote several extensions in C.
Yes, the D runtime should be initialized when the D program starts, and (depending on which libraries you use), static constructors must be called. This is minimal, but as you said, it would be inefficient for small functions.
. druntime main.
main
C ( extern(C)) , , GC .., .
extern(C)
.
D, %, , .. , #!/Usr/bin/env rdmd .
script , 2-3 , .
, , , . ( GC, .)
, . , . , , Python. Python , D. , C ++.
, .