tree: ac8e1f2cefbb701192862c2d1df8e1ac1f533f8f [path history] [tgz]
  1. BUILD.gn
  2. README.md
  3. bindgen/
  4. example/
  5. wasm_bindings.gni
src/diagnostics/wasm/README.md

Diagnostics WASM

Diagnostics WASM is a set of build rules and libraries to build rustc_library targets as .wasm libraries, with generated bindings.

WARNING: These build templates are for use only under //src/diagnostics. All other uses are unsupported and may break without warning.

Building

This project can be added to builds by including --with //src/diagnostics/wasm to the fx set invocation.

Using

Diagnostics WASM can be used by using the following import in BUILD.gn:

import("//src/diagnostics/wasm/rustc_wasm.gni")

For an example, see //src/diagnostics/wasm/example.

Diagnostics WASM is not available in the SDK.

Source layout

The main .gni and helpers for the build rule exist in this top-level directory.

Our in-tree implementation of the wasm-bindgen CLI is under “bindgen.”

The example library exists under “example.”