Rust 1.43, a minor version that only integrates updates and fixes

The Rust team announced the availability of the new version of your programming language Rust 1.43. This new version does not bring significant new features and is considered a minor version. Although it stands out that there new stabilized APIs, compiler performance improvements and little macro functionality.

For those who are unaware of Rust should know that this is a programming language that focuses on safe working with memory, provides automatic memory management and provides means to achieve high task concurrency, without using garbage collector and runtime.

Automatic memory management in Rust prevents the developer from tampering with pointers and protects against problems that arise from low-level work with memorysuch as accessing a memory area after freeing it, referencing null pointers, going out of buffer limits, etc.

To distribute libraries, ensure assembly and manage project dependencies, the Cargo package manager is developed, which allows you to get the libraries you need for the program with one click. The crates.io repository is supported for hosting libraries.

What's new in Rust 1.43?

Among Rust 1.43's new features, the most important highlighted by the team behind the programming language is stabilization of six new APIs, as well as improvements made to Clippy functionalities. 

Of the changes that stand out in this new version are in macros as it is now possible to use element fragments to convert them to trait code, implementations (impl) or external blocks.

Also, in Rust 1.43 type inference around primitives has been improved, binary references and operations. In this new version, there are new loading environment variables for testing.

To facilitate integration tests, Cargo will define new environment variables. For example, when we are working on a command line project, simply called "cli", if we write an integration test, we want to invoke this binary cli and see what it does, when running tests and benchmarks.

Now it is possible to use the associated constants in floats and integers directly, instead of having to import the module. In other words, you can now write u32 :: MAX and f32 :: NAN without using "Use std :: u32 or" use std :: f32 "

As well, there is a new module that re-exports the primitive types. This can be useful when you are writing a macro and you want to ensure that the types are not hidden.

Of the other changes that are presented:

  • A new environment variable CARGO_BIN_EXE_ {name} has been added to Cargo, set during the build of the integration tests and which allows determining the full path to the executable file defined in the "[[bin]]" section of the package.
  • "If" expressions allow the use of attributes such as "# [cfg ()]".
  • A new part of the API has been transferred to the stable category

Installing Rust on Linux

Si you want to install this programming language on your system, We can do it by downloading the installer which will help us to get Rust on our system

Just open a terminal and run on it:

curl https://sh.rustup.rs -sSf | sh

When running this command the installer will be downloaded and it will run almost immediately, you need to press 1 to continue with the installation with the default values ​​and it will download all the necessary packages.

If you want a custom installation you must type 2 and you will define your environment variables among other things.

At the end of the installation of Rust in our system, the Cargo bin directory will be added immediately in the following path ( ~ / .cargo / bin) where all tools are installed) in your PATH environment variable, in ~ / .profile.

Done this we must proceed to configure the Shell, we do this by modifying the ~ / .profile file to use the modified PATH to work with the Rust environment, running these commands in the terminal:

source ~/.profile
source ~/.cargo/env

Now only we must proceed to verify that Rust was installed correctly in our system, we do this by typing the following command on the terminal

rustc --version

And with it we should receive the Rust version on the screen that we have installed in our system.

And that's it, we can start using this language and be able to install applications that use it on our system.


Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.