summaryrefslogtreecommitdiff
path: root/src/main.rs
AgeCommit message (Collapse)Author
2019-03-19Rename //src/ to //cli/ (#1962)Ryan Dahl
To better distinguish the deno_core crate from the executable deno, which will now be called "the cli" internally.
2019-03-18Re-implement init scripts in core (#1958)andy finch
Re-enables arm64 CI test
2019-03-18Remove Eager read, write, accept (#1959)Ryan Dahl
Removing this reduces tail latency in test/http_bench.ts by half.
2019-03-18Integrate //core into existing code baseRyan Dahl
This disables a few tests which are broken still: - tests/error_004_missing_module.test - tests/error_005_missing_dynamic_import.test - tests/error_006_import_ext_failure.test - repl_test test_set_timeout - repl_test test_async_op - repl_test test_set_timeout_interlaced - all of permission_prompt_test
2019-03-12Make timers act like normal opsRyan Dahl
This is in preperation for core integration.
2019-03-06Replace deno.land/x/std with deno.land/std (#1890)Andy Hayden
2019-03-04`use-snapshots` build option for cross compile support. (#1852)andy finch
2019-03-01Permissions refactor (#1864)andy finch
Refactored permissions to be assignable on a per-isolate basis, and added a fix for #1858 to op_fetch_module_meta_data.
2019-02-18Add window.locationRyan Dahl
2019-02-08Add deps to --info output. (#1720)Ryan Dahl
Move module stuff into its own file.
2019-02-08Add --allow-read (#1689)Dmitry Sharshakov
Co-authored-by: Greg Altman <g.s.altman@gmail.com>
2019-02-07Color exceptions (#1698)Ryan Dahl
2019-02-07Add emojis to permission prompts (#1684)Dmitry Sharshakov
2019-02-02Support --fmtRyan Dahl
2019-02-02Avoid --info crash on missing filename (#1660)Kevin (Kun) "Kassimo" Qian
2019-02-02Better error message for bad filename CLI argument.Ryan Dahl
2019-02-02Add --info flag to display file info (compiled code/source map) (#1647)Kevin (Kun) "Kassimo" Qian
2019-01-30Refactor libdeno ES module interface. (#1624)Ryan Dahl
Allows for future asynchronous module loading. Add support for import.meta.url Fixes #1496
2019-01-29Minor code cleanups (#1613)JaePil Jung
2019-01-15 Add --prefetch flag for deps prefetch without running (#1475)Kevin (Kun) "Kassimo" Qian
2019-01-15Clippy fixes (also fixes build with nightly) (#1527)Bert Belder
2019-01-14Update to rust 2018 editionAndy Hayden
2019-01-13Properly parse network addresses. (#1515)Ryan Dahl
2019-01-09Native ES modules (#1460)Ryan Dahl
* Native ES modules This is a major refactor of internal compiler. Before: JS and TS both were sent through the typescript compiler where their imports were parsed and handled. Both compiled to AMD JS and finally sent to V8 Now: JS is sent directly into V8. TS is sent through the typescript compiler, but tsc generates ES modules now instead of AMD. This generated JS is then dumped into V8. This should much faster for pure JS code. It may improve TS compilation speed. In the future this allows us to separate TS out of the runtime heap and into its own dedicated snapshot. This will result in a smaller runtime heap, and thus should be faster. Some tests were unfortunately disabled to ease landing this patch: 1. compiler_tests.ts which I intend to bring back in later commits. 2. Some text_encoding_test.ts tests which made the file invalid utf8. See PR for a discussion. Also worth noting that this is necessary to support WASM
2019-01-08Minimal Worker support (#1476)Ryan Dahl
This adds the ability to spawn additional Isolates from Rust and send and receive messages from them. This is preliminary work to support running the typescript compiler in a separate isolate and thus support native ES modules. Ref #975.
2019-01-02Happy new year!Ryan Dahl
2018-12-19log: bump default minimum log level to "warn"Bert Belder
2018-12-11Remove custom panic handler.Ryan Dahl
This was introduced because Tokio would swallow panics. This is still the case, but this panic handler causes more problems than it solves. It requires people to know how to use debuggers to inspect stacktraces. TODO: - Fix Tokio to not swallow errors. - Be vigilant in the intrim to not introduce broken tests due to this unfortunate "feature" of tokio.
2018-12-11Use default filename for Isolate::execute.Ryan Dahl
2018-12-10Use stderr for exceptions (#1303)Ryan Dahl
2018-12-06Process source maps in Rust instead of JS (#1280)Ryan Dahl
- Improves speed and binary size significantly. - Makes deno_last_exception() output a JSON structure. - Isolate::execute and Isolate::event_loop now return structured, mapped JSError objects on errors. - Removes libdeno functions: libdeno.setGlobalErrorHandler() libdeno.setPromiseRejectHandler() libdeno.setPromiseErrorExaminer() In collaboration with Ryan Dahl.
2018-12-05Isolate::from_raw_ptr and other cleanups.F001
`Isolate::from_void_ptr` is renamed to `from_raw_ptr`, to keep consistency with std libs. It is changed to `unsafe` function, because it can't guarantee that the input is valid. This guarantee should be provided by the caller. Its return type is changed to `&Isolate`, because `&mut Isolate` type requires that no other aliases co-exist in this period of time, this does not seem true. So I changed most of the methods to accept shared reference `&Isolate`. It is easier to reason about the correctness of `unsafe` blocks. As long as these shared references are in the same thread, these `unsafe` codes are probably correct.
2018-12-03Use include_bytes! instead of incbin.Ryan Dahl
This is the second attempt at this patch. The first version was reverted in 2ffd78daf9956a24098d1f959f21882e350e9d37 The problem, I suspect, was that the snapshot was represented as a source_set, which inserted a node into the dependency tree. include_bytes does properly insert the snapshot into rustc's depfile but the use of source_set confused gn. Now the that the deno executable has the create_deno_snapshot as a direct dependency, changes will be propagated.
2018-11-29Replace mutex by atomics (#1238)F001
2018-11-23Revert "Use include_bytes! instead of incbin. (#1182)"Ryan Dahl
Reverting because this is causing Appveyor to be red. However I hope we can reintroduce include_bytes! soon in a way that works on windows. Fixes #1208. This reverts commits 96c3641fffe8509af9351cec4580861e76d89cc9 and 92e404706b0b1a26cdaf6f8cf81aac148292557f.
2018-11-16Lift snapshot to be an argument of Isolate::new().Ryan Dahl
2018-11-14Support request method and headers in fetch() (#1188)Ryan Dahl
Adds a general HttpHeader flatbuffer message for serializing requests and responses.
2018-11-13Wrapper around hyper::Body so it can be used as AsyncReadRyan Dahl
2018-11-06Remove flags::processAndy Hayden
It was doing two independent things: - print help and exit - set log level It's better to do those explicitly in main.rs
2018-11-05Add repl (#998)Andy Hayden
- Running repl from js side. - Add tests for repl behavior. - Handle ctrl-C and ctrl-D.
2018-11-04Fix clippy warnings (#1149)Andy Hayden
Run with: cargo clippy https://github.com/rust-lang-nursery/rust-clippy
2018-11-03third_party: add tokio-process Rust crate and its dependenciesBert Belder
2018-11-02Rename EnvPair to KeyValue.Ryan Dahl
2018-10-31Support cargo check (#1128)Ryan Dahl
- Based on code from @qti3e and @piscisaureus in #724 and #1125 respectively. - TODO The DENO_BUILD_PATH env var must be supplied and must be an absolute path, this restriction should be removed in future work.
2018-10-31Better output on panic (#1129)Joseph
2018-10-31Upgrade Flatbuffers. (#1127)Ryan Dahl
Use msg_generated.rs as mod instead of crate.
2018-10-27Minor sorting not handled by format.Ryan Dahl
2018-10-27Ergonomics: Prompt TTY for permission escalation (#1081)Ryan Dahl
2018-10-24libdeno: deno_new should take a snapshot parameter.Ryan Dahl
2018-10-24Move eager functions into eager_unix.rsBert Belder