Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rust at Sentry
Search
Armin Ronacher
July 07, 2017
Programming
4
1.2k
Rust at Sentry
An introduction to how we use Rust at Sentry.
Armin Ronacher
July 07, 2017
Tweet
Share
More Decks by Armin Ronacher
See All by Armin Ronacher
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
450
Do Dumb Things
mitsuhiko
0
820
No Assumptions
mitsuhiko
0
320
The Complexity Genie
mitsuhiko
0
280
The Catch in Rye: Seeding Change and Lessons Learned
mitsuhiko
0
390
Runtime Objects in Rust
mitsuhiko
0
370
Rust at Sentry
mitsuhiko
0
540
Overcoming Variable Payloads to Optimize for Performance
mitsuhiko
0
260
Rust API Design Learnings
mitsuhiko
0
620
Other Decks in Programming
See All in Programming
gunshi
kazupon
1
140
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
2k
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
210
AIエージェントの設計で注意するべきポイント6選
har1101
6
2.9k
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
430
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
160
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 2
philipschwarz
PRO
0
130
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
180
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
700
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
920
JETLS.jl ─ A New Language Server for Julia
abap34
2
470
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
920
Featured
See All Featured
More Than Pixels: Becoming A User Experience Designer
marktimemedia
2
280
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
140
Mobile First: as difficult as doing things right
swwweet
225
10k
エンジニアに許された特別な時間の終わり
watany
106
220k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
99
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
280
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
400
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
200
Product Roadmaps are Hard
iamctodd
PRO
55
12k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
120
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Transcript
Rust at Sentry Armin @mitsuhiko Ronacher
Hi, I'm Armin ... and I do Open Source, lots
of Python and SaaS Flask Sentry …
… and here is where you can find me twitter.com/@mitsuhiko
github.com/mitsuhiko lucumr.pocoo.org/
800°C 36° 2' 0.4662" N 118° 15' 38.7792" W 795°C
789°C 797°C 793°C 805°C 782°C we show you your crashes
None
None
a bit about us chapter 0
Open Source Project “sentry”
Cloud Hosted “sentry.io”
relatively flexible stack postgres, mysql, cassandra, riak, …
our general tech stack chapter 1
Lots of Python
Simple Stack Python RabbitMQ Postgres Riak Redis
Conservative Approach to Adding New Systems
prefer Internal Modularity over building More Services
how does rust fit?
why is there Rust? chapter 2
a bit of a hobby of mine
turned into sentry-cli (command line client to manage organizations /
build integration)
later reused components for Python modules
now part of our tech stack
how we started chapter 3
why we use Rust for sentry-cli
$ otool -L which sentry-cli /usr/local/bin/sentry-cli: /System/Library/Frameworks/Security.framework/Versions/A/Security /usr/lib/libiconv.2.dylib /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation /usr/lib/libcurl.4.dylib
/usr/lib/libz.1.dylib /usr/lib/libSystem.B.dylib
$ curl -sL https://sentry.io/get-cli/ | bash $ npm install sentry-cli-binary
that and crates.io
rejected alternatives go JavaScript (bundled node) C / C++ Python
/ Ruby
things that work well serialization / deserialization error handling console
UX file size
from client to server chapter 4
None
sourcemap parsing
reused sentry-cli code for server
+20 sec -> < 500ms processing time
debug symbols
proguard
marrying python and rust chapter 5
github.com/mitsuhiko/snaek
from setuptools import setup, find_packages setup( name='example', version='0.0.1', packages=find_packages(), include_package_data=True,
zip_safe=False, platforms='any', install_requires=[ 'snaek', ], snaek_rust_modules=[ ('example._native', 'rust/'), ] )
build rust library expose rust -> cabi snaek to consume
#[repr(C)] pub struct Point { pub x: f32, pub y:
f32, } #[no_mangle] pub unsafe extern "C" fn example_get_origin() -> Point { Point { x: 0.0, y: 0.0 } }
from example._native import lib def get_origin(): point = lib.example_get_origin() return
(point.x, point.y)
things in rust to love chapter 6
#[derive(Serialize, Deserialize, Debug, Default)] pub struct Deploy { #[serde(rename="environment")] pub
env: String, pub name: Option<String>, pub url: Option<String>, #[serde(rename="dateStarted")] pub started: Option<DateTime<UTC>>, #[serde(rename="dateFinished")] pub finished: Option<DateTime<UTC>>, }
/// Lists all deploys for a release pub fn list_deploys(&self,
org: &str, version: &str) -> ApiResult<Vec<Deploy>> { self.get(&format!("/organizations/{}/releases/{}/deploys/", PathArg(org), PathArg(version)))? .convert() }
super flexible (de)serialization layer
crates we use / built chapter 7
if_chain lazy_static error-chain always useful
serde serde_derive serde_json serde_yaml for serialization
console indicatif dialoguer for pretty console UI ours :)
rust-curl openssl-probe HTTP stuff
elementtree XML ours :)
things we don't like chapter 8
compile times :'(
things rust needs chapter 9
“what not to do” guide
incremental compilation
higher level C ABI tools
Questions?