suggestion add extern(GO)

Johan j at j.nl
Tue Jun 6 16:54:07 UTC 2023


On Tuesday, 6 June 2023 at 15:46:00 UTC, d007 wrote:
> golang support linker with asm without cgo at much fast speed.
>
> From this blog you can see go can call rust function without 
> CGO https://words.filippo.io/rustgo/
>
>
> maybe add extern(GO) will bring D into a large user community.
>
> extern(GO) should only support pointer and scalar arguments, 
> and must be @nogc nothrow.

The way I understand the article, nothing new is needed on the D 
side: you use extern(C) (and -betterC if you don't want to link 
with druntime).

-Johan


More information about the Digitalmars-d mailing list