hello_rusty_world 0.1.0-x64-mingw-ucrt
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 +7 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +10 -0
- data/LICENSE.txt +21 -0
- data/README.md +110 -0
- data/Rakefile +54 -0
- data/lib/hello_rusty_world/3.4/hello_rusty_world.so +0 -0
- data/lib/hello_rusty_world/4.0/hello_rusty_world.so +0 -0
- data/lib/hello_rusty_world/version.rb +5 -0
- data/lib/hello_rusty_world.rb +9 -0
- data/sig/hello_rusty_world.rbs +4 -0
- metadata +59 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 86e4dd2ff6014cef9ff61fca3a73566fbd647d78d50326742dae195e2b8da2ba
|
|
4
|
+
data.tar.gz: 9e37355f250fc329168ab7a047c94c1b2043f59be82df6eef91b8ad1fd9b47cc
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: f283c49e745765d0258d2c5f0f64540b544c3aecb7c3c819b67cb1dc2e1ad3c34bf8382e999ce405200444d77712c08c6dd4d1dfc388b4dd368b2ff631b71c12
|
|
7
|
+
data.tar.gz: bbd868db58f6ee2a5088f34cd6ac0a33135eac07a96461178c7104d4c17d4d2783a5636171c69609cb547cf85c2e5709cd0d7b2b129c87104132a127028de11a
|
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
"hello_rusty_world" follows [The Ruby Community Conduct Guideline](https://www.ruby-lang.org/en/conduct) in all "collaborative space", which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.):
|
|
4
|
+
|
|
5
|
+
* Participants will be tolerant of opposing views.
|
|
6
|
+
* Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
|
|
7
|
+
* When interpreting the words and actions of others, participants should always assume good intentions.
|
|
8
|
+
* Behaviour which can be reasonably considered harassment will not be tolerated.
|
|
9
|
+
|
|
10
|
+
If you have any concerns about behaviour within this project, please contact us at ["kenneth.c.demanawa@gmail.com"](mailto:"kenneth.c.demanawa@gmail.com").
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ken C. Demanawa
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# HelloRustyWorld
|
|
2
|
+
|
|
3
|
+
HelloRustyWorld is a tiny Ruby gem with a Rust native extension.
|
|
4
|
+
|
|
5
|
+
The project goal is to make native gem development stupidly boring for two
|
|
6
|
+
groups:
|
|
7
|
+
|
|
8
|
+
- Contributors get one setup command, one local check command, and one explicit
|
|
9
|
+
cross-compilation check that leaves native gems in `pkg/`.
|
|
10
|
+
- Gem consumers get normal RubyGems installs backed by precompiled native gems,
|
|
11
|
+
so they should not need Rust, Cargo, or a compiler for supported platforms.
|
|
12
|
+
|
|
13
|
+
The Ruby surface lives in `lib/hello_rusty_world`. The Rust extension lives in
|
|
14
|
+
`ext/hello_rusty_world`.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
|
19
|
+
|
|
20
|
+
Install the gem and add to the application's Gemfile by executing:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```ruby
|
|
35
|
+
require "hello_rusty_world"
|
|
36
|
+
|
|
37
|
+
HelloRustyWorld.hello("world")
|
|
38
|
+
#=> "Hello world, from Rust!"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Development
|
|
42
|
+
|
|
43
|
+
After checking out the repo, run:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
bin/setup
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
That installs Ruby dependencies and fetches Cargo dependencies.
|
|
50
|
+
|
|
51
|
+
For the normal development loop, run:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
bin/dev-check
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
This compiles the Rust extension, runs the RSpec suite, and runs RuboCop through
|
|
58
|
+
the default `rake` task.
|
|
59
|
+
|
|
60
|
+
For just the native gem package on the current platform, run:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
bin/dev-check-native
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
For the full cross-compiled native gem matrix, run:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
bin/dev-check-cross
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
That builds the source gem plus cross-compiled native gems into `pkg/`. Seeing
|
|
73
|
+
these platform gems there is the success condition for native packaging:
|
|
74
|
+
|
|
75
|
+
- `hello_rusty_world-*-x86_64-linux.gem`
|
|
76
|
+
- `hello_rusty_world-*-aarch64-linux.gem`
|
|
77
|
+
- `hello_rusty_world-*-x86_64-darwin.gem`
|
|
78
|
+
- `hello_rusty_world-*-arm64-darwin.gem`
|
|
79
|
+
- `hello_rusty_world-*-x64-mingw-ucrt.gem`
|
|
80
|
+
|
|
81
|
+
The task uses the `rake native` tasks created by `RbSys::ExtensionTask` inside
|
|
82
|
+
`rb-sys-dock`/`rake-compiler-dock` containers, so Docker is required.
|
|
83
|
+
|
|
84
|
+
You can also run the individual tasks directly:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
bundle exec rake compile
|
|
88
|
+
bundle exec rake spec
|
|
89
|
+
bundle exec rake rubocop
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The GitHub Actions release workflow builds the source gem and the native gem
|
|
93
|
+
matrix. Local development should stay focused on `bin/dev-check` unless you are
|
|
94
|
+
changing native packaging behavior.
|
|
95
|
+
|
|
96
|
+
Use `bin/console` for an interactive prompt that loads the gem.
|
|
97
|
+
|
|
98
|
+
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).
|
|
99
|
+
|
|
100
|
+
## Contributing
|
|
101
|
+
|
|
102
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello_rusty_world. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/hello_rusty_world/blob/main/CODE_OF_CONDUCT.md).
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
107
|
+
|
|
108
|
+
## Code of Conduct
|
|
109
|
+
|
|
110
|
+
Everyone interacting in the HelloRustyWorld project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/hello_rusty_world/blob/main/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
require "rubocop/rake_task"
|
|
9
|
+
|
|
10
|
+
RuboCop::RakeTask.new
|
|
11
|
+
|
|
12
|
+
require "rb_sys/extensiontask"
|
|
13
|
+
require "rake/clean"
|
|
14
|
+
|
|
15
|
+
task build: :compile
|
|
16
|
+
|
|
17
|
+
GEMSPEC = Gem::Specification.load("hello_rusty_world.gemspec")
|
|
18
|
+
RUBY_VERSION_REQUIREMENT = GEMSPEC.required_ruby_version.to_s
|
|
19
|
+
CROSS_PLATFORMS = %w[
|
|
20
|
+
x86_64-linux
|
|
21
|
+
aarch64-linux
|
|
22
|
+
x86_64-darwin
|
|
23
|
+
arm64-darwin
|
|
24
|
+
x64-mingw-ucrt
|
|
25
|
+
].freeze
|
|
26
|
+
|
|
27
|
+
RbSys::ExtensionTask.new("hello_rusty_world", GEMSPEC) do |ext|
|
|
28
|
+
ext.lib_dir = "lib/hello_rusty_world"
|
|
29
|
+
ext.cross_compile = true
|
|
30
|
+
ext.cross_platform = [ENV.fetch("RUBY_TARGET", nil)].compact
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
namespace :gem do
|
|
34
|
+
desc "Build source and cross-compiled native gems into pkg/"
|
|
35
|
+
task :native do
|
|
36
|
+
rm_rf("pkg")
|
|
37
|
+
Rake::Task["build"].invoke
|
|
38
|
+
|
|
39
|
+
CROSS_PLATFORMS.each do |platform|
|
|
40
|
+
sh(
|
|
41
|
+
"bundle",
|
|
42
|
+
"exec",
|
|
43
|
+
"rb-sys-dock",
|
|
44
|
+
"--platform",
|
|
45
|
+
platform,
|
|
46
|
+
"--ruby-versions",
|
|
47
|
+
RUBY_VERSION_REQUIREMENT,
|
|
48
|
+
"--build"
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
task default: %i[compile spec rubocop]
|
|
Binary file
|
|
Binary file
|
metadata
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: hello_rusty_world
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: x64-mingw-ucrt
|
|
6
|
+
authors:
|
|
7
|
+
- Ken C. Demanawa
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-06-03 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Write a longer description or delete this line.
|
|
14
|
+
email:
|
|
15
|
+
- kenneth.c.demanawa@gmail.com
|
|
16
|
+
executables: []
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- CHANGELOG.md
|
|
21
|
+
- CODE_OF_CONDUCT.md
|
|
22
|
+
- LICENSE.txt
|
|
23
|
+
- README.md
|
|
24
|
+
- Rakefile
|
|
25
|
+
- lib/hello_rusty_world.rb
|
|
26
|
+
- lib/hello_rusty_world/3.4/hello_rusty_world.so
|
|
27
|
+
- lib/hello_rusty_world/4.0/hello_rusty_world.so
|
|
28
|
+
- lib/hello_rusty_world/version.rb
|
|
29
|
+
- sig/hello_rusty_world.rbs
|
|
30
|
+
homepage: https://github.com/kanutocd/hello_rusty_world
|
|
31
|
+
licenses:
|
|
32
|
+
- MIT
|
|
33
|
+
metadata:
|
|
34
|
+
homepage_uri: https://github.com/kanutocd/hello_rusty_world
|
|
35
|
+
source_code_uri: https://github.com/kanutocd/hello_rusty_world
|
|
36
|
+
changelog_uri: https://github.com/kanutocd/hello_rusty_world
|
|
37
|
+
post_install_message:
|
|
38
|
+
rdoc_options: []
|
|
39
|
+
require_paths:
|
|
40
|
+
- lib
|
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
42
|
+
requirements:
|
|
43
|
+
- - ">="
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '3.4'
|
|
46
|
+
- - "<"
|
|
47
|
+
- !ruby/object:Gem::Version
|
|
48
|
+
version: 4.1.dev
|
|
49
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ">="
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '0'
|
|
54
|
+
requirements: []
|
|
55
|
+
rubygems_version: 3.5.23
|
|
56
|
+
signing_key:
|
|
57
|
+
specification_version: 4
|
|
58
|
+
summary: Write a short summary, because RubyGems requires one.
|
|
59
|
+
test_files: []
|