Originally posted by RahulSundaram
View Post
Announcement
Collapse
No announcement yet.
Rust-Written Coreutils Replacement uutils 0.0.19 Released
Collapse
X
-
Originally posted by lowflyer View PostThat means creating an installer that contains all binary dependencies.
So for binary crates, we only need to distribute the executables.
If you want to use third-party libraries and develop software in an offline/isolated environment, IMHO the best way is to host your own crates.io registry in your local network.
The Rust package manager. Contribute to rust-lang/cargo development by creating an account on GitHub.
Originally posted by lowflyer View PostThat is the reason why boost is per default statically linked on windows. Making it almost hassle-free.
Precompiled headers might help here, but AFAIK it is more similar to parsing than compilation.
Comment
-
Originally posted by NobodyXuSo for binary crates, we only need to distribute the executables.
Originally posted by NobodyXuit stores crates in source form and is immutable.Originally posted by NobodyXuIMHO the best way is to host your own crates.io registry in your local network.
Originally posted by NobodyXuInstalling boost on Windows would still be a hassle,
- Likes 1
Comment
-
Originally posted by lowflyer View PostThere are binary crates??? This contradicts your earlier answer to my direct question:
"Binary crates" refer to crates with a src/main.rs or src/bin/*.rs, when running cargo-build it will produce an executable.
"Library crates" refer to crates with a src/lib.rs, running cargo-build will compile and produce an achieve of object files.
Originally posted by lowflyer View PostI have the impression the more I ask - the more complicated the rust setup gets.
Usually we justnuse https://rustup.rs to install rustc (compiler) and cargo (package manager).
cargo, the package manager, is responsible for downloading dependencies based on manifests.
It supports alternative registries which can be used for self-hosting registries in cooperation internal network, where access to internet is blocked.
cargo also supports flag "--offline" if the index and dependencies are already downloaded.
Originally posted by lowflyer View PostNOT TRUE! I don't know why you say that. Are your sure you talking about the C++ Boost project from https://www.boost.org/ ???
While most of the boost libraries are header-only, there are still a few that requires building https://www.boost.org/doc/libs/1_82_...only-libraries :
The only Boost libraries that must be built separately are:- Boost.Chrono
- Boost.Context
- Boost.Filesystem
- Boost.GraphParallel
- Boost.IOStreams
- Boost.Locale
- Boost.Log (see build documentation)
- Boost.MPI
- Boost.ProgramOptions
- Boost.Python (see the Boost.Python build documentation before building and installing it)
- Boost.Regex
- Boost.Serialization
- Boost.Thread
- Boost.Timer
- Boost.Wave
A few libraries have optional separately-compiled binaries:- Boost.Graph also has a binary component that is only needed if you intend to parse GraphViz files.
- Boost.Math has binary components for the TR1 and C99 cmath functions.
- Boost.Random has a binary component which is only needed if you're using random_device.
- Boost.Test can be used in “header-only” or “separately compiled” mode, although separate compilation is recommended for serious use.
- Boost.Exception provides non-intrusive implementation of exception_ptr for 32-bit _MSC_VER==1310 and _MSC_VER==1400 which requires a separately-compiled binary. This is enabled by #define BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR.
- Boost.System is header-only since Boost 1.69. A stub library is still built for compatibility, but linking to it is no longer necessary.
Comment
-
Originally posted by lowflyer View PostIf you try to give away the impression that you know boost, you better not write untruths like this:
Compared to managing dependencies using package manager like cargo, it is indeed a hassle.
Besides, whether it is a "hassle" depends on expectation, if you expect to manually manage everything and enjoy the process of doing so, then yeah it is not that of a hassle since most of the libraries don't need to be compiled and compiling it not hard, but compared to package manager it is indeed much harder.
Comment
-
Originally posted by NobodyXuMost boost libraries are header-only, but for ones that need to be compiled, you would still need to compile them.
Compared to managing dependencies using package manager like cargo, it is indeed a hassle.
Besides, whether it is a "hassle" depends on expectation, if you expect to manually manage everything and enjoy the process of doing so, then yeah it is not that of a hassle since most of the libraries don't need to be compiled and compiling it not hard, but compared to package manager it is indeed much harder.
Code:b2 -j30 --build-type=complete toolset=msvc-19.0 stage
- Likes 1
Comment
-
Originally posted by lowflyer View Post
On windows you just install the binaries. A package manager will happily do this for you. If you insist on building it yourself, this is the command:
Code:b2 -j30 --build-type=complete toolset=msvc-19.0 stage
You can then clone the repository and build it with cargo on another target, with cargo handling all the dependencies for you.
- Likes 1
Comment
-
I still can't quote you directly ...
Originally posted by NobodyXuIn rust, you just need to add one line like 'rand = "0.8"' and then you can proceed to use it in your crate, knowing that cargo will download and build it for you.
You can then clone the repository and build it with cargo on another target, with cargo handling all the dependencies for you.
Comment
Comment