napi-rs
napi-rs copied to clipboard
A framework for building compiled Node.js add-ons in Rust via Node-API
- https://github.com/prisma/prisma/issues/13192 - https://github.com/Brooooooklyn/canvas/issues/445
Hi there! Coworker of the reporter of https://github.com/napi-rs/napi-rs/issues/1229 (hi @Xaeroxe!) here. Title says all -- I'm bubbling up the experimental `node_api_get_module_file_name` function to the `Env` API. :) Resolves #1229's use...
Hello, I'm trying to catch a Js function from a napi-rs asynctask unfortunately it doesn't work: ` foo('bar').catch((err) => { t.is(err.code, 'GenericFailure') }) ` However with try/catch it works perfectly....
I am running into the issue that two different classes defined in napi-rs can type-check as each other in typescript, because they use structural typing ```typescript export class Event {...
```rust use napi::bindgen_prelude::*; use napi_derive::napi; #[napi] pub mod test_module { #[napi] pub enum test_enum { test_value } } ``` This currently doesn't work and give out this error: ``` error[E0599]:...
```rust use std::collections::HashSet; #[napi] pub fn get_set(&self) -> HashSet { self.random_set } // the trait `NapiRaw` is not implemented for `std::collections::HashSet` ``` Would be neat to be able to write...
I have a struct that I don't want to convert to JavaScript, so I have it wrapped in an object. It would be great to have a way to still...
the working/tracing PR of refactoring napi cli tools with rust. features: - [x] napi new - [x] napi build - [x] napi watch - [ ] 🚘napi xxx Aimed to...
While debugging memory leak in Prisma, we stumbled upon couple of issues with `ThreadsafeFunctions`, which, I beleive, boil down to a not quite correct underlying C APIs usages. ## `unref`...
I tried to follow the getting started guide at https://napi.rs/docs/introduction/simple-package but I'm getting stuck pretty early. According to the documentation, the generated directory should contain a `.cargo` directory and building...