ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
_whitelogger has joined #zig
steveno has joined #zig
steveno has quit [Remote host closed the connection]
steveno has joined #zig
SimonNa has quit [Remote host closed the connection]
SimonNa has joined #zig
darithorn has quit [Quit: Leaving]
steveno has quit [Quit: Leaving]
darithorn has joined #zig
steveno has joined #zig
qazo has quit [Read error: Connection reset by peer]
qazo has joined #zig
darithorn has quit [Ping timeout: 250 seconds]
darithorn has joined #zig
Marumoto has quit [Ping timeout: 240 seconds]
hooo has quit [Quit: Connection closed for inactivity]
steveno has quit [Remote host closed the connection]
kristate has joined #zig
darithorn has quit [Quit: Leaving]
emekoi has joined #zig
emekoi has quit [Ping timeout: 245 seconds]
kristate has quit [Read error: Connection reset by peer]
<donpdonp>
export fn xzoomret() [8]u8 {} ; zig build-lib --strip --target-arch wasm32 => TODO implement C ABI for this architecture. See https://github.com/ziglang/zig/issues/1481
<donpdonp>
export fn xzoomret() u8 {}; works fine for a simpler return value. that was the difference.
<kristate>
donpdonp: okay, I will implement it
<donpdonp>
is there a way to return a string value without hitting this missing feature?
<Flaminator>
If I pass a struct to a function by value at what point does Zig decide to pass it by reference instead?
Hejsil has joined #zig
<Hejsil>
Flaminator, It's an optimization, so there is no clear semantic for it
<Hejsil>
Right now, Zig always pass structs by ref behind your back
<Hejsil>
I think
<kristate>
donpdonp: the calling convention for export is c abi, so you must return a c_abi objectg
<donpdonp>
so []u8 is the right type to return in this case?
<kristate>
[*]u8
* donpdonp
is still learning zig ptr foo
<Flaminator>
Yeah just noticed that just can't change things on a struct you passed to a function by value because it's constant. So need to create a copy of it in the function itself.