Skip to content

Commit f4b659e

Browse files
namseclaude
andauthored
Replace crossbeam channel with std::sync::mpsc (#861)
* Replace crossbeam channel with std::sync::mpsc - Replace all uses of crossbeam::channel with std::sync::mpsc - Remove crossbeam dependency from all Cargo.toml files - Update documentation to remove crossbeam references - Use std::sync::mpsc::channel() instead of crossbeam::channel::unbounded() Fixes #828 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * Update mod.rs --------- Co-authored-by: Claude <[email protected]>
1 parent 0f5b4a4 commit f4b659e

File tree

12 files changed

+6
-15
lines changed

12 files changed

+6
-15
lines changed

crates/rapier2d-f64/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ parry2d-f64 = "0.22.0-beta.1"
7373
simba = "0.9"
7474
approx = "0.5"
7575
rayon = { version = "1", optional = true }
76-
crossbeam = "0.8"
7776
arrayvec = "0.7"
7877
bit-vec = "0.8"
7978
rustc-hash = "2"

crates/rapier2d/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ parry2d = "0.22.0-beta.1"
7474
simba = "0.9"
7575
approx = "0.5"
7676
rayon = { version = "1", optional = true }
77-
crossbeam = "0.8"
7877
arrayvec = "0.7"
7978
bit-vec = "0.8"
8079
rustc-hash = "2"

crates/rapier3d-f64/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ parry3d-f64 = "0.22.0-beta.1"
7676
simba = "0.9"
7777
approx = "0.5"
7878
rayon = { version = "1", optional = true }
79-
crossbeam = "0.8"
8079
arrayvec = "0.7"
8180
bit-vec = "0.8"
8281
rustc-hash = "2"

crates/rapier3d/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ parry3d = "0.22.0-beta.1"
7878
simba = "0.9"
7979
approx = "0.5"
8080
rayon = { version = "1", optional = true }
81-
crossbeam = "0.8"
8281
arrayvec = "0.7"
8382
bit-vec = "0.8"
8483
rustc-hash = "2"

crates/rapier_testbed2d-f64/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ web-time = { version = "1.1" }
5050
bitflags = "2"
5151
num_cpus = { version = "1", optional = true }
5252
wrapped2d = { version = "0.4", optional = true }
53-
crossbeam = "0.8"
5453
bincode = "1"
5554
Inflector = "0.11"
5655
md5 = "0.7"

crates/rapier_testbed2d/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ web-time = { version = "1.1" }
5050
bitflags = "2"
5151
num_cpus = { version = "1", optional = true }
5252
wrapped2d = { version = "0.4", optional = true }
53-
crossbeam = "0.8"
5453
bincode = "1"
5554
Inflector = "0.11"
5655
md5 = "0.7"

crates/rapier_testbed3d-f64/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ rand_pcg = "0.3"
5151
web-time = { version = "1.1" }
5252
bitflags = "2"
5353
num_cpus = { version = "1", optional = true }
54-
crossbeam = "0.8"
5554
bincode = "1"
5655
md5 = "0.7"
5756
Inflector = "0.11"

crates/rapier_testbed3d/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ glam = { version = "0.27", optional = true } # For Physx
5252
num_cpus = { version = "1", optional = true }
5353
physx = { version = "0.19", features = ["glam"], optional = true }
5454
physx-sys = { version = "0.11", optional = true }
55-
crossbeam = "0.8"
5655
bincode = "1"
5756
md5 = "0.7"
5857
Inflector = "0.11"

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ pub extern crate parry3d as parry;
2525
#[cfg(all(feature = "dim3", feature = "f64"))]
2626
pub extern crate parry3d_f64 as parry;
2727

28-
pub extern crate crossbeam;
2928
pub extern crate nalgebra as na;
3029
#[cfg(feature = "serde-serialize")]
3130
#[macro_use]

src/pipeline/event_handler.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::dynamics::RigidBodySet;
22
use crate::geometry::{ColliderSet, CollisionEvent, ContactForceEvent, ContactPair};
33
use crate::math::Real;
4-
use crossbeam::channel::Sender;
4+
use std::sync::mpsc::Sender;
55

66
bitflags::bitflags! {
77
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
@@ -90,14 +90,14 @@ impl EventHandler for () {
9090
}
9191
}
9292

93-
/// A collision event handler that collects events into a crossbeam channel.
93+
/// A collision event handler that collects events into a channel.
9494
pub struct ChannelEventCollector {
9595
collision_event_sender: Sender<CollisionEvent>,
9696
contact_force_event_sender: Sender<ContactForceEvent>,
9797
}
9898

9999
impl ChannelEventCollector {
100-
/// Initialize a new collision event handler from crossbeam channel senders.
100+
/// Initialize a new collision event handler from channel senders.
101101
pub fn new(
102102
collision_event_sender: Sender<CollisionEvent>,
103103
contact_force_event_sender: Sender<ContactForceEvent>,

0 commit comments

Comments
 (0)