3 ms·
Is there similar effort from Apple?
by frankjr 3y ago
Is there similar effort from Apple?
- monocasa 3y agoI don't believe Apple has embraced Rust the same way Google has. Particularly their firmware is still very based on C.
- dagmx 3y agoSpecifically a dialect called Firebloom (supposedly anyway) https://saaramar.github.io/iBoot_firebloom/ https://saaramar.github.io/iBoot_firebloom/
- mrpippy 3y agoPossible related to the ‘-fbounds-safety’ feature they’ve proposed for Clang https://discourse.llvm.org/t/rfc-enforcing-bounds-safety-in-c-fbounds-safety/70854 https://discourse.llvm.org/t/rfc-enforcing-bounds-safety-in-...
- jonpalmisc 3y agoFirebloom == `-fbounds-safety`
- jonpalmisc 3y agoFirebloom is more of a custom compiler/toolchain than a dialect of C—apart from annotations to relate pointer+length parameters, etc., it is still just C.
- jd3 3y agoReminds me of this blurb from djb's qmail security guarantee [0]: > I've mostly given up on the standard C library. Many of its facilities, particularly stdio, seem designed to encourage bugs. A big chunk of qmail is stolen from a basic C library that I've been developing for several years for a variety of applications. The stralloc concept and getln() make it very easy to avoid buffer overruns, memory leaks, and artificial line length limits. [0]: http://cr.yp.to/qmail/guarantee.html http://cr.yp.to/qmail/guarantee.html
- sigsev_251 3y agoI mean, the annotations are supposed to be simple C attributes wrapped in macros, so even them are just C
- jonpalmisc 3y agoThe other commenter mentioning Firebloom is correct that some firmware (iBoot family) has been using C w/ Firebloom extensions for a while. Parts of SEPOS also use Swift, which would make more sense as a non-C language than Rust, from Apple's perspective at least.
- candiddevmike 3y agoWhat benefit would Apple get from this? They want you all in on an ecosystem they control. EDIT: Thought OP was talking about writing iOS apps using Rust.
- steveklabnik 3y agoApple does use Rust, though from job postings, we can infer it's more like network services than firmware. Regardless though, I don't see how the implementation language of your firmware is locking you into a specific ecosystem, so this criticism seems misguided to me.
- pjmlp 3y agoApparently people keep forgetting Swift exists. "CppNow 2023:Introducing a Memory-Safe Successor Language in Large C++ Code Bases" https://www.youtube.com/watch?v=lgivCGdmFrw https://www.youtube.com/watch?v=lgivCGdmFrw
- adastra22 3y agoSwift is a different class than rust though.
- pjmlp 3y agoNot for Apple, > Swift was designed from the outset to be safer than C-based languages, and eliminates entire classes of unsafe code. -- https://www.swift.org/about/ https://www.swift.org/about/ > Swift is a successor to the C, C++, and Objective-C languages -- https://developer.apple.com/swift/ https://developer.apple.com/swift/
- diogenes4 3y agoSorry, what does swift have to do with this?
- pjmlp 3y agoSwift is Apple's answer to replacing C derived languages, they don't need Rust. > Swift is a successor to the C, C++, and Objective-C languages -- https://developer.apple.com/swift/ https://developer.apple.com/swift/ They also mention plans for kernel and firmware targets on that talk.