Skip to content

Commit

Permalink
Merge pull request #408 from bytecodealliance/ruby-3.4
Browse files Browse the repository at this point in the history
Ruby 3.4 update
  • Loading branch information
jbourassa authored Jan 10, 2025
2 parents 60d5af6 + 3fb6780 commit e5270ae
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
with:
ruby-version: "3.3"
ruby-version: "3.4"
rustup-toolchain: "${{ env.NIGHTLY_VERSION }}"
bundler-cache: true
cargo-cache: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
with:
ruby-version: "3.3"
ruby-version: "3.4"
bundler-cache: true
cargo-cache: true
cargo-vendor: true
Expand All @@ -69,7 +69,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest"]
ruby: ["3.3"]
ruby: ["3.4"]
steps:
- uses: actions/checkout@v4

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ on:
ruby-version:
description: "Ruby version to memcheck"
required: true
default: "3.3"
default: "3.4"
type: choice
options:
- "head"
- "3.4"
- "3.3"
- "3.2"
- "3.1"
Expand All @@ -37,7 +38,7 @@ jobs:

- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
with:
ruby-version: ${{ inputs.ruby-version || '3.3' }}
ruby-version: ${{ inputs.ruby-version || '3.4' }}
bundler-cache: true
cargo-cache: true
cache-version: v2
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
wasmtime (27.0.0)
rb_sys (~> 0.9.97)
rb_sys (~> 0.9.105)

GEM
remote: https://rubygems.org/
Expand All @@ -11,11 +11,11 @@ GEM
benchmark-ips (2.14.0)
bigdecimal (3.1.8)
diff-lcs (1.5.1)
ffi (1.17.0)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x64-mingw-ucrt)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
ffi (1.17.1)
ffi (1.17.1-arm64-darwin)
ffi (1.17.1-x64-mingw-ucrt)
ffi (1.17.1-x86_64-darwin)
ffi (1.17.1-x86_64-linux-gnu)
get_process_mem (1.0.0)
bigdecimal (>= 2.0)
ffi (~> 1.0)
Expand All @@ -32,7 +32,7 @@ GEM
rake (13.2.1)
rake-compiler (1.2.8)
rake
rb_sys (0.9.102)
rb_sys (0.9.106)
regexp_parser (2.9.2)
rspec (3.13.0)
rspec-core (~> 3.13.0)
Expand Down Expand Up @@ -87,6 +87,7 @@ PLATFORMS
arm64-darwin-21
arm64-darwin-22
arm64-darwin-23
arm64-darwin-24
x64-mingw-ucrt
x64-mingw32
x86_64-darwin-19
Expand Down
2 changes: 1 addition & 1 deletion examples/rust-crate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ doctest = false
wasmtime-rb = { path = "../../ext", features = ["ruby-api"] }

[dev-dependencies]
magnus = { version = "0.5.5", features = ["embed"] } # Only need embed feature for tests
magnus = { version = "0.7.1", features = ["embed"] } # Only need embed feature for tests
wasmtime-rb = { path = "../../ext", features = ["embed"] } # Only need embed feature for tests
1 change: 0 additions & 1 deletion ext/src/ruby_api/component/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ impl Linker {
free_immediately,
unsafe_generics
)]

pub struct LinkerInstance<'a> {
inner: RefCell<MaybeInstanceImpl<'a>>,
refs: RefCell<Vec<Value>>,
Expand Down
4 changes: 2 additions & 2 deletions ext/src/ruby_api/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ pub enum StoreContextValue<'a> {
Caller(Opaque<Obj<Caller<'a>>>),
}

impl<'a> From<Obj<Store>> for StoreContextValue<'a> {
impl From<Obj<Store>> for StoreContextValue<'_> {
fn from(store: Obj<Store>) -> Self {
StoreContextValue::Store(store.into())
}
Expand All @@ -274,7 +274,7 @@ impl<'a> From<Obj<Caller<'a>>> for StoreContextValue<'a> {
}
}

impl<'a> StoreContextValue<'a> {
impl StoreContextValue<'_> {
pub fn mark(&self, marker: &Marker) {
match self {
Self::Store(store) => marker.mark(*store),
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/component/convert_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def call_func(name, *args)
["variant", Variant.new("no"), /invalid variant case "no", valid cases: \["all", "none", "lt"\]/],
["variant", Variant.new("lt", "nah"), /(variant value for "lt")/],
["enum", "no", /enum variant name `no` is not valid/],
["result", nil, /undefined method `ok\?/],
["result", nil, /undefined method [`']ok\?/], # [`']: various ruby version
["result-unit", Result.ok(""), /expected nil for result<_, E> ok branch/],
["result-unit", Result.error(""), /expected nil for result<O, _> error branch/],
["flags", ["no"], /unknown flag: `no`/],
Expand Down
2 changes: 1 addition & 1 deletion wasmtime.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ Gem::Specification.new do |spec|

spec.rdoc_options += ["--exclude", "vendor"]

spec.add_dependency "rb_sys", "~> 0.9.97"
spec.add_dependency "rb_sys", "~> 0.9.105"
end

0 comments on commit e5270ae

Please sign in to comment.