Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Rust meets Mobile
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Keith Smiley
November 07, 2022
Programming
460
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rust meets Mobile
2022 BazelCon talk about using bazel to build rust libraries for iOS and Android
Keith Smiley
November 07, 2022
More Decks by Keith Smiley
See All by Keith Smiley
Lyft iOS tooling infrastructure summary 2022
smileykeith
0
500
Postmortem for switching Lyft's iOS app to Bazel
smileykeith
4
1.7k
Lyft iOS tooling infrastructure summary 2019
smileykeith
2
1.6k
An alternative approach to building & shipping Swift apps
smileykeith
5
1.4k
Embrace Immutability
smileykeith
0
9.6k
Tales of a rewrite
smileykeith
0
800
Swift Thinking
smileykeith
0
12k
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
510
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
170
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
170
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
160
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
0
150
App Intentsのビルドプロセスを支える技術
kntkymt
0
420
Webの地図
yosuke_furukawa
PRO
6
4.7k
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
200
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
320
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
5
4.3k
setup-vp GitLab対応の裏側
naokihaba
0
120
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.1k
Featured
See All Featured
Done Done
chrislema
186
17k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
730
GraphQLとの向き合い方2022年版
quramy
50
15k
Test your architecture with Archunit
thirion
2
2.4k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
500
How to build a perfect <img>
jonoalderson
1
6k
How to train your dragon (web standard)
notwaldorf
97
6.8k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
770
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
sira's awesome portfolio website redesign presentation
elsirapls
0
420
Transcript
Rust meets Mobile Keith Smiley (he/him) Principal Engineer, Lyft @SmileyKeith
Sharing code on mobile
Why rust?
Rust + bazel
rust_library( name = "foo", srcs = ["foo.rs"], ) swift_library( name
= "main", srcs = ["main.swift"], deps = [":foo"], ) ios_application(...) Shouldn't this work?
--platforms=//:ios_arm64
bazel#7260
platform_mappings
flags: --cpu=arm64-v8a --crosstool_top=//external:android/crosstool //:android_aarch64 --cpu=ios_arm64 --apple_platform_type=ios //:ios_arm64 ...
Undefined symbols for architecture arm64: "___rust_alloc", referenced from: ... "___rust_alloc_error_handler",
referenced from: ... ... rules_rust#1238 / rust#73632
Who does the linking?
How do I use it?
#[no_mangle] pub extern fn print_something_from_rust() { println!("Ferris says hello!"); }
#[no_mangle] pub extern fn get_a_value_from_rust() -> i32 { 42 } extern void print_something_from_rust(void); extern int32_t get_a_value_from_rust(void);
#[no_mangle] pub extern "system" fn Java_com_example_androidapp_JniShim_getValue() -> i32 { get_a_value_from_rust()
} package com.example.androidapp; public class JniShim { public static native int getValue(); }
dtolnay/cxx rust-lang/rust-bindgen
Future areas of improvement
Developer Experience
Future rust mobile support
Was it worth it?
keith/bazel-rust-mobile-demo
- bazel#11454 - bazel#15041 - bazel#15248 - bazel#15462 - bazel#7260
- cargo-raze#484 - cargo-raze#489 - rules_rust#1186 - rules_rust#1238 - rules_rust#1259 - rules_rust#1271 - rules_rust#1276 - rules_rust#1290 - rules_rust#1304 - rules_rust#1362 - rules_rust#1372 - rules_rust#1401 - rules_rust#1462 - rules_rust#1541 - rules_rust#1545 - rules_rust#1546 - rules_rust#1573 - rules_rust#1576 - rust#73632
Thank you! twitter.com/SmileyKeith