Skip to main content

Questions tagged [rust-cargo]

Cargo is the official package manager for the Rust programming language.

rust-cargo
-1 votes
0 answers
27 views

How come the Rust Compiler says Glutin doesn't have glutin::window::WindowBuilder

I tried using use glutin::window::WindowBuilder and extern crate glutin and the compiler still says that Glutin doesn't have glutin::window::WindowBuilder. After installing the latest version (with ...
while 1's user avatar
2 votes
0 answers
18 views

Cross Compilation with custom Linker fails

I have to build my Rust program within a container, where I have all the build-essentials for i586 available (my target architecture is also i586). For that reason, I have added the i586 target rustup ...
guenhter's user avatar
  • 11.9k
1 vote
1 answer
48 views

Compiling Raylib-Rust game to WASM

I've successfully compiled my game to WASM with the flags: EMCC_CFLAGS="-sUSE_GLFW=3 -sGL_ENABLE_GET_PROC_ADDRESS -sASYNCIFY -sASSERTIONS --preload-file src/resources" cargo build --release -...
coolguy123's user avatar
-2 votes
0 answers
36 views

Rust, applying traits on struct in module drops error[E0599] [duplicate]

I got the error[E0599]: no function or associated item named error message, see details below. structure: src |-- point | |-- mod.rs | |-- point.rs |-- main.rs src/point/mod.rs pub mod point src/...
spyder's user avatar
  • 131
0 votes
1 answer
33 views

Do bootloader and bootimage contain std features in newer versions?

I am trying to create a bare-metal OS in Rust and I am encountering numerous errors related to unfound types such as Vec and other standard library features. I suspect that these errors are due to ...
Cosmin Drăguşanu's user avatar
4 votes
1 answer
48 views

`writeln!(std::io::stdout().lock(), "")` cannot be captured by cargo test

I am trying to implement a logger in my multi-threading program. So I tried using a std::io::stdout to gain a StdoutLock to ensure atomicity. But later I found in that way, all the log write to stdout ...
futuretech6's user avatar
0 votes
1 answer
39 views

Rust Bevy cannot run the release executable file; missing libbevy_dylib

I built Bevy on Ubuntu, but when I try to run the executable file in the target/release folder, it logs the following error: ./BevyPractice: error while loading shared libraries: libbevy_dylib-...
monok's user avatar
  • 1
1 vote
1 answer
45 views

How to enable only a subset of Polars' crate features?

I am using Polars in Rust. I have noticed that compile times drop significantly and give a smaller binary when using the polars-core crate instead of the polars crate. However, it's discouraged to use ...
robertdj's user avatar
  • 1,025
-1 votes
2 answers
59 views

How to import funnctions in rust from sub directories without using mod.rs [duplicate]

I'm working on a Rust project and I want to organize my code into multiple files and subdirectories. I have a main.rs file that I want to import modules from other files and subdirectories into. For ...
Just_Another_Dev's user avatar
1 vote
0 answers
30 views

Using Jfrog artifactory as cache packet repo

I'm trying to configure cargo to fetch packets from crates.io through jfrog artifactory remote. By using the jfrog cli command: jf atc I'm able to get an access token. However when trying to do a ...
user3307881's user avatar
2 votes
0 answers
71 views

Compile and run Rust program on save in VS Code?

I've just installed the rust-analyzer VS Code extension and configured "format on save" using rustfmt. Hitting the "Run" button also works nicely. However, in order to speed up my ...
kraftwer1's user avatar
  • 5,561
0 votes
0 answers
92 views

Reduce CPU usage for cargo run

During cargo run, rustc by default takes up all CPU resources. Is it possible to limit CPU usage? For example, cpulimit -l 40 works for cargo, but rustc processes still use 100% of the CPU. Fedora ...
Artem Baranov's user avatar
0 votes
0 answers
28 views

I'm facing the error[E0432]: unresolved import ; no external crate, but I'm following exact instructions [duplicate]

I'm trying to recreate a Turing Machine Simulator using WASM + React just for fun and to learn a bit about WebAssembly and front-end. As I wasn't very interested in the actual TM details, I decided to ...
Beatriz's user avatar
0 votes
1 answer
36 views

Does cargo unifies features across [build-dependencies] and [dependencies]?

I have a weird issue in a complex code base and it might come from me not understanding properly how cargo features are being propagated in the presence of [build-dependencies]. So I have a project X ...
big_gie's user avatar
  • 2,969
1 vote
0 answers
67 views

How to have different set of features when compiled as a binary and used as a library in a Rust project?

I have been developing a chess engine and I have published it in crates.io for public use. Links: https://crates.io/crates/timecat https://github.com/Gourab-Ghosh/timecat-rs/ My chess engine has ...
Gourab Ghosh's user avatar

15 30 50 per page
1
2 3 4 5
157