Skip to content

Add WebAssembly as a tier-3 supported platform #14542

@evan-bradley

Description

@evan-bradley

Component(s)

No response

Is your feature request related to a problem? Please describe.

The Collector has a large feature set that makes it useful as a telemetry collection and processing utility in a variety of contexts. However, as a standard executable binary, it may not always be accessible to me in all situations I would like.

Describe the solution you'd like

WebAssembly (Wasm) is currently the best candidate for a "write once, run anywhere" technology, based on current software support. There are a number of popular standalone runtimes, it is supported by all major browsers, and a handful of languages offer libraries that embed a Wasm runtime inside a program.

Go has good support for Wasm, which extends to running the Collector as a Wasm binary when compiled with components that don't rely on standard OS syscalls: opening ports, filesystem interactions, etc. As a result, fairly minimal changes to the current Collector codebase are required to support WebAssembly output.

I would like to propose that we add WebAssembly (specifically GOOS=js) as a tier-3 platform to our documented platform support, with an eye toward tier-2 support if there is community demand.

In the near-term, this will require:

  1. Gate certain parts of the Collector that make syscalls not supported in WebAssembly behind build flags
  2. Add some basic tests in CI to verify WebAssembly support. This should be easy, as WebAssembly runtimes are available on the OSes we run on our GH Actions runners.

Go also has WASI support, which is generally used for running on WebAssembly runtimes as opposed to in the browser. This is less restrictive and easier to port to, which we can address after supporting GOOS=js.

Describe alternatives you've considered

No response

Additional context

No response

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

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