Closed gedw99 closed 3 years ago
We would be more than happy to accept a PR for this fix
Unfortunately, we changed our tooling and this example moved to pre-otp
.
thanks @brooksmtownsend for the response.
Are there any examples using golang at all ? Non pre-otop
Before you had one tinygo example at https://github.com/wasmCloud/examples/tree/main/pre-otp/image-host, and so wondering if golang is off the table as they say.
I am looking to play around with things a bit.
@gedw99 we actually have a sample httpserver provider written in Go here: https://github.com/wasmCloud/wasmcloud-otp/tree/main/capability-providers
It's not production ready but should give you a good idea of what is required to make a capability provider. Go Lang is one of the popular requests for new language support for wasmCloud and we're currently looking at adding codegen support for Go providers. Tinygo actors are likely a bit further away.
@brooksmtownsend thanks for updates
had a look and now makes more sense.
The gui using elixer and Phoenix relies on a Phoenix backend ?
I ask because i got GIOUI and NATS working together, which does the same fundamental things are your stack. NATS can be compiled to WASM, and so can GIOUI.
Can you provide a link to how to compile nats to wasm without a Javascript shim? That's fascinating
@autodidaddict
Its a mess right in the repo but can tell you the gist of how it works.
there are two ways...
First way is pure nats websockets with wasm.. These Pr's highlight the gist of it. Its a mess though. Its being used i think for the https://github.com/matrix-org/dendrite project i think...
https://github.com/nats-io/nats-server/pull/2360
https://github.com/nats-io/nats.go/pull/774
Second way is to use a caddy proxy for web and isolate the NATS from the transport.
GIOUI and websockets work great if you use https://github.com/nhooyr/websocket . Its a joy to use.
So then a Caddy proxy can then do the transport to NATS for you.
This also allow HTTP/3 Web Transport aspects too. Browser, Desktop and Mobile apps now support HTTP/3 if you turn on the right flags.
Just ask if this is not making sense...
I hope to publish everything when things are a bitmore tiddy.
I noticed that your are using message pack for serialisation of the data ?. I am playing around with JSON Schema / JSON as the Master data binding description languages, because you can reflect on it and also get validation rules. You can gen a Proto or GraphQL from it. So you can run compiled ( proto or whatever you fancy) or not compiled ( JSON Schema )
Sorry I thought you meant nats server not client
i guess because your only interested in WASM on the Server and doing IO between the wasm and NATS Server ?
https://github.com/wasmCloud/examples/blob/9425f494ad/image-host/Makefile#L31 has a bug, in that the build Dir wont be created if no there, and fail. On a mac at least...
change that line to : cd ./tinygo; mkdir -p build; tinygo build -o build/tinygo.wasm -target wasm -no-debug main.go