add a wasm bazel toolchain (#603)

This commit is contained in:
walkingeyerobot
2020-09-10 21:42:46 -04:00
committed by GitHub
parent def6e4903a
commit 5f630def2a
20 changed files with 1835 additions and 0 deletions

12
bazel/hello-world/BUILD Normal file
View File

@@ -0,0 +1,12 @@
load("@rules_cc//cc:defs.bzl", "cc_binary")
load("//emscripten_toolchain:wasm_rules.bzl", "wasm_cc_binary")
cc_binary(
name = "hello-world",
srcs = ["hello-world.cc"],
)
wasm_cc_binary(
name = "hello-world-wasm",
cc_target = ":hello-world",
)

View File

@@ -0,0 +1,6 @@
#include <iostream>
int main(int argc, char** argv) {
std::cout << "hello world!" << std::endl;
return 0;
}