wry_bindgen_core/lib.rs
1#![doc = include_str!("../README.md")]
2#![no_std]
3
4// The stable runtime-support boundary that `wry-bindgen` builds on. This crate
5// exposes only *semantic* operations: typed JS function handles whose `.call()`
6// performs a round-trip, a typed object store keyed by an opaque `ObjectHandle`,
7// typed thread-local JS values, and the generated-code registration specs. Every
8// wire mechanism (function ids, the cached type-id protocol, borrow-stack ids,
9// placeholder ids, and `Box<dyn Any>` plumbing) is kept private here so the
10// frequently-changing `wry-bindgen-runtime` implementation can evolve beneath
11// this boundary without churning `wry-bindgen`'s public surface.
12
13extern crate alloc;
14
15mod batchable;
16mod call;
17mod callback;
18mod clamped;
19mod runtime;
20mod thread_local;
21
22pub use batchable::{BatchableResult, RequireFlush};
23pub use call::JsFunction;
24pub use callback::CallbackKey;
25pub use clamped::Clamped;
26pub use runtime::{Runtime, with_runtime};
27pub use thread_local::{JsThreadLocal, LazyCell};
28
29pub use wry_bindgen_runtime::wire::{
30 BinaryDecode, BinaryEncode, DecodeError, DecodedData, EncodeTypeDef, EncodedData,
31 JsClassMemberKind, JsClassMemberSpec, JsExportSpec, JsFunctionSpec, JsModuleSpec, JsRef,
32 JsRefEncode, ObjectHandle, RustCallback, TypeDef,
33};