nucypher / nucypher-core

Core structures for Nucypher network in Rust
6 stars 11 forks source link

Integrate with `ferveo` crate #53

Closed piotr-roslaniec closed 1 year ago

piotr-roslaniec commented 1 year ago
fjarri commented 1 year ago

Is it possible to make submodules somehow? Is it a thing in JS?

piotr-roslaniec commented 1 year ago

Yes, you can implement modules in JS. For example, you can group your exports like this:

// my-module.js
export { MyClass, myFunction };

// run.js
import myModule from 'myModule'
myModule.myFunction();
const { MyClass } = myModule;

I'm not sure how to do it in nucypher-core-wasm yet, but I will give it a go.

codecov-commenter commented 1 year ago

Codecov Report

Merging #53 (a4f4575) into main (03b7ba0) will increase coverage by 0.01%. The diff coverage is 28.00%.

@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
+ Coverage   15.24%   15.25%   +0.01%     
==========================================
  Files          16       16              
  Lines        2841     2845       +4     
==========================================
+ Hits          433      434       +1     
- Misses       2408     2411       +3     
Impacted Files Coverage Δ
nucypher-core-python/src/lib.rs 0.11% <0.00%> (-0.01%) :arrow_down:
nucypher-core-wasm/src/lib.rs 0.12% <0.00%> (ø)
nucypher-core/src/lib.rs 100.00% <ø> (ø)
nucypher-core/src/node_metadata.rs 0.00% <ø> (ø)
nucypher-core/src/dkg.rs 92.53% <100.00%> (+0.03%) :arrow_up:
piotr-roslaniec commented 1 year ago

halp

piotr-roslaniec commented 1 year ago

Ok, I just realized this is a known issue: https://github.com/fjarri/wasm-bindgen-derive/blame/955ed47bef0806fc5eb08a9d011f4bce10b7cf16/wasm-bindgen-derive/src/lib.rs#L269

Should be fixed by updating wasm-bindgen-derive and wasm-bindgen consistently across all Rust crates.

piotr-roslaniec commented 1 year ago

Hi @derekpierre, just wanted to check in with you. Are there any other TODOs that should be covered here?

derekpierre commented 1 year ago

Hi @derekpierre, just wanted to check in with you. Are there any other TODOs that should be covered here?

Perhaps this one as well? https://github.com/piotr-roslaniec/nucypher-core/blob/ferveo-types/nucypher-core/src/lib.rs#L51. Also adding @KPrasch as a reviewer.

--

Do these changes need an related update on the nucypher/nucypher python side of things?