repl: rename entrypoint from JS and remove unnecessary pub in Rust

This commit is contained in:
Brian Carroll 2022-02-08 09:28:42 +00:00
parent 9bfd0e44d6
commit f8ad09f6ab
2 changed files with 5 additions and 5 deletions

View File

@ -24,11 +24,11 @@ const WRAPPER_NAME: &str = "wrapper";
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen(catch)]
pub async fn js_create_app(wasm_module_bytes: &[u8]) -> Result<(), JsValue>;
async fn js_create_app(wasm_module_bytes: &[u8]) -> Result<(), JsValue>;
pub fn js_run_app() -> usize;
fn js_run_app() -> usize;
pub fn js_get_result_and_memory(buffer_alloc_addr: *mut u8) -> usize;
fn js_get_result_and_memory(buffer_alloc_addr: *mut u8) -> usize;
}
pub struct WasmReplApp<'a> {
@ -148,7 +148,7 @@ impl<'a> ReplApp<'a> for WasmReplApp<'a> {
}
#[wasm_bindgen]
pub async fn repl_wasm_entrypoint_from_js(src: String) -> Result<String, String> {
pub async fn entrypoint_from_js(src: String) -> Result<String, String> {
let arena = &Bump::new();
let pre_linked_binary: &'static [u8] = include_bytes!("../data/pre_linked_binary.o");

View File

@ -56,7 +56,7 @@ async function processInputQueue() {
let outputText;
let ok = true;
try {
outputText = await roc_repl_wasm.repl_wasm_entrypoint_from_js(inputText);
outputText = await roc_repl_wasm.entrypoint_from_js(inputText);
} catch (e) {
outputText = `${e}`;
ok = false;