RCasatta / electrsd

Utility to run a regtest electrsd process connected to a given bitcoind instance, useful in integration testing environment.
MIT License
21 stars 16 forks source link

FTB on Windows #65

Closed TheBlueMatt closed 5 months ago

TheBlueMatt commented 1 year ago

CI says:

error[E0433]: failed to resolve: could not find `unix` in `os`
 --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\electrsd-0.22.2\build.rs:4:14
  |
4 | use std::os::unix::fs::PermissionsExt;
  |              ^^^^ could not find `unix` in `os`

error[E0425]: cannot find value `OS` in this scope
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\electrsd-0.22.2\src/versions.rs:30:30
   |
30 |     format!("electrs_{}_{}", OS, VERSION)
   |                              ^^
  --> /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74\library\core\src\result.rs:507:5
   |
   = note: similarly named tuple variant `Ok` defined here
   |
help: a tuple variant with a similar name exists
   |
30 |     format!("electrs_{}_{}", Ok, VERSION)
   |                              ~~
help: consider importing this constant
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\electrsd-0.22.2\build.rs:1:1
   |
1  | use std::env::consts::OS;
   |

     Running `D:\a\rust-lightning\rust-lightning\lightning-transaction-sync\target\debug\build\bitcoind-b1632355beeb3a81\build-script-build`
error[E0599]: no function or associated item named `from_mode` found for struct `Permissions` in the current scope
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\electrsd-0.22.2\build.rs:67:35
   |
67 |             std::fs::Permissions::from_mode(0o755),
   |                                   ^^^^^^^^^ function or associated item not found in `Permissions`

Some errors have detailed explanations: E0425, E0433, E0599.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `electrsd` due to 3 previous errors
RCasatta commented 1 year ago

Yeah there is no support for windows yet, bitcoind crate introduced it in https://github.com/RCasatta/bitcoind/pull/76

Here we will also need to update the "Build electrs" manual CI build to produce windows executable and add them to github artifacts https://github.com/RCasatta/electrsd/releases so that automatic download could work.

I've no windows machine that could simplify the task hope someone take this one

RCasatta commented 5 months ago

I think we can have a step one where at least we build on windows but we don't test it yet (because it would require the executables)