comparison color_game/BUILD @ 179:8d17f6e6e290

[ThirdParty] Added emsdk bazel rules that can be supported by bazel 9.0.0
author MrJuneJune <me@mrjunejune.com>
date Thu, 22 Jan 2026 21:23:17 -0800
parents 655ea0b661fd
children
comparison
equal deleted inserted replaced
178:94705b5986b3 179:8d17f6e6e290
1 load("//third_party/raylib:raylib.bzl", "raylib_binary") 1 load("//third_party/raylib:raylib.bzl", "raylib_binary")
2 load("@emsdk//emscripten_toolchain:wasm_rules.bzl", "wasm_cc_binary")
3
4 filegroup(
5 name = "wasm_html",
6 srcs = ["index.html"],
7 )
2 8
3 raylib_binary( 9 raylib_binary(
4 name = "main", 10 name = "main",
5 srcs = ["main.c"], 11 srcs = ["main.c"],
6 deps = [ 12 deps = [
7 "//third_party/raylib:raylib", 13 "//third_party/raylib:raylib",
8 "//dowa:dowa", 14 "//dowa:dowa",
9 ], 15 ],
16 linkopts_wasm = [
17 "-sUSE_GLFW=3", # Tells Emscripten to provide GLFW3 compatibility
18 "-sUSE_WEBGL2=1", # Enables WebGL2 support
19 "-sASYNCIFY", # Often needed for Raylib's main loop if not using emscripten_set_main_loop
20 ],
21 data=[":wasm_html"],
10 static = True 22 static = True
11 ) 23 )
24
25 wasm_cc_binary(
26 name = "wasm",
27 cc_target = ":main",
28 )