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-05-14 17:30:56 -04:00
|
|
|
main_extern_rlib = [
|
|
|
|
"futures",
|
|
|
|
"libc",
|
|
|
|
"serde_json",
|
|
|
|
"log",
|
2019-02-26 17:36:05 -05:00
|
|
|
]
|
|
|
|
|
2019-05-14 17:30:56 -04:00
|
|
|
rust_rlib("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-05-14 17:30:56 -04:00
|
|
|
extern_rlib = main_extern_rlib
|
2019-02-26 17:36:05 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
rust_test("deno_core_test") {
|
|
|
|
source_root = "lib.rs"
|
2019-03-30 14:45:36 -04:00
|
|
|
deps = [
|
|
|
|
":deno_core_deps",
|
|
|
|
]
|
2019-05-14 17:30:56 -04:00
|
|
|
extern_rlib = main_extern_rlib
|
2019-03-14 19:17:52 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
http_bench_extern = [
|
2019-05-14 17:30:56 -04:00
|
|
|
{
|
|
|
|
label = ":deno"
|
|
|
|
crate_name = "deno"
|
|
|
|
crate_type = "rlib"
|
|
|
|
},
|
|
|
|
]
|
|
|
|
http_bench_extern_rlib = [
|
|
|
|
"futures",
|
|
|
|
"lazy_static",
|
|
|
|
"libc",
|
|
|
|
"log",
|
|
|
|
"tokio",
|
2019-03-14 19:17:52 -04:00
|
|
|
]
|
|
|
|
if (is_win) {
|
2019-05-14 17:30:56 -04:00
|
|
|
http_bench_extern_rlib += [ "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
|
2019-05-14 17:30:56 -04:00
|
|
|
extern_rlib = http_bench_extern_rlib
|
2019-03-14 19:17:52 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
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-05-14 17:30:56 -04:00
|
|
|
extern_rlib = http_bench_extern_rlib
|
2019-02-26 17:36:05 -05:00
|
|
|
}
|