Rust baksia2014

634 views

Published on

Rust lang introduction for the Baksia meetup

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
634
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Rust baksia2014

  1. 1. Introducing the Rust programming language Reidar Sollid Functional concurrent oriented low level language
  2. 2. So what is Rust 2 Presentation Title - Classification • A programming language from Mozilla labs • • Compiled un-managed language • Ahead of time compiler • Concurrent-oriented • – Message passing – Default immutable variables (mutable keyword) • • Lambda expressions with a lot if easy to use code • Classes and traits • No NPE crashes, libs use Option<T> or Result<T,U> • Shared memory is not allowed (Go and Scala does)
  3. 3. What problem to solve 3 Presentation Title - Classification
  4. 4. Multiple tabs with websockets 4 Presentation Title - Classification
  5. 5. And this 5 Presentation Title - Classification
  6. 6. Shared memory model 6 Presentation Title - Classification Shared memory Process thread Process thread Process thread
  7. 7. Message passing 7 Presentation Title - Classification Process thread Process thread Process thread
  8. 8. Concurrency and shared memory model 8 Presentation Title - Classification
  9. 9. Tasks 9 Presentation Title - Classification
  10. 10. Task management 10 Presentation Title - Classification • An Rust program consists of a tree of tasks, with their own stack and sole ownership of allocated heap data • Communicate through ports and channels • Propagates failures to its parent (the task spawned this one) unless unsupervise function is called. • May be executed in parallel and are scheduled by the runtime • Has its own GC (No global ”stop the world to clean up”)
  11. 11. Hello world 11 Presentation Title - Classification
  12. 12. Pattern matching 12 Presentation Title - Classification
  13. 13. Pattern matching example 13 Presentation Title - Classification
  14. 14. Closures 14 Presentation Title - Classification
  15. 15. Closures example 15 Presentation Title - Classification
  16. 16. Ports and Channels Task commuication 16 Presentation Title - Classification
  17. 17. Port and channel example 17 Presentation Title - Classification
  18. 18. Pointers 18 Presentation Title - Classification
  19. 19. Pointers example 19 Presentation Title - Classification
  20. 20. Class construct 20 Presentation Title - Classification
  21. 21. Some high order functions 21 Presentation Title - Classification
  22. 22. Unit test example 22 Presentation Title - Classification
  23. 23. Crate examples 23 Presentation Title - Classification
  24. 24. Stickers ? 24 Presentation Title - Classification

×