wazero icon indicating copy to clipboard operation
wazero copied to clipboard

Add Zig example

Open knqyf263 opened this issue 3 years ago • 1 comments

Close https://github.com/tetratelabs/wazero/issues/738

knqyf263 avatar Aug 09 '22 07:08 knqyf263

@codefromthecrypt @mathetake I've addressed all the comments.

knqyf263 avatar Aug 10 '22 10:08 knqyf263

Fantastic collaboration. @Luukdegram you're the best!

codefromthecrypt avatar Aug 11 '22 08:08 codefromthecrypt

Thank you so much @Luukdegram! 🙌

mathetake avatar Aug 11 '22 08:08 mathetake

Thank you, @codefromthecrypt @mathetake! Also, I'm so honored to have learned that much from @Luukdegram though I'm new to Zig. I really appreciate it. As we had some discussion about WASI, adding a Zig WASI example might also be useful.

knqyf263 avatar Aug 11 '22 08:08 knqyf263

Glad I could help! Feel free to message me anytime in the future :)

Luukdegram avatar Aug 11 '22 09:08 Luukdegram

@knqyf263 you feel up to adding a wasi example in zig? no issues on our side if you have time. Zig is well loved by us.

codefromthecrypt avatar Aug 11 '22 09:08 codefromthecrypt

@codefromthecrypt I won't have time until the first half of next week. If you are not in hurry, I can add the WASI example later next week.

knqyf263 avatar Aug 11 '22 11:08 knqyf263

no hurry at all, thanks!

codefromthecrypt avatar Aug 11 '22 23:08 codefromthecrypt

@knqyf263 once you have the WASI example up, I'll offer to put together a zig page like these. https://wazero.io/languages/

codefromthecrypt avatar Aug 25 '22 04:08 codefromthecrypt

Nice. I'm sorry to be late. I came up with an idea for Go plugin system over WebAssembly and had been developing that in my spare time 😄 It uses wazero under the food. You define proto files for Protocol Buffers and my protoc plugin generates TinyGo Wasm SDK like this. The proto file would be as below.

service Greeter {
  // Sends a greeting
  rpc Greet(GreetRequest) returns (GreetReply) {}
}

// The request message containing the user's name.
message GreetRequest {
  string name = 1;
}

// The response message containing the greetings
message GreetReply { string message = 1; }

Hopefully, I will wrap it up this week and move back to the Zig work.

knqyf263 avatar Aug 25 '22 05:08 knqyf263

You define proto files for Protocol Buffers and my protoc plugin generates TinyGo Wasm SDK ...

heh that sounds great!

mathetake avatar Aug 25 '22 06:08 mathetake

It's out😎 https://github.com/knqyf263/go-plugin

knqyf263 avatar Aug 29 '22 13:08 knqyf263

hey, I have updated the Zig section on the wazero website here, please do chime in https://github.com/tetratelabs/wazero/pull/1051

evacchi avatar Jan 22 '23 15:01 evacchi