Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Cannot install hal-elements on windows (rustc 1.91.0 )

未关闭
#6 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
rust
领域
build-system

调研方向

首先,在 Windows 上使用 rustc 1.91.0 复现 cargo install hal-elements,并检查 lightning-invoice-0.4.0/src/lib.rs 第 60 行报告的失败。检查 hal-elements 如何选择该依赖项,并验证在所述环境中的安装路径。当 hal-elements 能够在 Windows 上成功安装,且无需手动编辑缓存中的依赖项源代码时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

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

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:

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::<SystemTime, [u8; 16]>(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

// unsafe { std::mem::transmute::<SystemTime, [u8; 16]>(UNIX_EPOCH); }
assert_eq!(std::mem::size_of::<SystemTime>(), 16, "Unexpected SystemTime size");

Can you please make hal-elements also installable for windows

Thanks in advance

主要语言
Rust
星标
8
派生
5
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ElementsProject/hal-elements 的其他 Issue

查看 ElementsProject/hal-elements 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。