rust

当我使用 crontab 进行“cargo run”时,rust 文件无法正常工作
rust

当我使用 crontab 进行“cargo run”时,rust 文件无法正常工作

我输入sudo -i以继续编辑 crontab 的命令。 我在 crontab 文件中写了以下行。 @reboot cd /home/username/superuser && cargo run; 以下内容属于main.rs普通货物。 use std::fs; fn main() { let data = "rust language"; fs::write("/home/username/foo", data).expect("Unable to write file"); } 当我重新启动计算机时,实际上该文件fo...

Admin

Rust 多线程支持
rust

Rust 多线程支持

我想在装有 Linux(Raspberry Pi OS,但我可以更改它)的机器上运行 Minecraft/rust 服务器,有没有办法运行具有多个核心的服务器?(如果有帮助的话,我会在终端中启动服务器) ...

Admin

我无法在 Mac 上安装 Rust
rust

我无法在 Mac 上安装 Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 我确实安装了brew install curl-openssl,但仍然无法安装 Rust。 当我在浏览器中下载此脚本并运行它时,我得到: bash rustup-init.sh info: downloading installer Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure Warning: Detect...

Admin

如何在 Ubuntu 中为 Rust 应用程序创建 deb 包?
rust

如何在 Ubuntu 中为 Rust 应用程序创建 deb 包?

我想创建一个 deb 包氧化,这是一个 Rust 应用程序。 可以使用货物在当地建造。 git clone https://github.com/shssoichiro/oxipng.git cd oxipng cargo build --release cp target/release/oxipng /usr/local/bin 如何使用 cargo 生成 debian 包? ...

Admin

moshudp 交叉编译
rust

moshudp 交叉编译

我有一块带有 mips64el 的 MIPS CPU 的主板和带有工具链的 buildRoot。当我尝试使用 rust 从 buildRoot 编译 moshudp 程序时,我得到了以下错误 $ source $BUILD_ROOT_PATH/buildroot/output/host/environment_setup $ cargo build --target mips64el-unknown-linux-gnuabi64 Compiling syn v1.0.91 error[E0463]: can't find crate for `std`...

Admin

如何根据 diesel 的要求安装 mysqlclient lib
rust

如何根据 diesel 的要求安装 mysqlclient lib

编译diesel_cli在 Ubuntu 16.04 上,我找不到应该安装哪个软件包来摆脱消息 ~$ cargo install diesel_cli Updating crates.io index Installing diesel_cli v1.4.0 ... Compiling toml v0.4.10 Compiling diesel_cli v1.4.0 error: linking with `cc` failed: exit code: 1 | = note: "cc" "-Wl,--as-needed" ....

Admin

.profile 在 xfce4 上不起作用
rust

.profile 在 xfce4 上不起作用

我刚刚安装了 Rustcurl https://sh.rustup.rs -sSf | sh并重启了系统。但我无法在终端上访问cargo..。 rustc 我的 .profile 文件包含以下行 export PATH="$HOME/.cargo/bin:$PATH" 我使用 Xfce 4.12 作为我的桌面环境。 我猜测发生这种情况是因为我的 PATH 变量不起作用..? 所以,我的问题是,.profile 在 Xfce 中不能像在 Gnome 中一样工作(我对 Xfce 还很陌生)?我应该如何解决这个问题。 先感谢您。 ...

Admin

ubuntu-gnome 16.04.2 中的 Rust 安装问题
rust

ubuntu-gnome 16.04.2 中的 Rust 安装问题

我在 ubuntu-gnome 16.04.2 上安装 Rust 时遇到了问题。我按照锈网站。我附上了命令输出以供参考 $ curl https://sh.rustup.rs -sSf | sh info: downloading installer Welcome to Rust! This will download and install the official compiler for the Rust programming language, and its package manager, Cargo. It will add th...

Admin

Rust 编译器安装
rust

Rust 编译器安装

我试图在 Ubuntu 上安装 rustup,但是当我运行命令时curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh,出现以下错误: kdsouza@bsc-848851112:/$ sudo curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh info: downloading installer curl: (23) Failure writing output to destination rustup: c...

Admin

如何访问 Rust 文档?
rust

如何访问 Rust 文档?

我从 rustlang.org 网站安装了 Rust。我试着看了这本书: rustup doc --book 这会导致 Firefox 中出现“访问文件被拒绝”错误。 我以为这是一个突然出现的问题,于是在他们的论坛上提问。但没有任何回应。 所以,我在这里问。也许有人已经知道如何让 Firefox 打开 /home/me/.rustup/whatever。 以下是输出snap connections | grep personal-files: personal-files firefox:dot-mozilla-firefox ...

Admin

无法使用 Cargo 安装 anchor-cli
rust

无法使用 Cargo 安装 anchor-cli

我正在学习 Solana 区块链开发人员的 JavaScript 和 Rust 课程。我正在安装所有必要的框架和文件。在使用 Cargo 安装 anchor-cli 时。我收到以下错误。 error: failed to run custom build command for `hidapi v1.3.4` Caused by: process didn't exit successfully: `/tmp/cargo-installBgqF19/release/build/hidapi-8cca28feeebdc649/build-script...

Admin

为什么 Ubuntu 18.04 附带 rustc 1.18?
rust

为什么 Ubuntu 18.04 附带 rustc 1.18?

我知道 Ubuntu 18.04 尚未发布,情况可能会发生变化。但是,所有版本 < 18.04 均提供rustc1.21而 18.04 附带的 1.18 已经相当老旧了(最近的 Firefox 版本至少需要 2.23 才能构建)。降级有什么原因吗?是否值得建议在发布之前不要这样做? ...

Admin

安装 rusti(Rust 交互式 shell)时出现的问题
rust

安装 rusti(Rust 交互式 shell)时出现的问题

我正在尝试安装 Rusti(Rust 编程语言交互式 shell)https://github.com/murarth/rusti 但是执行此命令后,(如 GitHub 页面所建议的) rustup run nightly-2016-08-01 cargo install --git https://github.com/murarth/rusti 我收到此消息 错误:由于先前的错误而中止错误:无法编译rusti v0.0.1 (https://github.com/murarth/rusti#9a1eff33),中间工件可以在以下位置找...

Admin