Welcome to the new Golem Cloud Docs! 👋
January 2024

Guest language categorization changed since this release notes, Tier 2 languages are now called Tier 1 languages and Tier 3 languages are now called Tier 2 languages.

Breaking changes January 2024

The Golem Cloud January 2024 release contains a couple of breaking changes requiring installation of new tooling and rebuilding/re-uploading the user's projects, as it's core WASM engine was updated to the latest version.

REST API changes

We made some small changes to the REST API, and changed its version to v2. All the endpoints are now under the /v2 path, and the v1 endpoints are no longer available.

We provide an OpenAPI specification for the new API now.

Update to the latest WASI and component model versions

The new versions are using an updated version of the WASM Component Model and it's WIT interface definition language, introducing the concept of resources.

The WASI interface definitions had breaking changes since the version implemented in earlier Golem Cloud versions, having the following consequences:

  • The required versions of tooling (depending on the guest language) has been changed. Make sure to install the new versions before compiling any template for Golem Cloud!
  • The existing templates cannot run on the updated version of Golem Cloud. They need to be recompiled with the new tooling.
  • There are some differences in the generated bindings / required settings etc, depending on the used guest language, so the template's source code may have to be updated before recompilation. These differences are collected below.

Common changes

The WIT format has been changed, now it requires semicolons at the end of definitions, and it allows to define resources. The latest version of the format is documented in the official component model repository (opens in a new tab).

The WASI interfaces has been updated as well, they are now taking advantage of the resource support and some definitions were moved around / changed. If you were directly using any of the WASI interfaces, please check the updated definitions in the golem-wit (opens in a new tab) repository.

New templates generated with the latest version of golem-cli will contain the updated definitions.

Guest languages which are using wasm-tools to wrap the WASM module into a WASM component need a new version of wasm-tools and the Preview2 adapters.

The required wasm-tools version is 1.0.54:

cargo install  --force --locked wasm-tools@1.0.54

The new tier2 and tier3 adapters are in the golem-wit (opens in a new tab) repository.

Rust specific changes

The primary source level change is to update the cargo-component-bindings dependency to 0.5.0:

cargo-component-bindings = { version = "0.5.0" }

If you are using our reqwest fork for HTTP requests, you need to update it to the update-jan-2024 branch:

reqwest = { git = "https://github.com/zivergetech/reqwest", branch = "update-jan-2024", features = ["json"] }

Beside that you need to update cargo-component itself to 0.5.0 as well:

cargo install --force --locked cargo-component@0.5.0

Javascript and Scala.JS specific changes

The package.json file needs to be updated to use the updated version of the jco and componentize-js:

  "devDependencies": {
    "@bytecodealliance/jco": "0.14.1",
    "@bytecodealliance/componentize-js": "0.5.0"

Python specific changes

The version of componentize-py (0.7.1) must be downloaded from https://github.com/golemcloud/componentize-py/releases/tag/untagged-860415915cbad37073cb (opens in a new tab)

Go specific changes

A new compiler flag is needed when using the latest TinyGo version (0.30.0), when using the HTTP client: -tags=purego.

The wit-bindgen tool needs to be updated to a specific revision:

cargo install wit-bindgen-cli --git https://github.com/bytecodealliance/wit-bindgen --force --rev 3433f2d8515dd9eba95fd3ad581f5c389ae9dd1f

The roundtrip.go HTTP client implementation needs to be updated, the latest code can be found at https://github.com/golemcloud/go-wasi-http/tree/v0.2.0 (opens in a new tab).

C specific changes

The wit-bindgen tool needs to be updated to a specific revision:

cargo install wit-bindgen-cli --git https://github.com/bytecodealliance/wit-bindgen --force --rev 3433f2d8515dd9eba95fd3ad581f5c389ae9dd1f

This new version requires a new parameter that decides wheter to automatically drop resources in the generated bindings:

wit-bindgen c --autodrop-borrows yes ./wit