Skip to content

Commit 0a18857

Browse files
authored
Merge pull request #22 from sunfishcode/master
Update the WASI support.
2 parents 3142dee + 33a6157 commit 0a18857

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ matrix:
6464
install:
6565
- rustup target add wasm32-unknown-unknown
6666
- rustup target add wasm32-unknown-emscripten
67-
- rustup target add wasm32-unknown-wasi
67+
- rustup target add wasm32-wasi
6868
- nvm install 9
6969
- ./utils/ci/install_cargo_web.sh
7070
- cargo web prepare-emscripten
@@ -81,7 +81,7 @@ matrix:
8181
#- cargo web test --target wasm32-unknown-emscripten
8282
#- cargo web test --nodejs --target wasm32-unknown-emscripten
8383
#- cargo build --target wasm32-unknown-unknown # without any features
84-
- cargo build --target wasm32-unknown-wasi
84+
- cargo build --target wasm32-wasi
8585
- cargo build --target wasm32-unknown-unknown --features=wasm-bindgen
8686
- cargo web test --target wasm32-unknown-unknown --features=stdweb
8787
- cargo build --manifest-path tests/wasm_bindgen/Cargo.toml --target wasm32-unknown-unknown

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77

8+
## [0.1.3] - 2019-05-15
9+
- Update for `wasm32-unknown-wasi` being renamed to `wasm32-wasi`, and for
10+
WASI being categorized as an OS.
11+
812
## [0.1.2] - 2019-04-06
913
- Add support for `wasm32-unknown-wasi` target.
1014

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "getrandom"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
edition = "2018"
55
authors = ["The Rand Project Developers"]
66
license = "MIT OR Apache-2.0"
@@ -36,8 +36,8 @@ fuchsia-cprng = "0.1"
3636
wasm-bindgen = { version = "0.2.29", optional = true }
3737
stdweb = { version = "0.4.9", optional = true }
3838

39-
[target.wasm32-unknown-wasi.dependencies]
40-
libc = "0.2.51"
39+
[target.wasm32-wasi.dependencies]
40+
libc = "0.2.54"
4141

4242
[features]
4343
std = []

src/lib.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
//! enabled `wasm-bindgen` will be used. If neither feature is enabled,
4747
//! `getrandom` will always fail.
4848
//!
49-
//! The WASI target `wasm32-unknown-wasi` uses the `__wasi_random_get`
50-
//! function defined by the WASI standard.
49+
//! The WASI target `wasm32-wasi` uses the `__wasi_random_get` function defined
50+
//! by the WASI standard.
5151
//!
5252
//!
5353
//! ## Early boot
@@ -143,7 +143,7 @@ extern crate std;
143143
target_os = "linux",
144144
all(
145145
target_arch = "wasm32",
146-
not(target_env = "wasi")
146+
not(target_os = "wasi")
147147
),
148148
))]
149149
mod utils;
@@ -190,13 +190,13 @@ mod_use!(cfg(target_os = "redox"), use_file);
190190
mod_use!(cfg(target_os = "solaris"), solaris_illumos);
191191
mod_use!(cfg(windows), windows);
192192
mod_use!(cfg(target_env = "sgx"), sgx);
193-
mod_use!(cfg(target_env = "wasi"), wasi);
193+
mod_use!(cfg(target_os = "wasi"), wasi);
194194

195195
mod_use!(
196196
cfg(all(
197197
target_arch = "wasm32",
198198
not(target_os = "emscripten"),
199-
not(target_env = "wasi"),
199+
not(target_os = "wasi"),
200200
feature = "wasm-bindgen"
201201
)),
202202
wasm32_bindgen
@@ -206,7 +206,7 @@ mod_use!(
206206
cfg(all(
207207
target_arch = "wasm32",
208208
not(target_os = "emscripten"),
209-
not(target_env = "wasi"),
209+
not(target_os = "wasi"),
210210
not(feature = "wasm-bindgen"),
211211
feature = "stdweb",
212212
)),
@@ -237,7 +237,7 @@ mod_use!(
237237
target_arch = "wasm32",
238238
any(
239239
target_os = "emscripten",
240-
target_env = "wasi",
240+
target_os = "wasi",
241241
feature = "wasm-bindgen",
242242
feature = "stdweb",
243243
),

0 commit comments

Comments
 (0)