How to use ImportC to import WebGPU header

ryuukk_ ryuukk.dev at gmail.com
Thu Jan 11 22:00:16 UTC 2024


You need to use a .c file that include it


--- webgpu.c

```c
#include "webgpu.h"

```


--- app.d

```d
import std.stdio;
import webgpu;

void main()
{
     writeln(WGPUBlendFactor_Dst);
}
```


result:

```
$ dmd -run app.d webgpu.c
WGPUBlendFactor_Dst
```



More information about the Digitalmars-d-learn mailing list