mongo/bazel/toolchains/cc/mongo_wasm/README.md
Steve McClure 32e8f260de SERVER-124136 Format markdown via prettier: wrap lines and use width of 100 (#52231)
GitOrigin-RevId: 3305c1e2ee3a6a2c3a5b2b7883b0f491a59ed646
2026-04-21 19:20:11 +00:00

644 B

Usage

To use the WASI SDK apply the wasi_compatible with a select statement:

    select({
        "//bazel/toolchains/cc/wasm:wasi_compatible": [
            "//bazel/toolchains/cc/wasm/sample:dist_hello_world",
        ],
        "//conditions:default": [],
    })

If your target is defined in terms of a traditional bazel C/C++ target you can use the WASI transition in order to ensure the bazel options are WASI compatible.

load("//bazel/toolchains/cc/wasm/toolchain:with_wasi_config.bzl", "with_wasi_config")
with_wasi_config(
    name = "dist_hello_world",
    srcs = [
        ":hello_world",
    ],
)