<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Swift Community Apt Repository &#8211; Wade Tregaskis</title>
	<atom:link href="https://wadetregaskis.com/tags/swift-community-apt-repository/feed/" rel="self" type="application/rss+xml" />
	<link>https://wadetregaskis.com</link>
	<description></description>
	<lastBuildDate>Fri, 24 May 2024 19:20:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://wadetregaskis.com/wp-content/uploads/2016/03/Stitch-512x512-1-256x256.png</url>
	<title>Swift Community Apt Repository &#8211; Wade Tregaskis</title>
	<link>https://wadetregaskis.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">226351702</site>	<item>
		<title>Swift on a Raspberry Pi (in 2024)</title>
		<link>https://wadetregaskis.com/swift-on-a-raspberry-pi-in-2024/</link>
					<comments>https://wadetregaskis.com/swift-on-a-raspberry-pi-in-2024/#comments</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Fri, 24 May 2024 19:20:07 +0000</pubDate>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[buildSwiftOnARM]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[FutureJones]]></category>
		<category><![CDATA[Raspbian]]></category>
		<category><![CDATA[Swift]]></category>
		<category><![CDATA[Swift Community Apt Repository]]></category>
		<category><![CDATA[Swift-Arm]]></category>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8202</guid>

					<description><![CDATA[Five years ago installing Swift on a Raspberry Pi &#8211; or really any non-Apple platform &#8211; was fairly involved. Compared to getting a Raspberry Pi working to begin with it was easy, but still a far cry from apt install swift. Sadly it&#8217;s still not quite that easy (and some Python package is squatting on&#8230; <a class="read-more-link" href="https://wadetregaskis.com/swift-on-a-raspberry-pi-in-2024/" data-wpel-link="internal">Read more</a>]]></description>
										<content:encoded><![CDATA[
<p>Five years ago installing Swift on a Raspberry Pi &#8211; or really <em>any</em> non-Apple platform &#8211; was <a href="https://wadetregaskis.com/swift-on-raspberry-pi/" data-wpel-link="internal">fairly involved</a>.  Compared to getting a Raspberry Pi working to begin with it was easy, but still a far cry from <code>apt install swift</code>.</p>



<p>Sadly it&#8217;s still not <em>quite</em> that easy (and some Python package is squatting on the <code>swift</code> package name 🤨).</p>



<p>You can still install from source, in principle, although I&#8217;m not aware of any <em>current</em> instructions on how to do so.  The <a href="https://github.com/uraimo/buildSwiftOnARM" data-wpel-link="external" target="_blank" rel="external noopener">buildSwiftOnARM</a> project has seemingly been abandoned.  I haven&#8217;t tested if their now-years-old instructions still work for the latest versions of Swift (e.g. 5.10, 6.0).</p>



<p>But, you shouldn&#8217;t need to build from source anymore &#8211; now you have many better options:</p>



<h2 class="wp-block-heading">Swift.org (Apple-provided options)</h2>



<ul class="wp-block-list">
<li>If you happen to be using a <code>yum</code>-centric platform, like RHEL / Amazon Linux / CentOS, you can (finally!) just <a href="https://www.swift.org/install/linux/#installation-via-rpm" data-wpel-link="external" target="_blank" rel="external noopener">install RPMs</a>.</li>



<li>If you happen to use one of <a href="https://www.swift.org/platform-support/" data-wpel-link="external" target="_blank" rel="external noopener">the officially supported Linux distributions</a>, you can <a href="https://www.swift.org/install/linux/#installation-via-docker" data-wpel-link="external" target="_blank" rel="external noopener">install via Docker</a>.  Alas many major distros are notably absent from that list, like Debian<sup data-fn="bf7d2063-1944-4bd3-8081-5ce94b1243ed" class="fn"><a href="#bf7d2063-1944-4bd3-8081-5ce94b1243ed" id="bf7d2063-1944-4bd3-8081-5ce94b1243ed-link">1</a></sup> (and therefore Raspbian). 😔<br><br>It&#8217;s unfortunate that <a href="https://www.swift.org/install/linux/" data-wpel-link="external" target="_blank" rel="external noopener">Swift.org pushes this as the preferred way</a> to install Swift on Linux.  I avoid Docker because it tends to just make everything more complex (and error-prone), and encourage bad software practices (&#8220;it works in my docker image 🖕&#8221;).
<ul class="wp-block-list">
<li>You <em>can</em> bypass the Docker requirement via the relatively primitive method of <a href="https://www.swift.org/install/linux/#installation-via-tarball" data-wpel-link="external" target="_blank" rel="external noopener">splatting a tarball into your system</a>.  It works, it&#8217;s pretty quick, but it&#8217;s a maintenance hassle (no version management, no reliable update method, etc).</li>
</ul>
</li>
</ul>



<h2 class="wp-block-heading">Swift Community Apt Repository</h2>



<p>Thanks to the efforts of community volunteers &#8211; in particular the folks at <a href="https://futurejones.com" data-wpel-link="external" target="_blank" rel="external noopener">FutureJones</a> &#8211; there is the <a href="https://swiftlang.xyz" data-wpel-link="external" target="_blank" rel="external noopener">Swift Community Apt Repository</a>, which fills the massive void left by Apple&#8217;s apparent hatred for <code>apt</code>-based distros:</p>



<ol class="wp-block-list">
<li><code>curl -s https://archive.swiftlang.xyz/install.sh | sudo bash</code></li>



<li><code>sudo apt install swiftlang</code></li>



<li><a href="https://www.youtube.com/watch?v=c3pa3HCNHGI" data-wpel-link="external" target="_blank" rel="external noopener">There is no step 3!</a></li>
</ol>



<p><a href="https://swiftlang.xyz/user-guide" data-wpel-link="external" target="_blank" rel="external noopener">More details</a> (including the list of supported distros).</p>



<p>It&#8217;s a shame that it falls to third parties to make Swift on Linux easy (on major distros, at least).  Don&#8217;t forget to <a href="https://ko-fi.com/futurejones" data-wpel-link="external" target="_blank" rel="external noopener">support them</a> if you benefit from their work!</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<p>☝️ FutureJones also run <a href="https://swift-arm.com" data-wpel-link="external" target="_blank" rel="external noopener">Swift-Arm</a>, <a href="https://swift-arm.com/category/news" data-wpel-link="external" target="_blank" rel="external noopener">which implies</a> that only Swift 5.8 (and older) are supported.  But in fact 5.10 is available &#8211; it seems they&#8217;ve just forgotten / chosen to stop posting about newly supported Swift versions.</p>
</div></div>


<ol class="wp-block-footnotes"><li id="bf7d2063-1944-4bd3-8081-5ce94b1243ed">Though it appears <a href="https://github.com/apple/swift-docker/commit/1263ae112a1fd4b3445215c1f86994f161775b5c" data-wpel-link="external" target="_blank" rel="external noopener">Debian support is in the works</a>. <a href="#bf7d2063-1944-4bd3-8081-5ce94b1243ed-link" aria-label="Jump to footnote reference 1">↩︎</a></li></ol>]]></content:encoded>
					
					<wfw:commentRss>https://wadetregaskis.com/swift-on-a-raspberry-pi-in-2024/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			<media:content url="https://wadetregaskis.com/wp-content/uploads/2019/10/Swift-on-Raspberry-Pi.webp" medium="image" />
<post-id xmlns="com-wordpress:feed-additions:1">8202</post-id>	</item>
	</channel>
</rss>
