trudi-group / ipfs-tools

A collection of tools and schemas in Rust to analyze data on IPFS and BitSwap traces.
MIT License
9 stars 5 forks source link

Building with ``cargo build --release --locked`` in windows #119

Open FotiosBistas opened 11 months ago

FotiosBistas commented 11 months ago

Hello,

I'm trying to build the workspace inside a windows environment. Inside the root directory of the project I am running cargo build --release --locked and getting this error:

error[E0432]: unresolved import `tokio::signal::unix`
 --> bitswap-monitoring-client\src\gateways.rs:7:20
  |
7 | use tokio::signal::unix::{signal, Signal, SignalKind};
  |                    ^^^^ could not find `unix` in `signal`

I assume this is a windows thing and maybe building with docker is a far better idea.

mrd0ll4r commented 11 months ago

Hey, yes, that only works on Unix. In theory I suppose we could add some conditional compilation that basically does

  1. If you're compiling for Unix, enable reloading of lists via signals
  2. If you're not compiling for Unix, disable that.

If you want, you can try writing a PR :) But not need. Docker should work.

Best