Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Split into deno, denort and deno_lib crates #27326

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
237 changes: 134 additions & 103 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ resolver = "2"
members = [
"bench_util",
"cli",
"deno",
"denort",
"ext/broadcast_channel",
"ext/cache",
"ext/canvas",
Expand Down Expand Up @@ -81,6 +83,7 @@ deno_fs = { version = "0.92.0", path = "./ext/fs" }
deno_http = { version = "0.180.0", path = "./ext/http" }
deno_io = { version = "0.92.0", path = "./ext/io" }
deno_kv = { version = "0.90.0", path = "./ext/kv" }
deno_lib = { version = "0.1.0", path = "./cli" }
deno_napi = { version = "0.113.0", path = "./ext/napi" }
deno_net = { version = "0.174.0", path = "./ext/net" }
deno_node = { version = "0.119.0", path = "./ext/node" }
Expand Down
15 changes: 4 additions & 11 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

[package]
name = "deno"
version = "2.1.4"
name = "deno_lib"
version = "0.1.0"
authors.workspace = true
default-run = "deno"
edition.workspace = true
exclude = ["bench/testdata/lsp_benchdata/"]
license.workspace = true
repository.workspace = true
description = "Provides the deno executable"

[[bin]]
name = "deno"
path = "main.rs"
doc = false

[[bin]]
name = "denort"
path = "mainrt.rs"
[lib]
path = "lib.rs"
doc = false

[[test]]
Expand Down
2 changes: 1 addition & 1 deletion cli/args/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,7 @@ pub enum NpmCachingStrategy {
Manual,
}

pub(crate) fn otel_runtime_config() -> OtelRuntimeConfig {
pub fn otel_runtime_config() -> OtelRuntimeConfig {
OtelRuntimeConfig {
runtime_name: Cow::Borrowed("deno"),
runtime_version: Cow::Borrowed(crate::version::DENO_VERSION_INFO.deno),
Expand Down
21 changes: 0 additions & 21 deletions cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,6 @@ fn main() {
return;
}

deno_napi::print_linker_flags("deno");
deno_napi::print_linker_flags("denort");

// Host snapshots won't work when cross compiling.
let target = env::var("TARGET").unwrap();
let host = env::var("HOST").unwrap();
Expand Down Expand Up @@ -400,24 +397,6 @@ fn main() {
println!("cargo:rustc-env=TARGET={}", env::var("TARGET").unwrap());
println!("cargo:rustc-env=PROFILE={}", env::var("PROFILE").unwrap());

if cfg!(windows) {
// these dls load slowly, so delay loading them
let dlls = [
// webgpu
"d3dcompiler_47",
"OPENGL32",
// network related functions
"iphlpapi",
];
for dll in dlls {
println!("cargo:rustc-link-arg-bin=deno=/delayload:{dll}.dll");
println!("cargo:rustc-link-arg-bin=denort=/delayload:{dll}.dll");
}
// enable delay loading
println!("cargo:rustc-link-arg-bin=deno=delayimp.lib");
println!("cargo:rustc-link-arg-bin=denort=delayimp.lib");
}

let c = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap());
let o = PathBuf::from(env::var_os("OUT_DIR").unwrap());

Expand Down
Loading
Loading