napi-rs/examples/napi/src/lib.rs
2024-01-26 02:27:46 +00:00

53 lines
901 B
Rust

#![allow(dead_code)]
#![allow(unreachable_code)]
#![allow(clippy::disallowed_names)]
#![allow(clippy::uninlined_format_args)]
#![allow(clippy::new_without_default)]
#[macro_use]
extern crate napi_derive;
#[macro_use]
extern crate serde_derive;
#[cfg(feature = "snmalloc")]
#[global_allocator]
static ALLOC: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc;
#[napi]
/// This is a const
pub const DEFAULT_COST: u32 = 12;
#[napi(skip_typescript)]
pub const TYPE_SKIPPED_CONST: u32 = 12;
mod array;
mod r#async;
mod bigint;
mod callback;
mod class;
mod class_factory;
mod constructor;
mod date;
mod either;
mod r#enum;
mod env;
mod error;
mod external;
mod fn_strict;
mod fn_ts_override;
mod function;
mod generator;
mod js_mod;
mod map;
mod nullable;
mod number;
mod object;
mod promise;
mod reference;
mod serde;
mod shared;
mod string;
mod symbol;
mod task;
mod threadsafe_function;
mod typed_array;