wasm_feature_detect_sys/
lib.rs

1//! Raw bindings to the [wasm-feature-detect](https://wasm-feature-detect.surma.technology) API for projects using wasm-bindgen
2
3#![deny(clippy::all)]
4
5use js_sys::Promise;
6use wasm_bindgen::prelude::*;
7
8#[wasm_bindgen(module = "wasm-feature-detect")]
9extern {
10    /// Detector for the [BigInt Integration](https://github.com/WebAssembly/JS-BigInt-integration) feature proposal. Returns `Promise<bool>`.
11    #[wasm_bindgen(js_name = "bigInt")]
12    pub fn big_int() -> Promise;
13
14    /// Detector for the [Bulk Memory Operations](https://github.com/webassembly/bulk-memory-operations) feature proposal. Returns `Promise<bool>`.
15    #[wasm_bindgen(js_name = "bulkMemory")]
16    pub fn bulk_memory() -> Promise;
17
18    /// Detector for the [Exception Handling](https://github.com/WebAssembly/exception-handling) feature proposal. Returns `Promise<bool>`.
19    pub fn exceptions() -> Promise;
20
21    /// Detector for the [Multi-Value](https://github.com/WebAssembly/multi-value) feature proposal. Returns `Promise<bool>`.
22    #[wasm_bindgen(js_name = "multiValue")]
23    pub fn multi_value() -> Promise;
24
25    /// Detector for the [Multi-Global](https://github.com/WebAssembly/mutable-global) feature proposal. Returns `Promise<bool>`.
26    #[wasm_bindgen(js_name = "mutableGlobals")]
27    pub fn mutable_globals() -> Promise;
28
29    /// Detector for the [Reference Types](https://github.com/WebAssembly/reference-types) feature proposal. Returns `Promise<bool>`.
30    #[wasm_bindgen(js_name = "referenceTypes")]
31    pub fn reference_types() -> Promise;
32
33    /// Detector for the [Non-Trapping Float-to-Int Conversion](https://github.com/WebAssembly/nontrapping-float-to-int-conversions) feature proposal. Returns `Promise<bool>`.
34    #[wasm_bindgen(js_name = "saturatedFloatToInt")]
35    pub fn saturated_float_to_int() -> Promise;
36
37    /// Detector for the [Sign-Extension Operators](https://github.com/WebAssembly/sign-extension-ops) feature proposal. Returns `Promise<bool>`.
38    #[wasm_bindgen(js_name = "signExtensions")]
39    pub fn sign_extensions() -> Promise;
40
41    /// Detector for the [SIMD](https://github.com/webassembly/simd) feature proposal. Returns `Promise<bool>`.
42    pub fn simd() -> Promise;
43
44    /// Detector for the [Tail Call](https://github.com/webassembly/tail-call) feature proposal. Returns `Promise<bool>`.
45    #[wasm_bindgen(js_name = "tailCall")]
46    pub fn tail_call() -> Promise;
47
48    /// Detector for the [Threads](https://github.com/webassembly/threads) feature proposal. Returns `Promise<bool>`.
49    pub fn threads() -> Promise;
50}