-
Notifications
You must be signed in to change notification settings - Fork 30
Update wasm related dependencies #102
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
Changes from 1 commit
75804bb
36db195
1b5399a
0c3264d
2801483
9cf3f20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ use { | |
| std::borrow::Cow, | ||
| wasm_encoder::{ | ||
| CodeSection, ConstExpr, CustomSection, ElementSection, Elements, Encode, EntityType, | ||
| ExportKind, ExportSection, Function, FunctionSection, GlobalType, HeapType, ImportSection, | ||
| ExportKind, ExportSection, Function, FunctionSection, GlobalType, ImportSection, | ||
| Instruction as Ins, MemoryType, Module, RefType, TableType, TypeSection, ValType, | ||
| }, | ||
| wit_component::metadata, | ||
|
|
@@ -112,6 +112,7 @@ pub fn make_bindings( | |
| EntityType::Global(GlobalType { | ||
| val_type: ValType::I32, | ||
| mutable: false, | ||
| shared: false, | ||
| }), | ||
| ); | ||
| global_names.push((table_base, "__table_base".to_owned())); | ||
|
|
@@ -123,6 +124,7 @@ pub fn make_bindings( | |
| EntityType::Global(GlobalType { | ||
| val_type: ValType::I32, | ||
| mutable: true, | ||
| shared: false, | ||
| }), | ||
| ); | ||
| global_names.push((stack_pointer, "__stack_pointer".to_owned())); | ||
|
|
@@ -135,17 +137,15 @@ pub fn make_bindings( | |
| maximum: None, | ||
| memory64: false, | ||
| shared: false, | ||
| page_size_log2: None, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. I assumed the default There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, we have no use for non-default page sizes at this point. That's primarily meant for embedded systems. |
||
| }), | ||
| ); | ||
|
|
||
| imports.import( | ||
| "env", | ||
| "__indirect_function_table", | ||
| EntityType::Table(TableType { | ||
| element_type: RefType { | ||
| nullable: true, | ||
| heap_type: HeapType::Func, | ||
| }, | ||
| element_type: RefType::FUNCREF, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seemed that this constant was a convenience wrapper around the same thing, but I could be wrong |
||
| minimum: summary | ||
| .functions | ||
| .iter() | ||
|
|
@@ -154,6 +154,7 @@ pub fn make_bindings( | |
| .try_into() | ||
| .unwrap(), | ||
| maximum: None, | ||
| table64: false, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Followed the doc example here as well |
||
| }), | ||
| ); | ||
|
|
||
|
|
||
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.
The docs all had this as
false, but I don't know what the correct value should be.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.
falseis correct in this context.truewould mean the global can be accessed from more than one thread, but WASIp2 and the component model are strictly single threaded for the time being.