summaryrefslogtreecommitdiff
path: root/cli/ops
AgeCommit message (Collapse)Author
2019-12-02disable eager polling for ops (#3434)Bartek Iwańczuk
2019-12-01fix realpath behavior in windows (#3425)木杉
2019-11-26Add Deno.realpath (#3404)Kevin (Kun) "Kassimo" Qian
2019-11-25better error message for missing module (#3402)Bartek Iwańczuk
2019-11-24refactor: Elevate DenoPermissions lock to top level (#3398)Kevin (Kun) "Kassimo" Qian
2019-11-19remove tokio_util::block_on from ops/workers.rs (#3381)Bartek Iwańczuk
2019-11-17refactor: fixes for futures (#3363)Bartek Iwańczuk
After landing #3358 the benchmarks exploded indicating problems with workers and deno_core_http_bench. This PR dramatically fixes thread/syscall count that showed up on benchmarks. Thread count is not back to previous levels but difference went from hundreds/thousands to about ~50.
2019-11-16Use futures 0.3 API (#3358)Bartek Iwańczuk
2019-11-14refactor: per-worker resource table, take 2 (#3342)Bartek Iwańczuk
- removes global `RESOURCE_TABLE` - resource tables are now created per `Worker` in `State` - renames `CliResource` to `StreamResource` and moves all logic related to it to `cli/ops/io.rs` - removes `cli/resources.rs` - adds `state` argument to `op_read` and `op_write` and consequently adds `stateful_minimal_op` to `State` - IMPORTANT NOTE: workers don't have access to process stdio - this is caused by fact that dropping worker would close stdout for process (because it's constructed from raw handle, which closes underlying file descriptor on drop)
2019-11-14Loader: support .wasm imports (#3328)Kevin (Kun) "Kassimo" Qian
* loader: support .wasm imports * http_server: true * Support named exports * Clippy
2019-11-13Revert "refactor: per-worker resource table (#3306)"Ryan Dahl
This patch does not work with the recent bundler changes (#3325). Unfortunately I didn't merge master before landing this patch. It has something to do with console.log not working inside the compiler worker. This reverts commit fd62379eafde6571f126df5650b80cfda9f74229.
2019-11-13refactor: per-worker resource table (#3306)Bartek Iwańczuk
- removes global `RESOURCE_TABLE` - resource tables are now created per `Worker` in `State` - renames `CliResource` to `StreamResource` and moves all logic related to it to `cli/ops/io.rs` - removes `cli/resources.rs` - adds `state` argument to `op_read` and `op_write` and consequently adds `stateful_minimal_op` to `State` - IMPORTANT NOTE: workers don't have access to process stdio - this is caused by fact that dropping worker would close stdout for process (because it's constructed from raw handle, which closes underlying file descriptor on drop)
2019-11-11Add permissions.request (#3296)Yoshiya Hinosawa
2019-11-09refactor: worker is no longer a resource (#3290)Bartek Iwańczuk
2019-11-07refactor: move Child resource to ops/process.rs (#3291)Bartek Iwańczuk
2019-11-07refactor: remove cli::resources::Resource (#3285)Bartek Iwańczuk
2019-11-07refactor: rewrite accept resources (#3271)Bartek Iwańczuk
2019-11-06Remove CoreResource::inspect_repr method (#3274)Ry Dahl
Towards simplifying (or better removing entirely) the CoreResource trait. Resources should be any bit of privileged heap allocated memory that needs to be referenced from JS, not very specific trait implementations. Therefore CoreResource should be pushed towards being as general as possible.
2019-11-04Refactor Worker and ThreadSafeState (#3242)Bartek Iwańczuk
* Split ThreadSafeState into State and GlobalState. State is a "local" state belonging to "Worker" while "GlobalState" is state shared by whole program. * Update "Worker" and ops to use "GlobalState" where applicable * Move and refactor "WorkerChannels" resource
2019-10-28refactor: use core ResourceTable in cli (#3206)Bartek Iwańczuk
2019-10-27Use web standard Permissions API (#3200)Yoshiya Hinosawa
2019-10-25fix: handle malformed control buffers (#3202)Bartek Iwańczuk
2019-10-24Add error handling for minimal dispatch (#3176)Bartek Iwańczuk
2019-10-23refactor DenoPermissions.check_net & resolve_addr (#3182)EnokMan
2019-10-21feat: Deno.listenTLS (#3152)Bartek Iwańczuk
2019-10-19feat: Allow "deno eval" to run code as module (#3148)Kevin (Kun) "Kassimo" Qian
2019-10-13fix: [tls] op_dial_tls is not registerd and broken (#3121)Yusuke Sakurai
2019-10-11Add init methods for each op module (#3087)Ryan Dahl
2019-10-04Merge deno_cli_snapshots into deno_cli (#3064)Ryan Dahl
2019-10-04Use xeval from deno_std (#3058)Nayeem Rahman
2019-10-03Async compiler processing (#3043)Kitson Kelly
Basically this does pre-processing of TypeScript files and gathers all the dependencies asynchronously. Only then after all the dependencies are gathered, does it do a compile, which at that point all the dependencies are cached in memory in the compiler, so with the exception of the hard coded assets, there are no ops during the compilation. Because op_fetch_source_files is now handled asynchronously in the runtime, we can eliminate the tokio_util::block_on() which was causing the increase in threads. Benchmarking on my machine has shown about a 5% improvement in speed when dealing with compiling TypeScript. Still a long way to go, but an improvement. In theory the module name resolution and the fetching of the source files could be broken out as two different ops. This would prevent situations of sending the full source file all the time when actually the module is the same module referenced by multiple modules, but that could be done subsequently to this.
2019-10-02feat: Add support for passing a key to Deno.env() (#2952)Jed Fox
This adds a new op to get a single env var.
2019-10-01use Isolate::register_op in deno_cli (#3039)Bartek Iwańczuk
2019-09-27Add Deno.hostname() (#3032)Kevin (Kun) "Kassimo" Qian
2019-09-25Handle uncaught worker errors without panicking (#3019)Kitson Kelly
2019-09-23feat: Add Deno.dialTLS()Jonathon Orsi
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2019-09-20dial/listen API change (#3000)Ryan Dahl
Previously: dial("tcp", "deno.land:80") Now: dial({ hostname: "deno.land", port: 80, transport: "tcp" }) Similarly with listen().
2019-09-20js: reschedule global timer if it fires earlier than expected (#2989)Bert Belder
When the global timer fires earlier than expected, which apparently happens sometimes on server editions of Windows, we didn't call any setTimeout callbacks, but we *also* didn't reschedule the global timer to fire again later. When this situation occurred it would make deno exit abruptly if there were no other asynchronous ops running on the event loop. It could also lead to application hangs if the upcoming setTimeout callback was critical for the application to make progress.
2019-09-15Make deno_cli installable via crates.io (#2946)Ryan Dahl
- Fixes cargo publish on deno_typescript, deno_cli_snapshots, and deno_cli. - Combines cli_snapshots and js into one directory. - Extracts TS version at compile time rather than runtime - Bumps version awkwardly - it was necessary to test end-to-end publishing. Sorry. - Adds git submodule deno_typescript/typescript
2019-09-15Rename ansi.rs to colors.rs (#2956)Tomohito Nakayama
2019-09-14feat: parallelize downloads from TS compiler (#2949)Bartek Iwańczuk
2019-09-10fix: replace bad rid panics with errors (#2870)Bartek Iwańczuk
2019-09-06Remove replacements hack in deno_typescript (#2864)Yoshiya Hinosawa
2019-09-03Handle typescript version in rust (#2855)Yoshiya Hinosawa
2019-09-02ops/fetch: add statusText (#2851)Yoshiya Hinosawa
2019-08-30Use 'reqwest' to implement HTTP client (#2822)Bartek Iwańczuk
Closes #2720
2019-08-30Remove ts_library_builder, maintain lib.deno_runtime.d.ts by hand (#2827)Ryan Dahl
2019-08-27feat: implement Addr interface (#2821)Bartek Iwańczuk
2019-08-26Clean up various flatbuffer references (#2819)Ryan Dahl
2019-08-26Port readSync/writeSync ops to minimalRyan Dahl
This removes dispatch_flatbuffers as it is now unused. There are still a few places where msg_generated is used: ErrorKind and MediaType. These will be dealt with later.