rustc will use rust-lld by default on x86_64-unknown-linux-gnu on nightly to significantly reduce linking times.rustc will use rust-lld by default on x86_64-unknown-linux-gnu on nightly to significantly reduce linking times.

rust-lld: How It Can Give You Faster Linking Times

TL;DR: rustc will use rust-lld by default on x86_64-unknown-linux-gnu on nightly to significantly reduce linking times.

Some context

Linking time is often a big part of compilation time. When rustc needs to build a binary or a shared library, it will usually call the default linker installed on the system to do that (this can be changed on the command-line or by the target for which the code is compiled).

\ The linkers do an important job, with concerns about stability, backwards-compatibility and so on. For these and other reasons, on the most popular operating systems they usually are older programs, designed when computers only had a single core. So, they usually tend to be slow on a modern machine. For example, when building ripgrep 13 in debug mode on Linux, roughly half of the time is actually spent in the linker.

\ There are different linkers, however, and the usual advice to improve linking times is to use one of these newer and faster linkers, like LLVM's lld or Rui Ueyama's mold.

\ Some of Rust's wasm and aarch64 targets already use lld by default. When using rustup, rustc ships with a version of lld for this purpose. When CI builds LLVM to use in the compiler, it also builds the linker and packages it. It's referred to as rust-lld to avoid colliding with any lld already installed on the user's machine.

\ Since improvements to linking times are substantial, it would be a good default to use in the most popular targets. This has been discussed for a long time, for example in issues #39915 and #71515, and rustc already offers nightly flags to use rust-lld.

\ By now, we believe we've done all the internal testing that we could, on CI, crater, and our benchmarking infrastructure. We would now like to expand testing and gather real-world feedback and use-cases. Therefore, we will enable rust-lld to be the linker used by default on x86_64-unknown-linux-gnu for nightly builds.

Benefits

While this also enables the compiler to use more linker features in the future, the most immediate benefit is much improved linking times.

\ Here are more details from the ripgrep example mentioned above: linking is reduced 7x, resulting in a 40% reduction in end-to-end compilation times.

Before/after comparison of a ripgrep debug build

Most binaries should see some improvements here, but it's especially significant with e.g. bigger binaries, or when involving debuginfo. These usually see bottlenecks in the linker.

\ Here's a link to the complete results from our benchmarks.

\ If testing goes well, we can then stabilize using this faster linker by default for x86_64-unknown-linux-gnu users, before maybe looking at other targets.

Possible drawbacks

From our prior testing, we don't really expect issues to happen in practice. It is a drop-in replacement for the vast majority of cases, but lld is not bug-for-bug compatible with GNU ld.

\ In any case, using rust-lld can be disabled if any problem occurs: use the -Z linker-features=-lld flag to revert to using the system's default linker.

\ Some crates somehow relying on these differences could need additional link args. For example, we saw <20 crates in the crater run failing to link because of a different default about encapsulation symbols: these could require -Clink-arg=-Wl,-z,nostart-stop-gc to match the legacy GNU ld behavior.

\ Some of the big gains in performance come from parallelism, which could be undesirable in resource-constrained environments.

Summary

rustc will use rust-lld on x86_64-unknown-linux-gnu nightlies, for much improved linking times, starting in tomorrow's rustup nightly (nightly-2024-05-18). Let us know if you encounter problems, by opening an issue on GitHub.

\ If that happens, you can revert to the default linker with the -Z linker-features=-lld flag. Either by adding it to the usual RUSTFLAGS environment variable, or to a project's .cargo/config.toml configuration file, like so:

[target.x86_64-unknown-linux-gnu] rustflags = ["-Zlinker-features=-lld"] 

Rémy Rakic on behalf of the compiler performance working group

\ Also published here

\ Photo by Antoine Gravier on Unsplash

Market Opportunity
Liberland Logo
Liberland Price(LLD)
$0.967
$0.967$0.967
-0.20%
USD
Liberland (LLD) Live Price Chart
Disclaimer: The articles reposted on this site are sourced from public platforms and are provided for informational purposes only. They do not necessarily reflect the views of MEXC. All rights remain with the original authors. If you believe any content infringes on third-party rights, please contact [email protected] for removal. MEXC makes no guarantees regarding the accuracy, completeness, or timeliness of the content and is not responsible for any actions taken based on the information provided. The content does not constitute financial, legal, or other professional advice, nor should it be considered a recommendation or endorsement by MEXC.

You May Also Like

Unlocking Opportunities: Coinbase Derivative Blends Crypto ETFs and Tech Giants

Unlocking Opportunities: Coinbase Derivative Blends Crypto ETFs and Tech Giants

BitcoinWorld Unlocking Opportunities: Coinbase Derivative Blends Crypto ETFs and Tech Giants The financial world is constantly evolving, and a groundbreaking development has just arrived for investors seeking diversified exposure. Coinbase, a leading cryptocurrency exchange, has introduced an innovative Coinbase derivative product that’s poised to redefine investment strategies. This new offering uniquely combines crypto exchange-traded funds (ETFs) with the stability and growth potential of major U.S. technology stocks. What is This Revolutionary Coinbase Derivative? Coinbase’s latest financial innovation is a derivative product designed to track the performance of two powerful market segments. It’s a game-changer because it offers something unprecedented in the U.S. market. It tracks the “Magnificent Seven,” a group of seven dominant U.S. tech companies known for their significant market influence. It also includes BlackRock’s spot Bitcoin and Ethereum ETFs, providing direct exposure to the two largest cryptocurrencies. Additionally, Coinbase’s own stock is part of this unique blend, adding another layer of exposure to the crypto ecosystem. This Coinbase derivative marks the first time a U.S.-listed product has offered direct spot exposure to both cryptocurrencies and major equities in a single package. This simplifies investment, bridging traditional finance and digital assets. Bridging the Gap: Benefits for Investors with Coinbase Derivative This new Coinbase derivative offers several compelling advantages for both seasoned and new investors looking to diversify their portfolios efficiently. Simplified Diversification: Instead of managing separate investments, investors gain exposure to both through a single product, streamlining the process. Enhanced Accessibility: For those hesitant to directly invest in cryptocurrencies, this derivative provides a regulated and more familiar pathway through an established exchange. Potential for Growth: By combining high-growth tech companies with the dynamic potential of cryptocurrencies, the product aims to capture upside from both sectors. Innovation in Finance: It integrates digital assets into mainstream financial products, reflecting evolving global markets. This product caters to a growing demand for integrated investment solutions that reflect the interconnectedness of today’s financial world. Understanding the Components: Tech Giants and Crypto ETFs in the Coinbase Derivative To appreciate this Coinbase derivative, understanding its core components is essential. The “Magnificent Seven” refers to tech powerhouses driving significant market growth. On the cryptocurrency side, BlackRock’s spot Bitcoin and Ethereum ETFs are crucial. These ETFs allow investors to gain exposure to the price movements of Bitcoin and Ethereum without directly owning the underlying digital assets. This eliminates some complexities associated with crypto custody and security. The inclusion of Coinbase’s own stock further aligns the derivative with the crypto industry’s performance. This combination provides a balanced, dynamic investment profile, capturing modern market trends. Navigating the Future: Challenges and Considerations for the Coinbase Derivative While the Coinbase derivative presents exciting opportunities, investors should also be aware of potential challenges and considerations. All investments carry risks. Market Volatility: Cryptocurrencies are known for their price fluctuations, which can impact the derivative’s performance. Even large-cap tech stocks can experience significant swings. Regulatory Landscape: The regulatory environment for cryptocurrencies is still evolving. Changes could influence the value and availability of such products. Concentration Risk: While diversified across two asset classes, the product is still concentrated in specific tech companies and two main cryptocurrencies. Understanding these factors is crucial for informed decisions. Thorough research and considering risk tolerance are paramount before engaging. Coinbase’s introduction of this unique derivative product marks a significant milestone in the financial industry. By ingeniously blending the world of leading technology stocks with the dynamic growth of spot crypto ETFs, it offers investors an unprecedented avenue for diversified exposure. This move not only simplifies access to complex markets but also underscores the growing convergence of traditional finance and digital assets. It’s an exciting time to witness such innovation, providing new tools for portfolio expansion and risk management in an ever-changing economic landscape. Frequently Asked Questions About the Coinbase Derivative Here are some common questions about this new investment product: Q1: What exactly is the Coinbase derivative? A1: It’s a new financial product launched by Coinbase that tracks the performance of both major U.S. technology stocks (the Magnificent Seven) and spot Bitcoin and Ethereum ETFs, along with Coinbase’s own stock. Q2: Why is this derivative considered unique? A2: It’s the first U.S.-listed derivative to offer direct spot exposure to both cryptocurrencies and major equities within a single product, simplifying diversification for investors. Q3: Which specific tech companies are included in the “Magnificent Seven”? A3: While the exact composition can vary slightly depending on the index, it generally refers to leading U.S. tech giants like Apple, Microsoft, Amazon, Google (Alphabet), Meta, Nvidia, and Tesla. Q4: How does this product provide exposure to cryptocurrencies? A4: It achieves this through BlackRock’s spot Bitcoin and Ethereum ETFs, which allow investors to gain exposure to the price movements of these cryptocurrencies without directly holding the digital assets themselves. Q5: What are the main benefits of investing in this Coinbase derivative? A5: Key benefits include simplified diversification across tech and crypto, enhanced accessibility to digital assets, and the potential for growth from two dynamic market sectors. What are your thoughts on this innovative blend of crypto and tech? Share this article with your network and join the conversation about the future of diversified investing! To learn more about the latest explore our article on key developments shaping crypto market institutional adoption. This post Unlocking Opportunities: Coinbase Derivative Blends Crypto ETFs and Tech Giants first appeared on BitcoinWorld.
Share
Coinstats2025/09/23 05:10
Crossmint Partners with MoneyGram for USDC Remittances in Colombia

Crossmint Partners with MoneyGram for USDC Remittances in Colombia

TLDR Crossmint enables MoneyGram’s new stablecoin payment app for cross-border transfers. The new app allows USDC transfers from the US to Colombia, boosting financial inclusion. MoneyGram offers USDC savings and Visa-linked spending for Colombian users. The collaboration simplifies cross-border payments with enterprise-grade blockchain tech. MoneyGram, a global leader in remittance services, launched its stablecoin-powered cross-border [...] The post Crossmint Partners with MoneyGram for USDC Remittances in Colombia appeared first on CoinCentral.
Share
Coincentral2025/09/18 21:02
Why Peter Brandt Says The US Crypto Bill Won’t Be A Game-Changer

Why Peter Brandt Says The US Crypto Bill Won’t Be A Game-Changer

The post Why Peter Brandt Says The US Crypto Bill Won’t Be A Game-Changer appeared on BitcoinEthereumNews.com. Will a landmark US crypto bill send Bitcoin soaring
Share
BitcoinEthereumNews2025/12/20 08:21