Skip to content

Commit

Permalink
Dont suggest wee-alloc in docs (#630)
Browse files Browse the repository at this point in the history
`wee-alloc` should no longer be recommended because of a memory leak: rustwasm/wee_alloc#85

It appears that the project is abandoned and that this issue will not be fixed anytime soon.

Closes #614
  • Loading branch information
lukechu10 authored Oct 6, 2023
1 parent b53d6f1 commit a1b288b
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions docs/next/advanced/optimize_wasm_size.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,6 @@ A common mistake when building a Wasm binary is to forget to build in release mo
trunk build --release
```

## `wee_alloc`

[`wee_alloc`](https://github.com/rustwasm/wee_alloc) is a memory allocator focused on targeting
WebAssembly, producing a small .wasm code size, and having a simple, correct implementation.
Replacing the default allocator with this one will result in a smaller binary size at the expense of
speed and memory overhead.

```rust
// Use `wee_alloc` as the global allocator.
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
```

## `Cargo.toml`

It is possible to configure release builds to be smaller by using various flags and configurations
Expand Down

0 comments on commit a1b288b

Please sign in to comment.