Golem add rust crate

From golemcloud/golem · View interactive version

Golem add rust crate is an AI agent skill from the GitHub repository golemcloud/golem. Add a new Rust crate dependency to a Rust Golem project. Use when the user asks to add a library, crate, or dependency.

How to use this skill

Skill file

Add a Rust Crate Dependency

Important constraints

against wasm32-wasip2 and exercise them in Golem.

sockets, and memory-mapping APIs require particular scrutiny.

Steps

  1. Add the dependency to Cargo.toml

In the component's Cargo.toml (not a workspace Cargo.toml), add the crate under [dependencies]:

```toml

[dependencies]

my-crate = "1.0"

```

If the project has a Cargo workspace with [workspace.dependencies], add the version there and reference it with my-crate = { workspace = true } in the component crate.

  1. Build to verify

```shell

golem build --yes

```

Do NOT run cargo build directly — always use golem build.

  1. If the build fails

Already available crates

These crates are already in the project's Cargo.toml — do NOT add them again:

HTTP and networking

Use golem_rust::http for outgoing WASI HTTP p3 requests; no separate HTTP client crate is needed.

For streaming and low-level access, use golem_rust::wasip3::http and its http_compat sibling.

Compile support for an API does not guarantee that

the runtime grants the required network capability, so test the actual operation in Golem.

AI / LLM features

For AI provider dependencies, load golem-add-llm-rust. Use its matching core, provider, and SDK

dependencies together.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.