Rust news # 3 (November 2018)
I bring to your attention a subjective selection of rusty news for November. In this selection: Rust 2018, RustRush, video from conferences, Amazon Lambda and Firecracker, quizzes, switching exonum to actix-web, 10 reasons to use Rust.
Rust poll results 2018
The results of the annual Rust survey ( discussion ), which has been going since August, are published .
There is a lot of interesting information there, especially if viewed in dynamics compared to previous years, but there is a separate increase in the number of professionals using the language: if last year 21% of respondents used Rust at work, then this year - already 30%.
Rust 2018
Rust 1.31 will be released the other day - the first stable version with support for the new language edition: Rust 2018. ( what is the "edition"? )
By the release of the new edition of the language, the official page of the language was redesigned - beta.rust-lang.org - which caused polarized feedback on formulations and color fonts (for example: 1 , 2 );
AWS Firecracker (Amazon Web Services)
"The AWS introduced Firecracker -" micro-virtualization "for Linux" :
On AWS re: Invent 2018 , which is taking place these days in Las Vegas, Firecracker was announced - a new open source virtualization technology based on Linux KVM. The authors promise that “in a split second you can run lightweight micro-virtual machines (microVMs) in a non-virtualized environment, gaining the advantages of traditional VMs - in the form of security and isolation of workloads, and containers - in the form of efficient use of resources”.
The basis for the project was the open source development from Google - crosvm from Chromium OS, which is written in Rust and is responsible for launching operating systems with virtualization of devices (but without emulating real hardware). Therefore, the Firecracker code is also written in the Rust language, and its authors promise to return their corrections to the code base of the parent project, although the projects themselves have diverged greatly in their purpose over time.
Same:
- / r / rust: "AWS firecracker microvm is all rust" ;
- / r / rust: "Rust support has been added to AWS Lambda" ;
Video reports from RustFest 2018 Rome
- "Declarative programming in Rust" ;
- "Sequoia: A New OpenPGP Implementation in Rust" ;
- "Oh Boy! Creating a Game Boy Emulator in Rust" ;
- "One Thousand Ways to Die in Rust FFI" ;
- "Rust, For Science!" ;
- "Behind The Scenes Of Producing An Executable" ;
- "Simple CRDT in Rust" ;
- "Grappling with growth, and other good problems to have" ;
- "Caging the SpiderMonkey - Ensuring safe JS bindings in Servo" ;
- "Fun with Rusty Robots" ;
- "Increasing Rust's Reach Project Highlight" ;
Video reports from Rust Belt Rust 2018
All with rastfest looked? Then here is another supplement with Rust Belt Rust 2018 :
- "Core Team Talk" - Ashley Williams and Niko Matsakis ;
- "Monotron - a 1980s style home computer written in Rust" - Jonathan Pallant ;
- "Syntax conveniences shared with the compiler" - Tshepang Lekhonkhobe ;
- "Actix and Actors in Rust" - Nathan Hawkins ;
- "Lightning Talks: Rust Quiz" - Alex Crichton and David Tolnay ;
- "Lightning Talks: Rustbots" - Robots powered by Rust - Rahul Thakoor ;
- "Lightning Talks: Personal Wiki" - James Sacksteder ;
- "Lightning Talks: Rust's Family Tree" - Jenny Manning ;
- "Lightning Talks: Announcing the Ann Arbor Meetup" - Esty Thomas ;
- "Lightning Talks: Rust In Space" - myrrlyn ;
- "Percy: Isomorphic Web Apps with Rust + WebAssembly" - Chinedu Francis Nwafili ;
- "Evolving API design in Rust" - Simon Nicholas Heath ;
- "Maintaining the Rust Community" - Arshia Mufti ;
- "Move fast and don't break things:" - Joshua Liebow-Feeser ;
- "State of the crates.io" - Sean Griffin ;
And let me drop the two-hour record of the Rust Bay Area Meetup to the heap .
RustRush 2018 : Conference December 15-16 in Moscow
RustRush 2018 is a Rust developer conference dedicated to web, blockchain, high performance and system programming.
Less than two weeks left! CfP is finished, the final program of reports is posted .
cheats.rs
cheats.rs ( repository , discussion ) - a memo for Rust + selection of links to other similar memos. It may come in handy when immersed in a language.
The site, by the way, is made using Zola (see below in the section for new and updated packages).
How we translated Exonum from Iron to actix-web
An article on practical experience with relatively cunning generic code from Gorthauer87 . The code of the intestines is sometimes rather complicated, but the final result is convenient and beautiful for the user.
10 unobvious benefits of using Rust
freecoder_xx wrote a review article about the less advanced merits of Rust.
This article contains a dozen of unobvious and not particularly advertised advantages of using Rust, which I hope will help you decide on the choice of this language for your projects.
Rust quiz
From the report of Alex grew up a site with medium and very complex issues for extreme cases and Rust's "warts" ( discussion ). By clicking the "reveal" button ("I give up") a detailed explanation is shown of what the hell is happening in the example code.
The source code for this whole thing lives here . There can be done PRy, if you know more cool questions of this format.
Embedded
- OxidizeConf ( discussion ) - the conference about embedded / IoT on Rust is announced;
- "This Year in Embedded Rust" - summing up the progress of the programming working group for embedded systems for the year:
- An active sub-community has been organized;
- It became possible to develop without nightlights;
- The list of supported iron has greatly expanded;
- The threshold of entry has decreased due to the development of additional tools and ready-made project templates ;
- Documentation has improved, in particular, they were started:
- The Embedded Rust book - the main book;
- The Discovery book - introduction to the subject area;
- The Embedonomicon - for hardcore;
- Awesome Embedded Rust - a list of interesting projects;
- Bootstrapping My Embedded Rust Development Environment ( discussion ) - an overview of the workflow and tools embedded;
- embedded-sdmmc-rs ( discussion ) - allows reading SD / MMC cards, supports no_std ;
- drone ( discussion ) - software and controller for quadcopters;
WebAssembly
- "Programming WebAssembly with Rust" ( discussion ) - paid access to the beta version of the book is open;
- typed-html ( discussion ) - implements a macro
html!
that allows you to create HTML documents from Rust code using JSX- compatible syntax (BONUS: works great in WASM too! ); - HOWTO: Setting up ;
- Terrarium ( discussion ) - a platform for experimenting with WASM from Fastly ;
- php-ext-wasm ( discussion ) - a project to launch WASM directly from PHP, based on paritytech / wasmi ;
- Wasmer ( discussion , code ) - JIT optimizing compiler WASM, based on Cranelift ;
- Bringing Elm's architecture to Rust and Webassembly ( discussion ) - about willow , an attempt to transfer the "Elm architecture" to Rust;
Igrostroy
- I started twitter.com/rust_gamedev (by analogy with rustwasm , rustembedded , etc.), it’s strange that no one has done this before;
- The new studio Embark , founded by people from DICE / EA, announced its intention to use Rust as the main language ( discussion );
- Video "Modulator crate and Play app (Rust coding series)" ( discussion ) - Andrea Pessino (CTO Ready at Dawn) recorded a pathetic video presentation of the Modulator library ;
- Rusted Ruins ( discussion ) - expandable bagel ;
- Alexandru Ene: Rust And Game Development ( discussion ) - thoughts about the current state of the rusty game development and in what areas it should develop;
- Vulkano 0.11 released ( discussion ) - improved documentation and work with shaders, Tomaka stepped aside from development (and game development in general);
- grr ( discussion ) - another wrapper over OpenGL (in the reddit discussion there is a comparison with glium ), comes immediately with a PBR example ( picture );
- glsl-0.13 and its visitor pattern - improved glsl :: syntax module and "AST visitors";
- / r / rust: "Rust in AAA game engine" - a very sensible discussion of the prospects for using Rust in large game engines;
- This month in rustsim # 2 (November 2018) :
- improved deformable objects ;
- many minor improvements in the code and documentation of nalgebra / ncollide ;
- work has begun on a new package "space" with spatial data structures;
Amethyst Engine Ecosystem :
- Founded Amethyst Foundation - Amethyst Foundation ( discussion ) - mainly for receiving donations ( FAQ );
- A separate amethyst forum has appeared , in which, for example, there is a wiki theme with a list of games on the engine ;
- Changed the logo ;
- Laminar 0.1 ( discussion ) - a network library for games, working on top of UDP ( list of possibilities ), integrated into Amethyst;
- Video "Everpuzzle - using the Amethyst Engine with Rust for Games" - presentation on the development process of the Everpuzzle puzzle ;
- Where The Fun Begins - Azriel talks about the implementation of collisions of different zones of 2d characters;
- LemRunner ( discussion , code ) - a mixture of Lemmings and a runner for Game Off 2018 ;
One line
- IntelliJ-Rust continues to evolve: # 86 , # 87 - in particular, improved work with standard macros, improved integration with LLDB, added import grouping team ( GIF ) and support for collapsible regions ( GIF );
- From March 2019, a confirmed mailing address ( discussion ) will be required for posting something on crates.io ;
- The share of the Rust code in Firefox is gradually growing ( discussion ) - already about 6% of the code base;
- How to speed up the Rust compiler in 2018: NLL edition ( discussion ) - the heroic acceleration of the rasta compiler;
- Getting started with nightly async / await support ( discussion ) - the async syntax is not stabilized soon, but you can begin to get acquainted with it;
- How Rust helps keep Kentik's performance on high - Kentik talks about the role of Rust in their backend;
- A hammer you can only hold by the handle ( discussion ) - a visual demonstration of the benefits of the correct use of the type system;
- Build Your Own Shell using Rust ( discussion ) - every programmer must write at least one shell, right? :);
- Things Rust does not let you do ( discussion ) - listing the main restrictions that Rust imposes on the code, why they are needed and how they can be bypassed if necessary;
- After NLL: Moving from the pattern ( discussion ) - Niko continues his series on NLL and future plans;
- Stacked Borrows Implemented: An Aliasing Model for Rust ( discussion ) - Ralph continues to dig down to the semantics of Rust;
- Implementing Rust's std :: sync :: Mutex in D ( discussion ) - although the article is not aimed at Rust programmers, it provides a good educational program for a standard rusty mutex;
- / r / rust: What are the challenges when switching to Rust? - Discussion of the difficulties of transition to Rust;
- / r / rust: "When should a library panic vs. return 'Result'?" ) - very good discussion of the nuances of "panic vs result";
- Alternative backend compiler Rust Cranelift continues to grow: he can issue a code with a bit better performance than with LLVM
--opt-level=0
and gives it 30% faster ( discussion );
New and updated packages
Some fresh packages for the month or significant updates old:
- tr ( discussion ) - macros for localizing applications, inspired by 'tr' from Qt ;
- cargo nono ( discussion ) - cargo extension, which by external heuristics tries to find dependencies that break no_std;
- immense ( discussion ) - a package for generating three-dimensional grids;
- Logos ( discussion ) - allows you to write "incredibly fast" lexical analyzers;
- fluid ( discussion ) - a framework for writing tests, inspired by XUnit ;
- guerrilla ( discussion ) - an experiment on the implementation of "monkey patching" for Rust (by the way, about the name of the package: I never thought about the etymology of the term "monkey patch" );
- serde_postgres - an easy way to deserialize strings from postgres into arbitrary structures (backward serialization is not supported);
- pgxr - allows you to write rusty extension functions for PostgreSQL;
- MutGuard ( discussion ) - allows you to run arbitrary code every time you take a changing reference to the stored data (for example, to check invariants);
- Zola 0.5 ( discussion ) - the static site generator Gutenberg changed its name to Zola and got the data load from CSV / TOML / JSON, page templates, "transparent sections" ;
- rand 0.6 ( discussion ) - a library for generating random numbers, in addition to now getting its own book ;
- lifeguard 0.6 ( discussion ) - allows you to create pools of reusable objects; The new version improves performance, allows the creation of recursive pointers and adds service types for convenience;
- Pijul 0.11 ( discussion , code ) - version control system based on the theory of patches , moved to the new Tokio , acquired incomplete cloning, received support for SSH proxy and configuration files;
RFC
By RFC (Request for Comments) it is quite convenient to observe which way the language is moving, so here are some interesting ones. In the PR header, there is a "Rendered" link, under which the RFC is available in a readable form.
This month were taken:
- RFC # 2561 Future possibilities - a section with prospects for the development of the proposed idea will appear in the new RFCs (meta-RFC);
- RFC # 2591 Stabilize exhaustive integer pattern matching - stabilization of exhaustive numeric comparisons, that is, for example, if
u8
all 255 values are listed in a variable mapping , then the_
branch will not be needed;
RFC in review:
- RFC # 2592 Stabilize 'std :: task' and 'std :: future :: Future' - offers to stabilize futures (this is separate from the async / await RFC syntax);
- RFC # 2593 Enum variant types - offers to expand the possibilities of using variants of transfers, making them closer to the usual structures;
- RFC # 2584 Structural Records - offers to add anonymous structures (or they can be called tuples with named fields);
- RFC # 2602 # [attribute] s galore - offers to allow hanging attributes on the residence permit, types, limiters (bounds) and a whole bunch more;
- RFC # 2603 Symbol Mangling v2 - suggests combing the symbol decoration circuit ;
- RFC # 2500 Needle API proposes to add
std::needle
to the abstractions of&str
,&mut str
,&[T]
,&mut [T]
,Vec<T>
and&OsStr
;
Pre-RFC:
- Pre-RFC for Anonymous Variant Types, minimal anonymous sum type proposal - offers to add
assesanonymous transfers with types like(_|_)
(NoneError|ParseIntError)
; - Pre-RFC: sum-enums - offers to introduce a new kind of enum with syntax
enum(A, B, C, ..)
andenum Foo(A, B, C, ..)
; - Rust traits and their (lack of) privacy - phaazon offers to add types of the ability to have private methods ( here I am somehow directly very skeptical );
It was rejected by the RFC # 2328 Adopting A Ferris Officially - decided that Ferris is no particular reason to make the official mascot;
That's all, thank you for your attention!
If I have not added any important link or event, feel free to throw in the comments. :)
KDPV taken from here , the rest of the pictures from the sites of relevant projects.
Only registered users can participate in the survey. Sign in , please.