<dbandstra>
well, it's a bit smelly that i'm using unions in the first place. i'll stick to switch statement boilerplate for now and then try to get rid of the unions later. thanks daurnimator
<andrewrk>
11,000 lines of rust replaced with @cImport
<shritesh_>
andrewrk: Would it make sense to generate Zig function signatures like @cImport does at compile time using the build system? I'm trying to create bindings for Web APIs from WebIDL. Has this use case been considered or are there any example of something like this?
<andrewrk>
I think it's fair to say that some use cases call for code generation. And I think the best place for that to happen is at the build system level yes
<shritesh_>
Alright. Chrome is currently experimenting with WASM host bindings where WASM can directly talk to the browser without going through JS. They did a writeup on WebGL and it was like 5x faster. I think this is a better route to prepare for. Zig can really shine when the feature lands in all the browsers.
wootehfoot has joined #zig
<andrewrk>
that seems like the obvious endgame for wasm in the browser
<emekankurumeh[m]>
sounds like the equivalent of syscalls for wasm
<donpdonp>
looks like i can use this in the interim: var fds = try allocator.alloc(c_int, 2);c.pipe(fds.ptr);
<tgschultz>
you should be able to avoid avoid the allocation: var fds: [2]c_int = undefined; const fds_ptr = @ptrCast([*c]c_int, &fds); c.pipe(fds_ptr);
companion_cube has joined #zig
neceve has quit [Remote host closed the connection]
qazo has joined #zig
Ichorio has joined #zig
jjido has joined #zig
suirad has quit [Ping timeout: 256 seconds]
fengb has joined #zig
very-mediocre has quit [Quit: Page closed]
Ichorio has quit [Ping timeout: 245 seconds]
Ichorio has joined #zig
rivten has quit [Remote host closed the connection]
fengb has quit [Quit: Page closed]
halo has quit [Quit: WeeChat 2.4]
<andrewrk>
donpdonp, ^ yes, the bug is that you need that @ptrCast
qazo has quit [Read error: Connection reset by peer]
<donpdonp>
got it. thx.
wootehfoot has quit [Read error: Connection reset by peer]
qazo has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ichorio has quit [Ping timeout: 245 seconds]
ltriant has joined #zig
fengb has joined #zig
<fengb>
andrewrk: should I adapt https://github.com/ziglang/zig/pull/2336 to use the ABI only? I'm also happy to close it and start afresh since I learned a bunch through the process
<andrewrk>
fengb, up to you. I think I'll take responsibility of setting up the libc side of things though. Lots can go wrong and I want to pay close attention
<andrewrk>
I mean as far as the .h files and building libc.a from source