I’m trying to write a game in Rust. Since ncollision and specs seemed popular and useful, I’m trying to use them.
However, since specs support multithreading, it requires resources used with it to implement
CollisionWorld does not do.
Has anyone tried using
CollisionWorld in specs at all, and how did they get around this issue?
I haven’t found much on Google:
- This reddit thread mentions the issue in a PS but doesn’t mention a solution.
- Another reddit thread:
r/rust/comments/6qmbxg/hey_rustaceans_got_an_easy_question_ask_here/dl6j5jd/mentions trying to work around it with
Rc, but is mostly useless since
Rcs don’t have anything to do with threading.
This post on this forum explains why
CollisionWorlddoes not implement
Send: because the callbacks on the event handlers need to run on the same thread they were created on. I don’t plan on using event handlers (I think I can get the same information by filtering the results of the