diff --git a/.cargo/config.toml b/.cargo/config.toml index 2801c8f..a11c798 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -3,7 +3,7 @@ rustflags = [ "-C", "link-arg=-sEXPORTED_RUNTIME_METHODS=[\"UTF8ToString\"]", "-C", - "link-arg=-sEXPORTED_FUNCTIONS=[\"_malloc\",\"_free\"]", + "link-arg=-sEXPORTED_FUNCTIONS=[\"_malloc\",\"_free\",\"_main\"]", "-C", "link-arg=-sALLOW_MEMORY_GROWTH=1", "-C", diff --git a/src/lib.rs b/src/lib.rs index 820b254..c9eb9b0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -138,3 +138,6 @@ pub fn highlight(highlight_names: Vec, language: String, code: String) - html_renderer.lines().collect::>().join("") } + +#[no_mangle] +pub fn main() {}