Macro embed_js::embed_js_preamble
[−]
[src]
macro_rules! embed_js_preamble { () => { ... }; }
For every crate that uses the js
macro directly, the embed_js_preamble
macro must be called
at least once somewhere in the crate, for example
⚠Be careful when using this code, it's not being tested!
#[macro_use] extern crate embed_js; embed_js_preamble!(); #[no_mangle] pub fn entry_point() { js!({console.log("Hello world!");}); }
You do not need to import embed_js
at all in crates that only depend on crates that use the
js
macro without directly calling it themselves.