cross-rb 0.0.1.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9a7ede044f3ed6c6d4b47cfd9d670d0b89274d28386a5d082871cf9d4a209290
4
+ data.tar.gz: bc458ea6d8b2552d09e8c1f0e4c0dea64c02fdac68e46c495f9c5f75ee7e2c1c
5
+ SHA512:
6
+ metadata.gz: 5c961b4133d1789351ce5987598988112bdb35b4ee15a12394678c05d4ffb4a2a313aebaa4615ca1c941f529ef284fab810daeea65ec19e7d63a721ab8e442ce
7
+ data.tar.gz: a2944ce21e656b1c25de82c0982481c503292448d5b1793c67e5befc32653ea211b3ffbb4098d71b47dc7d7f974cceda221acf1c91241dbfed2eebfecb47648e
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2022-11-11
4
+
5
+ - Initial release
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in cross.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
data/Gemfile.lock ADDED
@@ -0,0 +1,34 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cross-rb (0.0.1.pre)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.5.0)
10
+ rake (13.0.6)
11
+ rspec (3.12.0)
12
+ rspec-core (~> 3.12.0)
13
+ rspec-expectations (~> 3.12.0)
14
+ rspec-mocks (~> 3.12.0)
15
+ rspec-core (3.12.0)
16
+ rspec-support (~> 3.12.0)
17
+ rspec-expectations (3.12.0)
18
+ diff-lcs (>= 1.2.0, < 2.0)
19
+ rspec-support (~> 3.12.0)
20
+ rspec-mocks (3.12.0)
21
+ diff-lcs (>= 1.2.0, < 2.0)
22
+ rspec-support (~> 3.12.0)
23
+ rspec-support (3.12.0)
24
+
25
+ PLATFORMS
26
+ x86_64-linux
27
+
28
+ DEPENDENCIES
29
+ cross-rb!
30
+ rake (~> 13.0)
31
+ rspec (~> 3.0)
32
+
33
+ BUNDLED WITH
34
+ 2.3.7
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Cross
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/cross`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'cross'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install cross
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/cross.
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
data/cross.gemspec ADDED
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/cross/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "cross-rb"
7
+ spec.version = Cross::VERSION
8
+ spec.authors = ["initdc"]
9
+ spec.email = ["initd@outlook.com"]
10
+
11
+ spec.summary = "Cross-platform just need build once time!"
12
+ spec.description = "[Golang Rust Zig C] just need build once time!"
13
+ spec.homepage = "https://github.com/initdc/cross-rb"
14
+ spec.required_ruby_version = ">= 2.6.0"
15
+
16
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
17
+
18
+ spec.metadata["homepage_uri"] = spec.homepage
19
+ spec.metadata["source_code_uri"] = "https://github.com/initdc/cross-rb"
20
+ spec.metadata["changelog_uri"] = "https://github.com/initdc/cross-rb/blob/master/CHANGELOG.md"
21
+
22
+ # Specify which files should be added to the gem when it is released.
23
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
25
+ `git ls-files -z`.split("\x0").reject do |f|
26
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
27
+ end
28
+ end
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ # Uncomment to register a new dependency of your gem
34
+ # spec.add_dependency "example-gem", "~> 1.0"
35
+
36
+ # For more information and examples about making a new gem, check out our
37
+ # guide at: https://bundler.io/guides/creating_gem.html
38
+ end
data/lib/cross/args.rb ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ VERSION = "0.1.0"
5
+ end
data/lib/cross/env.rb ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ module Go
5
+ BUILD_CMD = "go build"
6
+ end
7
+ end
@@ -0,0 +1,83 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ module Go
5
+
6
+ # go tool dist list
7
+ # go version go1.19.3 linux/amd64
8
+ TARGETS = [
9
+ "aix/ppc64",
10
+ "android/386",
11
+ "android/amd64",
12
+ "android/arm",
13
+ "android/arm64",
14
+ "darwin/amd64",
15
+ "darwin/arm64",
16
+ "dragonfly/amd64",
17
+ "freebsd/386",
18
+ "freebsd/amd64",
19
+ "freebsd/arm",
20
+ "freebsd/arm64",
21
+ "illumos/amd64",
22
+ "ios/amd64",
23
+ "ios/arm64",
24
+ "js/wasm",
25
+ "linux/386",
26
+ "linux/amd64",
27
+ "linux/arm",
28
+ "linux/arm64",
29
+ "linux/loong64",
30
+ "linux/mips",
31
+ "linux/mips64",
32
+ "linux/mips64le",
33
+ "linux/mipsle",
34
+ "linux/ppc64",
35
+ "linux/ppc64le",
36
+ "linux/riscv64",
37
+ "linux/s390x",
38
+ "netbsd/386",
39
+ "netbsd/amd64",
40
+ "netbsd/arm",
41
+ "netbsd/arm64",
42
+ "openbsd/386",
43
+ "openbsd/amd64",
44
+ "openbsd/arm",
45
+ "openbsd/arm64",
46
+ "openbsd/mips64",
47
+ "plan9/386",
48
+ "plan9/amd64",
49
+ "plan9/arm",
50
+ "solaris/amd64",
51
+ "windows/386",
52
+ "windows/amd64",
53
+ "windows/arm",
54
+ "windows/arm64",
55
+ ]
56
+
57
+ ARM_VARIANT = {
58
+ "linux/arm": ["5", "6", "7"],
59
+ }
60
+
61
+ TEST_TARGETS = [
62
+ "darwin/amd64",
63
+ "darwin/arm64",
64
+ "linux/386",
65
+ "linux/amd64",
66
+ "linux/arm",
67
+ "linux/arm64",
68
+ "linux/riscv64",
69
+ "windows/386",
70
+ "windows/amd64",
71
+ "windows/arm64",
72
+ ]
73
+
74
+ LESS_TARGETS = [
75
+ "linux/amd64",
76
+ "linux/arm64",
77
+ ]
78
+
79
+ def self.get_targets
80
+ return ["linux/loong64"]
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ module Go
5
+ TEST_CMD = "go test"
6
+
7
+ CROSS_TEST = true
8
+ CROSS_TEST_DEPS = [
9
+ "qemu-user",
10
+ ]
11
+ CROSS_TEST_RUNNER = {
12
+ "386": "",
13
+ "amd64": "",
14
+ "arm": "qemu-arm",
15
+ "arm64": "qemu-aarch64",
16
+ "mips": "qemu-mips",
17
+ "mips64": "qemu-mips64",
18
+ "mips64le": "qemu-mips64el",
19
+ "mipsle": "qemu-mipsel",
20
+ "ppc64": "qemu-ppc64",
21
+ "ppc64le": "qemu-ppc64le",
22
+ "riscv64": "qemu-riscv64",
23
+ "s390x": "qemu-s390x",
24
+ }
25
+ end
26
+ end
data/lib/cross/help.rb ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ VERSION = "0.0.1.pre"
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cross
4
+ VERSION = "0.1.0"
5
+ end
data/lib/cross.rb ADDED
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "cross/version"
4
+ require_relative "cross/go/build"
5
+ require_relative "cross/go/target"
6
+ require_relative "cross/go/test"
7
+
8
+ module Cross
9
+ class Error < StandardError; end
10
+ # Your code goes here...
11
+ end
data/sig/cross.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Cross
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,71 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cross-rb
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1.pre
5
+ platform: ruby
6
+ authors:
7
+ - initdc
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-11-11 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: "[Golang Rust Zig C] just need build once time!"
14
+ email:
15
+ - initd@outlook.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".rspec"
21
+ - CHANGELOG.md
22
+ - Gemfile
23
+ - Gemfile.lock
24
+ - README.md
25
+ - Rakefile
26
+ - cross.gemspec
27
+ - lib/cross.rb
28
+ - lib/cross/args.rb
29
+ - lib/cross/c/build.rb
30
+ - lib/cross/c/target.rb
31
+ - lib/cross/c/test.rb
32
+ - lib/cross/env.rb
33
+ - lib/cross/go/build.rb
34
+ - lib/cross/go/target.rb
35
+ - lib/cross/go/test.rb
36
+ - lib/cross/help.rb
37
+ - lib/cross/rust/build.rb
38
+ - lib/cross/rust/target.rb
39
+ - lib/cross/rust/test.rb
40
+ - lib/cross/version.rb
41
+ - lib/cross/zig/build.rb
42
+ - lib/cross/zig/target.rb
43
+ - lib/cross/zig/test.rb
44
+ - sig/cross.rbs
45
+ homepage: https://github.com/initdc/cross-rb
46
+ licenses: []
47
+ metadata:
48
+ allowed_push_host: https://rubygems.org
49
+ homepage_uri: https://github.com/initdc/cross-rb
50
+ source_code_uri: https://github.com/initdc/cross-rb
51
+ changelog_uri: https://github.com/initdc/cross-rb/blob/master/CHANGELOG.md
52
+ post_install_message:
53
+ rdoc_options: []
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 2.6.0
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">"
64
+ - !ruby/object:Gem::Version
65
+ version: 1.3.1
66
+ requirements: []
67
+ rubygems_version: 3.3.7
68
+ signing_key:
69
+ specification_version: 4
70
+ summary: Cross-platform just need build once time!
71
+ test_files: []