rust-git | yeah | Awesome List library
kandi X-RAY | rust-git Summary
kandi X-RAY | rust-git Summary
a git implementation in rust. yeah, I know..
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rust-git
rust-git Key Features
rust-git Examples and Code Snippets
Community Discussions
Trending Discussions on rust-git
QUESTION
- Linux (Pop!_OS if that matters, which means it's almost Ubuntu).
ANSWER
Answered 2020-Mar-11 at 18:33I figured this out (after a little bit of experimentation and luck).
The whole issue smelled like a problem with ld
and the linking process of the C libssl library needed by git to use SSH connections.
Pop!_OS is known for including a lot of "development needed" things, so I was positive I had all that (I did).
How did I fix it?I looked at the /etc/ld.so.conf.d/
directory. There are a few ".conf" files there. x86_64-linux-gnu.conf
pointed at /usr/lib/x86_64-linux-gnu
, so I went there to see which libraries matched libssh*
.
I found this:
QUESTION
Why can I not clone a git project, add a main.rs
and import one of the structs? The compiler complains that the import is unknown and if I make it known it complains about the library file can't be compiled.
My files
...ANSWER
Answered 2019-Feb-06 at 03:33First things first, go back and re-read The Rust Programming Language's chapter on "Packages, Crates, and Modules". This discusses several fundamental concepts that are vital for understanding.
Why can I not clone a git project, add a main.rs and import one of the structs?
To me, this feels like the same question as "why can't I reach into another human, grab their lungs, and then use them to breathe"? You simply cannot download some arbitrary Rust library and start pulling random files out of it and expect them to work.
Specifically in your case, all libraries have a lib.rs
that is the crate root. The crate root tends to have many common definitions that are needed by the rest of the code and imports all the submodules. When you create a main.rs
and declare the modules from the library as your own, your main.rs
becomes the crate root, but it doesn't define all the things that the library needs. This causes the code to fail to compile.
Instead, just use the crate as a library, as it's intended.
The easiest thing to do create a new Cargo project and add the crate as a dependency to your Cargo.toml. The gitlab
crate is already distributed on crates.io, so you just add the version number:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rust-git
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page