Today, we're excited to release the alpha version of Rust 1.0, a systems programming language with a focus on safety, performance and concurrency.
This release marks a huge milestone for Rust and its community:
-
The language is feature-complete for 1.0. While we plan to make many usability improvements before the final release, all 1.0 language features are now in place and we do not expect major breaking changes to them.
-
The core libraries are feature-complete for 1.0. API conventions have been firmly established, and core functionality -- basic types, traits, data structures and concurrency primitives -- has all been stabilized. Here again we do not expect major breaking changes before 1.0.
The Rust community really rolled up their sleeves to help push this release over the finish line; thanks to everyone who participated, and especially to the friends of the tree!
While we've come a long way in the last four months, there's a lot left to do before Rust hits 1.0 final. Read on for more.
What happens during the alpha cycle?
If you're already a Rust user, the first thing you'll notice during the alpha cycle is a dramatic drop in the pace of breaking changes.
Most features and modules that will ship with Rust 1.0 are in place and will change in only limited ways during this cycle, as detailed later in this post. Only a few modules -- the key ones being path manipulation and I/O -- are still stabilizing.
We need your help to iterate on those final libraries before the beta release, and to hammer out any remaining issues on the parts of Rust we have already marked as stable. During the alpha cycle, we recommend using the nightly releases, which will continue to evolve as these APIs take their final shape.
The alpha release is part of our transition into stability guarantees. While we're not ready to make full stability guarantees yet, this release cycle moves us much closer to that 1.0 goal. When 1.0-beta1 is released six weeks from now, these important remaining APIs will be stable. Code that compiles on the beta release should do so with minimal changes on 1.0 final as well.
What's shipping in alpha?
Since the previous release, we've made an enormous amount of progress. We'll cover a few of the highlights here; the full details are in the release notes.
Language features
-
Dynamically-sized types (DSTs): Types whose size is only known at runtime (such as array slices and trait objects) are now largely integrated into the language, including basic integration with user-defined smart pointers. Implemented by Nick Cameron; rolled out by Jorge Aparicio.
-
Multidispatch traits: Trait implementations can now be selected via multiple types (not just
Self), which has opened the door to many interesting APIs. Implemented by Niko Matsakis; rolled out by Jorge Aparicio and Aaron Turon. -
Associated types: Traits can now have associated types, which cuts down on verbosity with generics and aids type inference. Implemented by Patrick Walton, Niko Matsakis, and Nick Cameron; rolled out by Jorge Aparicio.
-
Where clauses: A powerful new way of specifying trait bounds, where clauses have landed and enabled some significant simplifications in the standard library. Implemented by Niko Matsakis, Patrick Walton, and Jared Roesch; rolled out by Jorge Aparicio and Aaron Turon.
-
"Unboxed" closures: Closures are now just another way of using the trait system, which required adding higher-ranked lifetimes; this allows much greater flexibility for both ownership and choosing static or dynamic dispatch. Implemented by Patrick Walton, Brian Koropoff and Niko Matsakis; rolled out by Jorge Aparicio.
-
Macros: The
macro_rulessystem has been significantly revised, cleaning up a number of rough edges and future-proofing in various ways. While macros suffer from some significant deficiencies, the macro system is a powerful and important part of Rust programming that will ship with 1.0. We plan to build a second-generation macro system after the 1.0 release. Implemented by Keegan McAllister and Corey Richardson. -
Integer type changes: The long-running debate about integer types was recently resolved:
intanduintare now known asisizeandusize, and no longer suggest the role of "default integer" in Rust. Credit goes to the entire community for the vigorous debate. -
Opt-in builtin traits: The marker traits that Rust uses to classify data as copyable, thread-safe, and so forth have been significantly refactored to have safer, more predicable defaults. Implemented by Patrick Walton and Flavio Percoco Premoli.
All of these language features have been rolled out throughout the standard library.
Library features
-
Consistent conventions: A large number of conventions RFCs have been approved, and are largely summarized in the Rust Guidelines; these conventions have been rolled out through all
#[stable]parts ofstd. Led by Aaron Turon. -
Stable core types and traits: All of the primitive types and basic building blocks (like
char,String,Vec,Box,Arc,RefCelland so on) are now#[stable]. Stabilized by Aaron Turon, Alex Crichton, Brian Anderson, Brendan Zabarauskas and Huon Wilson. -
Iterators and collections: A series of RFCs have been implemented to revamp and stabilize the collections APIs; iterators are also
#[stable]. RFCs by Aaron Turon and Alexis Beingessner, stabilized together with Chase Southwood, Piotr Czarnecki, Félix Raimundo, Clark Gaebel and others. -
Concurrency primitives: Rust's concurrency modules have seen an overhaul, including thread-local storage, synchronization primitives, and a new thread API that will soon allow child threads to share data on their parent's stack. These APIs are more efficient and idiomatic than previous versions, and most are already
#[stable]. Implemented by Alex Crichton and Aaron Turon. -
Runtime freedom: Rust's runtime system and green-threading model has been entirely removed, which cut the static binary size of "hello world" in half and has opened the door to lower-level hooks into the standard library. Implemented by Aaron Turon.
Documentation
-
The Rust Programming Language: The previous split between "The Guide" and "The guides" has been rectified by combining them into "The book". Led by Steve Klabnik.
-
Rust by Example: The lovely https://rustbyexample.com/ introduction to Rust is now part of the official documentation. Initiated by Jorge Aparicio.
-
Additional API documentation: A lot of work has gone into improving API documentation, both by expanding the overview text and adding examples throughout. Credit goes to the entire community, who worked tirelessly to improve these docs.
What remains to be done?
A detailed list of possible breaking changes to stable features/APIs can be found here. Below is a list of major areas of improvement for the alpha cycle:
-
Improvements to associated types and unboxed closures: Both of these features are functional, but we plan to make significant ergonomic improvements during the beta cycle, such as more sophisticated capture-clause inference and more uniform support for shorthands like
X::Type. -
Improvements to generics: We will explore avenues to cut down on the number of redundant trait bounds that are currently required.
-
Path reform: The
pathmodule will soon be reformed to make use of DST, to give a better account of platform differences, and to more closely align with the new C++ standard. Implementation work is largely complete, and the rollout should occur soon after alpha. -
IO reform: An overhaul of the IO APIs is being planned; please join in the conversation! These changes will be landing throughout the alpha cycle.
-
Sync/Send changes: We plan to tweak the definitions of the
SyncandSendmarkers so that threads can share stack data. This may cause some minor breakage. -
Integer type auditing: During the alpha cycle, we will finalize formal conventions for choosing integer types and re-audit the use of these types in
std. This auditing may cause some breakage to#[stable]APIs. -
Documentation for all features: Some recent feature additions, such as associated types and unboxed closures, have their RFC as the only documentation. User-facing documentation for these features will be added during the alpha cycle. The reference will likewise be brought up to date and improved.
-
Complete API documentation: Everything marked stable will have at least a usage example, and hopefully complete textual explanation, before beta.
And, of course, we will continue to fix bugs and add polish throughout the alpha cycle.
Contributors to Rust 1.0.0-alpha
This alpha release could not have happened without the help of Rust's enthusiastic community. Thanks go to:
Aaron FrielAaron LiblongAaron TuronAaron WeissAdam SzkodaAdolfo OchagavíaAdrien TétarAidan CullyA.J. GardnerAkos KissAleksandr KoshloAlexander LightAlex CrichtonAlex GaynorAlexis BeingessnerAlex LyonAlfie JohnAndrea CancianiAndrew CannAndrew PaseltinerAndrew WagnerareskiAriel Ben-YehudaArtemArthur LiaoarturoAustin BonanderBarosl LeeBen FoppaBen GamariBen SBheesham PersaudBjörn SteinbrinkblussBoris EgorovborsBrandon SandersonBrendan ZabarauskasBrian AndersonBrian J BrennanBrian KoropoffCarol NicholsChase SouthwoodChris MorganChris WongClark GaebelCody P SchaferColin SherrattCorey FarwellCorey FordCorey RichardsoncrhinoCristi BurcăDamien RadtkeDan Burkertdan@daramos.comDaniel HofstetterDaniel MicayDan LuuDavid CreswickDavis SilvermanDiego GiagioDirk GadsdenDylan EdeEarl St SauverEduard BurtescuEduardo BautistaelszbenEric AllenEric KiddErick TryzelaarErwanFabrice DesréFakeKaneFalco HirschenbergerFelix RaimundoFelix S. Klock IIFlavio PercocoFlorian GilcherFlorian HahnFlorian WilkensgamazepsGil CottleGleb KozyrevGraham FawcettGuillaume PinotHuon WilsonIan ConnollyinrustwetrustIvan PetkovIvan UkhovJacob EdelmanJake GouldingJakub BukajJames MillerJared RoeschJarod LiuJashank JeremyJauhien PiatlickijbranchaudJeff ParsonsJelte FennemajfagerJim Applejmu303Johannes HoffJohannes MuenzelJohn AlbietzJohn GallagherJohn Kåre AlsakerJohn KleintJonathan ReemJonathan SJon HaddadJONNALAGADDA SrinivasJoonas JavanainenJorge AparicioJoseph CrailJoseph Rushton WakelingJosh HabermanJosh StoneJoshua YanovskijrincaycJulian OrthjuxiliaryjxvKang SeonghoonKasey CarrothersKeegan McAllisterKen TossellKevin BallardKevin MehallKevin YapklutzykulakowskiLaurence TrattLiigo ZhuangLionel FlandrinLuke MetzLuqman AdenManish GoregaokarMarkus SiemensMartin PoolMarvin LöbelMatej LachMathieu PoumeyrolMatt McPherrinMatt MurphyMatt WindsorMaxime QuandalleMaximilian HaackMaya NitumchaputmdingerMichael GehringMichael NeumannMichael SproulMichael WoeristerMike DilgerMike PedersenMike RobinsonMs2gerMukilan ThiyagarajanMurarthNafisNathan ZadoksNeil PankeyNicholas BishopNick CameronNick HowellNiels EgbertsNiko MatsakisNODA, KaiOGINO Masanorioli-obkOliver SchneiderolivrenP1startPascal HertleifPatrick WaltonPaul CollierPedro LarroyPeter AtashianPeter ElmersPhil DawesPhilip MunksgaardPhilipp GesangPiotr CzarneckiPiotr JawniakPiotr SzotkowskiqwitwaRaphael SpeyerRay ClananRichard DiamondRicho HealeyRicky TaylorrjzRobin GlosterRobin StockerRohit JoshiRolf TimmermansRolf van de KrolRoy CrihfieldRuud van AsseldonkSean CollinsSean GillespieSean Jensen-GreySean McArthurSean T AllenSeo SanghyeonSeth Pollacksheroze1123Simonas KazlauskasSimon SapinSimon WollwageSonStefan BucurStepan KoltsovSteve KlabnikSteven FacklerStuart PernsteinerSubhash BhushanTamir DubersteinTaylor Hutchisonth0114ndthiagopntsTimon RappTitouan VervackTobias BucherTom JakubowskitshakahTshepang LekhonkhobeUlysse CarionUtkarsh KukretiVadim ChugunovVadim PetrochenkovValerii HioraVictor BergerVictor van den ElzenViktor Dahlville-hVitali HaravyVladimir MatveevVladimir SmolawewhataloadofwhatYawarRaza7349York XiangZbigniew SiciarzZiad Hatahet