Iyo yechitatu vhezheni yezvigamba zveRust mutyairi rutsigiro muLinux yatoburitswa

Mwedzi mitanhatu mushure mekubudiswa kweshanduro yechipiri, Miguel Ojeda, munyori wepurojekiti yeRust-for-Linux, akaita kuti zvizivikanwe chirevo chesarudzo yechitatu yekuvandudza madhiraivha emudziyo muRust mutauro muLinux Kernel.

Rutsigiro rutsigiro rwunoonekwa sekuyedza, asi kuiswa kwayo mulinux-rinotevera bazi rakatobvumirana. Kuvandudzwa uku kunotsigirwa nemari neGoogle nesangano reISRG (Internet Security Research Group), rinova ndiro rakavamba chirongwa cheLet Encrypt uye rinobatsira mukusimudzirwa kweHTTPS nekuvandudzwa kwemichina yekuvandudza kuchengetedzwa kweInternet.

Izvo zvinofanirwa kuyeukwa kuti shanduko dzakarongwa dzinobvumira Rust kushandiswa semutauro wechipiri kugadzira kernel driver uye module.

Nyaya inoenderana:
Iyo yechipiri vhezheni yezvimedu zveRust driver driver paLinux yakatotumirwa

Rutsigiro rwerust runoshambadzirwa sechisarudzo chisiri kushanda nekukasira uye hazvikonzere kuti Rust ibatanidzwe mune inodiwa yekuvaka inotsamira. Kushandisa Rust yekusimudzira mutyairi kuchakubvumidza kuti ugadzire madhiraivha ari nani uye akachengeteka nekuedza kushoma, pasina kunetsekana kwekuwana nzvimbo yendangariro kana yangosunungurwa, kudzoreredza null anonongedzera, uye kudarika buffer miganho.

Iyo nyowani vhezheni yezvigamba inoramba ichibvisa zvirevo zvakaitwa panguva yekukurukurirana kweyekutanga neyechipiri vhezheni yezvigamba uye shanduko dzinonyanya kukosha dzatinogona kuwana:

Yakachinjirwa kuRust 1.57 yakagadzikana vhezheni semuunganidzi wereferenzi uye inosunga kune yakagadzikana edition yeRust 2021 mutauro yakachengetedzwa. Shanduko kune iyo Rust 2021 p tsanangudzoinobvumirwa kutanga kushanda kudzivirira kushandisa zvinhu zvisina kugadzikana zvakadaro mune zvigamba senge const_fn_transmute, const_panic, const_unreachable_unchecked uye core_panic uye try_reserve.

Izvo zvakare zvinoratidzika kuti kuvandudzwa kweiyo alloc vhezheni kwaenderera mberi kubva muraibhurari yeRust, mushanduro itsva, iyo "no_rc" uye "no_sync" sarudzo dzinoitwa kudzima kushanda iyo isingashandiswe muRust kodhi yekernel, zvichiita kuti raibhurari iwedzere modular. Isu tinoenderera mberi nekushanda nevakuru vealloc vanogadzira kuunza inodiwa shanduko yekernel kuraibhurari huru. Iyo "no_fp_fmt_parse" sarudzo, inodiwa kuti raibhurari ishande pamwero wekernel, yaendeswa kuRust's base library (kernel).

Kodhi yakacheneswa kuti ibvise yambiro inobvira yekuunganidza paunenge uchigadzira kernel muCONFIG_WERROR modhi. Kana kodhi yagadzirwa muRust, yekuwedzera diagnostic compiler modes uye Clippy linter yambiro inosanganisirwa.

Vakakumbira abstractions kushandisa seqlocks (kutevedzana makiyi), callback kufona kwesimba manejimendi, ndangariro I / O (readX / nyora X), kukanganisa uye tambo zvibatiso, GPIO, kuwana mudziyo, vatyairi uye zvitupa mune ngura kodhi.

Maturusi ekusimudzira mutyairi akawedzerwa nekushandiswa kwezvimumumu zvinotamiswa, bit iterators, zvisungo zvakareruka pamusoro pezvinongedzo, zvakanatsiridzwa kuongororwa kwemhosho, uye data bhazi rakazvimirira zvivakwa.

Kushanda nemalink kwakagadziridzwa uchishandisa Ref mhando yakareruka, zvichibva pane refcount_t backend, inoshandisa iyo yepakati API yezita rimwechete kuverenga mareferensi. Tsigiro yemhando dzeArc neRc dzakapihwa muraibhurari yemepu yakajairwa yakabviswa uye haisi kuwanikwa mukodhi yakaitwa padanho rekernel (yeraibhurari pachayo, sarudzo dzakagadzirirwa kudzima marudzi aya).

Iyo vhezheni yemutyairi wePL061 GPIO, yakanyorwazve muRust, yakawedzerwa kumapeche. Chinhu chemutyairi ndechekuti padhuze mutsara-ne-mutsara kuita inodzokorora iripo C GPIO mutyairi. Kune vanogadzira vanoda kujairana nevatongi vekuvaka muRust, mutsara-ne-mutsara kuenzanisa kwakagadzirirwa, iyo inopa nzwisiso iyo inovaka muRust iyo C kodhi yave.

Rust's main codebase inotora rustc_codegen_gcc, rustc backend yeGCC iyo inoshandisa AOT kuunganidzwa ichishandisa libgccjit raibhurari. Nekuvandudza kwakaringana kwebackend, zvinokutendera kuti utore Rust kodhi inobatanidzwa mu kernel uchishandisa GCC.
Pamusoro peArM, Google, uye Microsoft, Red Hat yakaratidza kufarira kushandisa Rust muLinux kernel.

Chekupedzisira, kana iwe uchida kuziva zvakawanda nezvazvo, unogona kubvunza ruzivo Mune inotevera chinongedzo.


Izvo zviri muchinyorwa zvinoomerera pamisimboti yedu ye tsika dzekunyora. Kuti utaure chikanganiso tinya pano.

Iva wekutanga kutaura

Siya yako yekutaura

Your kero e havazobvumirwi ichibudiswa.

*

*

  1. Inotarisira data: AB Internet Networks 2008 SL
  2. Chinangwa cheiyo data: Kudzora SPAM, manejimendi manejimendi.
  3. Legitimation: Kubvuma kwako
  4. Kutaurirana kwedata
  5. Dhata yekuchengetedza: Dhatabhesi inobatwa neOccentus Networks (EU)
  6. Kodzero: Panguva ipi neipi iwe unogona kudzora, kupora uye kudzima ruzivo rwako