ãã®è¨äºã¯ Rust Advent Calendar 2023 22æ¥ç®ã®è¨äºã§ã. TL;DR std::thread::JoinHanlde<T> 㯠join() ããªãã¨ã¡ã¢ãªãªã¼ã¯ããã¨æãè¾¼ãã§ããããããªãã¨ã¯ãªãã£ããªï¼ åé¡ Rust ã¯ã¡ã¢ãªå®å ¨ã»ã¹ã¬ããå®å ¨ãªè¨èªã§ãããã¨ãæ¨æ¦ãã¦ãã, å¤ãã®å ´åã¯å®å ¨ã§ãªããã¨ããããã¨ããã¨ã³ã³ãã¤ã«ãéãã¾ãã. ä¾ãã°è¤æ°ã®ã¹ã¬ãããããããªãã¸ã§ã¯ãã«å¯¾ãã¦å¯å¤åç § &mut T ãéãã¦å¤æ´ããããã¨ã¯ã§ãã, ä¾ãã° Arc<Mutex<T>> ãªã©ãå©ç¨ããå¿ è¦ãããã¾ã. ä¸æ¹ã§å®å ¨ãª (unsafe ã§ãªã) æä½ã®ã¿ã使ã£ã¦ãã¦ãé²ããªããã®ãããã¾ã. å ¸åçãªãã®ã¯ã¡ã¢ãªãªã¼ã¯ã§ã. ä¾ãã° Rc ã使ã£ã¦å¾ªç°åç §ãä½ã£ã¦ãã®é¨åãåãé¢ãã¨, åãé¢ãããå´ã¯æ°¸é ã« drop ããã¾ãã. (åç §ã«ã¦ã³
Recently, I found myself returning to a compelling series of blog posts titled Zero-cost futures in Rust by Aaron Turon about what would become the foundation of Rust's async ecosystem and the Tokio runtime. This series stands as a cornerstone in writings about Rust. People like Aaron are the reason why I wanted to be part of the Rust community in the first place. While 2016 evokes nostalgic memor
Introduction About 9 months ago we announced the creation of the Keyword Generics Initiative; a group working under the lang team with the intent to solve the function coloring problem 1 through the type system not just for async, but for const and all current and future function modifier keywords as well. We're happy to share that we've made a lot of progress over these last several months, and w
Builder Lite May 29, 2022 In this short post, I describe and name a cousin of the builder pattern â builder lite. Unlike a traditional builder, which uses a separate builder object, builder lite re-uses the object itself to provide builder functionality. Hereâs an illustrative example Builder Lite pub struct Shape { position: Vec3, geometry: Geometry, material: Option<Material>, } impl Shape { pub
lalrpop A convenient LR(1) parser generator nom A byte-oriented, zero-copy, parser combinators library combine Fast parser combinators on arbitrary streams with zero-copy support. pom PEG parser combinators using operator overloading without macros. peg A simple Parsing Expression Grammar (PEG) parser generator. glue Glue is a parser combinator framework for parsing text based formats, it is easy
Rust is not a particularly original language, with design elements coming from a wide range of sources. Some of these are listed below (including elements that have since been removed): SML, OCaml: algebraic data types, pattern matching, type inference, semicolon statement separation C++: references, RAII, smart pointers, move semantics, monomorphization, memory model ML Kit, Cyclone: region based
Between 2016 and 2020 I wrote a series of blog posts called âHow to speed up the Rust compilerâ. These were mostly about my work on the Rust compiler, plus some updates on the progress on the Rust compilerâs speed in general. I am now back on the Rust bandwagon as a member of Futureweiâs Rust team, and itâs time to start up the blog series again. Successes In the past few months I have landed some
Today, we, the Tokio team, are announcing the initial release of Tokio Console (Github), enabling Rust developers to gain deeper insight into the runtime behavior of their applications. And just like that, we get to peek under the hood. âniedzejkob Tokio Console is a diagnostics and debugging tool for asynchronous Rust programs. It gives you a live, easy-to-navigate view into the program's tasks a
A goal of the async foundations working group is for async Rust to be portable and interoperable. I want to dig in to what that means in this blog post. For a little background, see my earlier post on async runtimes. To run async Rust code, you need an async runtime. Currently however, choosing a runtime locks you into a subset of the ecosystem. Library crates and tools are often restricted to a s
To implement its safety guarantees, the Rust compiler keeps careful track of ownership and references throughout a program. This makes writing certain kinds of data structures challenging; in particular, data structures that have circular references. Let's start with a simple binary tree: struct Tree { root: Option<Node>, } struct Node { data: i32, left: Option<Box<Node>>, right: Option<Box<Node>>
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}