Announcement
Collapse
No announcement yet.
Even Apple Is Interested In Migrating Their C Code To Rust
Collapse
X
-
Originally posted by Tomin View Post
Well, that's really close. What is Mb column? Program size? Also what is the source for that image? I'd like to take a better look how that comparison was made.
Sadly, given how much work has gone into the Rust compiler in the ~2.5 years since then, it's questionable how accurate it still is for such a small margin, and the 2020 revision of the tables at https://sites.google.com/view/energy...l-results-2020 only has about half the number of programming languages, of which C and C++ are not included.Last edited by ssokolow; 21 March 2020, 08:12 AM.
- Likes 5
Comment
-
Unfortunately not. Same with swig and other "binding generators". C code as you know gets more complex than that. These solutions do not handle callbacks well or memory that is retained by the library (light user data). Chuck in some MACROs, setjmp and other fairly common things and they don't stand a chance.
Just look at the Rust Gtk bindings. Would they have done all this work if a simple call to bindgen would have a chance of generating something useful?Last edited by kpedersen; 21 March 2020, 08:33 AM.
- Likes 13
Comment
-
Originally posted by ssokolow View PostIt's Table 4 from this 2017 research paper: https://greenlab.di.uminho.pt/wp-con...0/sleFinal.pdf
Originally posted by ssokolow View PostSadly, given how much work has gone into the Rust compiler in the ~2.5 years since then, it's questionable how accurate it still is for such a small margin, and the 2020 revision of the tables at https://sites.google.com/view/energy...l-results-2020 only has about half the number of programming languages, of which C and C++ are not included.
A bit odd choice to drop C and C++ out of such comparison. I would think that must have been due to limited resources. They didn't have time to update the codes for them or something. I hope that they will include them if they make another paper on the subject.Last edited by Tomin; 21 March 2020, 08:56 AM.
- Likes 1
Comment
-
Originally posted by kpedersen View PostC++ and Objective-C are the closest because they are C (mostly); and they extend it. Then I just need to write thin safety (RAII) wrappers.
And it's not a surprise Apple is interested in Rust now that they're porting large chunks of code from x86 to ARM and might need to do it again for RISC-V sometime in the future. Now if they keep up with the porting effort after the initial release and actually finish it... Now that will be surprising.
- Likes 2
Comment
-
Originally posted by r08z View PostThere hasn't been a programming language that has beaten C in speed and energy usage yet. Rust is impressive and is the closest thing out right now. But it's not C.
- Likes 18
Comment
-
Originally posted by bachchain View PostI would happily give up a few cycles or kilobytes if it meant I didn't have to spend hundreds of man-hours debugging one-in-ten-thousand race conditions or that segfault that only happens on the second Tuesday of each month.
- Likes 7
Comment
-
Originally posted by bachchain View Post
If I was a software engineer working on mission-critical infrastructure for a trillion dollar company, I would happily give up a few cycles or kilobytes if it meant I didn't have to spend hundreds of man-hours debugging one-in-ten-thousand race conditions or that segfault that only happens on the second Tuesday of each month.
Rust does not seem to be very friendly towards other languages, let's pick example X. Bindings for X to Rust or Rust to X are most likely not present at all, in premature stages or too impractical due to Rust's quirks. I can't afford living in my tiny little ecosystem of Rust.
- Likes 1
Comment
-
Originally posted by Kemosabe View Post
Even though I get the gist of what you're trying to convey - without arguing about the high potential of that being a self-inflicted situation - I gave up on Rust.
Rust does not seem to be very friendly towards other languages, let's pick example X. Bindings for X to Rust or Rust to X are most likely not present at all, in premature stages or too impractical due to Rust's quirks. I can't afford living in my tiny little ecosystem of Rust.
- Likes 5
Comment
Comment