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
I'm currently working on a project where I utilize N-API to facilitate the conversion of values from a Rust core to a TypeScript wrapper. However, I've encountered an issue: I'm unable to convert a Set object to a JavaScript Set due to the lack of support for sets in N-API.
Before proceeding further, I wanted to confirm whether my understanding is correct. Does N-API indeed lack support for sets, or is there a method I might have overlooked?
Additionally, I'm curious to know if there are any plans to include support for sets in N-API in future releases. If not, I'd appreciate any suggestions or workarounds that could help me achieve the desired conversion from Rust to TypeScript.
Thank you for your assistance!
The text was updated successfully, but these errors were encountered:
At present,N-API doesn't provide support to create a Set data structure. The creation from rust's hashmap is done by creating an object.
Could you consider using an array instead? Is there a specific situation where you absolutely need to use a set? Alternatively, after creating the array, you could create a set in the JS environment using this array.
Hi there! 馃檪
I'm currently working on a project where I utilize N-API to facilitate the conversion of values from a Rust core to a TypeScript wrapper. However, I've encountered an issue: I'm unable to convert a Set object to a JavaScript Set due to the lack of support for sets in N-API.
Before proceeding further, I wanted to confirm whether my understanding is correct. Does N-API indeed lack support for sets, or is there a method I might have overlooked?
Additionally, I'm curious to know if there are any plans to include support for sets in N-API in future releases. If not, I'd appreciate any suggestions or workarounds that could help me achieve the desired conversion from Rust to TypeScript.
Thank you for your assistance!
The text was updated successfully, but these errors were encountered: