summaryrefslogtreecommitdiff
path: root/test_util/src/lib.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2024-02-13 21:52:30 +0530
committerGitHub <noreply@github.com>2024-02-13 21:52:30 +0530
commita68eb3fcc3997fce8680f87edce46f6450e79635 (patch)
tree6839607033226fdfb2ce1be3187ef93791096507 /test_util/src/lib.rs
parent492a9fbb9194a24a1f9223f797b4f4df9efde2bd (diff)
feat: denort binary for `deno compile` (#22205)
This introduces the `denort` binary - a slim version of deno without tooling. The binary is used as the default for `deno compile`. Improves `deno compile` final size by ~2.5x (141 MB -> 61 MB) on Linux x86_64.
Diffstat (limited to 'test_util/src/lib.rs')
-rw-r--r--test_util/src/lib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs
index b750cb99a..f8fbb8b65 100644
--- a/test_util/src/lib.rs
+++ b/test_util/src/lib.rs
@@ -140,6 +140,14 @@ pub fn deno_exe_path() -> PathRef {
PathRef::new(p)
}
+pub fn denort_exe_path() -> PathRef {
+ let mut p = target_dir().join("denort").to_path_buf();
+ if cfg!(windows) {
+ p.set_extension("exe");
+ }
+ PathRef::new(p)
+}
+
pub fn prebuilt_tool_path(tool: &str) -> PathRef {
let mut exe = tool.to_string();
exe.push_str(if cfg!(windows) { ".exe" } else { "" });