dioxus_interpreter_js/
lib.rs1#![allow(clippy::empty_docs)]
2#![doc = include_str!("../README.md")]
3#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
4#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
5
6pub static INTERPRETER_JS: &str = include_str!("./js/core.js");
8
9pub static NATIVE_JS: &str = include_str!("./js/native.js");
11
12pub static INITIALIZE_STREAMING_JS: &str = include_str!("./js/initialize_streaming.js");
14
15#[cfg(all(feature = "binary-protocol", feature = "sledgehammer"))]
16mod write_native_mutations;
17
18#[cfg(all(feature = "binary-protocol", feature = "sledgehammer"))]
19pub use write_native_mutations::*;
20
21#[cfg(feature = "sledgehammer")]
22pub mod unified_bindings;
23
24#[cfg(feature = "sledgehammer")]
25pub use unified_bindings::*;
26
27#[cfg(all(feature = "minimal_bindings", feature = "webonly"))]
29pub mod minimal_bindings {
30 use wasm_bindgen::{prelude::wasm_bindgen, JsValue};
31
32 #[wasm_bindgen(module = "/src/js/common.js")]
36 extern "C" {
37 pub fn setAttributeInner(node: JsValue, name: &str, value: JsValue, ns: Option<&str>);
39
40 pub fn collectFormValues(node: JsValue) -> JsValue;
42 }
43
44 #[wasm_bindgen(module = "/src/js/hydrate.js")]
45 extern "C" {
46 pub fn register_rehydrate_chunk_for_streaming(
48 closure: &wasm_bindgen::closure::Closure<dyn FnMut(Vec<u32>, js_sys::Uint8Array)>,
49 );
50
51 pub fn register_rehydrate_chunk_for_streaming_debug(
53 closure: &wasm_bindgen::closure::Closure<
54 dyn FnMut(Vec<u32>, js_sys::Uint8Array, Option<Vec<String>>, Option<Vec<String>>),
55 >,
56 );
57 }
58
59 #[wasm_bindgen(module = "/src/js/patch_console.js")]
60 extern "C" {
61 pub fn monkeyPatchConsole(ws: JsValue);
62 }
63}