diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-07-13 03:24:07 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-07-18 15:43:50 -0400 |
commit | 3e51605bc9ca98522fc21a0673e690105f48da98 (patch) | |
tree | 1c31da16173d95d6623721414b402d1dcdf069b4 /src/reply.h | |
parent | 8a4e3dfda4975540d6e0059248477facfe03c31c (diff) |
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.
Diffstat (limited to 'src/reply.h')
-rw-r--r-- | src/reply.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/reply.h b/src/reply.h new file mode 100644 index 000000000..aa2e61f8c --- /dev/null +++ b/src/reply.h @@ -0,0 +1,29 @@ +// Copyright 2018 Ryan Dahl <ry@tinyclouds.org> +// All rights reserved. MIT License. + +// TODO(ry) This library handles parsing and sending Flatbuffers. It's written +// in C++ because flatbuffer support for Rust is not quite there. However, once +// flatbuffers are supported in Rust, all of this code should be ported back to +// Rust. + +#ifndef REPLY_H_ +#define REPLY_H_ + +#include <stdint.h> +#include "deno.h" + +extern "C" { + +void deno_reply_null(Deno* d, uint32_t cmd_id); +void deno_reply_error(Deno* d, uint32_t cmd_id, const char* error_msg); + +void deno_reply_start(Deno* d, uint32_t cmd_id, int argc, char* argv[], + char* cwd); +void deno_reply_code_fetch(Deno* d, uint32_t cmd_id, const char* module_name, + const char* filename, const char* source_code, + const char* output_code); + +// Parse incoming messages with C++ Flatbuffers, call into rust handlers. +void deno_handle_msg_from_js(Deno* d, deno_buf buf); +} +#endif // REPLY_H_ |