Error on conflicting `#[wasm_bindgen]` options

Author: RunDevelopmentCreated Nov 14, 2024Updated Sep 24, 2026
Labelsbugbreaking-change

Motivation

Right now, #[wasm_bindgen(getter, setter)] is valid and will be interpreted as a setter. The getter option will be ignored with no warning or error.

This also affects indexing_getter, indexing_getter, and indexing_deleter.

Solution

Emit a warning about conflicting options for now, and make it a hard error in the next major version.

Source: wasm-bindgen/wasm-bindgen