Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .cargo/config.toml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ jobs:
FEATURES: ${{ format(',{0}', matrix.platform.features ) }}
CMD: ${{ matrix.platform.cmd }}
RUSTDOCFLAGS: -Dwarnings
# Use `wasm-bindgen-cli` tooling when running wasm-bindgen tests.
CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER: wasm-bindgen-test-runner

runs-on: ${{ matrix.platform.os }}
steps:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
Cargo.lock
/.idea
/.vscode

# Allow people to customize this for their own checkouts.
.cargo/config.toml
Comment on lines +5 to +7
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added this to allow people checking out the repository to define the things they need in there themselves. We could alternatively use the new include field to have .cargo/config.toml and allow people to have a .cargo/custom.toml, don't know what you prefer?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a reference, Bevy doesn't add have to their .cargo/config.toml, they instead provide small scripts that you can choose to copy.

So I'm leaning towards not doing so either.

3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[workspace]
members = ["run-wasm"]

[package]
name = "softbuffer"
version = "0.4.8"
Expand Down
34 changes: 26 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ Beware that big endian targets are much less tested, and may behave incorrectly.

Pull requests to add support for new platforms are welcome!

## WebAssembly

To run an example with the web backend: `cargo run-wasm --example winit`

## Android

To run the Android-specific example on an Android phone: `cargo apk r --example winit_android` or `cargo apk r --example winit_multithread_android`.

## Example

```rust,no_run
Expand Down Expand Up @@ -202,6 +194,32 @@ impl ApplicationHandler for App {
}
```

## Test on WebAssembly

To run an example with the web backend, add the following to `.cargo/config.toml`:
```toml
[target.'cfg(target_family = "wasm")']
runner = "wasm-server-runner"
```

And then run:

```sh
cargo install wasm-server-runner
cargo run --target wasm32-unknown-unknown --example winit
```

And open the link to view the result in the browser.

## Test on Android

To run the Android-specific example on an Android phone:
```sh
cargo apk r --example winit_android
# or
cargo apk r --example winit_multithread_android
```

## MSRV Policy

This crate's Minimum Supported Rust Version (MSRV) is **1.71**. Changes to
Expand Down
7 changes: 0 additions & 7 deletions run-wasm/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions run-wasm/src/main.rs

This file was deleted.