-
-
Notifications
You must be signed in to change notification settings - Fork 366
Description
I'm kind of losing my mind over this, but I can't figure out a function and struct annotated with [napi] failed to get registered in the nodejs module. I've tried hundred iterations but nothing works. Admittedly, I am extremely weak at Rust programming, and can be making several mistakes. You can see the code here: https://github.com/turingscript/tokenizers/blob/8ee1e65e5cb190f3e451865d29d807d120b5b072/bindings/node/src/bpe_trainers.rs
The PR is located here but contains various changes as well. https://github.com/turingscript/tokenizers/pull/6/files
I'm testing this by compiling and packing my build. I then install it locally in a dummy project using npm install ${locall file path...}.
In the advent the component can't be exported, I would expect the build to fail or at least give a warning in the logs.
In addition, the documentation is very sparse and lacking some critical info and examples. I can seem to find a single section that would help me debug this.
I would appreciate any help in debugging this, and in addition would like to encourage any improvements to create better feedback on this error and it's route cause. I imagine a compiler plugin or something of the sort could greatly help here.