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
6 changes: 4 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Install xmllint
run: sudo apt-get install libxcb-composite0-dev
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libfontconfig-dev libxcb-composite0-dev
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose --examples --tests --features serde_support
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ serde = {version = "1.0.163", features = ["derive"], optional = true}
strum = {version = "0.27.2", optional = true}
strum_macros = {version ="0.27.2", optional = true}

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
web-time = "1.1"

[features]
serde_support = ["serde", "strum", "strum_macros"]

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A native port of [Box2D](https://github.com/erincatto/box2d) to Rust.

Minimum Rust version: 1.56.0 (1.61 for dev-dependecies)
Minimum Rust version: 1.56.0 (1.61 for dev-dependecies, 1.60 for `wasm32-unknown-unknown` support)

Ported Box2D version: 2.4.2

Expand Down
2 changes: 1 addition & 1 deletion examples/testbed/main_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ impl System {
TabItem::new("Tests").build(ui, || {
let tests = &g_test_entries;

for (key, group) in &tests.into_iter().group_by(|v| v.category) {
for (key, group) in &tests.into_iter().chunk_by(|v| v.category) {
let category_selected: bool =
g_test_entries[s_settings.m_test_index as usize].category == key;

Expand Down
3 changes: 3 additions & 0 deletions src/b2_timer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
use std::time::Instant;
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
use web_time::Instant;

pub struct B2timer {
start: Instant,
Expand Down
Loading