# gpui: Fix web examples build \(\#59470\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/9a992ed33c148179204885f6bff8c744dfa1d410)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 9a992ed33c148179204885f6bff8c744dfa1d410

Requested commit: 9a992ed33c148179204885f6bff8c744dfa1d410

Commit: 9a992ed33c148179204885f6bff8c744dfa1d410

Tree: 666a390e3e7f6b46da007ca25aab11828f19f9d7

Author: Xiaobo Liu

Committer: GitHub

## Message

````
gpui: Fix web examples build (#59470)

# Objective

fix `cargo xtask web-examples --no-serve` error.

## Solution

Building GPUI web examples for wasm failed because gpui's ordinary
dev-dependencies were included in the wasm build graph. That pulled in
proptest's default fork/timeout support, which depends on wait-timeout.
wait-timeout does not support wasm32-unknown-unknown, so compilation
failed.

The a11y example also had a wasm_bindgen start function but was missing
the wasm no_main crate attribute, so Rust still expected a normal main
function and emitted E0601.

Move gpui's proptest dev-dependency behind the non-wasm target so web
example builds do not include native-only test timeout support. Add the
wasm no_main crate attribute to the a11y example.

Verified with:

```
cargo tree --target wasm32-unknown-unknown -p gpui -i wait-timeout
cargo xtask web-examples --no-serve
```

---

Release Notes:

- N/A or Added/Fixed/Improved ...

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
````

## Parents

- [e25e52be87fe6329b38fc38abd0bcd87f0d379c8](https://git.cafe/gitcafe/zed/commit/e25e52be87fe6329b38fc38abd0bcd87f0d379c8?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/9a992ed33c148179204885f6bff8c744dfa1d410?format=markdown)
