mirror of
https://github.com/G2-Games/cross-usb.git
synced 2025-04-19 13:22:53 -05:00
Updated readme and added proper flags to runner
This commit is contained in:
parent
5893774c7c
commit
daa2321737
2 changed files with 15 additions and 7 deletions
2
.github/workflows/rust.yml
vendored
2
.github/workflows/rust.yml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
||||||
- name: Setup rust environment
|
- name: Setup rust environment
|
||||||
run: rustup target add wasm32-unknown-unknown
|
run: rustup target add wasm32-unknown-unknown
|
||||||
- name: Build WASM
|
- name: Build WASM
|
||||||
run: cargo build --verbose --target wasm32-unknown-unknown
|
run: RUSTFLAGS=--cfg=web_sys_unstable_apis cargo build --verbose --target wasm32-unknown-unknown
|
||||||
- name: Build Native (Linux)
|
- name: Build Native (Linux)
|
||||||
run: cargo build --verbose --target x86_64-unknown-linux-gnu
|
run: cargo build --verbose --target x86_64-unknown-linux-gnu
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
|
|
16
README.md
16
README.md
|
@ -1,16 +1,24 @@
|
||||||
# Cross USB
|
# Cross USB
|
||||||
|
[](https://lib.rs/crates/cross_usb)
|
||||||
|
[](https://docs.rs/cross_usb/)
|
||||||
|
|
||||||
A USB library which works seamlessly across most native and WASM targets.
|
A USB library which works seamlessly across most native and WASM targets.
|
||||||
|
|
||||||
[Crates.io](https://crates.io/crates/cross_usb)
|
|
||||||
|
|
||||||
[Documentation](https://docs.rs/cross_usb/)
|
|
||||||
|
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> Web USB only works in Chromium based browsers for now.
|
> Web USB only works in Chromium based browsers for now.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> Web USB has certain interation requirements in browsers, along with requiring
|
||||||
|
> a **Secure context**. Please read more about this on the
|
||||||
|
> [mdn web docs](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API)
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> When compiling this crate on a WASM target, you must use either
|
||||||
|
> `RUSTFLAGS=--cfg=web_sys_unstable_apis` or by passing the argument in a
|
||||||
|
> `.cargo/config.toml` file. Read more here: https://rustwasm.github.io/wasm-bindgen/web-sys/unstable-apis.html
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
For native USB, the crate utilizies [nusb](https://github.com/kevinmehall/nusb), a pure rust library similar to the very popular libusb.
|
For native USB, the crate utilizies [nusb](https://github.com/kevinmehall/nusb), a pure rust library similar to the very popular libusb.
|
||||||
|
|
Loading…
Reference in a new issue