DMD 2.067.0 で地味にインラインアセンブラで syscall 命令がサポートされたので、それを軽くラップするようなライブラリを書いてみました。
https://github.com/kubo39/syscall.d
コード例:
import syscall : syscall, WRITE; void main() { string buf = "Hello\n"; syscall(WRITE, 1, cast(ulong) buf.ptr, cast(ulong) buf.length); }