I see in the readme there are plans for
Typescript, Python, C++, and Lua on the backend, and Python, C++, and Lua on the client end
I am hoping we can get a golang library as well? A Pure Go implementation would be great for me as I prefer to not use cgo in my projects due compile complications that it can cause if not accounted for (and library overhead),
Thanks for filing this issue! We have this on our radar for future implementation as well π
Woo! as someone who uses go that would be amazing!
Yes please! Go support would be amazing.
Willing to help build it if someone can point me in the right direction. Where's the best place to start digging into the code for adding language support?
Yes please! Go support would be amazing.
Willing to help build it if someone can point me in the right direction. Where's the best place to start digging into the code for adding language support?
You can look at crates/client-api-messages/src/websocket.rs for what a client SDK needs to support, and crates/bindings-sys/src/lib.rs for a module (server-side) language.
Let's do it!!
Is there a language-agnostic test suite definition?
Is there a language-agnostic test suite definition?
Not really. The team mentioned to me that the Rust client SDK test suite is language-agnostic (presumably with regards to the language used on the server), but otherwise no. Parts of the test suites are fairly "factored out" with respect to the module language or client language used, but nothing really comprehensive.
Thanks. I think that's a significant risk for people wanting to implement clients in other languages.
I've just discovered SpacetimeDB and immediately checked if Go support was available!
I'd love to contribute to adding support for it as well.
hoping go can be added I would love to use this in my project
I am starting to work on adding golang support, if yall wanna help in this endeavor I made a fork. https://github.com/SMG3zx/SpacetimeDB/tree/golang-sdk
I might need some fresh set of eyes to test the basic-go template here: https://github.com/andrewloable/SpacetimeDB
Already tried to publish the module to maincloud and it seems to work.
Excited to see two options for a potential go-sdk! π
However, @SMG3zx and @andrewloable, would it be possible to consolidate your two solutions into one single SDK? I believe a collaboration would be awesome!
Announcing Alpha Go support for SpaceTimeDB
stdb-go cli tool that acts similar to the spacetime cli but only for go module building/publishing
Quick Install go install go.digitalxero.dev/stdb-go@lateststdb-go init myproject to create a go server module projectstdb-go init myproject --type client to create a go client project (--type fullstack for both)stdb-go build --dir=./mymodule --output=mymodule.wasm --wasi-shim --release to build the server module NOTE --wasi-shim is required to hack in some wasi stubs. https://github.com/clockworklabs/SpacetimeDB/pull/4641 will make this not required if it is mergedstdb-go publish --database myproject --skip-build --wasm-file mymodule.wasm || stdb-go publish --database myproject --dir=./mymodule --wasi-shim to publish a module to a running SpaceTimeDB instancestdb-go dev --database myproject --dir=./mymodule --wasi-shim to watch and republish the module during development
The Documentation for
This is splitting out https://github.com/clockworklabs/SpacetimeDB/pull/4526 into separate repos, since Clockwork Labs cannot reasonably take on yet another language at this time. I decided to develop and support it until they are able to either pull this back in or develop their own implementation.