Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/release-matrix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"supported-ruby-platforms": [
"aarch64-linux",
"aarch64-linux-musl",
"arm64-darwin",
"x64-mingw-ucrt",
"x86_64-darwin",
"x86_64-linux",
"x86_64-linux-musl"
],
"stable-ruby-versions": ["3.2", "3.3", "3.4"]
}
16 changes: 5 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,12 @@ env:
RSPEC_FORMATTER: doc

jobs:
# Test the Ruby versions pinned in `.github/release-matrix.json`, resolved the
# same way as for releases.
ci-data:
runs-on: ubuntu-latest
outputs:
result: ${{ steps.fetch.outputs.result }}
steps:
- id: fetch
uses: oxidize-rb/actions/fetch-ci-data@v1
with:
stable-ruby-versions: |
# See https://github.com/bytecodealliance/wasmtime-rb/issues/286
# for details.
exclude: [head]
uses: bytecodealliance/wasmtime-rb/.github/workflows/native-gem-matrix.yml@main

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This depends on #657

with:
snapshot: true

ci:
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion ext/src/ruby_api/component/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ pub(crate) fn rb_to_component_val(
let payload_val = match (&case.ty, payload_rb.is_nil()) {
(Some(ty), _) => rb_to_component_val(payload_rb, _store, ty)
.map(|val| Some(Box::new(val)))
.map_err(|e| e.append(format!(" (variant value for \"{}\")", &name))),
.map_err(|e| e.append(format!(" (variant value for \"{}\")", name))),

// case doesn't have payload and Variant#value *is nil*
(None, true) => Ok(None),
Expand Down
2 changes: 1 addition & 1 deletion ext/src/ruby_api/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl Engine {
pub fn new(args: &[Value]) -> Result<Self, Error> {
let args = scan_args::scan_args::<(), (Option<Value>,), (), (), (), ()>(args)?;
let (config,) = args.optional;
let config = config.and_then(|v| if v.is_nil() { None } else { Some(v) });
let config = config.filter(|v| !v.is_nil());
let inner = match config {
Some(config) => {
let config = RHash::try_convert(config).and_then(hash_to_config)?;
Expand Down
5 changes: 1 addition & 4 deletions ext/src/ruby_api/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ impl Instance {
scan_args::scan_args::<(Obj<Store>, &Module), (Option<Value>,), (), (), (), ()>(args)?;
let (wrapped_store, module) = args.required;
let mut context = wrapped_store.context_mut();
let imports = args
.optional
.0
.and_then(|v| if v.is_nil() { None } else { Some(v) });
let imports = args.optional.0.filter(|v| !v.is_nil());

let imports: Vec<Extern> = match imports {
Some(arr) => {
Expand Down
Loading