napi-rs/examples/napi/src/lib.rs

48 lines
769 B
Rust
Raw Normal View History

#![allow(dead_code)]
2022-03-13 18:28:41 +08:00
#![allow(unreachable_code)]
#![allow(clippy::disallowed_names)]
#[macro_use]
extern crate napi_derive;
2021-09-24 17:01:54 +08:00
#[macro_use]
extern crate serde_derive;
2022-12-09 18:56:50 +08:00
#[cfg(feature = "snmalloc")]
#[global_allocator]
static ALLOC: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc;
#[napi]
/// This is a const
pub const DEFAULT_COST: u32 = 12;
2021-12-19 20:17:54 +08:00
#[napi(skip_typescript)]
pub const TYPE_SKIPPED_CONST: u32 = 12;
mod array;
2021-10-25 00:00:31 +08:00
mod r#async;
2021-11-11 00:33:51 +08:00
mod bigint;
mod callback;
mod class;
mod class_factory;
mod date;
2021-11-02 00:34:19 +08:00
mod either;
mod r#enum;
2021-09-24 09:46:27 +08:00
mod error;
2021-11-21 16:11:15 +08:00
mod external;
mod fn_strict;
mod fn_ts_override;
mod generator;
mod js_mod;
mod map;
mod nullable;
mod number;
mod object;
mod promise;
mod reference;
2021-09-28 00:01:19 +08:00
mod serde;
mod string;
2021-11-15 23:09:44 +08:00
mod symbol;
2021-11-02 20:36:34 +08:00
mod task;
mod threadsafe_function;
2021-10-08 21:13:27 +08:00
mod typed_array;