rcee_precompiled 0.5.0.1-x86_64-darwin → 0.6.0-x86_64-darwin

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fb6571d075216e027b76f61f74669f3fd197fed85e3abb2c05f9a7f064d29f5
4
- data.tar.gz: 591dfe56c69cf401d28d2eb003f444c4399b96d6f4cc6e76af0bad8524cea3e3
3
+ metadata.gz: 0044bb13ff587a4bc3026010b6f7b6032654f6aa41e1c1a3ba7c80cdedd2c179
4
+ data.tar.gz: 6a6f066569f602b2ddec7a2058463b32175cc244de30a302a18504fe3ae62598
5
5
  SHA512:
6
- metadata.gz: 4ad884d77452e6d4d1bffafa05d2e5e585bb77280409cd89a02b3d747fbd769d10851b232e4c8b20c484f78daf8e95f405bf1ce32058f997ce347f87ede40005
7
- data.tar.gz: 1fba599a6e2bbba4ba473749a622a9b4be8d7cfea0d37aecae6f7e9c55f840ef6e557233b3e228137ae683795b46f3682ebf2092392d60e828225e2377c2972a
6
+ metadata.gz: c2e693e603d475cafa4e6b2a2b5e530ea80b2ab1198869f849e942440566d48f0e44edc326f0856e41d6b8b0e18305681ac25df48a808eabcc10a50870e30393
7
+ data.tar.gz: 892974736c7077d63990223e49dd3e84a86c19bff221189b6b4c43675ee624a57c2ea3dfb6bb6d806d18955e0339c287d845be172f6e9d985ef6c71938929d38
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ gemspec
7
7
 
8
8
  gem "rake", "~> 13.0"
9
9
 
10
- gem "rake-compiler", "1.2.7"
11
- gem "rake-compiler-dock", "1.5.0.rc1"
10
+ gem "rake-compiler"
11
+ gem "rake-compiler-dock", "1.7.0.rc1"
12
12
 
13
13
  gem "minitest", "~> 5.0"
data/README.md CHANGED
@@ -28,13 +28,18 @@ First, we need to add some features to our `Rake::ExtensionTask` in `Rakefile`:
28
28
  ``` ruby
29
29
  cross_rubies = ["3.3.0", "3.2.0", "3.1.0", "3.0.0"]
30
30
  cross_platforms = [
31
- "x64-mingw32",
31
+ "aarch64-linux-gnu",
32
+ "aarch64-linux-musl",
33
+ "arm-linux-gnu",
34
+ "arm-linux-musl",
35
+ "arm64-darwin",
32
36
  "x64-mingw-ucrt",
33
- "x86-linux",
34
- "x86_64-linux",
35
- "aarch64-linux",
37
+ "x64-mingw32",
38
+ "x86-linux-gnu",
39
+ "x86-linux-musl",
36
40
  "x86_64-darwin",
37
- "arm64-darwin",
41
+ "x86_64-linux-gnu",
42
+ "x86_64-linux-musl",
38
43
  ]
39
44
  ENV["RUBY_CC_VERSION"] = cross_rubies.join(":")
40
45
 
@@ -161,6 +166,22 @@ end
161
166
  Go ahead and try it! `gem install rcee_precompiled`. If you're on windows, linux, or macos you should get a precompiled version that installs in under a second. Everyone else (hello FreeBSD people!) it'll take a few more seconds to build the vanilla gem's packaged tarball.
162
167
 
163
168
 
169
+ ### Windows notes
170
+
171
+ You may have noticed that the gem for `x64-mingw32` only contains `.../3.0/precompiled.so` and not a shared library for 3.1, 3.2, or 3.3. Conversely, the gem for `x64-mingw-ucrt` does *not* contain 3.0 (but contains 3.1..3.3 inclusive).
172
+
173
+ This is because the Windows installer for Ruby switched from `msvcrt` to `ucrt` for the C standard library. Rubies 3.0 and earlier use `msvcrt` but later Rubies use `ucrt`. So if you're on Ruby 3.0 on Windows, bundler will resolve your platform as `x64-mingw32`; but if you're on Ruby 3.1 or later, bundler will resolve your platform as `x64-mingw-ucrt`. See [the rubyinstaller release notes](https://rubyinstaller.org/2021/12/31/rubyinstaller-3.1.0-1-released.html) for more information.
174
+
175
+ This is all taken care of for you by `rake-compiler-dock` and there's no additional work necessary to create those specialized native gems. However, you'll see this libc transition in the CI testing matrix in `.github/workflows/precompiled.yml`.
176
+
177
+
178
+ ### Linux notes
179
+
180
+ On Linux, the default C library for a long time was GNU libc, and so when you see native gem platforms like `x86_64-linux` the _implied_ libc is `gnu`. However, in recent years the `musl` libc project has gotten off the ground in distributions like Alpine. Often, `musl` systems are able to run code compiled on (and for) `gnu` systems; but not always. And in those incompatible cases, users had to work around it or avoid Alpine.
181
+
182
+ As of Rubygems 3.3.22, the `gem` and `bundle` tools are able to distinguish platforms by their libc type (e.g., `x86_64-linux-gnu` versus `x86_64-linux-musl`); and `rake-compiler-dock` started to be able to build `musl` native gems as of v1.5.0.
183
+
184
+
164
185
  ## Testing
165
186
 
166
187
  See [.github/workflows/precompiled.yml](../.github/workflows/precompiled.yml)
data/Rakefile CHANGED
@@ -6,20 +6,19 @@ require "rake/testtask"
6
6
  require "rake/extensiontask"
7
7
  require "rake_compiler_dock"
8
8
 
9
- cross_rubies = ["3.3.0", "3.2.0", "3.1.0", "3.0.0"]
9
+ cross_rubies = ["3.4.0", "3.3.5", "3.2.0", "3.1.0"]
10
10
  cross_platforms = [
11
- "aarch64-linux",
11
+ "aarch64-linux-gnu",
12
12
  "aarch64-linux-musl",
13
- "arm-linux",
13
+ "arm-linux-gnu",
14
14
  "arm-linux-musl",
15
- "arm64-darwin",
16
- "x64-mingw-ucrt",
17
- "x64-mingw32",
18
- "x86-linux",
15
+ "x86-linux-gnu",
19
16
  "x86-linux-musl",
20
- "x86_64-darwin",
21
- "x86_64-linux",
17
+ "x86_64-linux-gnu",
22
18
  "x86_64-linux-musl",
19
+ "arm64-darwin",
20
+ "x86_64-darwin",
21
+ "x64-mingw-ucrt",
23
22
  ]
24
23
  ENV["RUBY_CC_VERSION"] = cross_rubies.join(":")
25
24
 
@@ -42,6 +41,11 @@ Rake::ExtensionTask.new("precompiled", rcee_precompiled_spec) do |ext|
42
41
  # remove things not needed for precompiled gems
43
42
  spec.dependencies.reject! { |dep| dep.name == "mini_portile2" }
44
43
  spec.files.reject! { |file| File.fnmatch?("*.tar.gz", file) }
44
+
45
+ if spec.platform.os == "linux"
46
+ # the `-gnu` suffix is not recognized in earlier versions of rubygems
47
+ spec.required_rubygems_version.concat([">= 3.3.22"])
48
+ end
45
49
  end
46
50
  end
47
51
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RCEE
4
4
  module Precompiled
5
- VERSION = "0.5.0.1"
5
+ VERSION = "0.6.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcee_precompiled
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.1
4
+ version: 0.6.0
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Mike Dalessio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-01 00:00:00.000000000 Z
11
+ date: 2024-12-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Part of a project to explain how Ruby C extensions work.
14
14
  email:
@@ -25,10 +25,10 @@ files:
25
25
  - ext/precompiled/precompiled.c
26
26
  - ext/precompiled/precompiled.h
27
27
  - lib/rcee/precompiled.rb
28
- - lib/rcee/precompiled/3.0/precompiled.bundle
29
28
  - lib/rcee/precompiled/3.1/precompiled.bundle
30
29
  - lib/rcee/precompiled/3.2/precompiled.bundle
31
30
  - lib/rcee/precompiled/3.3/precompiled.bundle
31
+ - lib/rcee/precompiled/3.4/precompiled.bundle
32
32
  - lib/rcee/precompiled/version.rb
33
33
  - rcee_precompiled.gemspec
34
34
  homepage: https://github.com/flavorjones/ruby-c-extensions-explained
@@ -43,10 +43,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: '3.0'
46
+ version: '3.1'
47
47
  - - "<"
48
48
  - !ruby/object:Gem::Version
49
- version: 3.4.dev
49
+ version: 3.5.dev
50
50
  required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="