Generated stand-in crate uses global_asm!, which the workspaces forbid(unsafe_code) rejects
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Reproduce with the issue's commands to see the global_asm! lint error. Locate where rustd invokes cargo for stand-in crates and ensure --cap-lints allow is passed or workspace unsafe_code lints are stripped. Done when cargo rustd build -p nanocode-cli --bin nanocode succeeds.
索引モデルが issue の本文から書いたものです。
説明
Environment: bare-metal x86-64, 48 cores, 377 GB RAM, Ubuntu 24.04, Rust 1.99.0 with rust-src, rustd nightly release 4530fb8 from install.sh (RUSTD_VERSION=nightly).
git clone https://github.com/gakonst/nanocode && cd nanocode && git checkout 74ef4e9
echo 1.99.0 > rust-toolchain
sed -i '/^rustc-wrapper/d;/^rustc-workspace-wrapper/d' .cargo/config.toml # drop the repo's own wrappers
cargo rustd build -p nanocode-cli --bin nanocode
Expected: rustd builds the bin. Plain cargo builds it in 24 s.
Actual: it fails in 0.8 s:
error: rustd does not build `nanocode`: what stands in for it does not build:
error: usage of `core::arch::global_asm`
--> target/debug/.rustd-units/nanocode-09d0f3fa57332cc6/…/nanocode-09d0f3fa57332cc6.rustd.rs:20:1
20 | core::arch::global_asm!(".weak main", "main:");
= note: requested on the command line with `-F unsafe-code`
nanocode sets unsafe_code = "forbid" in [workspace.lints], and cargo passes that to every crate, including rustd's stand-in. forbid can't be overridden from inside the crate, so code rustd generates should be built without the workspace's lint flags (or with --cap-lints allow).
- 主要言語
- Rust
- スター
- 248
- フォーク
- 13
- 平均マージ
- 7時間 52分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DioxusLabs/rustd のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
DioxusLabs/rustd#15 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
DioxusLabs/rustd#28 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
DioxusLabs/rustd#27 ·
メンテナーはふだん 1 日以内に返信
-
Workspace fails to load: rquickjs types give layout of …: HasErrorType, and rustd never falls backオープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
DioxusLabs/rustd#26 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
DioxusLabs/rustd#25 ·
メンテナーはふだん 1 日以内に返信
DioxusLabs/rustd の issue をすべて見る
似ている issue
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
pbakaus/impeccable#1601 ·
メンテナーはふだん 1 日以内に返信
-
RDF/XML writer: a blank node in two lists is left out of the second対応中かも @mrnolte が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
phillord/horned-owl#368 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mongodb/kingfisher#588 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
bug rust
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信