Conversation
…373: exit: : numeric argument required)
e-n-f
left a comment
There was a problem hiding this comment.
I am no expert on native Node bindings, but it looks reasonable to me
|
This looks great @artemp - The next steps in my mind would be:
|
mapsam
left a comment
There was a problem hiding this comment.
@artemp this looks pretty great! Thanks so much for running through this port. Per @springmeyer's suggestion - you should be able to run benchmarks with the steps listed at https://github.com/mapbox/vtcomposite#benchmarks. Once those are run, mind posting the results from master and this branch?
I'll start working on the vtquery port as well, to get a better sense of the N-API flow.
| #include "vtcomposite.hpp" | ||
| #include <nan.h> | ||
| #include <napi.h> | ||
| #include <uv.h> |
There was a problem hiding this comment.
Reading a little about guaranteed ABI stability across major node versions and it includes <uv.h> as one of the ports that does not guarantee stability. And then continues to say, if you want a stable napi include, to use #include <node_api.h> - Will this be an issue?
There was a problem hiding this comment.
#include <napi.h> is a correct header from c++ wrapper : https://github.com/nodejs/node-addon-api/blob/master/napi.h
But, I removed #include <uv.h> as we shouldn't use it, thanks.
| */ | ||
| inline void CallbackError(std::string message, v8::Local<v8::Function> func) | ||
|
|
||
| inline Napi::Value CallbackError(std::string const& message, Napi::CallbackInfo const& info, Napi::Function const& func) |
There was a problem hiding this comment.
Curious question: do the https://nodejs.org/api/n-api.html#n_api_n_api_callback_types types come into play here?
| # cflags (linux) and xcode (mac) | ||
| 'system_includes': [ | ||
| "-isystem <(module_root_dir)/<!(node -e \"require('nan')\")", | ||
| "-isystem <!@(node -p \"require('node-addon-api').include.slice(1,-1)\")", |
There was a problem hiding this comment.
@artemp what's the need for slicing the include instead of using
"<!@(node -p \"require('node-addon-api').include\")"
?
There was a problem hiding this comment.
@mapsam this is the only way I found that works for me. The above expansion has too many quotes. Pls, suggest workaround, it's probably lack JS knowledge on my behalf.
N-APINAN |
…d storing `Napi::Reference<Napi::Buffer<char>>` in TileObject.
No description provided.