You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is due to the limitation of node-api. napi_set_named_property and ``napi_set_named_propertyconsider\0` as terminator rather values.
To solve the problem, we first use the workaround:
Convert the String to a custom string type that implements ToNapiValue trait and convert the String to JsString under the hood.
This way would cause a extra napi call for creating JsString.
The best practice is to make node-api napi_set_named_property and napi_set_named_property support passing string with length to treat \0 as values instead of terminator.
refs:
Nul
Error of CString while creating javascript object napi-rs/napi-rs#2110rolldown/crates/rolldown/src/utils/chunk/render_chunk.rs
Lines 76 to 78 in 49d4b5c
The text was updated successfully, but these errors were encountered: