napi-rs/crates/napi/src
Ivan Enderlin cb2a407228 feat(napi) Implement ToNapiValue for 8 and 16-bits numbers.
`napi` only supports numbers in 16 and 32-bits. To support Rust
numbers with 8 and 16-bits, we can cast them to 32-bits. To convert
from 8 and 16-bits to 32-bits, we use their `Into` implementation. To
convert from 32-bits to 8 and 16-bits, we use their `TryInto`, we
should theorically not fail, but in case of, an `except` message is
appended.

The code has also been re-indented as it was containing a mix of 2
spaces, 4 spaces and tabs identation.
2022-05-25 14:43:23 +08:00
..
bindgen_runtime feat(napi) Implement ToNapiValue for 8 and 16-bits numbers. 2022-05-25 14:43:23 +08:00
js_values refactor(napi): use libloading on Windows 2022-05-06 22:27:09 +08:00
async_cleanup_hook.rs
async_work.rs
call_context.rs
cleanup_env.rs
env.rs
error.rs feat(napi): make Error::from_reason() generic 2022-05-01 17:00:24 +02:00
lib.rs fix(napi): drop all thread_local! usage 2022-05-10 18:39:36 +08:00
promise.rs
status.rs
task.rs
threadsafe_function.rs
tokio_runtime.rs
value_type.rs
version.rs