惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tenable Blog
博客园_首页
Vercel News
Vercel News
WordPress大学
WordPress大学
美团技术团队
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Y
Y Combinator Blog
博客园 - 【当耐特】
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
The Cloudflare Blog
T
The Blog of Author Tim Ferriss
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
云风的 BLOG
云风的 BLOG
腾讯CDC
M
MIT News - Artificial intelligence
爱范儿
爱范儿
Recent Announcements
Recent Announcements
雷峰网
雷峰网
Last Week in AI
Last Week in AI
宝玉的分享
宝玉的分享
The Register - Security
The Register - Security
Jina AI
Jina AI
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog
P
Privacy & Cybersecurity Law Blog
Recorded Future
Recorded Future
Help Net Security
Help Net Security
N
News and Events Feed by Topic
博客园 - Franky
P
Proofpoint News Feed
L
LINUX DO - 热门话题
S
SegmentFault 最新的问题
The GitHub Blog
The GitHub Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
月光博客
月光博客
D
Docker
Google DeepMind News
Google DeepMind News
有赞技术团队
有赞技术团队
IT之家
IT之家
Security Latest
Security Latest
L
LangChain Blog
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
J
Java Code Geeks

oida.dev | TypeScript, Rust

TypeScript's `erasableSyntaxOnly` Flag Unsafe for work Tokio: Macros Tokio: Channels Tokio: Getting Started Network Applications on the Tokio Stack Remake, Remodel, Reduce. The `never` type and error handling in TypeScript 5 Inconvenient Truths about TypeScript Refactoring in Rust: Introducing Traits Refactoring in Rust: Abstraction with the Newtype Pattern Announcing the TypeScript Cookbook TypeScript: Iterating over objects The road to universal JavaScript 10 years of oida.dev Rust: Tiny little traits The TypeScript converging point How not to learn TypeScript Introducing Slides and Coverage TypeScript: The humble function overload TypeScript + React: Children types are broken TypeScript: In defense of any Rust: Enums to wrap multiple errors Dissecting Deno Error handling in Rust TypeScript: Unexpected intersections Upgrading Node.js dependencies after a yarn audit TypeScript: Array.includes on narrow types TypeScript + React: Typing Generic forwardRefs shared, util, core: Schroedinger's module names Learning Rust and Go TypeScript: Narrow types in catch clauses TypeScript: Low maintenance types Tidy TypeScript: Name your generics Tidy TypeScript: Avoid traditional OOP patterns Tidy TypeScript: Prefer type aliases over interfaces Tidy TypeScript: Prefer union types over enums My new book: TypeScript in 50 Lessons Go Preact! ❤️ this in JavaScript and TypeScript TypeScript and ECMAScript Modules TypeScript + React: Why I don't use React.FC TypeScript + React: Component patterns TypeScript: Augmenting global and lib.dom.d.ts Vite with Preact and TypeScript TypeScript: Union to intersection type 11ty: Generate Twitter cards automatically Are large node module dependencies an issue? TypeScript: Variadic Tuple Types Preview TypeScript: Improving Object.keys Remake, Remodel. Part 4. TypeScript + React: Typing custom hooks with tuple types TypeScript: Assertion signatures and Object.defineProperty TypeScript: Check for object properties and narrow down type Boolean in JavaScript and TypeScript void in JavaScript and TypeScript Symbols in JavaScript and TypeScript Why I use TypeScript TypeScript + React: Extending JSX Elements TypeScript: Validate mapped types and const context TypeScript: Match the exact object shape TypeScript: The constructor interface pattern Streaming your Meetup - Part 4: Directing and Streaming with OBS Streaming your Meetup - Part 3: Speaker audio Streaming your Meetup - Part 2: Speaker video Streaming your Meetup - Part 1: Basics and Projector TypeScript and React Guide: Added a new styles chapter TypeScript and React Guide: Added a new render props chapter TypeScript and React: Styles and CSS TypeScript and React TypeScript and React Guide: Added a new prop types chapter TypeScript without TypeScript -- JSDoc superpowers TypeScript: Mapped types for type maps JAMStack vs serverless web apps The Unsung Benefits of JAMStack Sites TypeScript: Ambient modules for Webpack loaders My most favourite talks in 2018 TypeScript and React Guide: Added a new context chapter TypeScript: Built-in generic types TypeScript: Type predicates JSX is syntactic sugar TypeScript and React Guide: Added a new hooks chapter Getting your CfP application right FAQ on our Angular Connect Talk: Automating UI development TypeScript and Substitutability Debugging Node.js apps in TypeScript with Visual Studio Code From Medium: Deconfusing Pre- and Post-processing From Medium: PostCSS misconceptions Saving and scraping a website with Puppeteer Cutting the mustard - 2018 edition Wordpress as CMS for your JAMStack sites My most favourite podcast episodes in 2017 My most favourite talks in 2017 My most favourite books in 2017 The Best Request Is No Request, Revisited Not so hidden figures - Organizing ScriptConf My podcast journey to ScriptCast Grid layout, grid layout everywhere! #scriptconf and #devone Object streams in Node.js
Getting started with Rust
2021-12-23 · via oida.dev | TypeScript, Rust

Learning and teaching Rust has been a big part of me in the last couple of years. Interest in the Rust programming language has brought me to found the Rust Linz meetup with Rainer Stropek, to teach Rust at the local university, and to do a ton of workshops on the topic. It’s a lot of fun! It has introduced me to one of the most welcoming communities. And I love seeing Rust code getting in production and keeping all the promises it gives us. Folks who I’m in contact with through various channels ask me how to best get started with Rust. This article tries to give you an overview.

The big problem with an article like this is that there is no definitive answer. Everybody learns differently. Some watch videos, some read books, others need tutorials. So instead of giving you a learning path, let me give you an overview of great resources that might help you get started!

Tutorials #

I learned a lot about Rust by using Exercism. It’s an interactive platform that guides you through various Rust concepts through actual examples. You solve arbitrary programming tasks – Programming 101 if you will – that you might already know how to solve in other languages, so you can focus on implementing and learning the language rather than on finding the right algorithm. Tests give you feedback on your solution, and you’re able to consult a trainer or the community for other solutions. Seeing the solutions by others also helps improve yours and maybe find new techniques along the way.

Books #

How many books are there on Rust? The answer is: yes. No seriously, every major tech publisher has multiple different takes on Rust. The Rust community and working groups publish online books on certain topics like the Rustonomicon for unsafe Rust, the book on async Rust, or the unofficial book on Rust design patterns. Sharing info on Rust is a common thing in the community, which is great!

There are a couple of introductory books that are floating around, aimed for different styles of learning and released by different publishers.

  • The Rust Programming Language – a.k.a “The book”. This is a fantastic and holistic introduction to the programming language and is available for free on the Rust website. It’s also possible to install a local HTML copy via rustup. It’s what you expect from a book that tries to give you all the info of what’s in store with the programming language itself, and it’s huge. The authors still managed to contain a narrative and lead you from chapter to chapter without overwhelming you. A couple of smaller projects help you get your feet wet with actual code. It’s hard not to recommend the book. Also, the physical copy is beautifully typeset.
  • Programming Rust published by O’Reilly. I tend to find O’Reilly introductory books a little hard to navigate, but Programming Rust is delightfully different: It’s as huge as the book, but I feel chapters are much more self-contained, making this a nice book if you want to have a guide from the very start, but also a book that you can use as a reference. I learned a ton about Futures and async by just picking out the respective chapter. Being an author myself, I think this is a remarkable achievement to create a book that can be accessed on so many levels!
  • Rust in Action published by Manning. Tim’s book has an entirely different take on how to learn Rust. It’s a lot more project-focused, which means that you finish each chapter with a complete Rust program. This makes it a lot more active than other books. Plus, all projects revolve around systems programming, which is arguably one of the most important use-cases for Rust, but might be unfamiliar with a lot of developers. So, with Rust in Action you hit two birds with one stone: Actively learning Rust by coding, and developing a sense for systems programming. Especially the latter is super helpful if you find yourself in situations where you need to dig a little deeper on how things work in Rust. Highly recommended!

There are so much more. Please look out for Rust books that might be tailored to a specific use-case that’s just up your alley, like Herbert’s “Hands-on Rust” that teaches through game development, or Luca’s “Zero to Production in Rust” that helps you deploy web APIs written in Rust.

Videos #

One of my most favorite videos is “Hack without fear” by Niko Matsakis. It gives you a really good overview of some of the most important topics and concepts without overwhelming you with syntax. Here, you learn ownership. You get the most important principles presented in the most digestible way.

I usually don’t do video courses, but I found Udemy’s Ultimate Rust Crash Course by Nathan Stocks valuable and approachable. Again for the same reasons: Introducing you to concepts and the language fundamentals in a very focussed way, without overwhelming you too much. The course runs for less than 3 hours, which is super short given how vast the programming language is. Still, you manage to gather a lot of information and see some actual examples!

I also invite you to watch the entirety of recordings for the Rust Linz meetup. We started 1.5 years ago with a special focus on newcomers, so you find some great introductory talks on Cargo, iterators, traits, debugging, paired with a lot of applied use-cases. One of our most-watched videos is “Learning how to learn Rust” by Tim McNamara (again!), which you might enjoy as well!

Improving #

While being influenced a lot by its precursors, Rust works differently than many other programming languages. Especially if you come from an OOP background and did mostly Java or C# in the past, you might find it hard to adapt to new patterns and leave out old ones that you acquired over the years. I could write at length on things that might not be useful while learning Rust, but I’d rather refer to the following resources

And that’s how I would get started learning Rust. I’d like to improve and extend the list over time. If you found a great resource that you think should be on this list, let me know!

Related Articles