---
title: "C ABI Changes for `wasm32-unknown-unknown` | Rust Blog"
description: "Rust is switching the `extern \"C\"` ABI on `wasm32-unknown-unknown` from a legacy non-standard definition to the WebAssembly tool-conventions C ABI, which changes generated binaries."
url: "https://swe.quest/articles/c-abi-changes-for-wasm32-unknown-unknown-rust-blog-cc1b5edcd4664f9f"
canonical: "https://blog.rust-lang.org/2025/04/04/c-abi-changes-for-wasm32-unknown-unknown/"
source: "Rust Blog"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 8
tags: ["rust","webassembly","compilers"]
---

# C ABI Changes for \`wasm32-unknown-unknown\` | Rust Blog

A post on [Rust Blog](https://swe.quest/sources/rust.md), 8 min read, Announcement. Original: [https://blog.rust-lang.org/2025/04/04/c-abi-changes-for-wasm32-unknown-unknown/](https://blog.rust-lang.org/2025/04/04/c-abi-changes-for-wasm32-unknown-unknown/)

## Summary

Rust is switching the \`extern "C"\` ABI on \`wasm32-unknown-unknown\` from a legacy non-standard definition to the WebAssembly tool-conventions C ABI, which changes generated binaries. The key difference is that the legacy ABI "splats" by-value structs into separate wasm parameters, while the standard ABI passes them indirectly through linear memory. wasm-bindgen was already fixed, but other projects still rely on the old behavior. To check exposure, build with nightly-2025-03-27 or later, watch for the new future-incompat warning (stable in 1.87.0), and test with \`-Zwasm-c-abi=spec\`. Affected projects can pin the compiler, adopt the spec ABI on nightly, or stop passing structs by value (e.g. pass \`&Pair\`) before the legacy flag is removed around summer 2025.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Rust](https://swe.quest/tags/rust.md) (Languages)
- [WebAssembly](https://swe.quest/tags/webassembly.md) (Languages)
- [Compilers](https://swe.quest/tags/compilers.md) (Compilers & runtimes)

## Prerequisites

- Rust FFI and extern "C" ([easy posts on Rust](https://swe.quest/tags/rust.md?difficulty=easy))
- WebAssembly basics ([easy posts on WebAssembly](https://swe.quest/tags/webassembly.md?difficulty=easy))
- Calling conventions/ABIs

## Keywords

wasm32-unknown-unknown, wasm-bindgen, WebAssembly tool-conventions, -Zwasm-c-abi, Rust 1.87.0, LLVM

## Related posts

- [Extensible Language Support in Zed - Part 1](https://swe.quest/articles/extensible-language-support-in-zed-part-1-13bc037c6f5096a9.md): Zed · 2024-04-18 · Medium · 7 min read · WebAssembly, Developer tools, Sandboxing & isolation, Compilers, Rust
  Zed loads third-party Tree-sitter grammars as WebAssembly modules using a hybrid design.
- [Announcing Rust 1.99.1](https://swe.quest/articles/announcing-rust-1-99-1-ac4ba358fd1ed2e2.md): Rust Blog · 2026-10-15 · Medium · 1 min read · Rust, Compilers
  Rust 1.99.1 is a point release fixing three regressions. LLVM's loop-idiom-wcslen pass could emit calls to \`wcslen\` on targets lacking it, breaking UEFI builds using \`std\`, so compiler-builtins now provides a fallback.
- [Contributing support for a Wasm instruction to Winch](https://swe.quest/articles/contributing-support-for-a-wasm-instruction-to-winch-3a4d14391ef1d680.md): Shopify Engineering · 2023-07-18 · Hard · 9 min read · WebAssembly, Compilers, Rust, Testing, Open source
  Adding a WebAssembly instruction to Winch, Wasmtime's baseline non-optimizing compiler, touches several layers: the wasmparser VisitOperator visitor, the CodeGenContext that manages the value stack, register allocation and spilling, an ISA-independent MacroAssembler, and an x86\_64 assembler built on Cranelift's ISLE-generated instruction definitions.
- [WebAssembly functions for your SQLite-compatible database](https://swe.quest/articles/webassembly-functions-for-your-sqlite-compatible-database-e23432782d9473c3.md): Turso · 2022-11-23 · Medium · 6 min read · SQLite, WebAssembly, Rust, Databases
  libSQL, Turso's open-contribution fork of SQLite, adds user-defined functions written in WebAssembly and registered directly from SQL with a CREATE FUNCTION ...
- [WebAssembly JSPI has a new API](https://swe.quest/articles/webassembly-jspi-has-a-new-api-8f87900c3d9ad3d8.md): V8 · 2024-06-04 · Medium · 6 min read · WebAssembly, Browsers, Concurrency, Runtimes & VMs
  WebAssembly JavaScript Promise Integration (JSPI) ships a revised API in Chrome M126 that drops explicit Suspender objects and instead uses the most recent JS-to-Wasm export call as the suspension cut point.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
