summaryrefslogtreecommitdiff
path: root/src/binding.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-07-23 14:13:12 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-07-24 12:29:54 -0400
commit0213053856148379992212b189390f222c6cb460 (patch)
treef62e02bf4d8d91cddcc45169ce5afb0c2d4bf5de /src/binding.rs
parentb79ce93010d0cc80a9345f646e562326de4588e5 (diff)
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.
Diffstat (limited to 'src/binding.rs')
-rw-r--r--src/binding.rs24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/binding.rs b/src/binding.rs
index 72e8af996..1ef376dff 100644
--- a/src/binding.rs
+++ b/src/binding.rs
@@ -1,11 +1,9 @@
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
#![allow(dead_code)]
-
extern crate libc;
use libc::c_char;
use libc::c_int;
use libc::c_void;
-use libc::uint32_t;
#[repr(C)]
pub struct DenoC {
@@ -14,10 +12,10 @@ pub struct DenoC {
#[repr(C)]
pub struct deno_buf {
- alloc_ptr: *mut u8,
- alloc_len: usize,
- data_ptr: *mut u8,
- data_len: usize,
+ pub alloc_ptr: *mut u8,
+ pub alloc_len: usize,
+ pub data_ptr: *mut u8,
+ pub data_len: usize,
}
type DenoRecvCb = unsafe extern "C" fn(d: *const DenoC, buf: deno_buf);
@@ -36,18 +34,4 @@ extern "C" {
js_source: *const c_char,
) -> c_int;
pub fn deno_handle_msg_from_js(d: *const DenoC, buf: deno_buf);
- pub fn deno_reply_error(
- d: *const DenoC,
- cmd_id: uint32_t,
- msg: *const c_char,
- );
- pub fn deno_reply_null(d: *const DenoC, cmd_id: uint32_t);
- pub fn deno_reply_code_fetch(
- d: *const DenoC,
- cmd_id: uint32_t,
- module_name: *const c_char,
- filename: *const c_char,
- source_code: *const c_char,
- output_code: *const c_char,
- );
}