SlideShare una empresa de Scribd logo
1 de 28
An Evening with…

Arkho Innova Meetup Series
Rust
ARKHO Innova
Meetup series
Gracias por su asistencia!!!
• Un espacio para compartir experiencias y conocimiento
• Un espacio para hacer relaciones entre personas y
equipos con intereses afines
• Un espacio para pasarla bien
¿Qué es?
Historia
• 2006: Graydon Hoare empieza escribir Rust como side-project
• 2009: Mozilla se involucra en el proyecto
• 2010: Mozilla lo anuncia
• 2011: Rust se auto-compila con éxito
• 2015: Primera versión estable
• 2017: Rust 1.20
Características principales
• Zero Cost Abstractions
• Guaranteed Memory Safety
• Minimal Runtime
• High Level Abstraction Features
¿Quién lo usa ?
https://www.rust-lang.org/en-US/friends.html
Los proyectos principales
• Servo : Parallel browser engine
• Rustc : Rust compiler
¿Quién lo financia?
• Mozilla
• Samsung
Hello, world!
fn main() {
println!("Hello, world!");
}
¿Porqué lo aman tanto?
Gartner Hype Cycle Curve 2017
Caja de herramientas
• Rustc
• Cargo
• Rustup
• Rustfmt
• Racer
• crates.io
Algunas características
• Type Inference
• Immutability by default
• Private by default
• Strings UTF8 by default
• Short key words
• Snake case
• Generics
• Traits
• Macros
• Annotations
• Matching Patterns
Enums ‘supervitaminizadas´
No hay NULL
•Option<T>
•Result<R, E>
I call it my billion-dollar mistake. At that time, I was designing the first comprehensive type
system for references in an object-oriented language. My goal was to ensure that all use of
references should be absolutely safe, with checking performed automatically by the compiler.
But I couldn't resist the temptation to put in a null reference, simply because it was so easy to
implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have
probably caused a billion dollars of pain and damage in the last forty years.
Tony Hoare, the inventor of null
Pero,
Existen:
Traits > Interfaces
Ownership & Borrowing
• Como Rust maneja la memoria
• Es lo que hace Rust difícil al principio
• Es lo que lo hace rápido y seguro (incluyendo thread safe)
• Requiere entender como funciona la memoria en un programa (Stack / Heap)
• Ownership
• Cada valor en Rust tiene una variable llamado su dueño (owner)
• Solo puede tener un dueño al mismo tiempo
• Cuando el dueño sale del scope, su valor esta suprimida
• Borrowing
• Cuando se pasa por referencia un valor, se llama prestar (borrow)
• Una nueva familia de errores de compilación
• Fallar al compilar > Fallar al ejecutar
Closures
Demo
An Evening with…

Arkho Innova Meetup Series
Rust
¿Con ganas de más?
• Source code Demo
• rest-in-rust - Rest API in Rust with Iron

https://github.com/arkhotech/rest-in-rust
• tokio-echo - Tokio Echo Server in Rust

https://github.com/arkhotech/tokio-echo
• Contribute to micropoc development by creating an account on GitHub.

https://github.com/arkhotech/micropoc/tree/master/OrderService

Más contenido relacionado

Similar a An evening with...Rust

An evening with... Docker
An evening with... DockerAn evening with... Docker
An evening with... DockerArkhotech
 
Down to-earth microservices with java ee
Down to-earth microservices with java eeDown to-earth microservices with java ee
Down to-earth microservices with java eeCJava Peru
 
Curso node.js
Curso node.js Curso node.js
Curso node.js Redradix
 
Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2Ricard Clau
 
Alta disponibilidad y balanceo de carga con Linux y nginx
Alta disponibilidad y balanceo de carga con Linux y nginxAlta disponibilidad y balanceo de carga con Linux y nginx
Alta disponibilidad y balanceo de carga con Linux y nginxPlain Concepts
 
Codemotion 2021 - The Rustalorian: Este es el camino
Codemotion 2021 - The Rustalorian: Este es el caminoCodemotion 2021 - The Rustalorian: Este es el camino
Codemotion 2021 - The Rustalorian: Este es el caminoFrancisco Javier Barrena
 
Symfony-Community: Introducción a Symfony Framework
Symfony-Community: Introducción a Symfony FrameworkSymfony-Community: Introducción a Symfony Framework
Symfony-Community: Introducción a Symfony Frameworkexcedesoft
 
BilboStack - Php en el 2012
BilboStack - Php en el 2012BilboStack - Php en el 2012
BilboStack - Php en el 2012Asier Marqués
 
Argentesting 2019 - Por que-python-esta-buenisimo
Argentesting 2019 - Por que-python-esta-buenisimoArgentesting 2019 - Por que-python-esta-buenisimo
Argentesting 2019 - Por que-python-esta-buenisimoArgentesting
 
Lenguaje de programción en internet
Lenguaje de programción en internetLenguaje de programción en internet
Lenguaje de programción en internetlorenzosc1995
 
Internet y navegador web
Internet y navegador webInternet y navegador web
Internet y navegador webKAREMDEDIOS
 
Open cores (software libre – hardware libre) javier condori flores
Open cores (software libre – hardware libre)   javier condori floresOpen cores (software libre – hardware libre)   javier condori flores
Open cores (software libre – hardware libre) javier condori floresJavier Condori Flores
 
Lenguaje de programción en internet
Lenguaje de programción en internetLenguaje de programción en internet
Lenguaje de programción en internetlorenzosc1995
 

Similar a An evening with...Rust (20)

An evening with... Docker
An evening with... DockerAn evening with... Docker
An evening with... Docker
 
Introducción a Ceylon
Introducción a CeylonIntroducción a Ceylon
Introducción a Ceylon
 
Dn12 u3 a6_msef
Dn12 u3 a6_msefDn12 u3 a6_msef
Dn12 u3 a6_msef
 
Down to-earth microservices with java ee
Down to-earth microservices with java eeDown to-earth microservices with java ee
Down to-earth microservices with java ee
 
Curso node.js
Curso node.js Curso node.js
Curso node.js
 
Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2
 
Alta disponibilidad y balanceo de carga con Linux y nginx
Alta disponibilidad y balanceo de carga con Linux y nginxAlta disponibilidad y balanceo de carga con Linux y nginx
Alta disponibilidad y balanceo de carga con Linux y nginx
 
Codemotion 2021 - The Rustalorian: Este es el camino
Codemotion 2021 - The Rustalorian: Este es el caminoCodemotion 2021 - The Rustalorian: Este es el camino
Codemotion 2021 - The Rustalorian: Este es el camino
 
Symfony-Community: Introducción a Symfony Framework
Symfony-Community: Introducción a Symfony FrameworkSymfony-Community: Introducción a Symfony Framework
Symfony-Community: Introducción a Symfony Framework
 
Devops episodio 1. devOpsTnf
Devops episodio 1. devOpsTnf Devops episodio 1. devOpsTnf
Devops episodio 1. devOpsTnf
 
BilboStack - Php en el 2012
BilboStack - Php en el 2012BilboStack - Php en el 2012
BilboStack - Php en el 2012
 
Argentesting 2019 - Por que-python-esta-buenisimo
Argentesting 2019 - Por que-python-esta-buenisimoArgentesting 2019 - Por que-python-esta-buenisimo
Argentesting 2019 - Por que-python-esta-buenisimo
 
"Al rico" PHP
"Al rico" PHP"Al rico" PHP
"Al rico" PHP
 
Lenguaje de programción en internet
Lenguaje de programción en internetLenguaje de programción en internet
Lenguaje de programción en internet
 
Internet y navegador web
Internet y navegador webInternet y navegador web
Internet y navegador web
 
Html5 vs Flash
Html5 vs FlashHtml5 vs Flash
Html5 vs Flash
 
Open cores (software libre – hardware libre) javier condori flores
Open cores (software libre – hardware libre)   javier condori floresOpen cores (software libre – hardware libre)   javier condori flores
Open cores (software libre – hardware libre) javier condori flores
 
Lenguaje de programción en internet
Lenguaje de programción en internetLenguaje de programción en internet
Lenguaje de programción en internet
 
Docker for losers
Docker for losersDocker for losers
Docker for losers
 
Open Build Service
Open Build ServiceOpen Build Service
Open Build Service
 

Más de Arkhotech

An Evening with Agile lean design_thinking
An Evening with Agile lean design_thinkingAn Evening with Agile lean design_thinking
An Evening with Agile lean design_thinkingArkhotech
 
An Evening with Meetup microservices-s2
An Evening with Meetup microservices-s2An Evening with Meetup microservices-s2
An Evening with Meetup microservices-s2Arkhotech
 
An evening with "Rework" - Reinventando nuestra forma de trabajar
An evening with "Rework" - Reinventando nuestra forma de trabajarAn evening with "Rework" - Reinventando nuestra forma de trabajar
An evening with "Rework" - Reinventando nuestra forma de trabajarArkhotech
 
An evening with... Microservices - Session 1
An evening with... Microservices - Session 1An evening with... Microservices - Session 1
An evening with... Microservices - Session 1Arkhotech
 
An evening with... Scrum
An evening with... ScrumAn evening with... Scrum
An evening with... ScrumArkhotech
 
An evening with... Liquidbase
An evening with... LiquidbaseAn evening with... Liquidbase
An evening with... LiquidbaseArkhotech
 
An evening with... DevOps
An evening with... DevOpsAn evening with... DevOps
An evening with... DevOpsArkhotech
 
An evening with ... Ionic Framework Meetup
An evening with ... Ionic Framework Meetup An evening with ... Ionic Framework Meetup
An evening with ... Ionic Framework Meetup Arkhotech
 
An evening with... BPM redhat Meetup
An evening with... BPM redhat MeetupAn evening with... BPM redhat Meetup
An evening with... BPM redhat MeetupArkhotech
 
An evening with... Continuous Integration and Bamboo intro Meetup
An evening with... Continuous Integration and Bamboo intro MeetupAn evening with... Continuous Integration and Bamboo intro Meetup
An evening with... Continuous Integration and Bamboo intro MeetupArkhotech
 
An evening with... Agile Metrics Meetup
An evening with... Agile Metrics MeetupAn evening with... Agile Metrics Meetup
An evening with... Agile Metrics MeetupArkhotech
 
An evening with... Apache hadoop Meetup
An evening with...  Apache hadoop MeetupAn evening with...  Apache hadoop Meetup
An evening with... Apache hadoop MeetupArkhotech
 
An evening with... Polymer Intro Meetup
An evening with... Polymer Intro MeetupAn evening with... Polymer Intro Meetup
An evening with... Polymer Intro MeetupArkhotech
 
An evening with... Oracle Endeca Guided Search & Experience Manager Meetup
An evening with... Oracle Endeca Guided Search & Experience Manager MeetupAn evening with... Oracle Endeca Guided Search & Experience Manager Meetup
An evening with... Oracle Endeca Guided Search & Experience Manager MeetupArkhotech
 
An evening with... No SQL Meetup
An evening with... No SQL MeetupAn evening with... No SQL Meetup
An evening with... No SQL MeetupArkhotech
 

Más de Arkhotech (15)

An Evening with Agile lean design_thinking
An Evening with Agile lean design_thinkingAn Evening with Agile lean design_thinking
An Evening with Agile lean design_thinking
 
An Evening with Meetup microservices-s2
An Evening with Meetup microservices-s2An Evening with Meetup microservices-s2
An Evening with Meetup microservices-s2
 
An evening with "Rework" - Reinventando nuestra forma de trabajar
An evening with "Rework" - Reinventando nuestra forma de trabajarAn evening with "Rework" - Reinventando nuestra forma de trabajar
An evening with "Rework" - Reinventando nuestra forma de trabajar
 
An evening with... Microservices - Session 1
An evening with... Microservices - Session 1An evening with... Microservices - Session 1
An evening with... Microservices - Session 1
 
An evening with... Scrum
An evening with... ScrumAn evening with... Scrum
An evening with... Scrum
 
An evening with... Liquidbase
An evening with... LiquidbaseAn evening with... Liquidbase
An evening with... Liquidbase
 
An evening with... DevOps
An evening with... DevOpsAn evening with... DevOps
An evening with... DevOps
 
An evening with ... Ionic Framework Meetup
An evening with ... Ionic Framework Meetup An evening with ... Ionic Framework Meetup
An evening with ... Ionic Framework Meetup
 
An evening with... BPM redhat Meetup
An evening with... BPM redhat MeetupAn evening with... BPM redhat Meetup
An evening with... BPM redhat Meetup
 
An evening with... Continuous Integration and Bamboo intro Meetup
An evening with... Continuous Integration and Bamboo intro MeetupAn evening with... Continuous Integration and Bamboo intro Meetup
An evening with... Continuous Integration and Bamboo intro Meetup
 
An evening with... Agile Metrics Meetup
An evening with... Agile Metrics MeetupAn evening with... Agile Metrics Meetup
An evening with... Agile Metrics Meetup
 
An evening with... Apache hadoop Meetup
An evening with...  Apache hadoop MeetupAn evening with...  Apache hadoop Meetup
An evening with... Apache hadoop Meetup
 
An evening with... Polymer Intro Meetup
An evening with... Polymer Intro MeetupAn evening with... Polymer Intro Meetup
An evening with... Polymer Intro Meetup
 
An evening with... Oracle Endeca Guided Search & Experience Manager Meetup
An evening with... Oracle Endeca Guided Search & Experience Manager MeetupAn evening with... Oracle Endeca Guided Search & Experience Manager Meetup
An evening with... Oracle Endeca Guided Search & Experience Manager Meetup
 
An evening with... No SQL Meetup
An evening with... No SQL MeetupAn evening with... No SQL Meetup
An evening with... No SQL Meetup
 

An evening with...Rust

  • 1. An Evening with…
 Arkho Innova Meetup Series Rust
  • 2. ARKHO Innova Meetup series Gracias por su asistencia!!! • Un espacio para compartir experiencias y conocimiento • Un espacio para hacer relaciones entre personas y equipos con intereses afines • Un espacio para pasarla bien
  • 4. Historia • 2006: Graydon Hoare empieza escribir Rust como side-project • 2009: Mozilla se involucra en el proyecto • 2010: Mozilla lo anuncia • 2011: Rust se auto-compila con éxito • 2015: Primera versión estable • 2017: Rust 1.20
  • 5. Características principales • Zero Cost Abstractions • Guaranteed Memory Safety • Minimal Runtime • High Level Abstraction Features
  • 6. ¿Quién lo usa ? https://www.rust-lang.org/en-US/friends.html
  • 7. Los proyectos principales • Servo : Parallel browser engine • Rustc : Rust compiler
  • 8. ¿Quién lo financia? • Mozilla • Samsung
  • 9. Hello, world! fn main() { println!("Hello, world!"); }
  • 11.
  • 12.
  • 13. Gartner Hype Cycle Curve 2017
  • 14. Caja de herramientas • Rustc • Cargo • Rustup • Rustfmt • Racer • crates.io
  • 15.
  • 16. Algunas características • Type Inference • Immutability by default • Private by default • Strings UTF8 by default • Short key words • Snake case • Generics • Traits • Macros • Annotations • Matching Patterns
  • 18.
  • 19. No hay NULL •Option<T> •Result<R, E> I call it my billion-dollar mistake. At that time, I was designing the first comprehensive type system for references in an object-oriented language. My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn't resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years. Tony Hoare, the inventor of null Pero, Existen:
  • 20.
  • 21.
  • 23. Ownership & Borrowing • Como Rust maneja la memoria • Es lo que hace Rust difícil al principio • Es lo que lo hace rápido y seguro (incluyendo thread safe) • Requiere entender como funciona la memoria en un programa (Stack / Heap) • Ownership • Cada valor en Rust tiene una variable llamado su dueño (owner) • Solo puede tener un dueño al mismo tiempo • Cuando el dueño sale del scope, su valor esta suprimida • Borrowing • Cuando se pasa por referencia un valor, se llama prestar (borrow) • Una nueva familia de errores de compilación • Fallar al compilar > Fallar al ejecutar
  • 25.
  • 26. Demo
  • 27. An Evening with…
 Arkho Innova Meetup Series Rust
  • 28. ¿Con ganas de más? • Source code Demo • rest-in-rust - Rest API in Rust with Iron
 https://github.com/arkhotech/rest-in-rust • tokio-echo - Tokio Echo Server in Rust
 https://github.com/arkhotech/tokio-echo • Contribute to micropoc development by creating an account on GitHub.
 https://github.com/arkhotech/micropoc/tree/master/OrderService