Dockerized Swift for Raspberry Pi w/ dev tools - https://github.com/helje5/dockSwiftOnARM
10K+
This extends the basic Docker image helje5/rpi-swift with pre-installed dev-tools like Emacs, vim and CLang. It is intended as a development environment, e.g. if you want to build Swift packages on the Raspberry Pi.
Note: Unofficial Swift build, may or may not work for you :-)
An easy way to get Docker running on a RaspberryPi is the Hypriot image, here is a quick howto. If you want to remote-control the Raspi from your mac, there is a howto for that as well.
Once you got Docker running, lets create and build a simple package:
docker run --tty -i helje5/rpi-swift-dev bash
swift@a6b3a3070fc9:~$ mkdir testit && cd testit
swift@a6b3a3070fc9:~/testit$ swift package init --type executable
Creating executable package: testit
Creating Package.swift
Creating .gitignore
Creating Sources/
Creating Sources/main.swift
Creating Tests/
swift@a6b3a3070fc9:~/testit$ swift build
Compile Swift Module 'testit' (1 sources)
Linking ./.build/debug/testit
swift@a6b3a3070fc9:~/testit$ .build/debug/testit
Hello, world!
swift@a6b3a3070fc9:~/testit$ file .build/debug/testit
.build/debug/testit: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=bd83e3ab5bb7a1e487b81f40d26ea617a8663cc6, not stripped
Note: Swift REPL does not work on ARM. Swift Package Manager etc. now do.
There is also a demo image which shows how to run Apache Modules written in Swift on a Raspi, checkout: Running Server Side Swift on RaspberryPi .
Checkout https://github.com/helje5/dockSwiftOnARM for more information.
Content type
Image
Digest
Size
626.7 MB
Last updated
over 8 years ago
docker pull helje5/rpi-swift-dev