CKB Pulse

All lessons · Rust scripts and ckb-std · Start here · Glossary

ckb-std C shim needs a RISC-V C toolchain (clang) in CIWorkingChecked by the owner

Checked by the owner · Check: right · Checked 2026-11-19

ckb-std compiles a C shim for riscv64imac-unknown-none-elf via cc-rs, which by default looks for riscv64-unknown-elf-gcc and fails with ToolNotFound when that toolchain is missing in CI. Pointing cc-rs at clang and llvm-ar (which can target RISC-V) lets the contract build without the GCC cross toolchain.

Why it matters: Without a RISC-V C compiler configured, cc-rs cannot find riscv64-unknown-elf-gcc. The contract build fails with ToolNotFound on every CI run, so the contract tests never run.

Concepts
Testing and devnet
Evidence
Checked by the owner: checked by the owner of the project it came from, who is also the publisher of these lessons
First seen
2026-11-02
Last changed
2026-11-02
Last checked
2026-11-19
Check against the commit
right: the lesson follows from its commit and still holds in the code today

Sources (1)

More about Rust scripts and ckb-std

All 35 in this topic

Checked by @LusoCryptoLabs (owner of the project), 2026-11-19.

Do you maintain a project this lesson came from? Confirm or correct it

Cite this lesson
LusoCryptoLabs, "ckb-std C shim needs a RISC-V C toolchain (clang) in CI", CKB lessons, https://pulse.lusocryptolabs.com/learned/scripts/ckb-std-c-shim-needs-a-risc-v-c-toolchain-clang-in-ci, CC BY 4.0, last changed 2026-11-02.

Drawn from public commits and checked against the commit each one came from and the project's code today. Read the source before you rely on one. Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. Want a lesson changed or removed? Open an issue.