Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Split memory into pages. Then create two types: OwnedMem, and SharedMem. OwnedMem will own page(s), so access to memory will require no Arc. SharedMem will implement safe protocol to access memory from different threads using Arc or atomic operations. SharedMem must also implement .clone(), so both CPU and GPU will be able to hold it.

> And I think that for certain problem domains, rust provides more safety than you actually want.

If writing of unsafe Rust by hands is hard for you, then write code in plain C, then convert it into unsafe Rust using crust.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: