Skip to content
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

wasm-compose: implement a component composition tool. #691

Merged
merged 14 commits into from
Aug 5, 2022

Commits on Jul 29, 2022

  1. wasmparser: allow subtype checks across type collections.

    This commit refactors the subtype checks in the validator type information to
    support comparing types from different type lists.
    
    This will allow tools to validate different components and be able to easily
    perform subtype checks from the disjoint type lists.
    peterhuene committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    d33ce84 View commit details
    Browse the repository at this point in the history
  2. wasmparser: expose exports method from validation instance types.

    This commit exposes the `exports` utility method from the validation instance
    types.
    peterhuene committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    d5fe238 View commit details
    Browse the repository at this point in the history
  3. wasmparser: extend validator type information.

    This commit extends the validator type information to include getting the
    entity types for imports and exports.
    peterhuene committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    839d52b View commit details
    Browse the repository at this point in the history
  4. wasmprinter: implement aliases to type exports.

    This commit implements printing components that alias type exports from
    component instances.
    peterhuene committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    339ff01 View commit details
    Browse the repository at this point in the history
  5. wasm-compose: implement a component composition tool.

    This commit implements `wasm-compose`, a tool for composing WebAssembly
    components from other components.
    
    Right now the tool is pretty simple: you specify a list of component imports,
    specify how they get instantiated, and which of the instances gets its exports
    exported from the composed component.
    
    `wasm-compose` operates directly on WebAssembly components and has no
    dependencies on `wit` or `wit-bindgen`.
    peterhuene committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    688edb7 View commit details
    Browse the repository at this point in the history
  6. wasm-compose: normalize path separator in test baselines.

    This commit normalizes the path separator for error baselines in the tests for
    `wasm-compose`.
    
    It also normalizes a platform-specific error message.
    peterhuene committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    2a2fd90 View commit details
    Browse the repository at this point in the history
  7. Remove wasm-compose binary in favor of wasm-tools compose.

    This commit removes the `wasm-compose` standalone binary and moves its
    functionality to the `wasm-tools compose` subcommand.
    
    It also updates the example README to use `wasm-tools compose`.
    peterhuene committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    c5853f9 View commit details
    Browse the repository at this point in the history
  8. Improve error messages.

    This tweaked a bunch of the error messages and made missing/incompatible
    exports for instances a little clearer.
    peterhuene committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    d3d2213 View commit details
    Browse the repository at this point in the history
  9. Redesign the composition configuration format.

    This commit changes how the composition configuration format is defined.
    
    It replaces `imports` with `components` and makes embedding components the
    default.
    
    The simplified format will hopefully make more sense.
    
    In addition, the explainer for the configuration file format has been split out
    from `README.md` into `CONFIG.md`.
    peterhuene committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    b5b03b3 View commit details
    Browse the repository at this point in the history
  10. wasm-compose: use YAML as the configuration file format.

    This commit removes support for TOML as the configuration file format and just
    supports YAML.
    peterhuene committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    6b5be70 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    784a16a View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2022

  1. wasm-compose: update example component Cargo.toml formats.

    This commit updates the example component `Cargo.toml` formats for
    `wasm-compose` to include changes to the latest `cargo component`.
    peterhuene committed Aug 2, 2022
    Configuration menu
    Copy the full SHA
    c9f0b28 View commit details
    Browse the repository at this point in the history
  2. wasm-compose: update example.

    This commit replaces the example with a sillier, but slightly more complex,
    example using lists in the interfaces (hot off the presses).
    peterhuene committed Aug 2, 2022
    Configuration menu
    Copy the full SHA
    340f95d View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2022

  1. Update example to something substantive.

    This commit updates the composition demo to include a simple HTTP service that
    uses a configurable backend to talk to.
    
    The backend in the demo expects a `text/plain` body and echoes the body in the
    response.
    
    With a simple change to how the component gets composed, a middleware component
    can be inserted between the service and the backend components; it is
    responsible for gzip compressing the response from the backend.
    peterhuene committed Aug 5, 2022
    Configuration menu
    Copy the full SHA
    3283996 View commit details
    Browse the repository at this point in the history