rb_sys 0.9.26 → 0.9.29

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: aa1d831457be7a9d731caccfd3a3929ebdd58cc3a852720dc7b5f44c32dd3155
4
- data.tar.gz: b53c92b9696af7ccdc68f6d712953e615b6250cfe5d757ec2a0af27aacc23931
3
+ metadata.gz: bab041c628d45013fde21c23bcd30e142eedb30750b59b5fad7ad1985e84c502
4
+ data.tar.gz: afb2d9325894ecbabc27ec26ab6b5d03c9704d7f39ee76b781e8d8347f876717
5
5
  SHA512:
6
- metadata.gz: de28c2ee7115c7c6e9cc28ffaf05a87827141d487a9466d7f29d4ed8506e3785ba696e0557731657bc0e00fe7c79e0dec6b57a9d0526b22da32bfc2bc130603a
7
- data.tar.gz: 381023cf378a8fcaaf62983172766f2c282dc613db8af78257cf042db3383161d0c3436497f353933b507305da7e382053d2197e0cb31314cec11c1758291fcf
6
+ metadata.gz: 14419a3dd436d6b34b82126f3c82f657910b9583805c771bd760ab5c54d6df158848ed4e3ba13130cebb4eb2fdc5bd2d74eedc5d2166cadd6ddb945c019fb3f5
7
+ data.tar.gz: b667b5570a72830b21212619e9c8b55d9a74dfae3bcbcd31d8b6ff17622f44b6c75fc9a0631d206109866d184a5bf3c92c8f80dd0eb3606e68772ba28a67103c
checksums.yaml.gz.sig CHANGED
Binary file
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ # THIS FILE IS AUTO-GENERATED BY `rake data:derive`
4
+
5
+ module RbSys
6
+ class ToolchainInfo
7
+ DATA = {"arm-linux" => {"rust-target" => "arm-unknown-linux-gnueabihf", "rake-compiler-dock" => {"cc" => "arm-linux-gnueabihf-gcc"}, "supported" => true}, "aarch64-linux" => {"rust-target" => "aarch64-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "aarch64-linux-gnu-gcc"}, "supported" => true}, "arm64-darwin" => {"rust-target" => "aarch64-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "aarch64-apple-darwin-clang"}, "supported" => true}, "x64-mingw-ucrt" => {"rust-target" => "x86_64-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "x86_64-windows-gnu-gcc"}, "supported" => true}, "x64-mingw32" => {"rust-target" => "x86_64-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "x86_64-windows-gnu-gcc"}, "supported" => true}, "x86-linux" => {"rust-target" => "i686-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "i686-redhat-linux-gcc"}, "supported" => false}, "x86-mingw32" => {"rust-target" => "i686-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "i686-w64-mingw32-gcc"}, "supported" => false}, "x86_64-darwin" => {"rust-target" => "x86_64-apple-darwin", "rake-compiler-dock" => {"cc" => "x86_64-apple-darwin-clang"}, "supported" => true}, "x86_64-linux" => {"rust-target" => "x86_64-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "x86_64-redhat-linux-gcc"}, "supported" => true}}
8
+ end
9
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "toolchain_info/data"
4
+
5
+ module RbSys
6
+ class ToolchainInfo
7
+ attr_reader :platform, :gem_platform, :rust_target, :rake_compiler_dock_cc, :supported, :rake_compiler_dock_image
8
+
9
+ class << self
10
+ def all
11
+ @all ||= DATA.keys.map { |k| new(k) }
12
+ end
13
+
14
+ def local
15
+ @current ||= new(RbConfig::CONFIG["arch"])
16
+ end
17
+ end
18
+
19
+ def initialize(platform)
20
+ @platform = platform
21
+ @gem_platform = Gem::Platform.new(platform)
22
+ data = DATA[platform] || DATA["#{gem_platform.cpu}-#{gem_platform.os}"] || raise(ArgumentError, "unknown ruby platform: #{platform.inspect}")
23
+ @rust_target = data["rust-target"]
24
+ @rake_compiler_dock_cc = data["rake-compiler-dock"]["cc"]
25
+ @supported = data["supported"]
26
+ @rake_compiler_dock_image = "rbsys/#{platform}:#{RbSys::VERSION}"
27
+ end
28
+
29
+ def supported?
30
+ @supported
31
+ end
32
+
33
+ def to_s
34
+ "#{gem_platform.cpu}-#{gem_platform.os}"
35
+ end
36
+
37
+ def ==(other)
38
+ @gem_platform == other.gem_platform
39
+ end
40
+ end
41
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RbSys
4
- VERSION = "0.9.26"
4
+ VERSION = "0.9.29"
5
5
  end
data/lib/rb_sys.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "rb_sys/version"
4
+ require_relative "rb_sys/toolchain_info"
4
5
 
5
6
  module RbSys
6
7
  class Error < StandardError; end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb_sys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.26
4
+ version: 0.9.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Ker-Seymer
@@ -30,7 +30,7 @@ cert_chain:
30
30
  Rl+ASkq2/1i07TkBpCf+2hq66+h/hx+/Y/KrUzXfe0jtvil0WESkJT2kqRqHWNhD
31
31
  9GKBxaQlXokNDtWCm1/gl6cD8WRZ0N5S4ZGJT1FLLsA=
32
32
  -----END CERTIFICATE-----
33
- date: 2022-07-23 00:00:00.000000000 Z
33
+ date: 2022-08-03 00:00:00.000000000 Z
34
34
  dependencies: []
35
35
  description:
36
36
  email:
@@ -47,6 +47,8 @@ files:
47
47
  - lib/rb_sys/cargo_builder/link_flag_converter.rb
48
48
  - lib/rb_sys/mkmf.rb
49
49
  - lib/rb_sys/mkmf/config.rb
50
+ - lib/rb_sys/toolchain_info.rb
51
+ - lib/rb_sys/toolchain_info/data.rb
50
52
  - lib/rb_sys/version.rb
51
53
  - sig/rb_sys.rbs
52
54
  homepage: https://github.com/oxidize-rb/rb-sys
metadata.gz.sig CHANGED
Binary file