cuckoofilter icon indicating copy to clipboard operation
cuckoofilter copied to clipboard

Adding an option to set bits_per_item

Open sebdeckers opened this issue 6 years ago • 0 comments

Goal: configurable bits_per_item option to allow Node.js users to tune the memory usage.

I don't know C++ so this is not working 100% yet. Sharing to ask for help and see if you are interested in this feature.

Stuck on these errors. Any ideas?

iMac:cuckoofilter sebdeckers$ npm run prebuild

> [email protected] prebuild /Users/sebdeckers/code/sebdeckers/cuckoofilter
> prebuildify --napi

  CC(target) Release/obj.target/nothing/node_modules/node-addon-api/src/nothing.o
  LIBTOOL-STATIC Release/nothing.a
  CXX(target) Release/obj.target/cuckoo/src/hashutil.o
  CXX(target) Release/obj.target/cuckoo/cuckoo.o
../cuckoo.cc:17:5: error: use of undeclared identifier 'InstanceMethod'
    InstanceMethod("add", &Cuckoo::Add),
    ^
../cuckoo.cc:156:14: note: in instantiation of member function 'Cuckoo<2>::Init' requested here
  Cuckoo<2>::Init(env, exports);
             ^
/Users/sebdeckers/code/sebdeckers/cuckoofilter/node_modules/node-addon-api/napi.h:1565:31: note: must qualify identifier to find this declaration in dependent base class
    static PropertyDescriptor InstanceMethod(const char* utf8name,
                              ^
/Users/sebdeckers/code/sebdeckers/cuckoofilter/node_modules/node-addon-api/napi.h:1569:31: note: must qualify identifier to find this declaration in dependent base class
    static PropertyDescriptor InstanceMethod(const char* utf8name,
                              ^
/Users/sebdeckers/code/sebdeckers/cuckoofilter/node_modules/node-addon-api/napi.h:1573:31: note: must qualify identifier to find this declaration in dependent base class
    static PropertyDescriptor InstanceMethod(Symbol name,
                              ^
/Users/sebdeckers/code/sebdeckers/cuckoofilter/node_modules/node-addon-api/napi.h:1577:31: note: must qualify identifier to find this declaration in dependent base class
    static PropertyDescriptor InstanceMethod(Symbol name,
                              ^

(section repeats a bunch of times)

sebdeckers avatar Feb 27 '19 14:02 sebdeckers