diff --git a/Cargo.lock b/Cargo.lock index 6000dd8e04..7b931c8bcf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -182,10 +182,22 @@ dependencies = [ [[package]] name = "deno" version = "0.3.5" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "deno_cli" +version = "0.3.5" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "deno_core 0.3.5", + "deno 0.3.5", "dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "flatbuffers 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -215,18 +227,6 @@ dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "deno_core" -version = "0.3.5" -dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "dirs" version = "1.0.5" diff --git a/cli/BUILD.gn b/cli/BUILD.gn index f6000a08f8..32c00d8cf0 100644 --- a/cli/BUILD.gn +++ b/cli/BUILD.gn @@ -8,7 +8,7 @@ import("//third_party/v8/snapshot_toolchain.gni") import("../deno.gni") main_extern = [ - "../core:deno_core", + "../core:deno", "$rust_build:ansi_term", "$rust_build:atty", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index c58558887b..6c25486a1b 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -11,12 +11,12 @@ name = "deno" path = "main.rs" [package] -name = "deno" +name = "deno_cli" version = "0.3.5" edition = "2018" [dependencies] -deno_core = { path = "../core" } +deno = { path = "../core" } ansi_term = "0.11.0" atty = "0.2.11" diff --git a/cli/cli_behavior.rs b/cli/cli_behavior.rs index c077d1ad11..05f2cf006e 100644 --- a/cli/cli_behavior.rs +++ b/cli/cli_behavior.rs @@ -1,13 +1,13 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. use crate::isolate_state::*; use crate::ops; -use deno_core::deno_buf; -use deno_core::Behavior; -use deno_core::Op; -use deno_core::StartupData; +use deno::deno_buf; +use deno::Behavior; +use deno::Op; +use deno::StartupData; use std::sync::Arc; -/// Implements deno_core::Behavior for the main Deno command-line. +/// Implements deno::Behavior for the main Deno command-line. pub struct CliBehavior { startup_data: Option, pub state: Arc, diff --git a/cli/compiler.rs b/cli/compiler.rs index f0e4f23f3f..4613aff995 100644 --- a/cli/compiler.rs +++ b/cli/compiler.rs @@ -8,11 +8,11 @@ use crate::resources::ResourceId; use crate::startup_data; use crate::workers; use crate::workers::WorkerBehavior; -use deno_core::deno_buf; -use deno_core::Behavior; -use deno_core::Buf; -use deno_core::Op; -use deno_core::StartupData; +use deno::deno_buf; +use deno::Behavior; +use deno::Buf; +use deno::Op; +use deno::StartupData; use futures::Future; use serde_json; use std::str; diff --git a/cli/errors.rs b/cli/errors.rs index dd1b6e6a7f..a2c3c34416 100644 --- a/cli/errors.rs +++ b/cli/errors.rs @@ -2,7 +2,7 @@ use crate::js_errors::JSErrorColor; pub use crate::msg::ErrorKind; use crate::resolve_addr::ResolveAddrError; -use deno_core::JSError; +use deno::JSError; use hyper; use std; use std::fmt; diff --git a/cli/flags.rs b/cli/flags.rs index e14077daed..9d187ecac8 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -1,5 +1,5 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -use deno_core::v8_set_flags; +use deno::v8_set_flags; use getopts; use getopts::Options; diff --git a/cli/isolate.rs b/cli/isolate.rs index 711c46ead6..15ad4e125a 100644 --- a/cli/isolate.rs +++ b/cli/isolate.rs @@ -8,10 +8,10 @@ use crate::isolate_state::IsolateStateContainer; use crate::js_errors; use crate::msg; use crate::tokio_util; -use deno_core; -use deno_core::deno_mod; -use deno_core::Behavior; -use deno_core::JSError; +use deno; +use deno::deno_mod; +use deno::Behavior; +use deno::JSError; use futures::Async; use futures::Future; use std::sync::atomic::Ordering; @@ -20,9 +20,9 @@ use std::sync::Arc; pub trait DenoBehavior: Behavior + IsolateStateContainer + Send {} impl DenoBehavior for T where T: Behavior + IsolateStateContainer + Send {} -type CoreIsolate = deno_core::Isolate; +type CoreIsolate = deno::Isolate; -/// Wraps deno_core::Isolate to provide source maps, ops for the CLI, and +/// Wraps deno::Isolate to provide source maps, ops for the CLI, and /// high-level module loading pub struct Isolate { inner: CoreIsolate, diff --git a/cli/isolate_state.rs b/cli/isolate_state.rs index f38f76e717..9f6749925c 100644 --- a/cli/isolate_state.rs +++ b/cli/isolate_state.rs @@ -5,7 +5,7 @@ use crate::flags; use crate::global_timer::GlobalTimer; use crate::modules::Modules; use crate::permissions::DenoPermissions; -use deno_core::Buf; +use deno::Buf; use futures::sync::mpsc as async_mpsc; use std; use std::env; diff --git a/cli/js_errors.rs b/cli/js_errors.rs index b478849d28..0bcc1176f6 100644 --- a/cli/js_errors.rs +++ b/cli/js_errors.rs @@ -1,8 +1,8 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -//! This mod adds source maps and ANSI color display to deno_core::JSError. +//! This mod adds source maps and ANSI color display to deno::JSError. use crate::ansi; -use deno_core::JSError; -use deno_core::StackFrame; +use deno::JSError; +use deno::StackFrame; use source_map_mappings::parse_mappings; use source_map_mappings::Bias; use source_map_mappings::Mappings; diff --git a/cli/modules.rs b/cli/modules.rs index 6de76b8fe6..e2ded67b20 100644 --- a/cli/modules.rs +++ b/cli/modules.rs @@ -2,7 +2,7 @@ use crate::ansi; use crate::deno_dir::DenoDir; use crate::msg; -use deno_core::deno_mod; +use deno::deno_mod; use std::collections::HashMap; use std::collections::HashSet; use std::fmt; diff --git a/cli/ops.rs b/cli/ops.rs index af27576488..a7c2e868fc 100644 --- a/cli/ops.rs +++ b/cli/ops.rs @@ -18,10 +18,10 @@ use crate::resources::Resource; use crate::tokio_util; use crate::tokio_write; use crate::version; -use deno_core::deno_buf; -use deno_core::Buf; -use deno_core::JSError; -use deno_core::Op; +use deno::deno_buf; +use deno::Buf; +use deno::JSError; +use deno::Op; use flatbuffers::FlatBufferBuilder; use futures; use futures::Async; diff --git a/cli/resources.rs b/cli/resources.rs index 76004ae502..5b08e4b327 100644 --- a/cli/resources.rs +++ b/cli/resources.rs @@ -16,7 +16,7 @@ use crate::http_body::HttpBody; use crate::isolate_state::WorkerChannels; use crate::repl::Repl; -use deno_core::Buf; +use deno::Buf; use futures; use futures::Future; diff --git a/cli/startup_data.rs b/cli/startup_data.rs index 747e8b11d1..7f59c06781 100644 --- a/cli/startup_data.rs +++ b/cli/startup_data.rs @@ -1,6 +1,6 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -use deno_core::deno_buf; -use deno_core::{Script, StartupData}; +use deno::deno_buf; +use deno::{Script, StartupData}; pub fn deno_isolate_init() -> StartupData { if cfg!(feature = "no-snapshot-init") { diff --git a/cli/version.rs b/cli/version.rs index e6ec9008b0..4b9509af96 100644 --- a/cli/version.rs +++ b/cli/version.rs @@ -2,5 +2,5 @@ pub const DENO: &str = env!("CARGO_PKG_VERSION"); pub fn v8() -> &'static str { - deno_core::v8_version() + deno::v8_version() } diff --git a/cli/workers.rs b/cli/workers.rs index 2be6f66b71..0c8d49fa7b 100644 --- a/cli/workers.rs +++ b/cli/workers.rs @@ -4,8 +4,8 @@ use crate::isolate_state::WorkerChannels; use crate::js_errors::JSErrorColor; use crate::resources; use crate::tokio_util; -use deno_core::Buf; -use deno_core::JSError; +use deno::Buf; +use deno::JSError; use futures::future::lazy; use futures::sync::mpsc; use futures::sync::oneshot; diff --git a/core/BUILD.gn b/core/BUILD.gn index 3439fa25dd..e74c26ccaf 100644 --- a/core/BUILD.gn +++ b/core/BUILD.gn @@ -3,7 +3,7 @@ import("//build_extra/rust/rust.gni") group("default") { testonly = true deps = [ - ":deno_core", + ":deno", ":deno_core_http_bench", ":deno_core_http_bench_test", ":deno_core_test", @@ -17,7 +17,7 @@ group("deno_core_deps") { ] } -# deno_core does not depend on flatbuffers nor tokio. +# deno does not depend on flatbuffers nor tokio. main_extern = [ "$rust_build:futures", "$rust_build:libc", @@ -25,7 +25,7 @@ main_extern = [ "$rust_build:log", ] -rust_crate("deno_core") { +rust_crate("deno") { source_root = "lib.rs" deps = [ ":deno_core_deps", @@ -47,7 +47,7 @@ http_bench_extern = [ "$rust_build:libc", "$rust_build:log", "$rust_build:tokio", - ":deno_core", + ":deno", ] if (is_win) { http_bench_extern += [ "$rust_build:winapi" ] diff --git a/core/Cargo.toml b/core/Cargo.toml index 758c06dc8a..06addd9c1c 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,7 +1,7 @@ # Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. [package] -name = "deno_core" +name = "deno" version = "0.3.5" edition = "2018" diff --git a/core/http_bench.rs b/core/http_bench.rs index 8b6a8e8fc1..37965510fe 100644 --- a/core/http_bench.rs +++ b/core/http_bench.rs @@ -2,7 +2,7 @@ /// /// > DENO_BUILD_MODE=release ./tools/build.py && \ /// ./target/release/deno_core_http_bench --multi-thread -extern crate deno_core; +extern crate deno; extern crate futures; extern crate libc; extern crate tokio; @@ -12,7 +12,7 @@ extern crate log; #[macro_use] extern crate lazy_static; -use deno_core::*; +use deno::*; use futures::future::lazy; use std::collections::HashMap; use std::env; @@ -168,7 +168,7 @@ fn main() { // TODO currently isolate.execute() must be run inside tokio, hence the // lazy(). It would be nice to not have that contraint. Probably requires // using v8::MicrotasksPolicy::kExplicit - let isolate = deno_core::Isolate::new(HttpBench()); + let isolate = deno::Isolate::new(HttpBench()); isolate.then(|r| { js_check(r); @@ -177,7 +177,7 @@ fn main() { }); let args: Vec = env::args().collect(); - let args = deno_core::v8_set_flags(args); + let args = deno::v8_set_flags(args); if args.len() > 1 && args[1] == "--multi-thread" { println!("multi-thread"); tokio::run(main_future);