Skip to content

Commit c389525

Browse files
authored
Merge pull request #7 from Nightforge/blake3-1.7
blake3 v1.8.1
2 parents 4143cd0 + 8177ea5 commit c389525

8 files changed

Lines changed: 100 additions & 90 deletions

File tree

.github/workflows/main.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ jobs:
1414
strategy:
1515
matrix:
1616
ruby:
17-
- '3.0'
18-
- '3.1'
19-
- '3.2'
20-
- '3.3'
17+
- "3.1"
18+
- "3.2"
19+
- "3.3"
20+
- "3.4"
2121

2222
steps:
23-
- uses: actions/checkout@v3
24-
- name: Set up Ruby & Rust
25-
uses: oxidize-rb/actions/setup-ruby-and-rust@main
26-
with:
27-
ruby-version: ${{ matrix.ruby }}
28-
bundler-cache: true
29-
cargo-cache: true
30-
rubygems: '3.4.7'
31-
- name: Run the default task
32-
run: bundle exec rake
23+
- uses: actions/checkout@v3
24+
- name: Set up Ruby & Rust
25+
uses: oxidize-rb/actions/setup-ruby-and-rust@main
26+
with:
27+
ruby-version: ${{ matrix.ruby }}
28+
bundler-cache: true
29+
cargo-cache: true
30+
rubygems: "3.6.2"
31+
- name: Run the default task
32+
run: bundle exec rake

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require:
44

55
AllCops:
66
NewCops: enable
7-
TargetRubyVersion: 3.0
7+
TargetRubyVersion: 3.1
88

99
Style/StringLiterals:
1010
Enabled: true

Cargo.lock

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gemfile.lock

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,67 @@
11
PATH
22
remote: .
33
specs:
4-
blake3ruby (0.2.4)
4+
blake3ruby (0.3.0)
55

66
GEM
77
remote: https://rubygems.org/
88
specs:
9-
ast (2.4.2)
10-
diff-lcs (1.5.1)
11-
json (2.7.2)
12-
language_server-protocol (3.17.0.3)
9+
ast (2.4.3)
10+
diff-lcs (1.6.1)
11+
json (2.10.2)
12+
language_server-protocol (3.17.0.4)
13+
lint_roller (1.1.0)
1314
parallel (1.26.3)
14-
parser (3.3.5.0)
15+
parser (3.3.7.4)
1516
ast (~> 2.4.1)
1617
racc
18+
prism (1.4.0)
1719
racc (1.8.1)
1820
rainbow (3.1.1)
1921
rake (13.2.1)
20-
rake-compiler (1.2.8)
22+
rake-compiler (1.3.0)
2123
rake
22-
rb_sys (0.9.102)
23-
regexp_parser (2.9.2)
24+
rake-compiler-dock (1.9.1)
25+
rb_sys (0.9.111)
26+
rake-compiler-dock (= 1.9.1)
27+
regexp_parser (2.10.0)
2428
rspec (3.13.0)
2529
rspec-core (~> 3.13.0)
2630
rspec-expectations (~> 3.13.0)
2731
rspec-mocks (~> 3.13.0)
28-
rspec-core (3.13.1)
32+
rspec-core (3.13.3)
2933
rspec-support (~> 3.13.0)
3034
rspec-expectations (3.13.3)
3135
diff-lcs (>= 1.2.0, < 2.0)
3236
rspec-support (~> 3.13.0)
3337
rspec-mocks (3.13.2)
3438
diff-lcs (>= 1.2.0, < 2.0)
3539
rspec-support (~> 3.13.0)
36-
rspec-support (3.13.1)
37-
rubocop (1.66.1)
40+
rspec-support (3.13.2)
41+
rubocop (1.75.2)
3842
json (~> 2.3)
39-
language_server-protocol (>= 3.17.0)
43+
language_server-protocol (~> 3.17.0.2)
44+
lint_roller (~> 1.1.0)
4045
parallel (~> 1.10)
4146
parser (>= 3.3.0.2)
4247
rainbow (>= 2.2.2, < 4.0)
43-
regexp_parser (>= 2.4, < 3.0)
44-
rubocop-ast (>= 1.32.2, < 2.0)
48+
regexp_parser (>= 2.9.3, < 3.0)
49+
rubocop-ast (>= 1.44.0, < 2.0)
4550
ruby-progressbar (~> 1.7)
46-
unicode-display_width (>= 2.4.0, < 3.0)
47-
rubocop-ast (1.32.3)
48-
parser (>= 3.3.1.0)
49-
rubocop-rake (0.6.0)
50-
rubocop (~> 1.0)
51-
rubocop-rspec (3.1.0)
52-
rubocop (~> 1.61)
51+
unicode-display_width (>= 2.4.0, < 4.0)
52+
rubocop-ast (1.44.1)
53+
parser (>= 3.3.7.2)
54+
prism (~> 1.4)
55+
rubocop-rake (0.7.1)
56+
lint_roller (~> 1.1)
57+
rubocop (>= 1.72.1)
58+
rubocop-rspec (3.5.0)
59+
lint_roller (~> 1.1)
60+
rubocop (~> 1.72, >= 1.72.1)
5361
ruby-progressbar (1.13.0)
54-
unicode-display_width (2.6.0)
62+
unicode-display_width (3.1.4)
63+
unicode-emoji (~> 4.0, >= 4.0.4)
64+
unicode-emoji (4.0.4)
5565

5666
PLATFORMS
5767
aarch64-linux
@@ -74,4 +84,4 @@ DEPENDENCIES
7484
rubocop-rspec
7585

7686
BUNDLED WITH
77-
2.5.20
87+
2.6.7

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
This is a Ruby wrapper for the [BLAKE3](https://github.com/BLAKE3-team/BLAKE3) hash function written in Rust.
66

77
## Requirements
8-
Tested on Ruby 3.1, 3.2 and 3.3.
8+
Tested on Ruby 3.1, 3.2, 3.3 and 3.4.
99
You will need to have Rust installed on your system, and the `cargo` command available in your path.
1010
See [here](https://www.rust-lang.org/tools/install) for instructions on how to install Rust.
1111
Rust is only required to build the gem, not to use it.
@@ -72,7 +72,7 @@ In versions 0.1.0 and 0.1.1, the Blake3ruby namespace was available. Starting fr
7272
The performance of this gem is comparable to the performance of the [blake3](https://github.com/BLAKE3-team/BLAKE3)
7373
crate, which is written in Rust.
7474

75-
The following benchmark was run on a 2015 MacBook Pro with a 2.5 GHz 4-Core Intel Core i7 processor and 16 GB of RAM.
75+
The following benchmark was run on a 2015 MacBook Pro with a 2.5 GHz 4-Core Intel Core i7 processor and 16 GB of RAM.
7676
```
7777
MD5 (13 chars): 6.141045 0.086745 6.227790 ( 6.263524)
7878
SHA1 (13 chars): 6.230957 0.080145 6.311102 ( 6.333384)
@@ -123,16 +123,16 @@ Fastest: blake3 with 8.499842999968678 seconds
123123
Slowest: RMD160 with 24.535302000120282 seconds
124124
```
125125

126-
Another benchmark was run on a 2022 MacBook Pro with a Apple M1 processor and 16 GB of RAM.
126+
Another benchmark was run on a 2022 MacBook Pro with a Apple M1 processor and 16 GB of RAM.
127127
```
128-
user system total real
129-
MD5: 4.080778 0.029457 4.110235 ( 4.388991)
130-
SHA1: 3.736124 0.030763 3.766887 ( 3.991860)
131-
SHA3-256: 3.511138 0.036125 3.547263 ( 3.664061)
132-
SHA3-384: 4.009041 0.085845 4.094886 ( 4.094987)
133-
SHA3-512: 4.078389 0.071463 4.149852 ( 4.149982)
134-
RMD160: 2.965860 0.026660 2.992520 ( 3.216815)
135-
blake3: 1.715370 0.004587 1.719957 ( 1.719995)
128+
user system total real
129+
MD5 (13 chars): 4.055481 0.041212 4.096693 ( 4.097044)
130+
SHA1 (13 chars): 3.862285 0.050686 3.912971 ( 3.928102)
131+
SHA3-256 (13 chars): 2.293100 0.052982 2.346082 ( 2.346571)
132+
SHA3-384 (13 chars): 2.767608 0.079975 2.847583 ( 2.847594)
133+
SHA3-512 (13 chars): 2.792520 0.070482 2.863002 ( 2.862991)
134+
RMD160 (13 chars): 2.842812 0.036370 2.879182 ( 3.097712)
135+
blake3 (13 chars): 1.208742 0.004124 1.212866 ( 1.212986)
136136
```
137137

138138
In both cases, the `blake3ruby` gem was about 2.5 times faster than the md5, sha1, sha3-256, sha3-384, sha3-512, and rmd160 digest algorithms.

blake3ruby.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
1111
spec.summary = "Ruby bindings for the blake3 hash function"
1212
spec.description = "Ruby bindings for the blake3 hash function using the Rust implementation"
1313
spec.homepage = "https://github.com/Nightforge/blake3ruby"
14-
spec.required_ruby_version = ">= 3.0"
14+
spec.required_ruby_version = ">= 3.1"
1515
spec.required_rubygems_version = ">= 3.3.11"
1616
spec.licenses = %w[MIT Ruby]
1717

0 commit comments

Comments
 (0)