Skip to content

wasmtime: Allow Import of External Definitions #191

@theduke

Description

@theduke

Unless I'm missing something, it currently does not seem possible for one wit_bindgen_wasmtime::export/import!() macro to use definitions produced by another export!/import! macro.

My use case is allowing crates to use core definitions provided by another crate.

It could look something like:

outer.wit:

use {...} from core

...
wit_bindgen_rust::import!({
  paths: ["outer.wit"],
  external: [ "core" ],
});

This would prevent all the core definintions from core.wit to be generated, but instead expect a core Rust module to be in scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    resourcesIssues with component resources and using them

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions