Miguel Ojeda, munyori wepurojekiti yeRust-for-Linux, Teme nguva pfupi yadarika yakaparura hurongwa hwechina hwe mudziyo mutyairi zvikamu Rust yeLinux kernel vanogadzira kufunga.
Rutsigiro rwengura runoonekwa sekuyedza, asi yakatobvumirwa kuverengerwa mulinux-inotevera bazi uye yakakura zvakakwana kuti itange kushanda pane abstraction layers pamusoro pe kernel subsystems, pamwe nekunyora madhiraivha nemamodule. Kuvandudzwa uku kunotsigirwa neGoogle neISRG (Internet Security Research Group), inova muvambi weLet Encrypt project uye inosimudzira HTTPS nekuvandudzwa kwetekinoroji yekuwedzera kuchengetedzeka kweInternet.
Kune avo vasati vaziva nezvekuchinja kuri kutaurwa, vanofanirwa kuziva kuti vanozviita kushandiswa kweRust semutauro wechipiri kugadzira ma controller nemamodule yezviyo. Rutsigiro rutsigiro runounzwa sechisarudzo chisingagoneswe nekukasira uye hachikonzereri kuti Rust ibatanidzwe pakati pezvinodiwa zvekuvaka kernel.
Kushandisa Rust kugadzira vatyairi zvinokutendera iwe kuti ugadzire zvirinani uye zvakachengeteka zvakanyanya madhiraivha nekuita kushoma, pasina matambudziko sekuwana nzvimbo yendangariro mushure mekuisunungura, kubvisa null pointer, uye buffer inofashukira.
Kuchengetedzwa kwendangariro kunopihwa muRust panguva yekuunganidza nekutarisa mareferensi, kuteedzera chinhu muridzi, uye chinhu hupenyu hwese (chiyero), pamwe nekuongorora iko kurongeka kwekuyeuka kwekuwana panguva yekuitwa kwekodhi.
Rust inopawo kuchengetedzwa kwehuwandu hwekufashukira, inoda zvinosiyana kuti zvitangwe isati yashandiswa, inobata zvirinani zvikanganiso muraibhurari yakajairwa, inosimbisa pfungwa yezvisingachinjiki uye mareferensi nekusarudzika, uye inopa yakasimba static typing kuderedza zvikanganiso zvine musoro. .
Ndedzipi shanduko muchikamu chechina?
Mune iyi vhezheni itsva yezvigamba zvinoratidzwa, zvinotaurwa kuti zvakataurwa panguva yekukurukurirana kwekutanga, yechipiri uye yechitatu edition yezvigamba zvakaramba zvichibviswa.
Ticharamba tichivandudza kusvikira tisingavimbi pane chero maitiro asina kugadzikana;
panguva iyo isu tingada kutanga kuzivisa shanduro shoma yeRust
inotsigirwa, sezvinoitwa, semuenzaniso, yeGCC neClang.Saizvozvo, isu takatamirawo kushanduro ya2021 yeRust mutauro.
Kana dziri dzimwe shanduko dzakaitwa muiyi vhezheni itsva, chiziviso chinotaura zvinotevera:
- Yakashandurwa kushandisa yakagadzikana Rust 1.58.0 seyereferenzi compiler.
- Shanduko dzinodiwa papurojekiti, dzisati dzabatanidzwa mune huru Rust toolkit, dzinosanganisira "-Zsymbol-mangling-version=v0" mureza (inotarisirwa muRust 1.59.0) uye "pamwe_uninit_extra" modhi (inotarisirwa muRust 1.60.0) .
- Otomatiki cheki yekuwanikwa kweRust maturusi uye kukodzera kwawo kwakawedzerwa, uye kugona kuyedza Rust rutsigiro pane system yakawedzerwa.
- Zvitsva zvinotorwa zvinofungidzirwa kuti zvikwanise kuwana matafura ekuzivikanwa kwemudziyo ("IdArray" uye "IdTable") kubva kuRust kodhi.
- Akawedzera maseru ekufona mabasa ane hukama netimer (wachi furemu).
- Platform controllers ikozvino inotsanangurwa kuburikidza nemaitiro ekuita.
- Imwe macro itsva yakawedzerwa kuitira kurerutsa kunyoreswa kwemutyairi wepuratifomu uye nyowani generic driver template yakatsanangurwa.
- Yakawedzera macros matsva e "dev_*" zvimiro.
- Yakawedzera nzira nyowani "{verenga, nyora}*_relaxed" yeIoMem mhando .
- Yakabviswa FileOpener pfuma kurerutsa mafaera.
- Yakawedzera "ThisModule" parameter kune nhamba yenharo dzakapfuura panguva yekunyoresa controller.
- Yakajairika template yekugadzira kernel module muRust mutauro inokurudzirwa.
Chekupedzisira, kana iwe uchida kukwanisa kuziva zvakawanda nezve iyi vhezheni itsva, unogona kubvunza ruzivo Mune inotevera chinongedzo.