1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

Rename crate deno_core to deno (#2022)

This commit is contained in:
Ryan Dahl 2019-03-30 19:30:40 -04:00 committed by GitHub
parent 6744bb8d75
commit e9910d8ae5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 58 additions and 58 deletions

26
Cargo.lock generated
View file

@ -182,10 +182,22 @@ dependencies = [
[[package]] [[package]]
name = "deno" name = "deno"
version = "0.3.5" 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 = [ dependencies = [
"ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "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)", "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)", "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)", "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)", "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)", "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]] [[package]]
name = "dirs" name = "dirs"
version = "1.0.5" version = "1.0.5"

View file

@ -8,7 +8,7 @@ import("//third_party/v8/snapshot_toolchain.gni")
import("../deno.gni") import("../deno.gni")
main_extern = [ main_extern = [
"../core:deno_core", "../core:deno",
"$rust_build:ansi_term", "$rust_build:ansi_term",
"$rust_build:atty", "$rust_build:atty",

View file

@ -11,12 +11,12 @@ name = "deno"
path = "main.rs" path = "main.rs"
[package] [package]
name = "deno" name = "deno_cli"
version = "0.3.5" version = "0.3.5"
edition = "2018" edition = "2018"
[dependencies] [dependencies]
deno_core = { path = "../core" } deno = { path = "../core" }
ansi_term = "0.11.0" ansi_term = "0.11.0"
atty = "0.2.11" atty = "0.2.11"

View file

@ -1,13 +1,13 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
use crate::isolate_state::*; use crate::isolate_state::*;
use crate::ops; use crate::ops;
use deno_core::deno_buf; use deno::deno_buf;
use deno_core::Behavior; use deno::Behavior;
use deno_core::Op; use deno::Op;
use deno_core::StartupData; use deno::StartupData;
use std::sync::Arc; 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 { pub struct CliBehavior {
startup_data: Option<StartupData>, startup_data: Option<StartupData>,
pub state: Arc<IsolateState>, pub state: Arc<IsolateState>,

View file

@ -8,11 +8,11 @@ use crate::resources::ResourceId;
use crate::startup_data; use crate::startup_data;
use crate::workers; use crate::workers;
use crate::workers::WorkerBehavior; use crate::workers::WorkerBehavior;
use deno_core::deno_buf; use deno::deno_buf;
use deno_core::Behavior; use deno::Behavior;
use deno_core::Buf; use deno::Buf;
use deno_core::Op; use deno::Op;
use deno_core::StartupData; use deno::StartupData;
use futures::Future; use futures::Future;
use serde_json; use serde_json;
use std::str; use std::str;

View file

@ -2,7 +2,7 @@
use crate::js_errors::JSErrorColor; use crate::js_errors::JSErrorColor;
pub use crate::msg::ErrorKind; pub use crate::msg::ErrorKind;
use crate::resolve_addr::ResolveAddrError; use crate::resolve_addr::ResolveAddrError;
use deno_core::JSError; use deno::JSError;
use hyper; use hyper;
use std; use std;
use std::fmt; use std::fmt;

View file

@ -1,5 +1,5 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // 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;
use getopts::Options; use getopts::Options;

View file

@ -8,10 +8,10 @@ use crate::isolate_state::IsolateStateContainer;
use crate::js_errors; use crate::js_errors;
use crate::msg; use crate::msg;
use crate::tokio_util; use crate::tokio_util;
use deno_core; use deno;
use deno_core::deno_mod; use deno::deno_mod;
use deno_core::Behavior; use deno::Behavior;
use deno_core::JSError; use deno::JSError;
use futures::Async; use futures::Async;
use futures::Future; use futures::Future;
use std::sync::atomic::Ordering; use std::sync::atomic::Ordering;
@ -20,9 +20,9 @@ use std::sync::Arc;
pub trait DenoBehavior: Behavior + IsolateStateContainer + Send {} pub trait DenoBehavior: Behavior + IsolateStateContainer + Send {}
impl<T> DenoBehavior for T where T: Behavior + IsolateStateContainer + Send {} impl<T> DenoBehavior for T where T: Behavior + IsolateStateContainer + Send {}
type CoreIsolate<B> = deno_core::Isolate<B>; type CoreIsolate<B> = deno::Isolate<B>;
/// 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 /// high-level module loading
pub struct Isolate<B: Behavior> { pub struct Isolate<B: Behavior> {
inner: CoreIsolate<B>, inner: CoreIsolate<B>,

View file

@ -5,7 +5,7 @@ use crate::flags;
use crate::global_timer::GlobalTimer; use crate::global_timer::GlobalTimer;
use crate::modules::Modules; use crate::modules::Modules;
use crate::permissions::DenoPermissions; use crate::permissions::DenoPermissions;
use deno_core::Buf; use deno::Buf;
use futures::sync::mpsc as async_mpsc; use futures::sync::mpsc as async_mpsc;
use std; use std;
use std::env; use std::env;

View file

@ -1,8 +1,8 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // 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 crate::ansi;
use deno_core::JSError; use deno::JSError;
use deno_core::StackFrame; use deno::StackFrame;
use source_map_mappings::parse_mappings; use source_map_mappings::parse_mappings;
use source_map_mappings::Bias; use source_map_mappings::Bias;
use source_map_mappings::Mappings; use source_map_mappings::Mappings;

View file

@ -2,7 +2,7 @@
use crate::ansi; use crate::ansi;
use crate::deno_dir::DenoDir; use crate::deno_dir::DenoDir;
use crate::msg; use crate::msg;
use deno_core::deno_mod; use deno::deno_mod;
use std::collections::HashMap; use std::collections::HashMap;
use std::collections::HashSet; use std::collections::HashSet;
use std::fmt; use std::fmt;

View file

@ -18,10 +18,10 @@ use crate::resources::Resource;
use crate::tokio_util; use crate::tokio_util;
use crate::tokio_write; use crate::tokio_write;
use crate::version; use crate::version;
use deno_core::deno_buf; use deno::deno_buf;
use deno_core::Buf; use deno::Buf;
use deno_core::JSError; use deno::JSError;
use deno_core::Op; use deno::Op;
use flatbuffers::FlatBufferBuilder; use flatbuffers::FlatBufferBuilder;
use futures; use futures;
use futures::Async; use futures::Async;

View file

@ -16,7 +16,7 @@ use crate::http_body::HttpBody;
use crate::isolate_state::WorkerChannels; use crate::isolate_state::WorkerChannels;
use crate::repl::Repl; use crate::repl::Repl;
use deno_core::Buf; use deno::Buf;
use futures; use futures;
use futures::Future; use futures::Future;

View file

@ -1,6 +1,6 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
use deno_core::deno_buf; use deno::deno_buf;
use deno_core::{Script, StartupData}; use deno::{Script, StartupData};
pub fn deno_isolate_init() -> StartupData { pub fn deno_isolate_init() -> StartupData {
if cfg!(feature = "no-snapshot-init") { if cfg!(feature = "no-snapshot-init") {

View file

@ -2,5 +2,5 @@
pub const DENO: &str = env!("CARGO_PKG_VERSION"); pub const DENO: &str = env!("CARGO_PKG_VERSION");
pub fn v8() -> &'static str { pub fn v8() -> &'static str {
deno_core::v8_version() deno::v8_version()
} }

View file

@ -4,8 +4,8 @@ use crate::isolate_state::WorkerChannels;
use crate::js_errors::JSErrorColor; use crate::js_errors::JSErrorColor;
use crate::resources; use crate::resources;
use crate::tokio_util; use crate::tokio_util;
use deno_core::Buf; use deno::Buf;
use deno_core::JSError; use deno::JSError;
use futures::future::lazy; use futures::future::lazy;
use futures::sync::mpsc; use futures::sync::mpsc;
use futures::sync::oneshot; use futures::sync::oneshot;

View file

@ -3,7 +3,7 @@ import("//build_extra/rust/rust.gni")
group("default") { group("default") {
testonly = true testonly = true
deps = [ deps = [
":deno_core", ":deno",
":deno_core_http_bench", ":deno_core_http_bench",
":deno_core_http_bench_test", ":deno_core_http_bench_test",
":deno_core_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 = [ main_extern = [
"$rust_build:futures", "$rust_build:futures",
"$rust_build:libc", "$rust_build:libc",
@ -25,7 +25,7 @@ main_extern = [
"$rust_build:log", "$rust_build:log",
] ]
rust_crate("deno_core") { rust_crate("deno") {
source_root = "lib.rs" source_root = "lib.rs"
deps = [ deps = [
":deno_core_deps", ":deno_core_deps",
@ -47,7 +47,7 @@ http_bench_extern = [
"$rust_build:libc", "$rust_build:libc",
"$rust_build:log", "$rust_build:log",
"$rust_build:tokio", "$rust_build:tokio",
":deno_core", ":deno",
] ]
if (is_win) { if (is_win) {
http_bench_extern += [ "$rust_build:winapi" ] http_bench_extern += [ "$rust_build:winapi" ]

View file

@ -1,7 +1,7 @@
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. # Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
[package] [package]
name = "deno_core" name = "deno"
version = "0.3.5" version = "0.3.5"
edition = "2018" edition = "2018"

View file

@ -2,7 +2,7 @@
/// ///
/// > DENO_BUILD_MODE=release ./tools/build.py && \ /// > DENO_BUILD_MODE=release ./tools/build.py && \
/// ./target/release/deno_core_http_bench --multi-thread /// ./target/release/deno_core_http_bench --multi-thread
extern crate deno_core; extern crate deno;
extern crate futures; extern crate futures;
extern crate libc; extern crate libc;
extern crate tokio; extern crate tokio;
@ -12,7 +12,7 @@ extern crate log;
#[macro_use] #[macro_use]
extern crate lazy_static; extern crate lazy_static;
use deno_core::*; use deno::*;
use futures::future::lazy; use futures::future::lazy;
use std::collections::HashMap; use std::collections::HashMap;
use std::env; use std::env;
@ -168,7 +168,7 @@ fn main() {
// TODO currently isolate.execute() must be run inside tokio, hence the // TODO currently isolate.execute() must be run inside tokio, hence the
// lazy(). It would be nice to not have that contraint. Probably requires // lazy(). It would be nice to not have that contraint. Probably requires
// using v8::MicrotasksPolicy::kExplicit // using v8::MicrotasksPolicy::kExplicit
let isolate = deno_core::Isolate::new(HttpBench()); let isolate = deno::Isolate::new(HttpBench());
isolate.then(|r| { isolate.then(|r| {
js_check(r); js_check(r);
@ -177,7 +177,7 @@ fn main() {
}); });
let args: Vec<String> = env::args().collect(); let args: Vec<String> = 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" { if args.len() > 1 && args[1] == "--multi-thread" {
println!("multi-thread"); println!("multi-thread");
tokio::run(main_future); tokio::run(main_future);