ifc_lite_wasm/zero_copy/
mod.rs

1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
5//! Zero-copy mesh data structures for WASM
6//!
7//! Enables direct access to WASM memory from JavaScript without copying.
8
9use wasm_bindgen::prelude::*;
10
11mod frame_swap;
12mod mesh;
13mod symbolic;
14mod symbolic_from_data;
15mod symbolic_truncation;
16#[cfg(test)]
17mod symbolic_tests;
18
19pub use mesh::{GeometryFingerprint, MeshCollection, MeshDataJs};
20pub use symbolic::{
21    SymbolicCircle, SymbolicFillArea, SymbolicPolyline, SymbolicRepresentationCollection,
22    SymbolicText,
23};
24
25/// Get WASM memory to allow JavaScript to create TypedArray views
26#[wasm_bindgen]
27pub fn get_memory() -> JsValue {
28    wasm_bindgen::memory()
29}