以太坊2.0最新的测试网里面,这两个客户端的受众最多,下面是我的一些安装和代码体验。
Lighthouse安装
首先体验了Lighthouse的安装,Lighthouse是基于Rust开发的,可查看下面官方提供的文档
LightHouse官方安装指南
Windows上安装
Rust在win上面安装比在Linux下面麻烦很多,经历了如下操作。
- Download and install “Build Tools for Visual Studio:”
You can get it at this link: https://aka.ms/buildtools.
Run the installation file: vs_buildtools.exe.
Ensure the “Windows 10 SDK” component is included when installing the Visual C++ Build Tools.
Restart your computer. - Install LLVM: https://releases.llvm.org/download.html
- Install OpenSSL with vcpkg:
- Finally, install cmake: https://cmake.org/download/
mkdir C:\Tools
cd C:\Tools
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg.exe install openssl:x64-windows-static
安装OpenSSL
的时候使用vcpkg无法安装,下载了安装包OpenSSL-Win64
,手动配置了环境变量。
OPENSSL_DIR D:\Program Files\OpenSSL-Win64
PATH %OPENSSL_DIR%\bin
配置完这些发现,使用cargo build
还是不能编译
error[E0433]: failed to resolve: could not find `unix` in `os`
--> C:\Users\mec\.cargo\registry\src\github.com-1ecc6299db9ec823\leveldb-sys-2.0.5\src/build.rs:6:14
|
6 | use std::os::unix::fs::PermissionsExt;
| ^^^^ could not find `unix` in `os`
error[E0599]: no method named `mode` found for struct `std::fs::Permissions` in the current scope
--> C:\Users\mec\.cargo\registry\src\github.com-1ecc6299db9ec823\leveldb-sys-2.0.5\src/build.rs:178:30
|
178 | let current_mode = p