Skip to content
Dave Cottlehuber edited this page Oct 7, 2014 · 11 revisions

Overview

swirl is developed on Mac OS X 10.9 and FreeBSD 10 in parallel, and when testing is set up, on common linux variants as well. The latest available Erlang/OTP release is used (currently at OTP 17.3), however any version since the 17.0 release should be compatible.

FreeBSD 10.0 was chosen because zfs is the only prudent filesystem if your data is of any value to you, and it's got a great network stack under the hood.

Swirl has no external dependencies other than Erlang/OTP so rebar, git, gnu make, and erlang are sufficient. The approach for FreeBSD, linux and OSX should be pretty much the same. Windows, while not tested, should work if using cygwin or mingw.

git clone git://github.com/skunkwerks/swirl/
cd swirl
make all dev

Check out the README.md in the project repo for more information.

LibSwift is the companion reference GPL-licenced tool, which is easily buildable on most common Unix platforms. It's great for testing and debugging output together with swirl.

Mac OS X 10.9

Using the homebrew package manager, simply create a new file in /usr/local/Library/Formula/libswift.rb with the following contents:

require "formula"

class Libswift < Formula
  homepage "http://libswift.org/"
  url "https://github.com/libswift/libswift/archive/daddd52aade71e692aedd498d8fc4ea1c633d840.tar.gz"
  sha1 "20619602d7d7b6c30b36cefa41d1939b6fd4db18"
  version "10"
  head 'https://github.com/libswift/libswift.git', :branch => :devel

  depends_on 'libevent'

  def install
    system "make"
    bin.install "swift"
  end

  test do
    # make a merkle tree hash from an arbitrary file
    system "#{bin}/swift -f #{bin}/swift"
  end
end

and then brew install -v libswift, or use brew install -v --HEAD libswift for the latest development branch.

Fedora 20

You'll need the devel versions of both openssl and libevent2 packages, for older fedora versions, make sure you're not getting a version that's < 2.0 please.

sudo yum install -y libevent-devel openssl-devel
make swift-dynamic

You now should have a working swift binary inside the git repo.

FreeBSD 10

The libswift binary doesn't build directly on FreeBSD 10.0 without a small patch, as it is 100% clang-based now. Clone the maintained fork and check out the devel branch. The patch is awaiting acceptance.

pkg install curl git gmake libevent2
git clone git://github.com/skunkwerks/libswift devel
cd libswift
gmake swift-static

You now should have a working swift static binary inside the git repo.

Clone this wiki locally