Skip to content

Instantly share code, notes, and snippets.

@thomas-jeepe
thomas-jeepe / ffi.rs
Created October 20, 2017 18:48
JsBytes
use std::mem;
/// Struct that can be used to store a vector of bytes and sent
/// to JS
#[repr(C)]
#[derive(Debug)]
pub struct JsBytes {
ptr: u32,
len: u32,
}