Einführung in Rust

Einführung in Rust

Rust ist eine moderne Programmiersprache, die Performance und Sicherheit verbindet. Sie ist systemnah und bietet leistungsstarke Abstraktionen, die stark an dynamische Sprachen wie Ruby oder Python erinnern. Rust bietet Speichersicherheit ohne Garbage Collector und macht die Low-Level-Programmierung einfacher und sicherer. Matthias wird einen einführenden Vortrag über Rust halten und in diesem Rahmen auch einige der schönsten Features vorstellen. Außerdem wird er auf Einsatzmöglichkeiten für WebAssembly, Cloud Computing und mehr eingehen.

Ed9e9992fe069a0d3de05b69d8d187c3?s=128

Matthias Endler

January 24, 2020
Tweet

Transcript

  1. None
  2. ?

  3. What Is Rust Doing Behind the Curtains?

  4. None
  5. None
  6. None
  7. Rust is a systems programming language that runs blazingly fast,

    prevents segfaults, and guarantees thread safety. It aims to bring modern language design and an advanced type system to systems programming. Rust does not use a garbage collector, using advanced static analysis to provide deterministic drops instead.
  8. Empowering everyone
 to build reliable and efficient software.

  9. Matthias Endler @matthiasendler - Düsseldorf, Germany - Backend Engineer at

    - Website performance team - Worked a lot with Python and PHP - Likes hot chocolate endler.dev mre
  10. hello-rust.show

  11. None
  12. None
  13. 5.90GiB/s 1.90GiB/s GNU cat fastcat

  14. None
  15. 3GiB/s 850MiB/s GNU yes My yes

  16. Do What You Can't

  17. None
  18. Rust Facts • Programming language • Funded by Mozilla •

    First version: 2010 • Version 1.0: May 2015 • Current stable version: 1.40
  19. Rust Facts • Memory safety • No undefined behavior •

    Fearless concurrency • High-level language concepts • Strong compiler checks • Easily embeddable into existing
 projects
  20. What I like about… Package manager, Community Syntax, Libraries, Async

    Tooling, Documentation, Concurrency Speed, no overhead PHP: Python:
 Golang:
 C:
  21. What I like about… Package manager, Community Syntax, Libraries, Async

    Tooling, Documentation, Concurrency Speed, no overhead
 Generics, Error handling Rust:
  22. Complexity vs speed PHP Python Golang Rust C Faster "Easier"

  23. None
  24. None
  25. None
  26. None
  27. None
  28. https://cacm.acm.org/magazines/2017/10/221326-a-large-scale-study-of-programming-languages-and-code-quality-in-github/fulltext

  29. wc

  30. None
  31. None
  32. None
  33. None
  34. None
  35. hellö wc wc.php 5 6

  36. None
  37. wc.php foo

  38. None
  39. None
  40. File icon created by Justiconnic from the Noun Project

  41. None
  42. None
  43. ... but there's more! • How to differentiate between end

    of file and error? • Parallel execution for multiple files? • What about very long lines? • Buffers for performance • Timeouts for slow reads? • SIMD?
  44. None
  45. None
  46. None
  47. None
  48. None
  49. None
  50. None
  51. None
  52. • Handles missing files • Handles read errors • Handles

    large files • UTF-8 support • Fast buffered reading • No memory leaks
  53. None
  54. None
  55. None
  56. None
  57. https://cacm.acm.org/magazines/2017/10/221326-a-large-scale-study-of-programming-languages-and-code-quality-in-github/fulltext

  58. Rust productivity

  59. None
  60. Who’s using Rust anyway? Firefox Dropbox Visual Studio Code npm

    Facebook (kind of) Google (kind of) trivago rust-lang.org/production
  61. None
  62. Wasm!

  63. https://endler.dev/2019/tinysearch

  64. None
  65. None
  66. 0 750 1500 2250 3000 Go C Rust How big

    is " Hello World " (in KB)? 40k 1k
  67. " Serverless "

  68. None
  69. None
  70. None
  71. None
  72. Thanks! endler.dev/talks