1

How can I generate a Go (Golang) client for my Solana program written in Rust ?

I am writing my Solana program with Pinocchio and using Codama to generate a TypeScript client.

Codama does not yet support Go. But Go is a major language for backend development.

There are only community-contributed Solana SDKs:

1 Answer 1

1

Typescript would not be able to support this entirely but you can achieve this with some extra bit of pattern tweaks. Essentially what you are trying to achieve is translate the layouts into Go types and deserialized code.

The only way I can suggest to achieve this is to use the gigliardetto borsh binary https://github.com/gagliardetto/binary and construct write your own minimal encoder.

https://pkg.go.dev/github.com/gagliardetto/solana-go/rpc

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.