-
Notifications
You must be signed in to change notification settings - Fork 11
Update wasi-stub dependencies #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
branch_hints: Box::new([]), | ||
instr_spans: None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only semantic difference. I'm assuming default values are ok. Didn't break downstream crate using it.
crates/wasi-stub/src/lib.rs
Outdated
HeapType::Func => HeapType::Func, | ||
HeapType::Extern => HeapType::Extern, | ||
HeapType::Any => HeapType::Any, | ||
HeapType::Eq => HeapType::Eq, | ||
HeapType::Struct => HeapType::Struct, | ||
HeapType::Array => HeapType::Array, | ||
HeapType::I31 => HeapType::I31, | ||
HeapType::NoFunc => HeapType::NoFunc, | ||
HeapType::NoExtern => HeapType::NoExtern, | ||
HeapType::None => HeapType::None, | ||
HeapType::Index(index) => { | ||
HeapType::Index(match index { | ||
HeapType::Concrete(index) => { | ||
HeapType::Concrete(match index { | ||
Index::Num(n, s) => Index::Num(n, s), | ||
Index::Id(id) => { | ||
Index::Id(static_id(Some(id)).unwrap()) | ||
} | ||
}) | ||
} | ||
HeapType::Abstract { shared, ty } => HeapType::Abstract { shared, ty }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now simpler because most of the matches used to erase lifetime are now under HeapType::Abstract
and are Copy
.
crates/wasi-stub/src/lib.rs
Outdated
@@ -115,7 +115,7 @@ pub fn stub_wasi_functions( | |||
println!("Stubbing function {}::{}", i.module, i.field); | |||
let typ = &types[type_index]; | |||
let ty = TypeUse::new_with_index(Index::Num(type_index as u32, typ.span)); | |||
let wast::core::TypeDef::Func(func_typ) = &typ.def else { | |||
let wast::core::TypeDef{kind: InnerTypeKind::Func(func_typ), ..} = &typ.def else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this is now more detailed.
Hi there, my programming computer is dead unfortunately so before merging i'd need a github action for automatic testing implemented, i might do it myself at some point. |
This looks really good, thanks! Please rebase this on master, and I'll merge it. |
Signed-off-by: Tin Švagelj <[email protected]>
81f8de5
to
46c1ac5
Compare
Signed-off-by: Tin Švagelj <[email protected]>
Done. Sorry for the wait. Had I known it was a 1-line change, would've done it ages ago. Just squash the fmt commit. |
Very minimal changes, just updated dependencies.
Some used structures changed a little, but the code is mostly the same.