Skip to content

Add support for serializing Config #12301

@gpace1

Description

@gpace1

Feature

Add serialization or some other form of line-wire data type to support transferring wasmtime::Config between devices.

Benefit

(Unless I'm misunderstanding something) In order to cross precompile right now, the wasmtime engine must know the target's configuration of its wasmtime Engine. By providing serialization to Config the compiling device can query the target for their Config and create an Engine using what it received.

In a simple scenario:

  • Device A is the compiler
  • Device B is the target
  1. A and B connect but otherwise A knows nothing about B except that it's has wasmtime
  2. B sends its configuration to A
  3. A creates an Engine from B's config and precompiles a component for B
  4. A sends the precompiled component to B

Without step 2 device A wouldn't know how to configure it's Engine for B. Even when knowing the target for B it seems it still wouldn't fully be aware of everything (not) supported by B (e.g. GC).

Implementation

The simplest would be to derive serde for Config and all inner types.

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