rb_sys 0.9.110 → 0.9.124
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.md +16 -75
- data/certs/ianks.pem +19 -18
- data/exe/rb-sys-dock +23 -17
- data/lib/rb_sys/cargo_builder.rb +6 -6
- data/lib/rb_sys/error.rb +2 -2
- data/lib/rb_sys/mkmf/config.rb +9 -5
- data/lib/rb_sys/mkmf.rb +19 -7
- data/lib/rb_sys/toolchain_info/data.rb +1 -1
- data/lib/rb_sys/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +25 -28
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c8a0fe40c93d062d2c3ae4f1a29885b07358bce613e8e3042cb9eee69456afb3
|
|
4
|
+
data.tar.gz: b4a40f471429193ce42c3d7ebb86e9a1d855bbfe44d72c6fbb9b81b19b5eab53
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a367516676c0cebaf563622d5f63b35691f560d68b28d2ed3123644d5ef20b8ec10e9d5b52c6f7996d8975f3c96ab417f471354788ff126424a8bb71e186c483
|
|
7
|
+
data.tar.gz: fa6f573434bed70e07b993fc80f875d4455e60eff44aba85448c28d549bcf1da2b8b33bbe4c00ee4b7123c13a6da09fc61c05ff98a2979e10b94104af03e9231
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/README.md
CHANGED
|
@@ -4,98 +4,39 @@
|
|
|
4
4
|
[](https://www.rubydoc.info/gems/rb_sys/frames)
|
|
5
5
|
[](https://join.slack.com/t/oxidize-rb/shared_invite/zt-16zv5tqte-Vi7WfzxCesdo2TqF_RYBCw)
|
|
6
6
|
|
|
7
|
-
The `rb_sys` gem
|
|
8
|
-
|
|
7
|
+
The `rb_sys` gem makes it easy to build native Ruby extensions in Rust. It interoperates with existing Ruby native
|
|
8
|
+
extension toolchains (i.e. `rake-compiler`) to make testing, building, and cross-compilation of gems easy.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Documentation
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
For comprehensive documentation, please refer to the [Ruby on Rust Book](https://oxidize-rb.github.io/rb-sys/), which
|
|
13
|
+
includes:
|
|
14
|
+
|
|
15
|
+
- [API Reference for rb_sys Gem Configuration](https://oxidize-rb.github.io/rb-sys/api-reference/rb-sys-gem-config.html)
|
|
16
|
+
- [The Build Process](https://oxidize-rb.github.io/rb-sys/build-process.html)
|
|
17
|
+
- [Cross-Platform Development](https://oxidize-rb.github.io/rb-sys/cross-platform.html)
|
|
18
|
+
|
|
19
|
+
## Basic Usage
|
|
14
20
|
|
|
15
21
|
```ruby
|
|
16
22
|
# Rakefile
|
|
17
|
-
|
|
18
23
|
require "rb_sys/extensiontask"
|
|
19
24
|
|
|
20
25
|
GEMSPEC = Gem::Specification.load("my_gem.gemspec")
|
|
21
26
|
|
|
22
27
|
RbSys::ExtensionTask.new("my-crate-name", GEMSPEC) do |ext|
|
|
23
28
|
ext.lib_dir = "lib/my_gem"
|
|
24
|
-
|
|
25
|
-
# If you want to use `rb-sys-dock` for cross-compilation:
|
|
26
|
-
ext.cross_compile = true
|
|
29
|
+
ext.cross_compile = true # For rb-sys-dock cross-compilation
|
|
27
30
|
end
|
|
28
31
|
```
|
|
29
32
|
|
|
30
|
-
## `create_rust_makefile`
|
|
31
|
-
|
|
32
|
-
This gem provides a simple helper to build a Ruby compatible Makefile for you Rust extension. For a full example, see
|
|
33
|
-
the [examples](./../examples) directory.
|
|
34
|
-
|
|
35
33
|
```ruby
|
|
36
|
-
# ext/
|
|
37
|
-
|
|
38
|
-
# We need to require mkmf *first* this since `rake-compiler` injects code here for cross compilation
|
|
34
|
+
# ext/my_gem/extconf.rb
|
|
39
35
|
require "mkmf"
|
|
40
36
|
require "rb_sys/mkmf"
|
|
41
37
|
|
|
42
|
-
create_rust_makefile("
|
|
43
|
-
# Create debug builds in dev. Make sure that release gems are compiled with
|
|
44
|
-
# `RB_SYS_CARGO_PROFILE=release` (optional)
|
|
45
|
-
r.profile = ENV.fetch("RB_SYS_CARGO_PROFILE", :dev).to_sym
|
|
46
|
-
|
|
47
|
-
# Can be overridden with `RB_SYS_CARGO_FEATURES` env var (optional)
|
|
48
|
-
r.features = ["test-feature"]
|
|
49
|
-
|
|
50
|
-
# You can add whatever env vars you want to the env hash (optional)
|
|
51
|
-
r.env = {"FOO" => "BAR"}
|
|
52
|
-
|
|
53
|
-
# If your Cargo.toml is in a different directory, you can specify it here (optional)
|
|
54
|
-
r.ext_dir = "."
|
|
55
|
-
|
|
56
|
-
# Extra flags to pass to the $RUSTFLAGS environment variable (optional)
|
|
57
|
-
r.extra_rustflags = ["--cfg=some_nested_config_var_for_crate"]
|
|
58
|
-
|
|
59
|
-
# Force a rust toolchain to be installed via rustup (optional)
|
|
60
|
-
# You can also set the env var `RB_SYS_FORCE_INSTALL_RUST_TOOLCHAIN=true`
|
|
61
|
-
r.force_install_rust_toolchain = "stable"
|
|
62
|
-
|
|
63
|
-
# Clean up the target/ dir after `gem install` to reduce bloat (optional)
|
|
64
|
-
r.clean_after_install = false # default: true if invoked by rubygems
|
|
65
|
-
|
|
66
|
-
# Auto-install Rust toolchain if not present on "gem install" (optional)
|
|
67
|
-
r.auto_install_rust_toolchain = false # default: true if invoked by rubygems
|
|
68
|
-
end
|
|
38
|
+
create_rust_makefile("my_gem")
|
|
69
39
|
```
|
|
70
40
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
- When using `rake-compiler` to build your gem, you can use the `RB_SYS_CARGO_PROFILE` environment variable to set the
|
|
74
|
-
Cargo profile (i.e. `release` or `dev`).
|
|
75
|
-
|
|
76
|
-
- You can pass Cargo arguments to `rake-compiler` like so: `rake compile -- --verbose`
|
|
77
|
-
|
|
78
|
-
- It's possible to force an installation of a Rust toolchain by setting the `RB_SYS_FORCE_INSTALL_RUST_TOOLCHAIN`
|
|
79
|
-
environment variable. This will install [rustup](https://rustup.rs/) and [cargo](https://crates.io/) in the build
|
|
80
|
-
directory, so the end user does not have to have Rust pre-installed. Ideally, this should be a last resort, as it's
|
|
81
|
-
better to already have the toolchain installed on your system.
|
|
82
|
-
|
|
83
|
-
## Troubleshooting
|
|
84
|
-
|
|
85
|
-
### Libclang issues
|
|
86
|
-
|
|
87
|
-
If you see an error like this:
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: \['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'\], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: \[\])"'
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
This means that bindgen is having issues finding a usable version of libclang. An easy way to fix this is to install the
|
|
94
|
-
[`libclang` gem](https://github.com/oxidize-rb/libclang-rb), which will install a pre-built version of libclang for you.
|
|
95
|
-
`rb_sys` will automatically detect this gem and use it.
|
|
96
|
-
|
|
97
|
-
```ruby
|
|
98
|
-
# Gemfile
|
|
99
|
-
|
|
100
|
-
gem "libclang", "~> 14.0.6"
|
|
101
|
-
```
|
|
41
|
+
For full configuration options and more advanced usage, see the
|
|
42
|
+
[rb_sys Gem Configuration](https://oxidize-rb.github.io/rb-sys/api-reference/rb-sys-gem-config.html) reference.
|
data/certs/ianks.pem
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
MIIDZTCCAk2gAwIBAgIUBA3+R8/tEu+w03IWit3NPqhAv5EwDQYJKoZIhvcNAQEL
|
|
3
|
+
BQAwQjEUMBIGA1UEAwwLaS5rZXJzZXltZXIxFTATBgoJkiaJk/IsZAEZFgVnbWFp
|
|
4
|
+
bDETMBEGCgmSJomT8ixkARkWA2NvbTAeFw0yNTA1MDcxOTA3NDNaFw0zNTA1MDUx
|
|
5
|
+
OTA3NDNaMEIxFDASBgNVBAMMC2kua2Vyc2V5bWVyMRUwEwYKCZImiZPyLGQBGRYF
|
|
6
|
+
Z21haWwxEzARBgoJkiaJk/IsZAEZFgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB
|
|
7
|
+
DwAwggEKAoIBAQDCdqRvnq+HDz2rMbDCCi/f7Ziy+IIfNBDLhd0gktKmaIfjqPHZ
|
|
8
|
+
L0WMVvDV3cBCHKd3AjYBPuRviUwjDlRfEteZ9WdT+8cV4l8WvwSKHyim7WrVUZ4J
|
|
9
|
+
teLkf+qY3ZLy16pa1nUue2zcL+y7ac2FXwx37Jf6kVmhIuI6tNDzQkUlo3L2vLXq
|
|
10
|
+
rMIwYPCpcBrcsoKXsz21Ulj/GL81mZlRe36kQV1O/AIdPqTTobJQVw07yN8SXTeI
|
|
11
|
+
UNx+6y46Q/6sSlqv/KPkL8enF3TWd7oB/z69wQLKreCRS14p/QCuzzvRgzB+SVya
|
|
12
|
+
1G/oQLdlTSGaqc/VZSgOgQNIzXlhnmvsgmZBAgMBAAGjUzBRMB0GA1UdDgQWBBTp
|
|
13
|
+
KxeobKHGiDDo0fytyQc8lwiyTzAfBgNVHSMEGDAWgBTpKxeobKHGiDDo0fytyQc8
|
|
14
|
+
lwiyTzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAhKxsiI5Xz
|
|
15
|
+
H3isxJy4pD1FZ6rrU0gg/kFkWlsYgrw/Cqt53Nj6ValhpbA/VoftE80xEHfv4qR0
|
|
16
|
+
eiBkYVyULXZbojF9qRokVTXDY6lWzHdesbSt314IBBJR55aTw4IPHGikhMNeZ3M1
|
|
17
|
+
ffINONWhsL+ZwMaiLedThkRkPNzCvvRSNZiQXsdl/xV55JWqmmgfONCafx6/L8cI
|
|
18
|
+
EZEISe0Z9uvVtO6G+mfX6nfGGVjJg6B53wSXaipDGxOh0vn1YiQzPxY+8ouXmfj6
|
|
19
|
+
C/k2s4tlFwg7XEtz7wjSnVeiNP9EOK50WgVr4muWx1rhvOFhpxypONCCANJUILGk
|
|
20
|
+
1JUZhXwcbcst
|
|
20
21
|
-----END CERTIFICATE-----
|
data/exe/rb-sys-dock
CHANGED
|
@@ -14,7 +14,7 @@ require "tmpdir"
|
|
|
14
14
|
|
|
15
15
|
OPTIONS = {
|
|
16
16
|
docker_platform: "linux/amd64",
|
|
17
|
-
version: RbSys::VERSION,
|
|
17
|
+
version: ENV["RCD_IMAGE_VERSION"] || RbSys::VERSION,
|
|
18
18
|
directory: Dir.pwd
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -38,10 +38,12 @@ end
|
|
|
38
38
|
def list_platforms
|
|
39
39
|
RbSys::ToolchainInfo.supported.each do |p|
|
|
40
40
|
old = logger.io
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
begin
|
|
42
|
+
logger.io = $stdout
|
|
43
|
+
puts "- #{p.platform}"
|
|
44
|
+
ensure
|
|
45
|
+
logger.io = old
|
|
46
|
+
end
|
|
45
47
|
end
|
|
46
48
|
end
|
|
47
49
|
|
|
@@ -99,28 +101,30 @@ OptionParser.new do |opts|
|
|
|
99
101
|
OPTIONS[:toolchain_info] = toolchain_info
|
|
100
102
|
end
|
|
101
103
|
|
|
102
|
-
opts.on("-r", "--ruby-versions LIST", "
|
|
103
|
-
|
|
104
|
-
override = RakeCompilerDock.cross_rubies[v]
|
|
105
|
-
|
|
106
|
-
next override if override
|
|
104
|
+
opts.on("-r", "--ruby-versions LIST", "Comma- or colon-separated Ruby requirements (e.g., '3.4,~> 3.1')") do |arg|
|
|
105
|
+
requirements = arg.tr(":", ",").split(",").map(&:strip).reject(&:empty?)
|
|
107
106
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
begin
|
|
108
|
+
resolved = RakeCompilerDock.ruby_cc_version(*requirements)
|
|
109
|
+
rescue => error
|
|
110
|
+
logger.error("Could not resolve requested Ruby versions: #{error.message}")
|
|
111
|
+
exit(1)
|
|
111
112
|
end
|
|
112
113
|
|
|
113
|
-
|
|
114
|
+
resolved_versions = resolved.split(":")
|
|
115
|
+
OPTIONS[:ruby_version_requirements] = requirements
|
|
116
|
+
OPTIONS[:ruby_versions] = resolved_versions
|
|
114
117
|
|
|
115
|
-
logger.info("Building for Ruby requested versions: #{
|
|
118
|
+
logger.info("Building for Ruby requested versions: #{resolved_versions.join(":")}")
|
|
116
119
|
|
|
117
|
-
|
|
120
|
+
RakeCompilerDock.set_ruby_cc_version(*requirements)
|
|
118
121
|
end
|
|
119
122
|
|
|
120
123
|
opts.on("--tag TAG", "Use a specific version of the Docker image") do |tag|
|
|
121
124
|
logger.info("Using version #{tag} of the Docker image")
|
|
122
125
|
OPTIONS[:version] = tag
|
|
123
126
|
OPTIONS[:no_cache] = tag == "latest"
|
|
127
|
+
ENV["RCD_IMAGE_VERSION"] = tag
|
|
124
128
|
end
|
|
125
129
|
|
|
126
130
|
opts.on("--list-platforms", "--list", "List all supported platforms") do
|
|
@@ -445,7 +449,9 @@ def log_some_useful_info
|
|
|
445
449
|
end
|
|
446
450
|
|
|
447
451
|
def set_env
|
|
448
|
-
ENV["
|
|
452
|
+
ENV["RCD_IMAGE_VERSION"] ||= OPTIONS[:version]
|
|
453
|
+
version = ENV.fetch("RCD_IMAGE_VERSION")
|
|
454
|
+
ENV["RCD_IMAGE"] ||= "rbsys/#{ruby_platform}:#{version}"
|
|
449
455
|
end
|
|
450
456
|
|
|
451
457
|
def lint_rb_sys
|
data/lib/rb_sys/cargo_builder.rb
CHANGED
|
@@ -87,7 +87,7 @@ module RbSys
|
|
|
87
87
|
end
|
|
88
88
|
|
|
89
89
|
def cargo_dylib_path(dest_path)
|
|
90
|
-
prefix = so_ext == "dll" ? "" : "lib"
|
|
90
|
+
prefix = (so_ext == "dll") ? "" : "lib"
|
|
91
91
|
path_parts = [dest_path]
|
|
92
92
|
path_parts << target if target
|
|
93
93
|
path_parts += [profile_target_directory, "#{prefix}#{cargo_crate_name}.#{so_ext}"]
|
|
@@ -110,6 +110,10 @@ module RbSys
|
|
|
110
110
|
end
|
|
111
111
|
end
|
|
112
112
|
|
|
113
|
+
def rubygems_invoked?
|
|
114
|
+
ENV.key?("SOURCE_DATE_EPOCH") && ENV["RB_SYS_TEST"] != "1" && !ENV.key?("NIX_STORE")
|
|
115
|
+
end
|
|
116
|
+
|
|
113
117
|
private
|
|
114
118
|
|
|
115
119
|
def rb_config_env
|
|
@@ -342,10 +346,6 @@ module RbSys
|
|
|
342
346
|
end
|
|
343
347
|
end
|
|
344
348
|
|
|
345
|
-
def rubygems_invoked?
|
|
346
|
-
ENV.key?("SOURCE_DATE_EPOCH") && ENV["RB_SYS_TEST"] != "1"
|
|
347
|
-
end
|
|
348
|
-
|
|
349
349
|
def musl?
|
|
350
350
|
RbConfig::CONFIG["target_os"] == "linux-musl" || RbConfig::CONFIG["CC"]&.include?("musl-gcc")
|
|
351
351
|
end
|
|
@@ -355,7 +355,7 @@ module RbSys
|
|
|
355
355
|
def initialize(dir)
|
|
356
356
|
files = Dir.glob(File.join(dir, "**", "*")).map { |f| "- #{f}" }.join "\n"
|
|
357
357
|
|
|
358
|
-
super
|
|
358
|
+
super(<<~MSG)
|
|
359
359
|
Dynamic library not found for Rust extension (in #{dir})
|
|
360
360
|
|
|
361
361
|
Make sure you set "crate-type" in Cargo.toml to "cdylib"
|
data/lib/rb_sys/error.rb
CHANGED
|
@@ -8,8 +8,8 @@ module RbSys
|
|
|
8
8
|
class PackageNotFoundError < Error
|
|
9
9
|
def initialize(name)
|
|
10
10
|
msg = <<~MSG.chomp.tr("\n", " ")
|
|
11
|
-
Could not find Cargo package metadata for #{
|
|
12
|
-
check that #{
|
|
11
|
+
Could not find Cargo package metadata for #{name.inspect}. Please
|
|
12
|
+
check that #{name.inspect} matches the crate name in your
|
|
13
13
|
Cargo.toml."
|
|
14
14
|
MSG
|
|
15
15
|
|
data/lib/rb_sys/mkmf/config.rb
CHANGED
|
@@ -55,12 +55,16 @@ module RbSys
|
|
|
55
55
|
@builder.respond_to?(name) || super
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
#
|
|
59
|
-
# We want to know this so we can cleanup the
|
|
60
|
-
# install, to remove bloat.
|
|
61
|
-
#
|
|
58
|
+
# Unfortunate, but this seems to be the only way to reliably know if we
|
|
59
|
+
# were invoked by Rubygems. We want to know this so we can cleanup the
|
|
60
|
+
# target directory after an install, to remove bloat.
|
|
61
|
+
#
|
|
62
|
+
# Note: we avoid nix environments so we do not force recompilation in
|
|
63
|
+
# development, and accept that the "clean" task will not automatically
|
|
64
|
+
# run.
|
|
65
|
+
#
|
|
62
66
|
def rubygems_invoked?
|
|
63
|
-
ENV.key?("SOURCE_DATE_EPOCH") && ENV["RB_SYS_TEST"] != "1"
|
|
67
|
+
ENV.key?("SOURCE_DATE_EPOCH") && ENV["RB_SYS_TEST"] != "1" && !ENV.key?("NIX_STORE")
|
|
64
68
|
end
|
|
65
69
|
|
|
66
70
|
def use_stable_api_compiled_fallback?
|
data/lib/rb_sys/mkmf.rb
CHANGED
|
@@ -141,11 +141,11 @@ module RbSys
|
|
|
141
141
|
\t$(Q) $(MAKEDIRS) $(RUBYARCHDIR)
|
|
142
142
|
\t$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
|
143
143
|
|
|
144
|
-
gemclean:
|
|
144
|
+
gemclean: install-so
|
|
145
145
|
\t$(ECHO) Cleaning gem artifacts
|
|
146
146
|
\t-$(Q)$(RM_RF) $(RUBYGEMS_CLEAN_DIRS) 2> /dev/null || true
|
|
147
147
|
|
|
148
|
-
install: #{builder.clean_after_install ? "
|
|
148
|
+
install: #{builder.clean_after_install ? "gemclean" : "install-so"}
|
|
149
149
|
|
|
150
150
|
all: #{$extout ? "install" : "$(DLLIB)"}
|
|
151
151
|
MAKE
|
|
@@ -250,6 +250,9 @@ module RbSys
|
|
|
250
250
|
end
|
|
251
251
|
|
|
252
252
|
def optional_rust_toolchain(builder)
|
|
253
|
+
rustup_default_cmd = "$(Q) $(CARGO_HOME)/bin/rustup default $(RB_SYS_DEFAULT_TOOLCHAIN)"
|
|
254
|
+
rustup_toolchain_cmd = "$(Q) $(CARGO_HOME)/bin/rustup toolchain install $(RB_SYS_DEFAULT_TOOLCHAIN) --profile $(RB_SYS_RUSTUP_PROFILE)"
|
|
255
|
+
|
|
253
256
|
<<~MAKE
|
|
254
257
|
#{conditional_assign("RB_SYS_FORCE_INSTALL_RUST_TOOLCHAIN", force_install_rust_toolchain?(builder))}
|
|
255
258
|
|
|
@@ -260,8 +263,8 @@ module RbSys
|
|
|
260
263
|
$(CARGO):
|
|
261
264
|
\t$(Q) $(MAKEDIRS) $(CARGO_HOME) $(RUSTUP_HOME)
|
|
262
265
|
\t$(Q) curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --no-modify-path --profile $(RB_SYS_RUSTUP_PROFILE) --default-toolchain none -y
|
|
263
|
-
\t
|
|
264
|
-
\t
|
|
266
|
+
\t#{rustup_toolchain_cmd} || (sleep 5; #{rustup_toolchain_cmd}) || (sleep 5; #{rustup_toolchain_cmd})
|
|
267
|
+
\t#{rustup_default_cmd} || (sleep 5; #{rustup_default_cmd}) || (sleep 5; #{rustup_default_cmd})
|
|
265
268
|
#{install_extra_rustup_targets(builder)}
|
|
266
269
|
|
|
267
270
|
$(RUSTLIB): $(CARGO)
|
|
@@ -283,9 +286,18 @@ module RbSys
|
|
|
283
286
|
end
|
|
284
287
|
|
|
285
288
|
def fixup_libnames
|
|
286
|
-
|
|
289
|
+
# Try to find install_name_tool, checking multiple possible names:
|
|
290
|
+
# 1. Native macOS install_name_tool
|
|
291
|
+
# 2. Target-prefixed version from osxcross (e.g., aarch64-apple-darwin-install_name_tool)
|
|
292
|
+
tool = if find_executable("install_name_tool")
|
|
293
|
+
"install_name_tool"
|
|
294
|
+
elsif find_executable("$(CARGO_BUILD_TARGET)-install_name_tool")
|
|
295
|
+
"$(CARGO_BUILD_TARGET)-install_name_tool"
|
|
296
|
+
else
|
|
297
|
+
return
|
|
298
|
+
end
|
|
287
299
|
|
|
288
|
-
|
|
300
|
+
%($(Q) #{tool} -id "" $(DLLIB))
|
|
289
301
|
end
|
|
290
302
|
|
|
291
303
|
def if_eq_stmt(a, b)
|
|
@@ -326,7 +338,7 @@ module RbSys
|
|
|
326
338
|
result << export_env(a, b) if export
|
|
327
339
|
result
|
|
328
340
|
else
|
|
329
|
-
"#{"\t" * indent}#{
|
|
341
|
+
"#{"\t" * indent}#{"export " if export}#{a} ?= #{b}"
|
|
330
342
|
end
|
|
331
343
|
end
|
|
332
344
|
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
module RbSys
|
|
6
6
|
class ToolchainInfo
|
|
7
7
|
# @private
|
|
8
|
-
DATA = {"arm-linux" => {"rust-target" => "arm-unknown-linux-gnueabihf", "rake-compiler-dock" => {"cc" => "arm-linux-gnueabihf-gcc"}, "docker-platform" => "linux/arm/v7", "supported" => true}, "aarch64-linux" => {"aliases" => ["aarch64-linux-gnu", "aarch64-unknown-linux-gnu"], "rust-target" => "aarch64-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "aarch64-linux-gnu-gcc"}, "docker-platform" => "linux/arm64/v8", "supported" => true}, "aarch64-linux-musl" => {"rust-target" => "aarch64-unknown-linux-musl", "rake-compiler-dock" => {"cc" => "aarch64-linux-musl-gcc"}, "docker-platform" => "linux/arm64/v8", "supported" => true}, "arm64-darwin" => {"rust-target" => "aarch64-apple-darwin", "rake-compiler-dock" => {"cc" => "aarch64-apple-darwin-clang"}, "docker-platform" => "linux/arm64/v8", "supported" => true}, "x64-mingw-ucrt" => {"rust-target" => "x86_64-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "x86_64-windows-gnu-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}, "x64-mingw32" => {"rust-target" => "x86_64-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "x86_64-windows-gnu-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}, "x86-linux" => {"rust-target" => "i686-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "i686-redhat-linux-gcc"}, "docker-platform" => "linux/i386", "supported" => false}, "x86-mingw32" => {"rust-target" => "i686-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "i686-w64-mingw32-gcc"}, "docker-platform" => "linux/i386", "supported" => false}, "x86_64-darwin" => {"rust-target" => "x86_64-apple-darwin", "rake-compiler-dock" => {"cc" => "x86_64-apple-darwin-clang"}, "docker-platform" => "linux/amd64", "supported" => true}, "x86_64-linux" => {"aliases" => ["x86_64-linux-gnu", "x86_64-unknown-linux-gnu"], "rust-target" => "x86_64-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "x86_64-redhat-linux-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}, "x86_64-linux-musl" => {"rust-target" => "x86_64-unknown-linux-musl", "rake-compiler-dock" => {"cc" => "x86_64-unknown-linux-musl-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}}
|
|
8
|
+
DATA = {"arm-linux" => {"rust-target" => "arm-unknown-linux-gnueabihf", "rake-compiler-dock" => {"cc" => "arm-linux-gnueabihf-gcc"}, "docker-platform" => "linux/arm/v7", "supported" => true}, "aarch64-linux" => {"aliases" => ["aarch64-linux-gnu", "aarch64-unknown-linux-gnu"], "rust-target" => "aarch64-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "aarch64-linux-gnu-gcc"}, "docker-platform" => "linux/arm64/v8", "supported" => true}, "aarch64-linux-musl" => {"rust-target" => "aarch64-unknown-linux-musl", "rake-compiler-dock" => {"cc" => "aarch64-linux-musl-gcc"}, "docker-platform" => "linux/arm64/v8", "supported" => true}, "arm64-darwin" => {"rust-target" => "aarch64-apple-darwin", "rake-compiler-dock" => {"cc" => "aarch64-apple-darwin-clang"}, "docker-platform" => "linux/arm64/v8", "supported" => true}, "x64-mingw-ucrt" => {"rust-target" => "x86_64-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "x86_64-windows-gnu-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}, "aarch64-mingw-ucrt" => {"rust-target" => "aarch64-pc-windows-gnullvm", "rake-compiler-dock" => {"cc" => "aarch64-w64-mingw32-clang"}, "docker-platform" => "linux/amd64", "supported" => true}, "x64-mingw32" => {"rust-target" => "x86_64-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "x86_64-windows-gnu-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}, "x86-linux" => {"rust-target" => "i686-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "i686-redhat-linux-gcc"}, "docker-platform" => "linux/i386", "supported" => false}, "x86-mingw32" => {"rust-target" => "i686-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "i686-w64-mingw32-gcc"}, "docker-platform" => "linux/i386", "supported" => false}, "x86_64-darwin" => {"rust-target" => "x86_64-apple-darwin", "rake-compiler-dock" => {"cc" => "x86_64-apple-darwin-clang"}, "docker-platform" => "linux/amd64", "supported" => true}, "x86_64-linux" => {"aliases" => ["x86_64-linux-gnu", "x86_64-unknown-linux-gnu"], "rust-target" => "x86_64-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "x86_64-redhat-linux-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}, "x86_64-linux-musl" => {"rust-target" => "x86_64-unknown-linux-musl", "rake-compiler-dock" => {"cc" => "x86_64-unknown-linux-musl-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}}
|
|
9
9
|
end
|
|
10
10
|
end
|
data/lib/rb_sys/version.rb
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rb_sys
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.124
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ian Ker-Seymer
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain:
|
|
11
10
|
- |
|
|
12
11
|
-----BEGIN CERTIFICATE-----
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
12
|
+
MIIDZTCCAk2gAwIBAgIUBA3+R8/tEu+w03IWit3NPqhAv5EwDQYJKoZIhvcNAQEL
|
|
13
|
+
BQAwQjEUMBIGA1UEAwwLaS5rZXJzZXltZXIxFTATBgoJkiaJk/IsZAEZFgVnbWFp
|
|
14
|
+
bDETMBEGCgmSJomT8ixkARkWA2NvbTAeFw0yNTA1MDcxOTA3NDNaFw0zNTA1MDUx
|
|
15
|
+
OTA3NDNaMEIxFDASBgNVBAMMC2kua2Vyc2V5bWVyMRUwEwYKCZImiZPyLGQBGRYF
|
|
16
|
+
Z21haWwxEzARBgoJkiaJk/IsZAEZFgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB
|
|
17
|
+
DwAwggEKAoIBAQDCdqRvnq+HDz2rMbDCCi/f7Ziy+IIfNBDLhd0gktKmaIfjqPHZ
|
|
18
|
+
L0WMVvDV3cBCHKd3AjYBPuRviUwjDlRfEteZ9WdT+8cV4l8WvwSKHyim7WrVUZ4J
|
|
19
|
+
teLkf+qY3ZLy16pa1nUue2zcL+y7ac2FXwx37Jf6kVmhIuI6tNDzQkUlo3L2vLXq
|
|
20
|
+
rMIwYPCpcBrcsoKXsz21Ulj/GL81mZlRe36kQV1O/AIdPqTTobJQVw07yN8SXTeI
|
|
21
|
+
UNx+6y46Q/6sSlqv/KPkL8enF3TWd7oB/z69wQLKreCRS14p/QCuzzvRgzB+SVya
|
|
22
|
+
1G/oQLdlTSGaqc/VZSgOgQNIzXlhnmvsgmZBAgMBAAGjUzBRMB0GA1UdDgQWBBTp
|
|
23
|
+
KxeobKHGiDDo0fytyQc8lwiyTzAfBgNVHSMEGDAWgBTpKxeobKHGiDDo0fytyQc8
|
|
24
|
+
lwiyTzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAhKxsiI5Xz
|
|
25
|
+
H3isxJy4pD1FZ6rrU0gg/kFkWlsYgrw/Cqt53Nj6ValhpbA/VoftE80xEHfv4qR0
|
|
26
|
+
eiBkYVyULXZbojF9qRokVTXDY6lWzHdesbSt314IBBJR55aTw4IPHGikhMNeZ3M1
|
|
27
|
+
ffINONWhsL+ZwMaiLedThkRkPNzCvvRSNZiQXsdl/xV55JWqmmgfONCafx6/L8cI
|
|
28
|
+
EZEISe0Z9uvVtO6G+mfX6nfGGVjJg6B53wSXaipDGxOh0vn1YiQzPxY+8ouXmfj6
|
|
29
|
+
C/k2s4tlFwg7XEtz7wjSnVeiNP9EOK50WgVr4muWx1rhvOFhpxypONCCANJUILGk
|
|
30
|
+
1JUZhXwcbcst
|
|
31
31
|
-----END CERTIFICATE-----
|
|
32
|
-
date:
|
|
32
|
+
date: 1980-01-01 00:00:00.000000000 Z
|
|
33
33
|
dependencies:
|
|
34
34
|
- !ruby/object:Gem::Dependency
|
|
35
35
|
name: rake-compiler-dock
|
|
@@ -37,15 +37,14 @@ dependencies:
|
|
|
37
37
|
requirements:
|
|
38
38
|
- - '='
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 1.
|
|
40
|
+
version: 1.11.0
|
|
41
41
|
type: :runtime
|
|
42
42
|
prerelease: false
|
|
43
43
|
version_requirements: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - '='
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 1.
|
|
48
|
-
description:
|
|
47
|
+
version: 1.11.0
|
|
49
48
|
email:
|
|
50
49
|
- i.kerseymer@gmail.com
|
|
51
50
|
executables:
|
|
@@ -80,7 +79,6 @@ metadata:
|
|
|
80
79
|
homepage_uri: https://oxidize-rb.github.io/rb-sys/
|
|
81
80
|
source_code_uri: https://github.com/oxidize-rb/rb-sys
|
|
82
81
|
rubygems_mfa_required: 'true'
|
|
83
|
-
post_install_message:
|
|
84
82
|
rdoc_options: []
|
|
85
83
|
require_paths:
|
|
86
84
|
- lib
|
|
@@ -88,15 +86,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
88
86
|
requirements:
|
|
89
87
|
- - ">="
|
|
90
88
|
- !ruby/object:Gem::Version
|
|
91
|
-
version: 2.
|
|
89
|
+
version: 2.7.0
|
|
92
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
91
|
requirements:
|
|
94
92
|
- - ">="
|
|
95
93
|
- !ruby/object:Gem::Version
|
|
96
94
|
version: '0'
|
|
97
95
|
requirements: []
|
|
98
|
-
rubygems_version:
|
|
99
|
-
signing_key:
|
|
96
|
+
rubygems_version: 4.0.3
|
|
100
97
|
specification_version: 4
|
|
101
98
|
summary: Helpers for compiling Rust extensions for ruby
|
|
102
99
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|