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 = [
|
2019-03-30 19:30:40 -04:00
|
|
|
":deno",
|
2019-03-14 19:17:52 -04:00
|
|
|
":deno_core_http_bench",
|
|
|
|
":deno_core_http_bench_test",
|
|
|
|
":deno_core_test",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-03-30 14:45:36 -04:00
|
|
|
group("deno_core_deps") {
|
|
|
|
deps = [
|
|
|
|
"libdeno:libdeno_static_lib",
|
|
|
|
"libdeno:v8",
|
|
|
|
]
|
|
|
|
}
|
2019-03-14 19:17:52 -04:00
|
|
|
|
2019-03-30 19:30:40 -04:00
|
|
|
# deno does not depend on flatbuffers nor tokio.
|
2019-02-26 17:36:05 -05:00
|
|
|
main_extern = [
|
|
|
|
"$rust_build:futures",
|
|
|
|
"$rust_build:libc",
|
|
|
|
"$rust_build:serde_json",
|
|
|
|
"$rust_build:log",
|
|
|
|
]
|
|
|
|
|
2019-03-30 19:30:40 -04:00
|
|
|
rust_crate("deno") {
|
2019-02-26 17:36:05 -05:00
|
|
|
source_root = "lib.rs"
|
2019-03-30 14:45:36 -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-30 14:45:36 -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",
|
2019-03-30 19:30:40 -04:00
|
|
|
":deno",
|
2019-03-14 19:17:52 -04:00
|
|
|
]
|
|
|
|
if (is_win) {
|
|
|
|
http_bench_extern += [ "$rust_build:winapi" ]
|
2019-02-26 17:36:05 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
rust_executable("deno_core_http_bench") {
|
2019-04-16 17:53:43 -04:00
|
|
|
source_root = "examples/http_bench.rs"
|
2019-03-30 14:45:36 -04:00
|
|
|
deps = [
|
|
|
|
":deno_core_deps",
|
|
|
|
]
|
2019-03-14 19:17:52 -04:00
|
|
|
extern = http_bench_extern
|
|
|
|
}
|
|
|
|
|
|
|
|
rust_test("deno_core_http_bench_test") {
|
2019-04-16 17:53:43 -04:00
|
|
|
source_root = "examples/http_bench.rs"
|
2019-03-30 14:45:36 -04:00
|
|
|
deps = [
|
|
|
|
":deno_core_deps",
|
|
|
|
]
|
2019-03-14 19:17:52 -04:00
|
|
|
extern = http_bench_extern
|
2019-02-26 17:36:05 -05:00
|
|
|
}
|