blob: bee39dcfbd9ade4a589d5e3bab5448f3cbed09a1 [file] [log] [blame]
workspace(name = "bazel_webgpu_example")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Loading in the emscripten toolchain is documented at https://github.com/emscripten-core/emsdk/tree/3891e7b04bf8cbb3bc62758e9c575ae096a9a518/bazel
# The hash in the http_archive URL corresponds to https://github.com/emscripten-core/emsdk/commit/3891e7b04bf8cbb3bc62758e9c575ae096a9a518
# AKA the 2.0.31 release. The sha256 sum came from a manual inspection of that archive.
http_archive(
name = "emsdk",
sha256 = "d55e3c73fc4f8d1fecb7aabe548de86bdb55080fe6b12ce593d63b8bade54567",
strip_prefix = "emsdk-3891e7b04bf8cbb3bc62758e9c575ae096a9a518/bazel",
url = "https://github.com/emscripten-core/emsdk/archive/3891e7b04bf8cbb3bc62758e9c575ae096a9a518.tar.gz",
)
# Working around https://github.com/emscripten-core/emsdk/issues/907
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "3635797a96c7bfcd0d265dacd722a07335e64d6ded9834af8d3f1b7ba5a25bba",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.3.0/rules_nodejs-4.3.0.tar.gz"],
)
# Once the workaround is no longer needed, we should be able to uncomment below
# load("@emsdk//:deps.bzl", emsdk_deps = "deps")
# emsdk_deps()
load("@emsdk//:emscripten_deps.bzl", emsdk_emscripten_deps = "emscripten_deps")
emsdk_emscripten_deps(emscripten_version = "2.0.31")