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
```
On Thursday, 11 January 2024 at 12:45:45 UTC, cc wrote:
I don't use the delegate version personally, but if that's
already working for you, may as well stick with it.
In retrospect, that delegate version is probably quite a bit
better.
On Wednesday, 10 January 2024 at 23:36:33 UTC, JN wrote:
I would like to use ImportC to automatically import a C header
into my D project.
It was already done. Use it https://code.dlang.org/packages/wgpu-d
Don't reinvent the wheel :)
On Thursday, 11 January 2024 at 08:57:43 UTC, Christian Köstlin
wrote:
Did someone already try to do this in dlang?
I guess it will be very hard to beat the java solutions running
with graalvm!
https://news.ycombinator.com/item?id=38851337
Kind regards,
Christian
The problem with this
On Sunday, 7 January 2024 at 09:49:36 UTC, Renato wrote:
Hi, I wanted to customize the toString implementation for my
structs.
So I wrote a mixin for doing that:
Alternative format similar to what you already have:
```d
import std.format;
mixin template ToStringMixin() {
void
On Thursday, 11 January 2024 at 08:57:43 UTC, Christian Köstlin
wrote:
Did someone already try to do this in dlang?
I guess it will be very hard to beat the java solutions running
with graalvm!
https://news.ycombinator.com/item?id=38851337
Kind regards,
Christian
I think C++ people already