Expose objects and functions from the JavaScript global scope

These are bindings to JavaScript's standard, built-in objects and their methods
and properties.

This does *not* include any Web, Node, or any other JS environment APIs. Only
the things that are guaranteed to exist in the global scope by the ECMAScript
standard.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects
This commit is contained in:
Nick Fitzgerald
2018-06-08 16:46:51 -07:00
parent 132103eb06
commit 161fce9d50
5 changed files with 249 additions and 1 deletions

View File

@ -6,6 +6,7 @@
//! interface.
#![feature(use_extern_macros, wasm_import_module, try_reserve, unsize)]
#![cfg_attr(feature = "js_globals", feature(proc_macro, wasm_custom_section))]
#![no_std]
#[cfg(feature = "serde-serialize")]
@ -43,6 +44,13 @@ pub mod prelude {
pub mod convert;
pub mod describe;
#[cfg(feature = "js_globals")]
pub mod js;
#[cfg(feature = "js_globals")]
mod wasm_bindgen {
pub use super::*;
}
if_std! {
extern crate std;