fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
2bad96d9
cleanup
1# Copyright 2020 The Bazel Authors. All rights reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15load ( "@rules_rust//rust:defs.bzl" , "rust_binary" , "rust_shared_library" ) 16load ( "@rules_rust_wasm_bindgen//:defs.bzl" , "rust_wasm_bindgen" ) 17 18package ( default_visibility = [ "//:__subpackages__" ]) 19 20exports_files ([ 21"hello_world_wasm_test.js" , 22"main.rs" , 23]) 24 25rust_binary ( 26name = "hello_world_bin_wasm" , 27srcs = [ "main.rs" ], 28edition = "2018" , 29deps = [ 30"@rules_rust_wasm_bindgen//3rdparty:wasm_bindgen" , 31], 32) 33 34rust_shared_library ( 35name = "hello_world_lib_wasm" , 36srcs = [ "main.rs" ], 37edition = "2018" , 38deps = [ 39"@rules_rust_wasm_bindgen//3rdparty:wasm_bindgen" , 40], 41) 42 43rust_wasm_bindgen ( 44name = "hello_world_bundler_wasm_bindgen" , 45wasm_file = ":hello_world_bin_wasm" , 46) 47 48rust_wasm_bindgen ( 49name = "hello_world_web_wasm_bindgen" , 50target = "web" , 51wasm_file = ":hello_world_lib_wasm" , 52) 53 54rust_wasm_bindgen ( 55name = "hello_world_deno_wasm_bindgen" , 56target = "deno" , 57wasm_file = ":hello_world_lib_wasm" , 58) 59 60rust_wasm_bindgen ( 61name = "hello_world_nomodules_wasm_bindgen" , 62target = "no-modules" , 63wasm_file = ":hello_world_lib_wasm" , 64) 65 66rust_wasm_bindgen ( 67name = "hello_world_nodejs_wasm_bindgen" , 68target = "nodejs" , 69wasm_file = ":hello_world_lib_wasm" , 70)