Skip to content

Commit 03e442a

Browse files
committed
wee_alloc for wasm works on stable now!
Removed the whole "does wee_alloc require nightly rust" section since only using different cargo features might require nightly rust, and that is already documented in the cargo features section.
1 parent 9a73268 commit 03e442a

File tree

4 files changed

+13
-35
lines changed

4 files changed

+13
-35
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
README.md -diff -merge

.travis.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ script:
2323

2424
matrix:
2525
include:
26-
- rust: stable
26+
- name: "Windows Builds"
27+
rust: stable
2728
before_script:
2829
- rustup target add i686-pc-windows-gnu
2930
script:
@@ -32,3 +33,9 @@ matrix:
3233
- cargo check --release
3334
- cargo check --release --no-default-features --target i686-pc-windows-gnu
3435
- cargo check --release --target i686-pc-windows-gnu
36+
- name: "Stable Wasm Builds"
37+
rust: stable
38+
before_script:
39+
- rustup target add wasm32-unknown-unknown
40+
script:
41+
- cargo check -p wee_alloc --target wasm32-unknown-unknown

README.md

+2-17
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ and a static array-based backend for OS-independent environments. This enables
3030
testing `wee_alloc`, and code using `wee_alloc`, without a browser or
3131
WebAssembly engine.
3232

33+
`wee_alloc` compiles on stable Rust 1.33 and newer.
34+
3335
- [Using `wee_alloc` as the Global Allocator](#using-wee_alloc-as-the-global-allocator)
34-
- [Does `wee_alloc` require nightly Rust?](#does-wee_alloc-require-nightly-rust)
3536
- [`cargo` Features](#cargo-features)
3637
- [Implementation Notes and Constraints](#implementation-notes-and-constraints)
3738
- [License](#license)
@@ -47,22 +48,6 @@ extern crate wee_alloc;
4748
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
4849
```
4950

50-
### Does `wee_alloc` require nightly Rust?
51-
52-
Sometimes.
53-
54-
Notably, using `wee_alloc` when targeting WebAssembly requires nightly in order
55-
to get access to the Wasm `grow_memory` instruction (currently exposed as part
56-
of the `stdsimd` nightly feature).
57-
58-
Targeting Unix and Windows does not require nightly Rust.
59-
60-
The static array-based backend requires nightly Rust in order to have `const`
61-
spin locks.
62-
63-
Additional nightly-only features can be enabled with the "nightly" cargo
64-
feature. See below.
65-
6651
### `cargo` Features
6752

6853
- **size_classes**: On by default. Use size classes for smaller allocations to

wee_alloc/src/lib.rs

+2-17
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ and a static array-based backend for OS-independent environments. This enables
2929
testing `wee_alloc`, and code using `wee_alloc`, without a browser or
3030
WebAssembly engine.
3131
32+
`wee_alloc` compiles on stable Rust 1.33 and newer.
33+
3234
- [Using `wee_alloc` as the Global Allocator](#using-wee_alloc-as-the-global-allocator)
33-
- [Does `wee_alloc` require nightly Rust?](#does-wee_alloc-require-nightly-rust)
3435
- [`cargo` Features](#cargo-features)
3536
- [Implementation Notes and Constraints](#implementation-notes-and-constraints)
3637
- [License](#license)
@@ -47,22 +48,6 @@ static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
4748
# fn main() {}
4849
```
4950
50-
## Does `wee_alloc` require nightly Rust?
51-
52-
Sometimes.
53-
54-
Notably, using `wee_alloc` when targeting WebAssembly requires nightly in order
55-
to get access to the Wasm `grow_memory` instruction (currently exposed as part
56-
of the `stdsimd` nightly feature).
57-
58-
Targeting Unix and Windows does not require nightly Rust.
59-
60-
The static array-based backend requires nightly Rust in order to have `const`
61-
spin locks.
62-
63-
Additional nightly-only features can be enabled with the "nightly" cargo
64-
feature. See below.
65-
6651
## `cargo` Features
6752
6853
- **size_classes**: On by default. Use size classes for smaller allocations to

0 commit comments

Comments
 (0)