From 27f7e00bbf8b79fe6b762d81fe0a679e027c46c3 Mon Sep 17 00:00:00 2001 From: ccgauche Date: Mon, 14 Dec 2020 18:22:03 +0100 Subject: [PATCH] added safety section --- plugin/rt/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/rt/src/lib.rs b/plugin/rt/src/lib.rs index ef7c25d0cd..f010266708 100644 --- a/plugin/rt/src/lib.rs +++ b/plugin/rt/src/lib.rs @@ -40,6 +40,8 @@ pub fn write_output(value: impl Serialize) -> i32 { static mut BUFFERS: Vec = Vec::new(); /// Allocate buffer from wasm linear memory +/// # Safety +/// This function should never be used only intented to by used by the host #[no_mangle] pub unsafe fn wasm_prepare_buffer(size: i32) -> i32 { BUFFERS = Vec::::with_capacity(size as usize);