s5-dev / S5

Decentralized content-addressed storage network
https://docs.sfive.net
MIT License
52 stars 7 forks source link

when complling subfolder rust from version 0.5.0 "warnings" appear #4

Closed parajbs closed 1 year ago

parajbs commented 1 year ago

Hello @resolver

There are problems installing S5 version 0.5.0. I cloned the repo with git, and ran "dart pub get" which also works without errors. Then I executed the command "cargo build" in the subfolder "rust" and "warnings" came up:

At the beginning: warning: dependency (flutter_rust_bridge_codegen) specified without providing a local path, Git repository, or version to use. This will be considered an error in future versions

Just before the end:

   Compiling rust v0.1.0 (D:\d3\1\S5\rust)
warning: unused import: `Hasher`
 --> src\api.rs:1:20
  |
1 | use blake3::{Hash, Hasher};
  |                    ^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `flutter_rust_bridge::frb`
 --> src\api.rs:3:5
  |
3 | use flutter_rust_bridge::frb;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `std::sync::Arc`
 --> src\api.rs:7:5
  |
7 | use std::sync::Arc;
  |     ^^^^^^^^^^^^^^

warning: unused `Result` that must be used
   --> src\api.rs:126:9
    |
126 |         encoder.write(&buffer[..count]);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unused_must_use)]` on by default
    = note: this `Result` may be an `Err` variant, which should be handled

warning: `rust` (lib) generated 4 warnings
    Finished dev [unoptimized + debuginfo] target(s) in 1m 49s

The warnings come with all installaions of my 4 s5 nodes on "linux 32bit, ubuntu 64bit and windows10 64bit". But it compiles all files so that there are no errors, except for the warnings.

My question: Is this ok or is this a bug? Or maybe something is missing? What can I do, or is everything ok?

redsolver commented 1 year ago

Should be fixed now, also I recommend running cargo build --release for the Rust directory