summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/ops/mod.rs1
-rw-r--r--cli/ops/utils.rs49
-rw-r--r--core/libdeno/BUILD.gn2
-rw-r--r--js/dispatch_minimal.ts1
-rw-r--r--rollup.config.js17
-rw-r--r--tools/ts_library_builder/README.md6
-rw-r--r--tsconfig.json3
-rw-r--r--website/manual.md12
8 files changed, 3 insertions, 88 deletions
diff --git a/cli/ops/mod.rs b/cli/ops/mod.rs
index d254f34d2..106948492 100644
--- a/cli/ops/mod.rs
+++ b/cli/ops/mod.rs
@@ -20,7 +20,6 @@ mod random;
mod repl;
mod resources;
mod timers;
-mod utils;
mod workers;
// Warning! These values are duplicated in the TypeScript code (js/dispatch.ts),
diff --git a/cli/ops/utils.rs b/cli/ops/utils.rs
deleted file mode 100644
index daa6150a6..000000000
--- a/cli/ops/utils.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-#![allow(dead_code)]
-use crate::tokio_util;
-use deno::Buf;
-use deno::ErrBox;
-use deno::Op;
-use deno::OpResult;
-use futures::Poll;
-
-pub type CliOpResult = OpResult<ErrBox>;
-
-#[inline]
-pub fn ok_buf(buf: Buf) -> CliOpResult {
- Ok(Op::Sync(buf))
-}
-
-#[inline]
-pub fn empty_buf() -> Buf {
- Box::new([])
-}
-
-// This is just type conversion. Implement From trait?
-// See https://github.com/tokio-rs/tokio/blob/ffd73a64e7ec497622b7f939e38017afe7124dc4/tokio-fs/src/lib.rs#L76-L85
-pub fn convert_blocking<F>(f: F) -> Poll<Buf, ErrBox>
-where
- F: FnOnce() -> Result<Buf, ErrBox>,
-{
- use futures::Async::*;
- match tokio_threadpool::blocking(f) {
- Ok(Ready(Ok(v))) => Ok(v.into()),
- Ok(Ready(Err(err))) => Err(err),
- Ok(NotReady) => Ok(NotReady),
- Err(err) => panic!("blocking error {}", err),
- }
-}
-
-pub fn blocking<F>(is_sync: bool, f: F) -> CliOpResult
-where
- F: 'static + Send + FnOnce() -> Result<Buf, ErrBox>,
-{
- if is_sync {
- let result_buf = f()?;
- Ok(Op::Sync(result_buf))
- } else {
- Ok(Op::Async(Box::new(futures::sync::oneshot::spawn(
- tokio_util::poll_fn(move || convert_blocking(f)),
- &tokio_executor::DefaultExecutor::current(),
- ))))
- }
-}
diff --git a/core/libdeno/BUILD.gn b/core/libdeno/BUILD.gn
index 10ec4bf91..2623fef2d 100644
--- a/core/libdeno/BUILD.gn
+++ b/core/libdeno/BUILD.gn
@@ -38,7 +38,7 @@ v8_source_set("v8") {
}
# Only functionality needed for libdeno_test and snapshot_creator
-# In particular no flatbuffers, no assets, no rust, no msg handlers.
+# In particular no assets, no rust, no msg handlers.
# Because snapshots are slow, it's important that snapshot_creator's
# dependencies are minimal.
v8_source_set("libdeno") {
diff --git a/js/dispatch_minimal.ts b/js/dispatch_minimal.ts
index 3df888e77..75514368c 100644
--- a/js/dispatch_minimal.ts
+++ b/js/dispatch_minimal.ts
@@ -1,5 +1,4 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
-// Do not add flatbuffer dependencies to this module.
import * as util from "./util";
import { core } from "./core";
diff --git a/rollup.config.js b/rollup.config.js
index 95f06f2b6..793b5bd6c 100644
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -88,20 +88,6 @@ const osNodeToDeno = {
linux: "linux"
};
-// This plugin resolves at bundle time any generated resources that are
-// in the build path under `gen` and specified with a MID starting with `gen/`.
-// The plugin assumes that the MID needs to have the `.ts` extension appended.
-function resolveGenerated() {
- return {
- name: "resolve-msg-generated",
- resolveId(importee) {
- if (importee.startsWith("gen/cli/msg_generated")) {
- return path.resolve(`${importee}.ts`);
- }
- }
- };
-}
-
function generateDepFile({ outputFile, sourceFiles = [], configFiles = [] }) {
let timestamp = new Date();
@@ -214,9 +200,6 @@ export default function makeConfig(commandOptions) {
]
}),
- // Resolves any resources that have been generated at build time
- resolveGenerated(),
-
// Allows rollup to resolve modules based on Node.js resolution
nodeResolve(),
diff --git a/tools/ts_library_builder/README.md b/tools/ts_library_builder/README.md
index c96fba16b..2eca169ae 100644
--- a/tools/ts_library_builder/README.md
+++ b/tools/ts_library_builder/README.md
@@ -60,12 +60,6 @@ like this:
- We process the `deno` namespace/module, by "flattening" the type definition
file.
- We determine the exported symbols for `js/deno.ts`.
- - We create a custom extraction of the `gen/msg_generated.ts` which is
- generated during the build process and contains the type information related
- to flatbuffer structures that communicate between the privileged part of
- deno and the user land. Currently, the tool doesn't do full complex
- dependency analysis to be able to determine what is required out of this
- file, so we explicitly extract the type information we need.
- We recurse over all imports/exports of the modules, only exporting those
symbols which are finally exported by `js/deno.ts`.
- We replace the import/export with the type information from the source file.
diff --git a/tsconfig.json b/tsconfig.json
index 500b0fcd0..e9f8048df 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -10,9 +10,6 @@
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
- "paths": {
- "*": ["*", "target/debug/*", "target/release/*"]
- },
"preserveConstEnums": true,
"pretty": true,
"removeComments": true,
diff --git a/website/manual.md b/website/manual.md
index 6cffa7f73..917d9a37d 100644
--- a/website/manual.md
+++ b/website/manual.md
@@ -46,10 +46,8 @@ Deno provides <a href="https://github.com/denoland/deno_std">a set of reviewed
- File system and network access can be controlled in order to run sandboxed
code. Access between V8 (unprivileged) and Rust (privileged) is only done via
- serialized messages defined in this
- [flatbuffer](https://github.com/denoland/deno/blob/master/cli/msg.fbs). This
- makes it easy to audit. For example, to enable write access use the flag
- `--allow-write` or for network access `--allow-net`.
+ serialized messages. This makes it easy to audit. For example, to enable write
+ access use the flag `--allow-write` or for network access `--allow-net`.
- Only ship a single executable.
@@ -1029,12 +1027,6 @@ The core binding layer for Deno. It is released as a
with a binding API called "libdeno". See the crate documentation for more
details.
-### Flatbuffers
-
-We use Flatbuffers to define common structs and enums between TypeScript and
-Rust. These common data structures are defined in
-[msg.fbs](https://github.com/denoland/deno/blob/master/cli/msg.fbs)
-
### Updating prebuilt binaries
```shell