Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Any chance of moving to js-sha3? #3

Open
daviddias opened this issue Jul 23, 2017 · 4 comments
Open

Any chance of moving to js-sha3? #3

daviddias opened this issue Jul 23, 2017 · 4 comments
Labels
status/ready Ready to be worked

Comments

@daviddias
Copy link
Member

Currently, this module brings in a Native dep sha3@1.2.0. Would it be possible to move to js-sha3, the same used in js-multihashing-async, so that it doesn't represent a blocker for js-ipfs electron users

> fsevents@1.1.2 install /Users/koruza/code/js-ipld-eth-star/node_modules/fsevents
> node install

[fsevents] Success: "/Users/koruza/code/js-ipld-eth-star/node_modules/fsevents/lib/binding/Release/node-v51-darwin-x64/fse.node" is installed via remote

> sha3@1.2.0 install /Users/koruza/code/js-ipld-eth-star/node_modules/sha3
> node-gyp rebuild

  CXX(target) Release/obj.target/sha3/src/addon.o
../src/addon.cpp:59:36: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
                        info.GetReturnValue().Set(cons->NewInstance(argc, argv));
                                                        ^
/Users/koruza/.node-gyp/7.10.0/include/node/v8.h:3658:31: note: 'NewInstance' has been explicitly marked deprecated
      here
                Local<Object> NewInstance(int argc, Local<Value> argv[]) const);
                              ^
1 warning generated.
  CXX(target) Release/obj.target/sha3/src/displayIntermediateValues.o
  CXX(target) Release/obj.target/sha3/src/KeccakF-1600-reference.o
  CXX(target) Release/obj.target/sha3/src/KeccakNISTInterface.o
  CXX(target) Release/obj.target/sha3/src/KeccakSponge.o
  SOLINK_MODULE(target) Release/sha3.node

> keccak@1.3.0 install /Users/koruza/code/js-ipld-eth-star/node_modules/keccak
> prebuild-install || node-gyp rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."

Thanks!

@daviddias daviddias changed the title Any change of moving to js-sha3? Any chance of moving to js-sha3? Aug 25, 2017
@daviddias
Copy link
Member Author

@kumavis ping

@kumavis
Copy link
Collaborator

kumavis commented Sep 17, 2017

@diasdavid This is set up so that you get the js implementation when targeting the browser, and c++ on node (with failover to js). So is there some error with the failover when targeting electron?

@kumavis
Copy link
Collaborator

kumavis commented Sep 17, 2017

echo "Keccak bindings compilation fail. Pure JS implementation will be used."

@daviddias daviddias added the status/ready Ready to be worked label Oct 13, 2017
@daviddias
Copy link
Member Author

I'm still investigating, but as far as I understand electron-rebuild is not super friendly to deps in Node.js that fail. It doesn't work well with the failover.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

2 participants