Puo ea Rust programming 1.44 tokollo

e hatisitsoeng tokollo ea puo ea lenaneo la sistimi Mafome 1.44, e thehiloeng ke morero oa Mozilla. Puo e shebana le polokeho ea mohopolo, e fana ka taolo ea memori ea othomathike, hape e fana ka lisebelisoa tsa ho fihlela ts'ebetso e phahameng ea ts'ebetso ntle le ho sebelisa pokello ea lithōle le nako ea nako.

Taolo ea memori ea othomathike ea Rust e felisa liphoso ha e tsamaisa lintlha le ho sireletsa khahlanong le mathata a bakoang ke ho qhekella ha memori ea boemo bo tlase, joalo ka ho fihlella sebaka sa memori kamora hore e lokolloe, li-null pointer dereferences, buffer overruns, jj. Motsamaisi oa liphutheloana o ntse a ntlafatsoa ho aba lilaebrari, ho netefatsa ho bokelloa le ho laola litšepe ka morero. thepa, ho u lumella ho fumana lilaebrari tse hlokahalang bakeng sa lenaneo ka ho tobetsa hanngoe feela. Sebaka sa polokelo se tšehetsoa ho amohela lilaebrari crates.io.

Lengolong la phatlalatso bakeng sa tokollo e ncha, baetsi ba Rust ba ile ba fumana lipolotiki mme ba hana ka ho toba ho phatlalatsa kakaretso e feletseng ea liphetoho tsa Rust 1.44 ka bonngoe le baipelaetsi khahlanong le pefo ea mapolesa, ba bolela hore taba ena ke ea bohlokoa ho feta phapanyetsano ea tsebo ea theknoloji. boiqapelo:

  • Mookameli oa sephutheloana sa Cargo joale o kenyelletsa taelo ea "cargo tree", e bonts'ang kerafo e kang ea lifate ea litšepeho. Khetho ea "--duplicates" (cargo tree -d) le eona e kentsoe, e u lumellang ho lekola litšepeho ho mefuta e fapaneng ea sephutheloana se le seng.

    mdbook v0.3.2 (/Users/src/rust/mdbook)
    ├── ammonia v3.0.0
    │ ├── html5ever v0.24.0
    │ │ ├── log v0.4.8
    │ │ │ └── cfg-haeba v0.1.9
    │ │ ├── mac v0.1.1
    │ │ └── markup5ever v0.9.0
    │ │ ├── log v0.4.8 (*)
    │ │ ├── phf v0.7.24
    │ │ │ └── phf_shared v0.7.24
    │ │ │ ├── siphasher v0.2.3
    │ │ │ └── unicase v1.4.2
    │ │ │ [ho itšetleha ka ho haha] │ │ │ └── version_check v0.1.5
    ...

  • Bakeng sa lits'ebetso tse sa tlameheng ho std ("#![no_std]"), ts'ehetso e kentsoe ts'ebetsong bakeng sa mekhoa ea mananeo a asynchronous e thehiloeng ho "async" mosebetsi, async move { ... } thibela, le ".await" opareitara, e leng ho nolofalletsang ho ngola litšoantšiso tse sa thibeleng phallo ea taelo e kholo.
  • Hona joale parser e ts'ehetsa leano la tlhaloso ea maemo a phahameng a module. Mohlala, moaho o latelang o ke ke oa hlahisa phoso, leha ho se na mojule oa "foo/bar/baz.rs" (ka mantsoe a mang, moaho o ntse o sa sebetse mme o ka hlahisa phoso, empa liphetoho li ka bonoa le ho aroloa maemong a macro le a maemo a ho bokella):

    #[cfg(FALSE)] mod foo {
    mod bar {
    mod baz;
    }
    }

  • "Rustc compiler" joale e ts'ehetsa folakha ea "-C codegen-units" ka mokhoa o ntseng o eketseha. Ts'ebetso ea catch_unwind e hlahlobiloe hape ho netefatsa hore ha e na tšusumetso ea ts'ebetso haeba ho phutholoha ho koetsoe 'me ha ho mekhelo e etsoang.
  • Ts'ehetso ea Level 3 e nolofalitsoe bakeng sa liforomo tsa aarch64-tse sa tsejoeng-none, aarch64-tse sa tsejoeng-none-softfloat, arm64-apple-tvos, le x86_64-apple-tvos platforms. Mohato oa 3 o fana ka ts'ehetso ea mantlha, empa ntle le liteko tsa othomathike kapa litokollo tsa semmuso tsa moaho.
  • Karolo e ncha ea API e fetiselitsoe sehlopheng se tsitsitseng, ho kenyelletsa le ho tsitsisoa
    PathBuf::ka_bokhoni,
    PathBuf:: bokhoni,
    PathBuf :: hlakile,
    PathBuf:: boloka,
    PathBuf:: boloka_hantle,
    PathBuf::honyela_ho_ho lekana,
    {f32|f64}::ho_int_unchecked,
    Sebopeho::align_to,
    Sebopeho::pad_to_align,
    Tlhophiso:: sehlopha le
    Sebopeho:: atolosa.
  • Mesebetsi ea laeborari e tloaelehileng e ekelitsoe:
    • E kentse mofuta o ikhethileng oa "vec![]" o hlahang ka kotloloho ho Vec::new(), e lumellang "vec![]" ho sebelisoa moelelong ho fapana le li-constants.
    • Kenyelletso (impl) ea tšobotsi e kenyellelitsoeng ho fetolela::Infallible Hash.
    • OsString e sebelisa lisupa tse bohlale DerefMut и IndexMut, e khutlisetsang "&mut OsStr".
    • Tšehetso e ekelitsoeng bakeng sa Unicode 13.
    • E kentsoe ka String Ho tsoa ho<&mut str>.
    • IoSlice e sebelisa mokhoa ona khopi.
    • Ho Vec kenngwa tshebetsong Ho tloha<[T; N]>.
    • proc_macro::LexError e sebelisa fmt:: Pontšo le Phoso.
  • Folakha ea "const", e khethollang monyetla oa ho sebelisoa maemong afe kapa afe sebakeng sa li-constants, e sebelisoa ho tloha_le_bytes, ho_le_bytes, ho tloha_be_bytes, ho_be_bytes, ho tloha_ne_bytes le ho_ne_bytes mekhoa bakeng sa mefuta eohle ea linomoro.
  • Tšehetso e ekelitsoeng bakeng sa ho hlahisa lilaebrari tse tsitsitseng ka ".a" format ho e-na le ".lib" bakeng sa liforomo tsa GNU Windows.
  • Litlhoko tse tlase tsa LLVM li phahamisitsoe ho LLVM 8.

Source: opennet.ru

Reka sebaka se tšepahalang sa libaka tse nang le ts'ireletso ea DDoS, li-server tsa VPS VDS 🔥 Reka sebaka se tšepahalang sa ho amohela webosaete ka tšireletso ea DDoS, li-server tsa VPS VDS | ProHoster