Ryan Dahl
790baae673
Expose deno.exit() and add test.
2018-08-21 18:34:56 -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
5d866161f8
Fix TS errors in fetch.ts
2018-08-20 21:20:15 -04:00
Ryan Dahl
868e8d8866
First pass at fetch()
...
With help from Thomas Ghysels <info@thomasg.be>
2018-08-20 16:53:39 -04:00
Bartek Iwańczuk
66f0e93b4c
add notImplemented and unreachable util functions ( #540 )
2018-08-19 15:04:27 -04:00
Yoshiya Hinosawa
aaabc853e8
chore: move libdeno files to //libdeno/
2018-08-19 11:27:47 -04:00
Ryan Dahl
17b9c5c390
Command line flag parsing ( #524 )
...
In particular this allow -D for logging debug output.
2018-08-17 16:34:30 -04:00
Yoshiya Hinosawa
565a21eb0e
chore: format files in tests/
2018-08-17 12:43:21 -04:00
Ryan Dahl
36d82374cf
Implement deno_handle_msg_from_js in Rust
...
Fixes #419 , #414 .
2018-08-16 08:40:11 -04:00
Kitson Kelly
168d92f5d2
Use typescript strict mode ( #505 )
2018-08-15 12:40:30 -04:00
Kitson Kelly
e9d692ef70
Use @internal
with js/timers.ts
2018-08-13 11:54:10 -04:00
Ryan Dahl
c7ce450ee9
Rename mock_runtime_test to libdeno_test
...
Fixes #465
2018-08-11 09:02:07 -07:00
Ryan Dahl
89eee51f07
Use unit_tests for readFileSync testing.
2018-08-11 09:02:07 -07:00
Kitson Kelly
e28d7abc1c
Only emit declarations for generated files ( #502 )
...
and remove declarationMap flag from generated tsconfig
2018-08-10 10:46:09 -07:00
Ryan Dahl
9d90c4ae95
Adds js/unit_tests.ts ( #448 )
2018-08-09 14:48:17 -07:00
Ryan Dahl
413bcf2042
Add readFileSync
2018-08-09 14:27:46 -07:00
Ryan Dahl
040a042679
Add TextEncoder/TextDecoder support.
...
Fixes #470
This commit increases size:
out/release/gen/bundle/main.js 7.3M -> 7.9M
out/release/gen/bundle/main.js.map 11M -> 12M
out/release/gen/snapshot_deno.bin 34M -> 37M
out/release/deno 49M -> 53M
Note the amount in the JS code added is quite small:
4.0K node_modules/text-encoding/index.js
4.0K node_modules/@types/text-encoding/index.d.ts
4.0K js/text_encoding.ts
Unclear to me what is causing the jump in snapshot size.
2018-08-09 14:27:46 -07:00
Ryan Dahl
fb87cb38ec
First pass at setTimeout with Tokio ( #434 )
2018-08-09 12:17:08 -07:00
Ryan Dahl
51380bf399
Organize libdeno functions.
2018-08-08 18:35:26 -07:00
Ryan Dahl
7895964ee1
Better error for 'No such asset'
2018-08-08 18:35:26 -07:00
Kitson Kelly
817380a2d9
Generate declarations
2018-08-08 04:17:46 -07:00
Kitson Kelly
eda1c7b74a
Create ASSETS const in runtime.ts
2018-08-08 04:17:46 -07:00
Kitson Kelly
28078cf441
Rename lib.deno.d.ts to lib.globals.d.ts
2018-08-08 04:17:46 -07:00
Ryan Dahl
60f6067cf9
Implement os.exit
2018-08-03 22:41:59 -04:00
Ryan Dahl
c7c6203e61
Source map support ( #429 )
...
This change increases size:
out/debug/obj/libdeno/from_snapshot.o 19M -> 34M
out/release/deno 32M -> 47M
2018-08-02 13:13:32 -04:00
Ryan Dahl
421358e7a9
Remove dispatch.ts and move assignCmdId to util.ts
2018-08-02 12:49:40 -04:00
Ryan Dahl
db8dc0e9f8
Better handling of exceptions during snapshot creation.
2018-08-01 12:14:10 -04:00
Kitson Kelly
36fa1cea4a
Upgrade TypeScript (3.0.1)
...
Update runtime to use lib.deno.d.ts
Add proper console declaration
Upgrade prettier (There was an issue formatting lib.deno.d.ts)
2018-07-31 20:47:49 -04:00
Ryan Dahl
4d386e9e1c
Implement CodeCache
2018-07-29 00:22:39 -04:00
Kitson Kelly
5562c36824
Remove msg_generated hack ( #409 )
2018-07-25 23:07:50 -04: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
Ryan Dahl
b79ce93010
Allow deno_buf with null alloc_ptr to be memcpy'd
...
This is a temporary hack to allow for easier restructuring of
the serialization code as we move Flatbuffer stuff from C++ to Rust.
2018-07-24 12:29:54 -04:00
Ryan Dahl
b87e6d5604
Add mock_runtime_test for deno_last_exception.
2018-07-24 12:29:54 -04:00
Ryan Dahl
1de16af1f3
Change copyrights to be 'Deno authors'.
2018-07-24 10:38:11 -04:00
Kitson Kelly
845f7215db
Replace packer with rollup
2018-07-22 03:16:17 +02:00
Ryan Dahl
b892188878
Better exception output.
2018-07-18 15:43:50 -04:00
Ryan Dahl
3e51605bc9
Execute JS for the first time in Rust rewrite.
...
Implements code_fetch handler in Rust.
Add ability to embed string assets (for typescript declaration files)
Remove deno_cc and deno_cc_nosnapshot targets.
2018-07-18 15:43:50 -04:00
Bert Belder
24b0e91d80
Move buffers between V8 and native
...
* send()/recv() now operate on TypedArrays rather than ArrayBuffers.
* Remove a copy (through ArrayBuffer.slice()) from the send path.
* Remove a copy (through v8::ArrayBuffer::New()) from the return path.
* After moving a buffer from JS to native, the ArrayBuffer object and
it's views are made inaccessible ('neutered').
* `struct deno_buf` now holds two [ptr, length] tuples, one for the actual
memory allocation, and one for the logical data contained therein.
This is necessary because flatbuffers fills it's buffer bottom-up, so
the serialized blob doesn't start at beginning of the buffer, but
somewhere in the middle.
2018-07-12 21:26:38 +02:00
Yoshiya Hinosawa
46db20172c
chore: use local prettier
2018-07-09 11:05:02 -04:00
Bert Belder
14f208fff9
Regenerate msg_generated.ts
...
I forgot to commit this file in 8a17db8
.
2018-07-09 04:23:58 +02: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
f917c5e722
Clean up tools/
...
- Factor out tools/util.py
- Move js/*.py to tools.
- Rewrite tools/format.sh in python.
- Run lint first in travis.
2018-07-08 13:40:18 -04:00
Ryan Dahl
a2dde56c59
Remove channel parameter from deno_send/recv.
2018-07-06 18:25:09 -04: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
fe404dfce9
Import ts file from prototype without change
...
From commit 559453cf6c
Excluding v8worker.d.ts, main.ts, and deno.d.ts.
Updates tslint.json to be original settings.
2018-07-06 12:22:11 -04:00
Yoshiya Hinosawa
c1f430966a
chore: reorganize symlinks
...
resolves #332
2018-07-06 01:57:32 -04:00
Ryan Dahl
06a28998ea
Replace protobufs with flatbuffers
2018-07-04 16:43:08 -04:00
Yoshiya Hinosawa
2060bc939d
Add tools/build_third_party.py ( #328 )
...
Fixes #312
2018-07-04 15:04:59 +02:00
Ryan Dahl
a33f575cda
Switch back to recv/send instead of pub/sub for low-level API.
2018-07-03 21:22:39 +02:00
Ryan Dahl
92d01f8519
Remove BaseMsg from msg.proto
2018-07-03 21:22:39 +02:00
Parsa Ghadimi
235e549035
Add tslint
2018-07-01 21:41:53 +02:00
Yoshiya Hinosawa
ea35281d63
chore: move //src/js to //js
...
refs: #285
2018-07-01 17:22:36 +02:00