当前位置: 首页 > news >正文

Windows10安装Rust 和ZED(失败)

安装Rust

Rust直接从官网下载安装文件:Install Rust - Rust Programming Language

下载,运行安装即可。

安装好提示:

Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload its PATH environment variable to include
Cargo's bin directory (%USERPROFILE%\.cargo\bin).

Press the Enter key to continue.

设置cargo加速

进入目录,如~/.cargo 

删除cache文件

rm .package-cache

创建config.toml文件

[source.crates-io]
replace-with = 'tuna' # 可以根据需要替换为其他源

# 中国科学技术大学
[source.ustc]
registry = "sparse+https://mirrors.ustc.edu.cn/crates.io-index/"

# 阿里云
[source.aliyun]
registry = "sparse+https://mirrors.aliyun.com/crates.io-index/"

# 上海交通大学
[source.sjtu]
registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index/"

# 清华大学
[source.tuna]
registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"

# rustcc社区
[source.rustcc]
registry = "https://code.aliyun.com/rustcc/crates.io-index.git"

再使用cargo,就会发现下载文件快很多! 

安装Zed

Zed的官网:GitHub - zed-industries/zed: Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Zed有LInux和Mac OS的安装包,Windows下反而要自己编译安装。

 安装条件

需要rustup、VisualStudo、CMake 以及Windows 10 SDK version 2104 (10.0.20348.0)等

开始安装

下载源代码

git clone https://github.com/zed-industries/zed

进入zed目录,然后

cargo 安装

执行:

cargo run

编译碰到报错:Unable to init GPU context: NoSupportedDeviceFound

无法解决问题。

zed安装失败。

总结

大约是显卡太老了,导致zed编译的时候报错Unable to init GPU context: NoSupportedDeviceFound

调试

cargo run报错Unable to init GPU context: NoSupportedDeviceFound

E:\github\zed>cargo run
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.10s
     Running `target\debug\zed.exe`

thread 'main' panicked at crates\gpui\src\platform\windows\platform.rs:111:47:
Unable to init GPU context: NoSupportedDeviceFound

Stack backtrace:
   0: std::backtrace_rs::backtrace::dbghelp64::trace
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91
   1: std::backtrace_rs::backtrace::trace_unsynchronized
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2: std::backtrace::Backtrace::create
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library\std\src\backtrace.rs:331
   3: std::backtrace::Backtrace::capture
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library\std\src\backtrace.rs:296
   4: anyhow::Error::msg<alloc::string::String>
             at C:\Users\Admin\.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-e791a3f93f26854f\anyhow-1.0.97\src\backtrace.rs:27
   5: gpui::platform::blade::blade_context::impl$0::new::closure$0
             at .\crates\gpui\src\platform\blade\blade_context.rs:20
   6: core::result::Result::map_err<blade_graphics::hal::Context,enum2$<blade_graphics::NotSupportedError>,anyhow::Error,gpui::platform::blade::blade_context::impl$0::new::closure_env$0>
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688\library\core\src\result.rs:856
   7: gpui::platform::blade::blade_context::BladeContext::new
             at .\crates\gpui\src\platform\blade\blade_context.rs:12
   8: gpui::platform::windows::platform::WindowsPlatform::new
             at .\crates\gpui\src\platform\windows\platform.rs:111
   9: gpui::platform::current_platform
             at .\crates\gpui\src\platform.rs:133
  10: gpui::app::Application::new
             at .\crates\gpui\src\app.rs:121
  11: zed::main
             at .\crates\zed\src\main.rs:200
  12: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688\library\core\src\ops\function.rs:250
  13: core::hint::black_box
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688\library\core\src\hint.rs:475
  14: std::sys::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688\library\std\src\sys\backtrace.rs:152
  15: std::rt::lang_start::closure$0<tuple$<> >
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688\library\std\src\rt.rs:195
  16: std::rt::lang_start_internal::closure$1
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library\std\src\rt.rs:174
  17: std::panicking::try::do_call
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library\std\src\panicking.rs:584
  18: std::panicking::try
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library\std\src\panicking.rs:547
  19: std::panic::catch_unwind
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library\std\src\panic.rs:358
  20: std::rt::lang_start_internal
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library\std\src\rt.rs:174
  21: std::rt::lang_start<tuple$<> >
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688\library\std\src\rt.rs:194
  22: main
  23: invoke_main
             at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  24: __scrt_common_main_seh
             at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  25: BaseThreadInitThunk
  26: RtlUserThreadStart
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library\std\src\panicking.rs:692
   1: core::panicking::panic_fmt
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library\core\src\panicking.rs:75
   2: core::result::unwrap_failed
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library\core\src\result.rs:1704
   3: core::result::Result::expect<gpui::platform::blade::blade_context::BladeContext,anyhow::Error>
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688\library\core\src\result.rs:1061
   4: gpui::platform::windows::platform::WindowsPlatform::new
             at .\crates\gpui\src\platform\windows\platform.rs:111
   5: gpui::platform::current_platform
             at .\crates\gpui\src\platform.rs:133
   6: gpui::app::Application::new
             at .\crates\gpui\src\app.rs:121
   7: zed::main
             at .\crates\zed\src\main.rs:200
   8: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688\library\core\src\ops\function.rs:250
   9: core::hint::black_box
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688\library\core\src\hint.rs:475
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: process didn't exit successfully: `target\debug\zed.exe` (exit code: 101)

显卡是:quadro k4200 下载驱动试试:NVIDIA RTX / Quadro Desktop and Notebook Driver Release 470

以前的是: NVIDIA-SMI 474.82       Driver Version: 474.82       CUDA Version: 11.4

更新了也不行,而且现在nvidia-smi也不能执行了,它不在path里了

查看zed手册,提到需要Vulkan

下载Vulan驱动:Vulkan Driver Support | NVIDIA Developer

If you see a notification saying Zed failed to open a window: NoSupportedDeviceFound this means that Vulkan cannot find a compatible GPU. You can begin troubleshooting Vulkan by installing the vulkan-tools package and running:

vkcube

但是最新的Vulkan1.4是支持到572版本,474版本的没找到。而且这块卡quadro k4200 不在支持列表。

所以,这里只好放弃了。

相关文章:

  • P6772 [NOI2020] 美食家
  • WebSocket的参数粗略解释
  • AVL树的平衡算法的简化问题
  • 数据类型及sizeof,进制转换
  • go中实现子模块调用main包中函数的方法
  • /etc/sysconfig/jenkins 没有这个文件
  • 计算机网络-TCP/IP协议族
  • 无再暴露源站!群联AI云防护IP隐匿方案+防绕过实战
  • netsh实现TCP端口转发
  • 40.动态规划13
  • Ansible命令行模式常用模块使用案例(三)
  • Python与Solidity联手:从跨语言智能合约开发到区块链生态跃迁
  • 实习笔试-01字符转换小写字母
  • 【AWS入门】2025 AWS亚马逊云科技账户注册指南
  • 《解锁华为黑科技:MindSpore+鸿蒙深度集成奥秘》
  • A Survey on Mixture of Experts 混合专家模型综述(第二部分:混合专家系统设计)
  • 机器学习基础
  • MyBatis 如何解析 XML 配置文件和 SQL 映射文件
  • 【综述】An Introduction to Vision-Language Modeling【二】
  • WordPress调用当前文章作者头像
  • 做网站二级页面的/鹤壁网络推广哪家好
  • 产品展示型网站有哪些/应用商店搜索优化
  • 网站开发设计报告书怎么写/实体店铺引流推广方法
  • 公司网站建设价格多少/南京seo网站优化
  • WordPress 网站小图标/国际新闻最新消息十条摘抄
  • 网站目录结构怎么做/搜索引擎优化的方法