johanbrandhorst / protobuf

GopherJS Bindings for ProtobufJS and gRPC-Web
MIT License
81 stars 16 forks source link

Might be worth updating this now that caddy 2 is stable and tinygo can compile to WASM #44

Open joe-getcouragenow opened 3 years ago

joe-getcouragenow commented 3 years ago

I use envoy, but have projects where i need pure baremetal golang and browsers.

Tinygo is now working with go modules and JSON via a hack that will be sorted soon i think. Caddy v2 is pretty powerful now. QUIC Is also taking off. Safari beta has it turned on finally :) Then there is gioui.org:https://gioui.org/

So it feels like its good timing to revive this project. Sort of right time and place.

Tinygo working, instead of gopherjs. Did require quite some hacks.. But i think the tinygo team are getting it to the point that these hacks wont be needed https://github.com/vugu/vugu https://github.com/vugu-examples/tinygo cd /github.com/vugu-examples/tinygo && go run devserver.go

GIO running using gopherjs WASM https://git.sr.ht/~eliasnaur/gio/tree/master/example/kitchen/kitchen.go

go get -u github.com/shurcooL/goexec
go install: git.sr.ht/~eliasnaur/gio/cmd/gogio/main.go 
cd $(GOPATH)/src/git.sr.ht/~eliasnaur/gio/example/kitchen && gogio -target js gioui.org/example/kitchen .
cd $(GOPATH)/src/git.sr.ht/~eliasnaur/gio/example/kitchen && goexec -quiet 'http.ListenAndServe(":8080", http.FileServer(http.Dir("www")))'

All the other examples work fine in web, Desktops and mobiles btw.

Caddy QUIC https://ma.ttias.be/how-run-http-3-with-caddy-2/

Caddy AutoCert

johanbrandhorst commented 3 years ago

Hi Joe, thanks for your issue, though I don't think I will be reviving this project - my longer term goal is to provide some way to natively use the native grpc-go library with WASM. See https://github.com/grpc/grpc-go/pull/2174 and https://github.com/grpc/grpc-go/issues/2294 on where we're currently blocked (basically, a grpc-go Transport interface).

Having said that, you're welcome to make any changes you like and I can review and merge them.

joe-getcouragenow commented 3 years ago

Hey @johanbrandhorst

Thanks for the follow up.

I checked all the links you gave ( huge thank you for digging them out to make my job easier).

Its sort of soul destroying to see that this code you did years ago that does something quite amazing was not upstreamed.

https://github.com/elliotpeele/golang-wasm-example Frontend: https://github.com/elliotpeele/golang-wasm-example/blob/master/frontend/Makefile

I really wish it was possible to work forward with the GRPC Community to get this type of functionality mainlined