rust-crates Questions
6
Solved
Is there a standard way to determine what features are available for a given crate?
I'm trying to read Postgres timezones, and this says to use the crate postgres = "0.17.0-alpha.1" crate's with-t...
Fredericton asked 15/1, 2020 at 23:33
2
Solved
I have a proc-macro crate with a macro that, when expanded, needs to use custom trait implementations for Rust built-in types. I tried to define the trait in the same crate, but Rust tells me that ...
Wivinah asked 9/10, 2020 at 23:18
5
Solved
I'm trying to create a module in Rust and then use it from a different file. This is my file structure:
matthias@X1:~/projects/bitter-oyster$ tree
.
├── Cargo.lock
├── Cargo.toml
├── Readme.md
├──...
Timekeeper asked 25/12, 2015 at 15:15
2
Solved
Is there a robust way, maybe something in cargo CLI, to get the version of the crate?
I can grep on Cargo.toml, but I'm looking for something that won't break in 6 months.
Is there a better way?
Lindo asked 5/1, 2023 at 18:49
2
I want to install cargo-apk cargo install cargo-apk to my system (Linux Mint), but I'm getting this error
error: failed to run custom build command for `openssl v0.9.24`
Caused by:
process didn'...
Eruptive asked 24/7, 2019 at 12:8
1
Solved
I'm trying some Rust, and my program is getting somewhat long. I now want to split my program into many files -- how do I most easily do this?
The Rust book chapter I get when trying to Google this...
Introversion asked 6/11, 2021 at 22:31
3
Solved
I want to use this library: https://github.com/stepfunc/dnp3, but it is not on crates.io, it only has a repository and I can't implement it. I tried to add it to my Cargo.toml like [dependencies] d...
Lomax asked 24/9, 2021 at 14:53
2
Solved
When I run cargo build, various libs get stored within the folder /usr/local/lib/rustlib/.
What is the correct way to clear these libs? I could rm these files manually, but would that be the right...
Sulfanilamide asked 1/8, 2014 at 4:34
2
Solved
I am new to rust and diesel orm. I am trying to execute below things on my query:
count
select
order
limit
but I am getting error.
I am using postgres database.
I have added the exact error above...
Overset asked 5/12, 2020 at 15:29
2
Solved
In a Rust project, I want to generate reproducible random numbers based on a integer seed as I'm used to in Java.
The documentation for Seed in the rand crate states:
Seed type, which is restri...
Comma asked 24/11, 2019 at 18:1
3
Solved
I've poked the serde-yaml and yaml-rust crates a bit, but I haven't seen any examples.
Frascati asked 10/11, 2018 at 21:56
2
Solved
I 've read https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
If I understand correctly, when I commit Cargo.lock into my crate (which is both a library and an executable)'s reposi...
Otolith asked 12/7, 2020 at 13:20
1
In this book- Rust By Example,Chapter 11:
A crate is a compilation unit in Rust. Whenever rustc some_file.rs is called, some_file.rs is treated as the crate file.
According to this book, what abo...
Spatula asked 21/8, 2020 at 2:54
5
Solved
I'm trying to work with the rust-http library, and I'd like to use it as the basis for a small project.
I have no idea how to use something that I can't install via rustpkg install <remote_url&...
Sostenuto asked 9/2, 2014 at 3:53
1
Solved
I'm having some issues due to my ignorance of cargo setup and the vast amount of documentation.
The cargo.toml file is the current:
[package]
name = "hello"
version = "0.1.0"
authors = ["PC4\\Aut...
Eckman asked 14/6, 2020 at 10:37
1
Solved
I'm trying to call a function belonging to some module from another module (for code factoring, organization, etc).
Here is my crate structure:
➜ mod_test git:(master) ✗ tree
.
├── Cargo.lock
├─...
Albino asked 2/4, 2020 at 14:13
1
Solved
I am currently learning Rust, and for that purpose I wanted to create my own crate and use it. However, Rust can't find this crate.
I have the following file structure:
├───minimal
│ ├───Cargo.toml...
Ctenoid asked 7/12, 2019 at 20:28
1
Solved
I have included a library as a submodule in my program. The structure looks like this:
.
├── my_lib/
│ ├── Cargo.toml
│ └── src/
│ ├── lib/
│ │ ├── mod.rs
│ │ └── foo.rs
│ └── main.rs
├── src/
│ └─...
Nestling asked 23/10, 2019 at 12:59
1
Solved
I want to compile a simple rust program using a third party library named warp:
[package]
name = "hello-world-warp"
version = "0.1.0"
[dependencies]
warp = "0.1.18"
In src/main.rs:
use warp::{...
Krueger asked 4/8, 2019 at 22:6
2
Solved
I've made a library:
cargo new my_lib
and I want to use that library in a different program:
cargo new my_program --bin
extern crate my_lib;
fn main {
println!("Hello, World!");
}
what ...
Pluck asked 8/10, 2015 at 21:1
1
Solved
I am a little confused as to the exact things hosted on crates.io (is a 'crate' the proper way to refer to those)? My understanding is that a crate is a unit of compilation in Rust, but then what i...
Joviality asked 26/8, 2018 at 7:58
1
Solved
After figuring out cargo build of the same code: spurious compile time errors?, I want to know how to prevent such a problem:
$ cargo new feature_merge
$ cargo add nmea
$ cargo check > /dev/nul...
Miran asked 24/7, 2017 at 18:0
1
I have crate A that depend on B and B depend on rust-nmea crate.
If I build crate A I got bunch of errors (all of them that missed use std::error::Error;) during build of rust-nmea dependency:
er...
Itchy asked 24/7, 2017 at 13:9
1
Solved
I've published my crate and then realized that I've forgotten to include some small detail in my README.md. I've included that detail into README.md and did git commit and push. How to update my cr...
Hungerford asked 16/5, 2017 at 4:19
1
Solved
I have a crate that has lots of code, so I've split it into multiple files/modules. However, some modules have internal unsafe stuff (e.g. raw pointers) that I need to make public to the different ...
Berger asked 15/1, 2017 at 20:56
1 Next >
© 2022 - 2024 — McMap. All rights reserved.