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
The sys module was moved from a neon-runtime crate when the C++/NAN backend was removed. Originally it made sense to have logic there in order to abstract over the backend. However, now that there is a single backend it's no longer necessary to restrict calls to Node-API to this module. In fact, the extractor PR makes heavy use of sys functions for performance.
A cleaner and easier to follow model is a module for each JavaScript type.
In this structure, we would move TryFromJs implementations. In many cases, we could de-duplicate code by making fn value(..) implementations delegate to try_from_js. For example, JsString::value:
kjvalencik
changed the title
Re-orgnize types module and remove logic from sys module
Re-organize types module and remove logic from sys module
Apr 3, 2024
The
sys
module was moved from aneon-runtime
crate when the C++/NAN backend was removed. Originally it made sense to have logic there in order to abstract over the backend. However, now that there is a single backend it's no longer necessary to restrict calls to Node-API to this module. In fact, the extractor PR makes heavy use ofsys
functions for performance.A cleaner and easier to follow model is a module for each JavaScript type.
In this structure, we would move
TryFromJs
implementations. In many cases, we could de-duplicate code by makingfn value(..)
implementations delegate totry_from_js
. For example,JsString::value
:The text was updated successfully, but these errors were encountered: