2019-02-26 17:36:05 -05:00
|
|
|
import("//build_extra/rust/rust.gni")
|
|
|
|
|
2019-03-14 19:17:52 -04:00
|
|
|
group("default") {
|
|
|
|
testonly = true
|
|
|
|
deps = [
|
|
|
|
":deno_core_http_bench",
|
|
|
|
":deno_core_http_bench_test",
|
|
|
|
":deno_core_test",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
deno_core_deps = [
|
|
|
|
"../libdeno:libdeno_static_lib",
|
|
|
|
"../libdeno:v8",
|
|
|
|
]
|
|
|
|
|
2019-02-26 17:36:05 -05:00
|
|
|
# deno_core does not depend on flatbuffers nor tokio.
|
|
|
|
main_extern = [
|
|
|
|
"$rust_build:futures",
|
|
|
|
"$rust_build:libc",
|
|
|
|
"$rust_build:serde_json",
|
|
|
|
"$rust_build:log",
|
|
|
|
]
|
|
|
|
|
|
|
|
rust_crate("deno_core") {
|
|
|
|
source_root = "lib.rs"
|
2019-03-14 19:17:52 -04:00
|
|
|
deps = deno_core_deps
|
2019-02-26 17:36:05 -05:00
|
|
|
extern = main_extern
|
|
|
|
}
|
|
|
|
|
|
|
|
rust_test("deno_core_test") {
|
|
|
|
source_root = "lib.rs"
|
2019-03-14 19:17:52 -04:00
|
|
|
deps = deno_core_deps
|
2019-02-26 17:36:05 -05:00
|
|
|
extern = main_extern
|
2019-03-14 19:17:52 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
http_bench_extern = [
|
|
|
|
"$rust_build:futures",
|
|
|
|
"$rust_build:lazy_static",
|
|
|
|
"$rust_build:libc",
|
|
|
|
"$rust_build:log",
|
|
|
|
"$rust_build:tokio",
|
|
|
|
":deno_core",
|
|
|
|
]
|
|
|
|
if (is_win) {
|
|
|
|
http_bench_extern += [ "$rust_build:winapi" ]
|
2019-02-26 17:36:05 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
rust_executable("deno_core_http_bench") {
|
|
|
|
source_root = "http_bench.rs"
|
2019-03-14 19:17:52 -04:00
|
|
|
deps = deno_core_deps
|
|
|
|
extern = http_bench_extern
|
|
|
|
}
|
|
|
|
|
|
|
|
rust_test("deno_core_http_bench_test") {
|
|
|
|
source_root = "http_bench.rs"
|
|
|
|
deps = deno_core_deps
|
|
|
|
extern = http_bench_extern
|
2019-02-26 17:36:05 -05:00
|
|
|
}
|