From 8e68b7221ca72c10268338eb1734530438e5ccb7 Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Thu, 28 Nov 2024 15:47:26 -0800 Subject: [PATCH] feat: use .wasm artifact name extension (#185) I added support for the `.wasm` extension to bazel last year and I figured it'd be a slightly nicity improvement when targetting wasm. --- toolchain/private/defs.bzl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/toolchain/private/defs.bzl b/toolchain/private/defs.bzl index 43b21a4..c9c940d 100644 --- a/toolchain/private/defs.bzl +++ b/toolchain/private/defs.bzl @@ -220,5 +220,17 @@ def _target_wasm(): "@platforms//cpu:wasm32", ], ld_zig_subcmd = "wasm-ld", - artifact_name_patterns = [], + # .wasm extension supported in bazel >= 6.4.0 + artifact_name_patterns = [ + { + "category_name": "dynamic_library", + "prefix": "", + "extension": ".wasm", + }, + { + "category_name": "executable", + "prefix": "", + "extension": ".wasm", + }, + ], )