fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
2bad96d9
cleanup
1load ( "@build_bazel_rules_nodejs//:index.bzl" , "nodejs_test" ) 2load ( "@rules_rust//rust:defs.bzl" , "rust_binary" , "rust_shared_library" ) 3load ( "@rules_rust_wasm_bindgen//rules_nodejs:defs.bzl" , "nodejs_rust_wasm_bindgen" ) 4 5rust_binary ( 6name = "hello_world_bin_wasm" , 7srcs = [ "//test:main.rs" ], 8edition = "2018" , 9deps = [ 10"@rules_rust_wasm_bindgen//3rdparty:wasm_bindgen" , 11], 12) 13 14rust_shared_library ( 15name = "hello_world_lib_wasm" , 16srcs = [ "//test:main.rs" ], 17edition = "2018" , 18deps = [ 19"@rules_rust_wasm_bindgen//3rdparty:wasm_bindgen" , 20], 21) 22 23nodejs_rust_wasm_bindgen ( 24name = "hello_world_bundler_wasm_bindgen" , 25wasm_file = ":hello_world_bin_wasm" , 26) 27 28nodejs_rust_wasm_bindgen ( 29name = "hello_world_web_wasm_bindgen" , 30target = "web" , 31wasm_file = ":hello_world_lib_wasm" , 32) 33 34nodejs_rust_wasm_bindgen ( 35name = "hello_world_deno_wasm_bindgen" , 36target = "deno" , 37wasm_file = ":hello_world_lib_wasm" , 38) 39 40nodejs_rust_wasm_bindgen ( 41name = "hello_world_nomodules_wasm_bindgen" , 42target = "no-modules" , 43wasm_file = ":hello_world_lib_wasm" , 44) 45 46nodejs_rust_wasm_bindgen ( 47name = "hello_world_nodejs_wasm_bindgen" , 48target = "nodejs" , 49wasm_file = ":hello_world_lib_wasm" , 50) 51 52nodejs_test ( 53name = "hello_world_wasm_test" , 54args = [ "rules_nodejs" ], 55data = [ 56":hello_world_bundler_wasm_bindgen" , 57":hello_world_deno_wasm_bindgen" , 58":hello_world_nodejs_wasm_bindgen" , 59":hello_world_nomodules_wasm_bindgen" , 60":hello_world_web_wasm_bindgen" , 61], 62entry_point = "//test:hello_world_wasm_test.js" , 63)