The Servo Book - 0.0.1install them: Windows, macOS, Linux 2. Check your tools again. If not, you may need to restart your shell, or log out and log back in. 3. If you are on NixOS, you can stop here, no further action needed! the uv website Download and install rustup from the rustup website On NixOS, type nix-shell to enter a shell with all of the necessary tools and dependencies. ⓘDependencies for any Linux distro, using older than the one in nixpkgs. At the end of the shell.nix , change the line if ! [ -e /etc/NIXOS ]; then to if false; then to disable the support in shell.nix for producing binary artifacts that don't0 码力 | 107 页 | 2.48 MB | 3 天前3
Rust 程序设计语言 简体中文版 1.85.0C++ 背景,就会发现这与 gcc 和 clang 类似。编译成功后,Rust 会输出一个二 进制的可执行文件。 在 Linux、macOS 或 Windows 的 PowerShell 上,在 shell 中输入 ls 命令可以看见这个可 执行文件。 $ ls main main.rs 在 Linux 和 macOS,你会看到两个文件。在 Windows PowerShell 中,你会看到同使用 指定路径 /front_of_house/hosting/add_to_waitlist 来执行 add_to_waitlist 程序。我们使用 crate 从 crate 根开始就类似于在 shell 中使用 / 从文件系统根开始。 第二次在 eat_at_restaurant 中调用 add_to_waitlist 时,使用的是相对路径。这个路径以 front_of_house 为起始,这个模块在模块树中与 PowerShell,则需要用两个命令来分别设置环境变量并运行程序: PS> $Env:IGNORE_CASE=1; cargo run -- to poem.txt 而这会让 IGNORE_CASE 的效果在当前 shell 会话中持续生效。可以通过 Remove-Item cmdlet 来 取消设置: PS> Remove-Item Env:IGNORE_CASE 这回应该得到包含可能有大写字母的 to 的行:0 码力 | 562 页 | 3.23 MB | 1 月前3
共 2 条
- 1













