mirror of
https://github.com/fluencelabs/marine.git
synced 2025-07-31 14:01:59 +00:00
add ability to use IT in host imports
This commit is contained in:
@@ -26,8 +26,15 @@ use fluence_sdk_wit::ParsedType;
|
||||
use wasmer_wit::interpreter::Instruction;
|
||||
use crate::instructions_generator::utils::wtype_to_itype;
|
||||
|
||||
const HOST_NAMESPACE_NAME: &str = "host";
|
||||
|
||||
impl WITGenerator for AstExternModItem {
|
||||
fn generate_wit<'a>(&'a self, interfaces: &mut Interfaces<'a>) {
|
||||
// host imports should be left as is
|
||||
if self.namespace == HOST_NAMESPACE_NAME {
|
||||
return;
|
||||
}
|
||||
|
||||
for import in &self.imports {
|
||||
generate_wit_for_import(import, &self.namespace, interfaces);
|
||||
}
|
||||
|
Reference in New Issue
Block a user