Add web assembly compiler
This does the bare minimum to get the emscripten web assembly compiler
into our code base. There's still some things that'll need to be
improved, but this makes it possible to compile C++ code to web assembly
and run it on a web-page.
Incomplete list of TODOs:
-Improve handling of cached files.
-Figure out exactly how we deploy the webpages to the roborio.
-Figure out what, if anything, needs to be done to import WebGL.
-Actually use WebAssembly somewhere.
-Get a better idea of how the wrapper scripts for the WebAssembly work.
Change-Id: I91db4019395d6488f17f37769032da60fe519f4e
diff --git a/tools/BUILD b/tools/BUILD
index 6993e5f..ac76ee9 100644
--- a/tools/BUILD
+++ b/tools/BUILD
@@ -14,11 +14,21 @@
)
config_setting(
+ name = "compiler_emscripten",
+ values = {"compiler": "emscripten"},
+)
+
+config_setting(
name = "cpu_k8",
values = {"cpu": "k8"},
)
config_setting(
+ name = "cpu_web",
+ values = {"cpu": "web"},
+)
+
+config_setting(
name = "cpu_roborio",
values = {"cpu": "roborio"},
)
@@ -59,6 +69,8 @@
environment(name = "roborio")
+environment(name = "web")
+
environment(name = "cortex-m4f")
environment(name = "cortex-m4f-k22")
@@ -73,6 +85,7 @@
environments = [
":k8",
":roborio",
+ ":web",
":armhf-debian",
":cortex-m4f",
":cortex-m4f-k22",