Gore rino 2022 rinogona kunge riri gore reRust mukati meLinux kernel, kubvira Rust yeLinux ingangove yakagadzirira Linux kernel vhezheni 6.1. Izvi ndizvo zvinobuda mukutaura kwazvino naLinus Torvalds pakupedzisira Open Source Summit.
Uye ndezvekuti vachengeti vakuru veLinux kernel vanoziva nemutauro weC uyo zera rinotoonekwa serinotariswa, sezvo vamwe vari kutosvika makumi matanhatu, nepo chizvarwa chitsva chevanochengetedza vane makore makumi matatu vari kusimuka. iyo inogona kuwedzera kuoma kwekutsvaga vachengeti veLinux kernel kana budiriro yayo ichienderera mumutauro weC.
Munguva yeOpen Source Summit Europe, Linus Torvalds akazivisa kuti, kudzivisa matambudziko asingatarisirwi, suye ichasanganisira zvigamba kutsigira kuvandudzwa kweRust mutyairi muLinux 6.1 kernel, iyo inotarisirwa kuburitswa muna Zvita.
Vamwe yemabhenefiti ekuwana Rust rutsigiro mu kernel vari kuita kuti zvive nyore kunyora ma controller yemidziyo yakachengeteka nekuderedza mikana yekukanganisa kwendangariro uye kurudzira vagadziri vatsva kuti vapinde mu kernel.
"Ngura ndechimwe chezvinhu zvandinofunga kuti zvichaunza huso hutsva ... tave kuchembera nekuchena," Linus akadaro.
Zvinyorwa zvekusunungurwa zve Linux 6.0 rc1 inopa gadziriso pamusoro pekufambira mberi kweRust chirongwa yeLinux: kune boka rinoshanda rakabatana, mutyairi wekutanga weNVMe kuchengetedza midhiya yakagadziridzwa nemutauro iwoyo iripo, pamwe nemutyairi weserver inoitirwa 9P network protocol.
Nekudaro, timu iri kuramba ichisangana nematambudziko nekuvaka. Muchokwadi, zvinoitwa neGCC yekernel uku Rust ichiri neLLVM. Iyo Rust interface yeGCC iri mumabasa, asi danho richiri mukutanga.
Kutanga kweRust rutsigiro yeLinux kernel budiriro akafunga "danho rinokosha kukwanisa kunyora zvidzori mumutauro wakachengeteka zvikuru.” Mozilla Research's Rust ndiyo mhando yemutauro wechirongwa uyo avo vanonyora kodhi yekutanga yekuisa / yekubuda masisitimu (BIOS), bootloaders, masisitimu anoshanda, nezvimwe. iva nechido
Maererano nevacherechedzi, inguva yemberi yezvirongwa zvehurongwa panzvimbo yemutauro weC. Kutaura zvazviri, nyanzvi dzinotaura kuti inopa zviri nani zvivimbiso zvekuchengetedza software kupfuura C / C ++ pair. PaAWS, vanotsanangura kuti kusarudza Rust yemapurojekiti ekusimudzira zvinoreva kuwedzera simba resimba uye kuita kwekuita kweC kune mukana wekuchengetedza.
Linus akazivisawo kuti vhezheni 6.1 yekernel ichavandudza zvimwe zvevakuru zvikamu uye kernel zvakakosha, senge printk () basa. Uyezve, Linus akayeuka kuti makumi mashoma emakore apfuura, Intel akaedza kumuratidza kuti Itanium processor yaive ramangwana, asi akapindura.
“Kwete, izvi hazvichaita, nekuti hapana chikuva chebudiriro. ARM iri kuita zvese nemazvo." «
Rimwe dambudziko rakataurwa naTorvalds nderekusaenderana mukugadzirwa kweArM processors:
"Makambani anopenga emahara kubva kuWild West, achigadzira machipisi ehunyanzvi emabasa akasiyana." Akawedzera kuti "chaive chinhu chikuru pakabuda mapurosesa ekutanga, nhasi kune zviyero zvakakwana kuti zvive nyore kuendesa macores kune matsva eArM processors."
Zvakare, isu tinogona kunongedza kuburitswa kwekutanga kuitiswa kwerust-e1000 mutyairi weIntel Ethernet adapters, yakanyorwa zvishoma muRust.
Iyo kodhi ichine runhare rwakananga kune mamwe maC anosungirirwa, asi basa riri kuitwa zvishoma nezvishoma kutsiva iwo uye nekuwedzera iyo Rust abstractions inodiwa kunyora network madhiraivha (kuwana PCI, DMA, uye kernel network APIs). Mune chimiro chayo chazvino, mutyairi akabudirira kupasa ping bvunzo kana yadhonzwa muQEMU, asi haisati yashanda nehardware chaiyo.
Finalmente Kana iwe uchifarira kuziva zvakawanda nezvazvo, unogona kutarisa ruzivo Mune inotevera chinongedzo.