Briefing this month | Rust conversations, summary of this month

  • Source: Rust chat room
  • Host: MikeTang
  • Post editor: Gao Xianfeng

Rust Chatter Room no. 18 – Dissect Rust references

Time: 2021/02/02 20:30-21:30

Speaker: Andy Shu

In 2018, I started to write Rust and participated in the design and development of ImmuxDB immutable database and ImmuxCompute computing engine. Used C to develop bitcoin node tinyBTC; He was chief engineer at Matters Lab and wrote about both the front and back ends of the Web.

Content:

Starting from scratch, Rust explains the concept of reference and a number of reference-related concepts: address, pointer, borrow, slice, smart pointer, fat pointer, bare pointer, ownership, lifecycle, scope, etc.

We’ll also cover some issues with Rust references, such as:

  • What is the relationship between the lifecycle and scope?
  • Why is STR not used by itself, but always by reference (e.g. & STR)?
  • Vec has an into_boxed_slice() method — what is a boxed slice and how is it different from Vec?
  • What is the difference between RefCell, Cell, and UnsafeCell? What to use when?

See the replay

Additional information:

  • The official documentation

    • Doc.rust-lang.org/stable/refe…
    • Doc.rust-lang.org/stable/refe…
    • Doc.rust-lang.org/nomicon/own…
    • Github.com/rust-lang/r…
    • Rust – lang. Making. IO/RFCS / 1558 – c…
    • Prev.rust-lang.org/en-US/faq.h…
    • Doc.rust-lang.org/book/ch04-0…
  • blog

    • Smallcultfollowing.com/babysteps/b…
    • Ricardomartins. Cc / 2016/06/25 /…
    • Limpet.net/mbrubeck/20…
    • Internals.rust-lang.org/t/function-…

The Rust Year of the Ox Gala

Time: 2021/02/14 16:00-24:00

P1 [4 points] Rust1.50 latest changes explained

Guest: Zhang Handong

Mr. Zhang Handong kicks off the fun Rust Year of the Ox Gala with a macro code of Rust. Then Teacher Handong explained the main content of the UPDATE of Rust1.50 version. This update includes language level features, compilers, standard libraries, stable apis, Cargo related, others, and compatibility tips.

See the replay

Extended information

  1. Warm the code
macro_rules! m {
    ($($s:stmt)*) => {
        $(
            { stringify!($s); 1}}) < < *; }fn main() {
    print!(
        "{} {} {}",
        m! { return || true}, m! {(return) | |true}, m! {{return} | |true}); }Copy the code
  1. Rust 1.50 Stable release interpretation

P2 [5 point field] Delay-timer sharing

Guest: Pao Pao

Delay-timer is a library similar to the management of periodic tasks. Currently, it supports periodic delivery of synchronous and asynchronous tasks, and supports the operation of dynamically adding and submitting tasks in the scheduling process of some tasks. Teacher Pao pao shared the heart of the development process.

See the replay

Additional information:

  1. Warm the code
fn main() {
    let a = 4;
    println!("{}, {}", --a, --a);
}
Copy the code
  1. Delay-Timer

P3【5 points field 】Libra code analysis and explanation

Guests: Shara

A Rust blockchain project developed by Libra Facebook, its mission is to build a simple global monetary and financial infrastructure for billions of people around the world. Teacher Share shares an idea for analyzing the Libra code.

See the replay

Extended source: Libra

P4 [6:00 PM] Rust developed embedded rotten apple

Guest: Wang Mono

Teacher Wang on-site lute code, using Rust step by step to complete the development of embedded rotten apple.

See the replay

Extended information

  1. Warm the code
trait Trait {
    fn f(self);
}

impl<T> Trait for fn(T) {
    fn f(self) {
        print!("1"); }}impl<T> Trait for fn(&T) {
    fn f(self) {
        print!("2"); }}fn main() {
    let a: fn(_) = | _ :u8| {};
    let b: fn(_) = | _ : &u8| {};
    let c: fn(& _) = | _ : &u8| {};
    a.f();
    b.f();
    c.f();
}
Copy the code
  1. Longan document

P5 [scene at 8] From the perspective of go community leaders

Guest: Cloud drink

As two new languages, Go has about 64 times as many developers as Rust. Several leaders from the Go community have a chat from different perspectives.

See the replay

Extended information

  1. Cloubhouse

P6 [at 9:00] Guitar lessons for programmers

Guests: MiskoLee

MiskoLee will teach you how to play guitar on the spot.

See the replay

P7 [9pm Venue] SNMP project introduction

Guests: Robin

SNMP is a standard protocol designed to manage network nodes (servers, workstations, routers, switches, and HUBS) in IP networks. It is an application-layer protocol. SNMP enables network administrators to manage network performance, discover and resolve network problems, and plan network growth. The network management system receives random messages (and event reports) through SNMP to learn about network problems. Robin shared the practical application of SNMP in her work.

See the replay

P8 [10:00pm] Maya- RS share

Guests: JungWoo

Use Rust to achieve noise effect in Maya. How it works: Use Rust to call the Python API and then pass the results back to the Python API.

See the replay

Extended information

  1. Maya PolyNoise
  2. Maya help

P9 some words on database research and development

Guest: Jin Mingjian

Mr. Jin mingjian talked about his understanding of Rust in both depth and breadth based on his own practical experience.

See the replay

P10 [11:00 PM] WASM shared with Rust and VitejS-RS

Guest: Xia Ge & Lencx

Teacher Xia Ge made a brief introduction to the overall situation of WebAssembly according to the ecological map she organized.

Lencx demonstrates how to start a project with a standard Vite scaffold, integrate it into Rust, and finally package it into a Wasm project.

See the replay

Extended information

  1. Github.com/second-stat…
  2. Mtc.nofwl.com/tech/post/w…
  3. vitejs.dev/

Content: February issue of Rust Chinese (Rust_Magazine)