Skip to content

How to add additional imports? #174

Open
@Vithanco

Description

@Vithanco

I think I miss an introduction. I have a non-standard import in an emscripten created WASM

(import "env" "__syscall_faccessat" (func $env.__syscall_faccessat (type $t7)))
with t7 being
(type $t7 (func (param i32 i32 i32 i32) (result i32)))

How would I add an implementation for this to my setup?

let wasi = try WASIBridgeToHost()
let engine = Engine()
let store = Store(engine: engine)
var imports = Imports()
//add the missing import here
wasi.link(to: &imports, store: store)
let instance = try module.instantiate(store: store, imports: imports) 

Relevant types seem to have only private init functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions