bltavares / colmeia

Attempt to make an interop layer to connect to dat on hyperswarm in Rust
24 stars 4 forks source link

Wip - colmeia-clone #4

Closed bltavares closed 4 years ago

bltavares commented 4 years ago

Hypercore is not thread safe:

`std::rc::Rc<hypercore::storage::node::Node>` cannot be sent between threads safely

`std::rc::Rc<hypercore::storage::node::Node>` cannot be sent between threads safely

help: the trait `std::marker::Send` is not implemented for `std::rc::Rc<hypercore::storage::node::Node>`
note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<std::rc::Rc<hypercore::storage::node::Node>>`
note: required because it appears within the type `alloc::raw_vec::RawVec<std::rc::Rc<hypercore::storage::node::Node>>`
note: required because it appears within the type `std::vec::Vec<std::rc::Rc<hypercore::storage::node::Node>>`
note: required because it appears within the type `hypercore::crypto::merkle::Merkle`
note: required because it appears within the type `hypercore::feed::Feed<random_access_memory::RandomAccessMemory>`
note: required because it appears within the type `CloneDatClient<random_access_memory::RandomAccessMemory>`
note: required because of the requirements on the impl of `std::marker::Send` for `&mut CloneDatClient<random_access_memory::RandomAccessMemory>`
note: required because it appears within the type `[static generator@src\bin\colmeia-clone.rs:92:57: 95:6 _self:&mut CloneDatClient<random_access_memory::RandomAccessMemory>, _client:&mut colmeia_dat_proto::Client {}]`
bltavares commented 4 years ago

Using a thread safe hypercore, it compiles and we can do have & want exchanges

bltavares commented 4 years ago

Colmeia can download data!