News for hackers. Stuff that matters.
Re:The Problem with Friendly C by anp on Thursday December 24, 2015 @11:44AM (#10788683)
I haven't used it yet, but apparently Rust's FFI with C (in both directions) is quite good:

https://doc.rust-lang.org/book/ffi.html

Re:The Problem with Friendly C by chubot on Thursday December 24, 2015 @03:06PM (#10789439)
That doesn't do IPC though right? When I say IPC, I mean where you have a Rust process and and a C/C++ process running with different privileges. When people say FFI, they mean Rust code and C code running in the same process.

I thought Chromium had a library for this (for multiple C++ processes), but I guess it is sort of ad hoc now?

https://www.chromium.org/developers/design-documents/inter-p...

https://www.chromium.org/Home/chromium-security/education/se...

Re:The Problem with Friendly C by steveklabnik on Thursday December 24, 2015 @10:35PM (#10790324)
Re:The Problem with Friendly C by chubot on Friday December 25, 2015 @01:16PM (#10791847)
This seems like a great start, but it would be far more useful if there was a C/C++ side. I only see Rust examples, which makes me think it is for Rust <-> Rust communication.

Though it's great to see this, because just rewriting in Rust -- while fantastically expensive -- isn't necessarily enough. You need multiple security measures. The grandparent comment was mistaken about this.

Re:The Problem with Friendly C by steveklabnik on Thursday December 24, 2015 @01:30PM (#10789121)
In fact, we removed language features in order to gain a zero-cost interop.
Re:The Problem with Friendly C by muflax on Saturday December 26, 2015 @03:18AM (#10793654)
Which ones?
Re:The Problem with Friendly C by steveklabnik on Sunday December 27, 2015 @08:16PM (#10799359)
Green threads.