Rust programming language 1.44 release

Published system programming language release Rest 1.44founded by the Mozilla project. The language focuses on safe memory management, provides automatic memory management, and provides the means to achieve high job parallelism while avoiding the use of a garbage collector and runtime.

Rust's automatic memory management saves the developer from errors when manipulating pointers and protects against problems that arise due to low-level memory manipulation, such as accessing a memory area after it has been freed, dereferencing null pointers, buffer overruns, etc. To distribute libraries, ensure assembly and manage dependencies, the project develops a package manager Job, which allows you to get the libraries you need for the program in one click. A repository is supported to host libraries crates.io.

In the text of the announcement of the new release, the Rust developers got involved in politics and defiantly refused to publish a full review of the changes in Rust 1.44 in solidarity with the protesters against police violence, indicating that this issue is more important than the exchange of technical knowledge. Main innovations:

  • The "cargo tree" command is integrated into the Cargo package manager, which displays a tree-like dependency graph. Also added the option "--duplicates" ("cargo tree -d"), which allows you to evaluate dependencies in different versions of the same package.

    mdbook v0.3.2 (/Users/src/rust/mdbook)
    ├── ammonia v3.0.0
    │ ├── html5ever v0.24.0
    │ │ ├── log v0.4.8
    │ │ │ └── cfg-if 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
    │ │ │ [build-dependencies] │ │ │ └── version_check v0.1.5
    ...

  • For applications not bound to std ("#![no_std]"), support for asynchronous programming methods based on the "async" function, the async move { ... } block, and the ".await" operator is implemented, which makes it easier to write non-blocking handlers main command stream.
  • Support for an extensible module hierarchy definition scheme has been added to the parser. For example, the following construct will not produce an error, despite the actual absence of the "foo/bar/baz.rs" module (semantically, the construct is still invalid and may cause an error, but the changes can be seen and parsed at the macro level and conditional compilation):

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

  • The rustc compiler added the ability to use the "-C codegen-units" flag in incremental mode. The implementation of catch_unwind has been redesigned, which now does not affect performance if the unwinding process is disabled and no exceptions are thrown.
  • Provided third level support for aarch64-unknown-none, aarch64-unknown-none-softfloat, arm64-apple-tvos, and x86_64-apple-tvos platforms. The third level implies basic support, but without automated testing and publication of official builds.
  • A new portion of the API has been transferred to the category of stable, including stabilized
    PathBuf::with_capacity,
    PathBuf::capacity,
    PathBuf::clear,
    PathBuf::reserve,
    PathBuf::reserve_exact,
    PathBuf::shrink_to_fit,
    {f32|f64}::to_int_unchecked,
    Layout::align_to
    Layout::pad_to_align,
    Layout::array and
    layout::extend.

  • Extended functions of the standard library:
    • Added a special variant of "vec![]" directly reflected in Vec::new(), allowing "vec![]" to be used in context instead of constants.
    • Trait implementation (impl) added to convert::Infallible Hash.
    • OsString implements smart pointers DerefMut и IndexMut, returning "&mut OsStr".
    • Added support for Unicode 13.
    • Implemented in String From<&mutstr>.
    • Trait implemented in IoSlice Copy.
    • Vec implemented From<[T; N]>.
    • proc_macro::LexError implements fmt::Display and Error.
  • The "const" attribute, which determines the possibility of using in any context instead of constants, is used in the from_le_bytes, to_le_bytes, from_be_bytes, to_be_bytes, from_ne_bytes and to_ne_bytes methods for all integer types.
  • Added support for generating static libraries in ".a" format instead of ".lib" for GNU platforms for Windows.
  • The minimum requirements for LLVM have been raised to LLVM 8.

Source: opennet.ru

Add a comment