<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br><br>Sent from my iPhone</div><div><br>On Aug 10, 2016, at 08:31, Jens Alfke via swift-users &lt;<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 9, 2016, at 1:10 PM, Rick Mann via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Alegreya-Regular; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">For the smaller devices, runtime library overhead is a concern (mostly due to code size). Is it possible to write swift code with no runtime library? I think this is possible in Rust (came up on another list).</span><br style="font-family: Alegreya-Regular; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote></div><br class=""><div class="">I have never seen the Swift source code, but I’d be surprised if Swift binaries didn’t require at least the standard C runtime library. (It’s pretty hard to get anything done without at least having malloc/free!)</div><div class=""><br class=""></div><div class="">Don’t forget that the binary will have to include the implementations of the standard Swift library classes, at least the ones used by your program. I’m sure String in particular is a significant chunk of code, since it has to do all kinds of Unicode stuff. (In fact it might have a dependency on ICU, which is a pretty hefty C library.)</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><span style="font-family: Alegreya-Regular;" class="">These devices usually have memory-mapped registers that are read and written to affect the operation of the device. Some can be quite small (e.g. 8-bit registers, simple single physical memory address space), and others quite robust (full 32- or 64-bit machines with MMUs, etc.).</span></blockquote><br class=""></div><div class="">Arduinos are probably right out, since there’s no way anyone’s going to port Swift to an 8-bit CPU!</div><div class=""><br class=""></div><div class="">If you’re going for something bigger than that, why not just use a Raspberry Pi or C.H.I.P. or one of the other tiny ARM PC boards? They all run Linux, and I believe people are already working on porting Swift to run on those. </div></div></blockquote><div><br></div><div>Minor correction: Swift already builds and runs on the Raspberry Pi :)</div><br><blockquote type="cite"><div><div class="">C.H.I.P. costs $9, and I saw a blurb somewhere about a competitor that’s only $5.</div><div class=""><br class=""></div><div class="">—Jens</div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-users mailing list</span><br><span><a href="mailto:swift-users@swift.org">swift-users@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-users">https://lists.swift.org/mailman/listinfo/swift-users</a></span><br></div></blockquote></body></html>