Welcome to the new Golem Cloud Docs! 👋
Documentation
Experimental Languages
TypeScript
Setup

Setup development environment for TypeScript

First install Node.js and npm to your system by following the official instructions (opens in a new tab).

Typescript programs can be compiled into WASM components using the componentize-js and jco npm packages. For Golem you should use our forked version of these tools, as they pin all the dependencies to the ones required by Golem Cloud, and they also include workarounds for some experimental features.

These tools are using the StarlingMonkey (opens in a new tab) JavaScript engine to create WASM components from JavaScript.

The tool packages can be installed globally, but we recommend adding them to your package.json.

Projects created with golem-cli new will reference the latest versions of the appropriate forked tools.

In case you want setup you project manually, see the steps for using the Golem TypeScript SDK.

Install WebAssembly tooling for Worker to Worker communication

Using Worker to Worker communication requires Rust and WASM tooling, because golem RPC client stubs are generated and implemented as Rust components.

Install Rust

Install rustup

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install the latest stable version of Rust

rustup install stable && rustup default stable

Add the WASI target

rustup target add wasm32-wasi