quickjs_oxide/engine/api/mod.rs
1//! Rust embedding boundary: the API over `quickjs-oxide-core` lives in [`core`].
2pub mod core;
3pub mod error;
4
5pub use crate::engine::compiler::lexer::quickjs_detect_module_bytes;
6
7/// Declare that the current thread was spawned with `size` bytes of stack.
8///
9/// Call this first thing on the thread. The parser reports deeply nested
10/// source as a catchable `SyntaxError: stack overflow` before exhausting the
11/// native stack; without a declaration it assumes at most one MiB is
12/// available to a parse on a thread other than the main thread.
13pub fn declare_thread_stack(size: usize) {
14 crate::engine::compiler::stack_guard::declare_thread_stack(size);
15}
16/// Formatting and source classification used by embedders.
17pub use crate::engine::value::number_to_string;
18
19#[cfg(feature = "test-support")]
20pub mod testing;