ElementsProject / ElementsProject/hal-elements
Cannot install hal-elements on windows (rustc 1.91.0 )
- 主要語言
- Rust
- 星號
- 8
- 分支
- 5
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Dear Maintainers.
I trid on wndows 11 (git-bash) with rustc 1.91.0 (f8297e351 2025-10-28) to install hal-elements v0.9.0 with
````bash
cargo install hal-elements
````
hal-elements seems to depend on lightning-invoice 0.4.0 (which is pretty old).
I am facing a compiling error when installing:
````bash
Compiling lightning-invoice v0.4.0
error[E0080]: attempt to compute 8_usize - 16_usize, which would overflow
--> %USERPROFILE%\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lightning-invoice-0.4.0\src\lib.rs:60:11
|
60 | unsafe { std::mem::transmute::(UNIX_EPOCH); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: `SystemTime` (64 bits)
= note: target type: `[u8; 16]` (128 bits)
For more information about this error, try `rustc --explain E0512`.
error: could not compile `lightning-invoice` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `hal-elements v0.2.1`, intermediate artifacts can be found at `%USERPROFILE%\AppData\Local\Temp\cargo-install042DLx`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
````
I found a quick fix for line 60 kike this
````rust
// unsafe { std::mem::transmute::(UNIX_EPOCH); }
assert_eq!(std::mem::size_of::(), 16, "Unexpected SystemTime size");
````
Can you please make hal-elements also installable for windows
Thanks in advance
````
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
首先,在 Windows 上使用 rustc 1.91.0 重現 `cargo install hal-elements`,並檢查 `lightning-invoice-0.4.0/src/lib.rs` 第 60 行回報的失敗。檢查 hal-elements 如何選取該相依性,並驗證在所述環境中的安裝路徑。當 hal-elements 能夠在 Windows 上成功安裝,且無需手動編輯快取中的相依性原始碼時,即視為完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- rust
- 領域
- build-system
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100