multirust | A tool for managing multiple Rust installations
kandi X-RAY | multirust Summary
kandi X-RAY | multirust Summary
A simple tool for managing multiple installations of the Rust toolchain. It replaces the standard Rust toolchain with components that dynamically choose between alternate implementations based on context.
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 multirust
multirust Key Features
multirust Examples and Code Snippets
Community Discussions
Trending Discussions on multirust
QUESTION
I have built an API using Rocket, Diesel and SQLite. It runs fine locally.
Now I want to deploy my API it to Heroku. I'm going off this example: https://github.com/emk/rust-buildpack-example-rocket
I've followed the included instructions as close as I can. However, the build step returns the following error:
...ANSWER
Answered 2021-Jan-07 at 17:53As the error message indicates your build system is missing libsqlite3
.
There are two ways to solve this problem:
Add
libsqlite3-sys = { version = "0.18", features = ["bundled"]}
to yourCargo.toml
. This instructs the cargo to also buildlibsqlite3
as part of your application build. The library is statically linked using this method.Install
libsqlite3
on the build system and use theSQLITE3_LIB_DIR
environment variable to point the compiler to the correct directory.libsqlite3
will be linked dynamically, which means you also need to provide this library on the system you are running your application afterwards.
QUESTION
I have created a rust application, which uses the sqlite crate from crates.io
I am just using this crate as is and when I run my application with cargo run
, I do get what I want. However, it seems my application has now a dependency to sqlite3.dll
, which needs to be in my path.
From the Cargo docs that I read, my understanding is that the sqlite crate itself is linked statically, but not the C Library that it depends on.
On my own computer, I solved this by simply copying the sqlite3.dll into a folder in my path or to the same directory, where cargo has created my executable.
But, I realised that this didn't work with any sqlite3.dll file, but it worked with the one I found somewhere deep under the .multirust
folder.
Additionally, when I give this application to someone else, I would also have to make sure that the DLL is also there.
So, I would like to avoid these complications by statically linking this DLL to my executable.
Is there a way to tell Cargo link this C Library statically without diving into custom build scripts?
...ANSWER
Answered 2019-Sep-04 at 06:55The sqlite crate depends on the sqlite3-sys crate to provide the FFI towards SQLite. This crate in turn depends on the sqlite3-src crate, which includes an optional feature called bundle
- if you specify this feature then it bundles a copy of SQLite into your rust binary.
To do this, specify the dependency on this package manually like this:
QUESTION
I encountered a problem when running cargo build
:
ANSWER
Answered 2017-Aug-03 at 13:45As listed in the url crate's GitHub issue, it previously used a form of TOML that was actually invalid. Newer versions of Cargo no longer parse that invalid form.
Nothing in your shown dependency list requires url version 0.5.7. url version 0.5.10 has been released, so perform a cargo update
to switch to it. Note that 0.5.10 was published on Aug 21, 2016, so it's almost a year old at this point.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install multirust
A manual build and install allows one to tailor multirust to meet specific needs.
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