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