I hereby claim:
- I am achalasb on github.
- I am achhu (https://keybase.io/achhu) on keybase.
- I have a public key ASDBAziN0L_wXFz5aNkKx4RYQWvTGg2ocNtgRlUlFID--Ao
To claim this, I am signing this object:
| package main | |
| import ( | |
| "fmt" | |
| "../runtime" | |
| ) | |
| func main() { | |
| r, err := runtime.NewRuntime("simple.wasm") |
I hereby claim:
To claim this, I am signing this object:
| [package] | |
| name = "hello_rust" | |
| version = "0.1.0" | |
| authors = ["AchalaSB <achalasbhatt@gmail.com>"] | |
| edition = "2018" | |
| # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
| [dependencies] | |
| syn = {version = "0.13", features = ["full", "extra-traits"] } |
| { | |
| "items": [ | |
| { | |
| "fn": { | |
| "attrs": [ | |
| { | |
| "style": "outer", | |
| "path": { | |
| "segments": [ | |
| { |
| { | |
| "items": [ | |
| { | |
| "fn": { | |
| "attrs": [ | |
| { | |
| "style": "outer", | |
| "path": { | |
| "segments": [ | |
| { |
| use std::ffi::{CStr, CString}; | |
| use std::os::raw::{c_char}; | |
| use std::mem; | |
| #[no_mangle] | |
| pub extern fn allocate(size: usize) -> *mut c_char { | |
| let mut data = Vec::with_capacity(size); | |
| let subject = data.as_mut_ptr(); | |
| // Avoid memory leakage |