siku2 / rust-monaco

Rust WASM bindings for the Monaco Editor
Apache License 2.0
77 stars 25 forks source link

Add missing `module` and `js_namespace` annotations to `languages` binding #30

Closed abesto closed 1 year ago

abesto commented 1 year ago

Currently calling monaco::languages::register and presumably any other function in tho module) lead to ReferenceError: register is not defined. AFAICT this is due to languages.rs not telling wasm_bindgen where to find the functions.

I just dabble with this Rust / WebAssembly stuff in hobby projects, so I could be going about this wrong :) But I took what I saw in editor.rs, and

siku2 commented 1 year ago

Looks good to me, thanks