mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-21 07:49:17 +03:00
repl: rename entrypoint from JS and remove unnecessary pub
in Rust
This commit is contained in:
parent
9bfd0e44d6
commit
f8ad09f6ab
@ -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");
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user