Releases for AArch64 (ARM64)


(Piotr Gorzelany) #21

A stable release for the Raspberry Pi would be awesome! The use case I have in mind is education.

Now if you want to teach kids to code in Swift you usually need a Mac which is pretty expensive. Raspberry Pi support + LSP would enable teaching Swift on the Pi using VSCode which would be a low cost and very nice learning environment. The Pi has a rich teaching ecosystem with resources and fun experiments you could do with periferal hardware.

In short, if it’s not a huge burden on the core team, I am a huge fan of an official ARM64 support.


(Lee) #22

ARM64 (AArch64) is more than just the RPi too.

AArch64 is going to be the new big player in the Enterprise space (Amazon just made a big announcement regarding EC2 instances : https://aws.amazon.com/about-aws/whats-new/2018/11/introducing-amazon-ec2-a1-instances/) and in the mid-high end mobile space (quite a few AArch64 laptops are popping up of late [HP Envy X2, Asus NovaGo, Lenovo MIIX 360, Samsung's Galaxy Book 2, etc etc]).

So adding AArch64 support is starting to sound like the right thing to do.


(Tobias) #23

Sorry if this is a stupid question: What is the difference between AArch64 / ARM64 and what the iOS ecosystem runs on? Since the later is quite prominently supported by swift why is the former such an issue?


(Lee) #24

The latest Apple processors are AArch64 (ARM64, ARMv8) based.

So supporting the architecture seems like a no brainer to me.

Still not 100% sure why only x86_64 is supported. My guess is because that's what Macbooks still use.

But not for long if this is to believed: https://www.theregister.co.uk/2018/10/18/apple_to_dump_intel_again/


(Neil Jones) #25

Definitely not a stupid question.
If you read the "About Swift" page it gives an explanation about the differences between Apple Platforms and Linux.
Once you have written your code you then need to build it using the Swift compiler.
If you are developing for Apple platforms you will be using XCode on your Mac (x86_64) to compile your swift code. There is never any need to be able to compile your Swift code on an iPhone or other ARM64 Apple devices.

If your computer is not an x86_64 device such as a Raspberry Pi and you want to compile your swift code, you need a version of the Swift compiler than is compatible with the arch type and OS of your system.
e.g AArch64_Ubuntu_16.04. or Armv7_Raspbian_Stretch.


(Tobias) #26

Thanks I did not think about the difference between running an executable and building the executable.
However,

There is never any need to be able to compile your Swift code on an iPhone or other ARM64 Apple devices.

How does Swift Playgrounds build swift code on iPad then?

Also, as it stand today, can you compile a binary with the swift compiler on Mac that will execute on a RaspberryPi ARM64?


(Lee) #27

Any updates since we discussed this?

The bug appears open still too: https://bugs.swift.org/browse/SR-9500


(Neil Jones) #28

@lag-linaro PR's have been approved and merged in the master and swift-5.0 branches. Both branches are now building patch free. swift-4.2-branch still needs a couple of PR's approved, hopefully they will be included in the Swift 4.2.3 release.
There are a small number of failing tests in swift-5.0-branch that need to be addressed, but all in all everything is looking pretty good.
There are swift-5.0 developer snapshots available for testing here:- https://github.com/futurejones/swift-arm64/releases
Swift-Arm Community releases of Swift 4.2.2 for Ubuntu 16.04, Ubuntu 18.04 and Debian 9 are available here:- https://packagecloud.io/swift-arm/release


(Lee) #29

@futurejones well I was not expecting that. Great work Neil.

I'm pleased your hard work has finally been accepted upstream.

So where does that leave us with the docker image (still only marked for amd64):

https://hub.docker.com/_/swift

This is the Issue I submitted some months ago (which was moved here):

https://github.com/apple/swift-docker/issues/116

Hopefully support for AArch64 will be added soon.