Skip to content

Commit cc8003e

Browse files
committed
Updated runner and added new docs, bumped version and changed to MIT license
1 parent daa2321 commit cc8003e

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/rust.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
env:
1010
CARGO_TERM_COLOR: always
11+
RUSTFLAGS: --cfg=web_sys_unstable_apis
1112

1213
jobs:
1314
build:
@@ -19,7 +20,7 @@ jobs:
1920
- name: Setup rust environment
2021
run: rustup target add wasm32-unknown-unknown
2122
- name: Build WASM
22-
run: RUSTFLAGS=--cfg=web_sys_unstable_apis cargo build --verbose --target wasm32-unknown-unknown
23+
run: cargo build --verbose --target wasm32-unknown-unknown
2324
- name: Build Native (Linux)
2425
run: cargo build --verbose --target x86_64-unknown-linux-gnu
2526
- name: Run clippy

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cross_usb"
3-
version = "0.3.2"
3+
version = "0.3.3"
44
authors = ["G2-Games <ke0bhogsg@gmail.com>"]
55
repository = "https://github.com/G2-Games/cross-usb"
66
documentation = "https://docs.rs/cross_usb"

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
//! is merged into wasm bindgen, getting a list of USB devices is not possible on WASM
1717
//! targets. However, this isn't a huge deal as the user gets a list to select from anyway.
1818
//!
19+
//! * When compiling this crate on a WASM target, you must use either
20+
//! `RUSTFLAGS=--cfg=web_sys_unstable_apis` or by passing the argument in a
21+
//! `.cargo/config.toml` file. Read more here: https://rustwasm.github.io/wasm-bindgen/web-sys/unstable-apis.html
22+
//!
1923
//! ## Example:
2024
//! ```no_run
2125
//! # tokio_test::block_on(async {

0 commit comments

Comments
 (0)