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 × C++】 夢の共演を試した話
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
lemolatoon
August 10, 2023
Programming
1.8k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
【Rust × C++】 夢の共演を試した話
2023 セキュリティ・キャンプLT会で話した内容です。
lemolatoon
August 10, 2023
More Decks by lemolatoon
See All by lemolatoon
スマホから Youtube Shortsを見られないようにする
lemolatoon
29
39k
お家miniPCを使ってミリしらでkubernetes clusterたててみる
lemolatoon
1
360
no_stdでもasyncしたい
lemolatoon
0
280
Rustの手続きマクロで黒魔術入門
lemolatoon
2
1.4k
Other Decks in Programming
See All in Programming
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
7
1.8k
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
120
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.5k
iOSDC2026登壇資料.pdf
riofujimon
0
210
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
460
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
130
Simple Storage Service(S3) is not simple
iwatsukayura
0
190
SREの越境 / SRE Collaboration
y0hgi
2
300
mrbgem 三角測量 開発
ogom
0
200
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
150
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
180
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
130
Featured
See All Featured
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
250
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
560
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
For a Future-Friendly Web
brad_frost
183
10k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
620
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Designing for Performance
lara
611
70k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
Transcript
【Rust × C++】 夢の共演を試した話 Y1 OS自作ゼミ lemolatoon
自己紹介 • 名前: lemolatoon • twitter( X ) や github
は lemolatoon • 情報系の学科の大学2年生 • 普段は Rust を触っていることが多いです。
Rust × C++ !? Rust × C の場合 • Rustはシステムプログラミング言語で
C言語の関数などは簡単に呼ぶことができる。 • C言語は、いろいろな言語の間の共通言語のような感じでいろいろな言語から呼べるような仕組みがあ る。 Rust × C++ の場合 • 共通言語であるC言語からC++のクラスなどを使うのが難しいように、 RustからC++を使うのは難しい
CXX crate CXX crateはRust, C++どうしを舞台裏でCに訳してくれる。 現実の翻訳家のようなもの。 * Rustではcrateというものがあり、他言語でいうところのライブラリのようなものである。 * 画像の出典:
cxx.rs
具体例 ← C++のクラスの実装 ↓Rustのライブラリのノリをつくる部分
具体例 Rust から C++ が呼べた! * https://github.com/lemolatoon/cxx-example
舞台裏で作られた”のり”の部分 ↑C++側 Rust側→
実際に使われた例 • autocxx ◦ CXX crateをさらにwrapしたcrate • chromium ◦ https://source.chromium.org/chromium/chromium/src/+/main:third_party/rust/serde_json_
lenient/v0_1/wrapper/lib.rs ◦ https://github.com/chromium/chromium/blob/4184e2582e2a94f607c7eec562502dcd370 d5769/docs/rust.md ◦ 実際にchromiumのソースコード内部で使われている!
None
ありがとうございました。 twitter: @lemolatoon1 github: lemolatoon https://github.com/lemolatoon/cxx-example