1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -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]]
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"

View file

@ -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",

View file

@ -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"

View file

@ -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<StartupData>,
pub state: Arc<IsolateState>,

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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<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
pub struct Isolate<B: Behavior> {
inner: CoreIsolate<B>,

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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") {

View file

@ -2,5 +2,5 @@
pub const DENO: &str = env!("CARGO_PKG_VERSION");
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::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;

View file

@ -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" ]

View file

@ -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"

View file

@ -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<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" {
println!("multi-thread");
tokio::run(main_future);