You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-1Lines changed: 40 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,43 @@ This is kind of successor of [rake-compiler-dev-box](https://github.com/tjschuck
10
10
It is wrapped as a gem for easier setup, usage and integration and is based on lightweight Docker containers.
11
11
It is also more reliable, since the underlying docker images are versioned and immutable.
12
12
13
+
## Supported platforms
14
+
15
+
The following platforms are supported for cross-compilation by rake-compiler-dock:
16
+
17
+
-`aarch64-linux` and `aarch64-linux-gnu`
18
+
-`aarch64-linux-musl`
19
+
-`arm-linux` and `arm-linux-gnu`
20
+
-`arm-linux-musl`
21
+
-`arm64-darwin`
22
+
-`jruby`
23
+
-`x64-mingw-ucrt`
24
+
-`x64-mingw32`
25
+
-`x86-linux` and `x86-linux-gnu`
26
+
-`x86-linux-musl`
27
+
-`x86-mingw32`
28
+
-`x86_64-darwin`
29
+
-`x86_64-linux` and `x86_64-linux-gnu`
30
+
-`x86_64-linux-musl`
31
+
32
+
### Windows
33
+
34
+
`x64-mingw-ucrt` should be used for Ruby 3.1 and later on windows. `x64-mingw32` should be used for Ruby 3.0 and earlier.
35
+
36
+
### GNU and Musl
37
+
38
+
Platform names with a `*-linux` suffix are aliases for `*-linux-gnu`, since the Rubygems default is to assume `gnu` if no libc is specified.
39
+
40
+
Some C extensions may not require separate GNU and Musl builds, in which case it's acceptable to ship a single `*-linux` gem to cover both platforms.
41
+
42
+
The `*-linux-gnu` and `*-linux-musl` platform name suffixes require Rubygems 3.3.22 or later (or Bundler 2.3.21 or later) at installation time. Ruby version 3.0 and later ship with a sufficient Rubygems version, but versions compatible with earlier Rubies are:
43
+
44
+
- ruby: "2.7", rubygems: "3.4.22"
45
+
- ruby: "2.6", rubygems: "3.4.22"
46
+
- ruby: "2.5", rubygems: "3.3.26"
47
+
- ruby: "2.4", rubygems: "3.3.26"
48
+
49
+
13
50
## Installation
14
51
15
52
Install docker [following the instructions on the docker website](https://docs.docker.com/engine/install/) ... or install [docker-toolbox for Windows and OSX](https://github.com/docker/toolbox/releases) or boot2docker on [Windows](https://github.com/boot2docker/windows-installer/releases) or [OS X](https://github.com/boot2docker/osx-installer/releases) .
@@ -33,10 +70,12 @@ Your Rakefile should enable cross compilation like so:
33
70
```ruby
34
71
exttask =Rake::ExtensionTask.new('my_extension', my_gem_spec) do |ext|
where you should choose your platforms from the list in the "Supported platforms" section.
78
+
40
79
See below, how to invoke cross builds in your Rakefile.
41
80
42
81
Additionally it may also be used to build ffi based binary gems like [libusb](https://github.com/larskanis/libusb), but currently doesn't provide any additional build helpers for this use case, beyond docker invocation and cross compilers.
0 commit comments