1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

70 commits

Author SHA1 Message Date
Ryan Dahl
35bc9ddf63 Implement deno.readFile()
As an example of how to implement ops that have both sync and async
versions.
2018-09-10 00:14:28 -04:00
Ryan Dahl
a4f1b367b9 Remove namespace from src/msg.fbs 2018-09-09 23:12:22 -04:00
Ryan Dahl
0d03fafbfe Map promises onto futures.
Refactors handlers.rs

The idea is that all Deno "ops" (aka bindings) should map onto
a Rust Future. By setting the "sync" flag in the Base message
users can determine if the future is executed immediately or put
on the event loop.

In the case of async futures, a promise is automatically created.
Errors are automatically forwarded and raised.

TODO:

- The file system ops in src/handler.rs are not using the thread pool
  yet. This will be done in the future using tokio_threadpool::blocking.
  That is, if you try to call them asynchronously, you will get a promise
  and it will act asynchronous, but currently it will be blocking.
- Handlers in src/handler.rs returned boxed futures. This was to make
  it easy while developing. We should try to remove this allocation.
2018-09-09 18:47:22 -04:00
J2P
3deaf99a92 Format msg.fbs 2018-09-07 20:36:18 -04:00
Mirko Jotic
fcdfacc2de Implementing --deps flag
- Adding a ModuleId type alias to specify original url or local file of
dependency
- Modifying ModuleMetaData class to contain ModuleId
- Adding a --deps flag
2018-09-06 10:42:07 -04:00
Mani Maghsoudlou
641e3d404d Implement renameSync 2018-09-04 11:57:04 -04:00
Sajjad Hashemian
b2b4299e3b Implement mkdirSync 2018-09-03 15:06:00 -04:00
Aaron Power
f131445a46 Implemented deno.env and refactored flags.rs 2018-08-31 13:18:24 -04:00
Aaron Power
b86bf4d8a4 Implemented statSync and lStatSync 2018-08-30 12:39:33 -04:00
Bert Belder
ceaf822682
Implement makeTempDirSync() 2018-08-29 22:40:05 +02:00
Ryan Dahl
e2f9b0e6fd First pass at HTTP imports
Implement --reload

Integrate hyper errors into DenoError

In collaboration with Tommy Savaria <tommy.savaria@protonmail.ch>
2018-08-23 09:41:08 -04:00
Ryan Dahl
18d495c7d1 Better error handling in src/handlers.rs
Introduces error codes that are shared between JS/RS

Fixes #526.
2018-08-21 15:37:45 -04:00
Ryan Dahl
42e7b7b3e7 Use snake-case for cmd_id. 2018-08-17 18:50:37 -04:00
Ryan Dahl
36d82374cf Implement deno_handle_msg_from_js in Rust
Fixes #419, #414.
2018-08-16 08:40:11 -04:00
Ryan Dahl
d770cc18f8 Upgrade Rust Flatbuffers 2018-08-16 08:40:11 -04:00
Ryan Dahl
fb87cb38ec
First pass at setTimeout with Tokio (#434) 2018-08-09 12:17:08 -07:00
Ryan Dahl
0213053856 Remove handlers crate target.
- Add build scripts for Rust flatbuffers.
- Rewrites some reply.cc methods in Rust.
- Changes some struct elements to table in msg.fbs (rust flatbuffers
  lacks support currently)
- Renames handlers_test to test_rs.
- This reorg is needed to make progress on the code cache handler.
2018-07-24 12:29:54 -04:00
Bert Belder
8a17db8266
Add 'command id' field to messages
This allows for correlating response messages to the command message that
caused them.
2018-07-08 21:01:24 +02:00
Ryan Dahl
9778eceaf5 Use C++ to do flatbuffer parsing.
- Port protobuf messages to flatbuffers.
- Demo linking to rust from C++ executable.
- Start using the prototype TS libraries.
2018-07-06 17:33:06 -04:00
Ryan Dahl
06a28998ea Replace protobufs with flatbuffers 2018-07-04 16:43:08 -04:00