Rust 1.78 has upgraded its bundled LLVM to version 18, completing the announced u128/i128 ABI change for x86-32 and x86-64 targets. Distributors that use their own LLVM older than 18 may still face the calling convention bugs mentioned in that post.Rust 1.78 has upgraded its bundled LLVM to version 18, completing the announced u128/i128 ABI change for x86-32 and x86-64 targets. Distributors that use their own LLVM older than 18 may still face the calling convention bugs mentioned in that post.

Rust 1.78.0: What's In It?

2025/12/08 02:45
6 min di lettura
Per feedback o dubbi su questo contenuto, contattateci all'indirizzo crypto.news@mexc.com.

The Rust team is happy to announce a new version of Rust, 1.78.0. Rust is a programming language empowering everyone to build reliable and efficient software.

\ If you have a previous version of Rust installed via rustup, you can get 1.78.0 with:

$ rustup update stable

\ If you don't have it already, you can get rustup from the appropriate page on our website, and check out the detailed release notes for 1.78.0.

\ If you'd like to help us out by testing future releases, you might consider updating locally to use the beta channel (rustup default beta) or the nightly channel (rustup default nightly). Please report any bugs you might come across!

What's in 1.78.0 stable

Diagnostic attributes

Rust now supports a #[diagnostic] attribute namespace to influence compiler error messages. These are treated as hints which the compiler is not required to use, and it is also not an error to provide a diagnostic that the compiler doesn't recognize. This flexibility allows source code to provide diagnostics even when they're not supported by all compilers, whether those are different versions or entirely different implementations.

\ With this namespace comes the first supported attribute, #[diagnostic::on_unimplemented], which can be placed on a trait to customize the message when that trait is required but hasn't been implemented on a type. Consider the example given in the stabilization pull request:

#[diagnostic::on_unimplemented( message = "My Message for `ImportantTrait<{A}>` is not implemented for `{Self}`", label = "My Label", note = "Note 1", note = "Note 2" )] trait ImportantTrait<A> {} fn use_my_trait(_: impl ImportantTrait<i32>) {} fn main() { use_my_trait(String::new()); }

\ Previously, the compiler would give a builtin error like this:

error[E0277]: the trait bound `String: ImportantTrait<i32>` is not satisfied --> src/main.rs:12:18 | 12 | use_my_trait(String::new()); | ------------ ^^^^^^^^^^^^^ the trait `ImportantTrait<i32>` is not implemented for `String` | | | required by a bound introduced by this call |

\ With #[diagnostic::on_unimplemented], its custom message fills the primary error line, and its custom label is placed on the source output. The original label is still written as help output, and any custom notes are written as well. (These exact details are subject to change.)

error[E0277]: My Message for `ImportantTrait<i32>` is not implemented for `String` --> src/main.rs:12:18 | 12 | use_my_trait(String::new()); | ------------ ^^^^^^^^^^^^^ My Label | | | required by a bound introduced by this call | = help: the trait `ImportantTrait<i32>` is not implemented for `String` = note: Note 1 = note: Note 2

\ For trait authors, this kind of diagnostic is more useful if you can provide a better hint than just talking about the missing implementation itself. For example, this is an abridged sample from the standard library:

#[diagnostic::on_unimplemented( message = "the size for values of type `{Self}` cannot be known at compilation time", label = "doesn't have a size known at compile-time" )] pub trait Sized {}

\ For more information, see the reference section on the diagnostic tool attribute namespace.

Asserting unsafe preconditions

The Rust standard library has a number of assertions for the preconditions of unsafe functions, but historically they have only been enabled in #[cfg(debug_assertions)] builds of the standard library to avoid affecting release performance. However, since the standard library is usually compiled and distributed in release mode, most Rust developers weren't ever executing these checks at all.

\ Now, the condition for these assertions is delayed until code generation, so they will be checked depending on the user's own setting for debug assertions -- enabled by default in debug and test builds. This change helps users catch undefined behavior in their code, though the details of how much is checked are generally not stable.

\ For example, slice::from_raw_parts requires an aligned non-null pointer. The following use of a purposely-misaligned pointer has undefined behavior, and while if you were unlucky it may have appeared to "work" in the past, the debug assertion can now catch it:

fn main() { let slice: &[u8] = &[1, 2, 3, 4, 5]; let ptr = slice.as_ptr(); // Create an offset from `ptr` that will always be one off from `u16`'s correct alignment let i = usize::from(ptr as usize & 1 == 0); let slice16: &[u16] = unsafe { std::slice::from_raw_parts(ptr.add(i).cast::<u16>(), 2) }; dbg!(slice16); } thread 'main' panicked at library/core/src/panicking.rs:220:5: unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX` note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread caused non-unwinding panic. aborting.

Deterministic realignment

The standard library has a few functions that change the alignment of pointers and slices, but they previously had caveats that made them difficult to rely on in practice, if you followed their documentation precisely. Those caveats primarily existed as a hedge against const evaluation, but they're only stable for non-const use anyway. They are now promised to have consistent runtime behavior according to their actual inputs.

  • pointer::align_offset computes the offset needed to change a pointer to the given alignment. It returns usize::MAX if that is not possible, but it was previously permitted to always return usize::MAX, and now that behavior is removed.
  • slice::align_to and slice::align_to_mut both transmute slices to an aligned middle slice and the remaining unaligned head and tail slices. These methods now promise to return the largest possible middle part, rather than allowing the implementation to return something less optimal like returning everything as the head slice.

Stabilized APIs

  • impl Read for &Stdin
  • Accept non 'static lifetimes for several std::error::Error related implementations
  • Make impl<Fd: AsFd> impl take ?Sized
  • impl From<TryReserveError> for io::Error

\ These APIs are now stable in const contexts:

  • Barrier::new()

Compatibility notes

  • As previously announced, Rust 1.78 has increased its minimum requirement to Windows 10 for the following targets:
  • x86_64-pc-windows-msvc
  • i686-pc-windows-msvc
  • x86_64-pc-windows-gnu
  • i686-pc-windows-gnu
  • x86_64-pc-windows-gnullvm
  • i686-pc-windows-gnullvm
  • Rust 1.78 has upgraded its bundled LLVM to version 18, completing the announced u128/i128 ABI change for x86-32 and x86-64 targets. Distributors that use their own LLVM older than 18 may still face the calling convention bugs mentioned in that post.

Other changes

Check out everything that changed in Rust, Cargo, and Clippy.

Contributors to 1.78.0

Many people came together to create Rust 1.78.0. We couldn't have done it without all of you. Thanks!


The Rust Release Team

\ Also published here

\ Photo by Ubaid E. Alyafizi on Unsplash

Opportunità di mercato
Logo ChangeX
Valore ChangeX (CHANGE)
$0.00144854
$0.00144854$0.00144854
+0.23%
USD
Grafico dei prezzi in tempo reale di ChangeX (CHANGE)
Disclaimer: gli articoli ripubblicati su questo sito provengono da piattaforme pubbliche e sono forniti esclusivamente a scopo informativo. Non riflettono necessariamente le opinioni di MEXC. Tutti i diritti rimangono agli autori originali. Se ritieni che un contenuto violi i diritti di terze parti, contatta crypto.news@mexc.com per la rimozione. MEXC non fornisce alcuna garanzia in merito all'accuratezza, completezza o tempestività del contenuto e non è responsabile per eventuali azioni intraprese sulla base delle informazioni fornite. Il contenuto non costituisce consulenza finanziaria, legale o professionale di altro tipo, né deve essere considerato una raccomandazione o un'approvazione da parte di MEXC.

Potrebbe anche piacerti

The Best Crypto Presale in 2025? Solana and ADA Struggle, but Lyno AI Surges With Growing Momentum

The Best Crypto Presale in 2025? Solana and ADA Struggle, but Lyno AI Surges With Growing Momentum

The post The Best Crypto Presale in 2025? Solana and ADA Struggle, but Lyno AI Surges With Growing Momentum appeared on BitcoinEthereumNews.com. With the development of 2025, certain large cryptocurrencies encounter continuous issues and a new player secures an impressive advantage. Solana is struggling with congestion, and the ADA of Cardano is still at a significantly lower level than its highest price. In the meantime, Lyno AI presale is gaining momentum, attracting a large number of investors. Solana Faces Setbacks Amid Market Pressure However, despite the hype surrounding ETFs, Solana fell by 7% to $ 203, due to the constant congestion problems that hamper its network functionality. This makes adoption slow and aggravates traders who want to get things done quickly. Recent upgrades should combat those issues but the competition is rising, and Solana continues to lag in terms of user adoption and ecosystem development. Cardano Struggles to Regain Momentum ADA, the token of a Cardano, costs 72% less than the 2021 high and is developing more slowly than Ethereum Layer 2 solutions. The adoption of the coin is not making any progress despite the good forecasts. Analysts believe that the road to regain the past heights is long before Cardano can go back, with more technological advancements getting more and more attention. Lyno AI’s Explosive Presale Growth In stark contrast, Lyno AI is currently in its Early Bird presale, in which tokens are sold at 0.05 per unit and have already sold 632,398 tokens and raised 31,462 dollars. The next stage price will be established at $0.055 and the final target will be at $0.10. Audited by Cyberscope , Lyno AI provides a cross-chain AI arbitrage platform that enables retail traders to compete with institutions. Its AI algorithms perform trades in 15+ blockchains in real time, opening profitable arbitrage opportunities to everyone. Those who make purchases above 100 dollars are also offered the possibility of winning in the 100K Lyno AI…
Condividi
BitcoinEthereumNews2025/09/18 18:22
Nexstar Pulls ‘Jimmy Kimmel Live!’ From ABC Over Charlie Kirk Comments

Nexstar Pulls ‘Jimmy Kimmel Live!’ From ABC Over Charlie Kirk Comments

The post Nexstar Pulls ‘Jimmy Kimmel Live!’ From ABC Over Charlie Kirk Comments appeared on BitcoinEthereumNews.com. Topline “Jimmy Kimmel Live!” will be removed from local ABC stations owned by Nexstar “indefinitely,” according to a statement from the broadcasting giant, pulling the show after its host made comments about conservative activist Charlie Kirk, who was assassinated last week. Kimmel speaks at the 2022 Media Access Awards presented by Easterseals and broadcast on November 17, 2022. (Photo by 2022 Media Access Awards Presented By Easterseals/Getty Images for Easterseals) Getty Images for Easterseals Key Facts Nexstar said its “owned and partner television stations affiliated with the ABC Television Network will preempt” Kimmel’s show “for the foreseeable future beginning with tonight’s show.” This is a developing story. Check back for updates. Source: https://www.forbes.com/sites/antoniopequenoiv/2025/09/17/nexstar-will-pull-jimmy-kimmel-live-from-its-abc-stations-indefinitely-after-kimmels-comments-on-charlie-kirk/
Condividi
BitcoinEthereumNews2025/09/18 07:59
What to Look for in Professional Liability Insurance for Beauty Professionals

What to Look for in Professional Liability Insurance for Beauty Professionals

A career in the beauty is very rewarding but has its own perils on day to day basis. You are either a loyal cosmetologist or you are an esthetician; either way,
Condividi
Techbullion2026/03/07 18:09