Welcome to the new Golem Cloud Docs! 👋
Documentation
Go Language Guide
WASI

Using WASI interfaces from Go

Golem implements and exports a subset of the WASI (opens in a new tab) interfaces, as well as its own runtime interfaces.

The Golem Go SDK provides idiomatic wrappers on a subset of these interfaces, but it is also possible to use the generated bindings directly.

WIT specifications

The full set of WIT specifications Golem implements is available in the following public repository:

https://github.com/golemcloud/golem-wit/tree/main/wit/deps (opens in a new tab)

The following table lists all packages provided by Golem:

PackageDescription
golem:apiGolem's Runtime API
golem:rpcProvides support for Worker to Worker communication
wasi:blobstoreInterface for storing and retrieving large binary data
wasi:cliInterface for environment variables and standard I/O
wasi:clocksInterface for querying the system time
wasi:filesystemInterface for working with files and directories
wasi:httpInterface for making HTTP requests
wasi:ioInterface for working with futures and streams
wasi:keyvalueInterface for storing and retrieving key-value pairs - only partially implemented
wasi:loggingInterface for logging messages
wasi:randomInterface for generating random numbers
wasi:socketsInterface for working with TCP and UDP sockets (currently not supporting durable execution)

Additional Golem runtime APIs

This section describes Golem-specific functionalities which are available through the Golem runtime API but does not have an idiomatic Go wrapper in the golem-go library yet.

The WASI Blob Store interface

The wasi:blobstore interface provides a way to store and retrieve large binary data. This can be useful for storing large files or other binary data that is too large to be stored in the worker's memory.