Skip to content

Commit

Permalink
refactor(wasm): init for bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Nov 27, 2023
1 parent f25f82e commit 0c2ba41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion enfer_wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "inference_wasm"
name = "enfer_wasm"
version = "0.1.0"
authors = ["Phodal Huang <[email protected]>"]
edition = "2021"
Expand All @@ -11,6 +11,8 @@ crate-type = ["cdylib", "rlib"]
default = ["console_error_panic_hook"]

[dependencies]
enfer_core = { path = "../enfer_core" }

wasm-bindgen = "0.2.88"

tracing = "0.1.40"
Expand Down
5 changes: 5 additions & 0 deletions enfer_wasm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
mod utils;

use std::sync::Arc;
use wasm_bindgen::prelude::*;
use inference_core::{Semantic, SemanticError};

#[wasm_bindgen]
extern "C" {
fn alert(s: &str);

// fn init_semantic(model: Vec<u8>, tokenizer_data: Vec<u8>) -> Result<Arc<Semantic>, SemanticError>;
}

#[wasm_bindgen]
Expand Down

0 comments on commit 0c2ba41

Please sign in to comment.