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 × C++】 夢の共演を試した話
Search
lemolatoon
August 10, 2023
Programming
1.8k
1
Share
【Rust × C++】 夢の共演を試した話
2023 セキュリティ・キャンプLT会で話した内容です。
lemolatoon
August 10, 2023
More Decks by lemolatoon
See All by lemolatoon
スマホから Youtube Shortsを見られないようにする
lemolatoon
29
38k
お家miniPCを使ってミリしらでkubernetes clusterたててみる
lemolatoon
1
270
no_stdでもasyncしたい
lemolatoon
0
270
Rustの手続きマクロで黒魔術入門
lemolatoon
2
1.3k
Other Decks in Programming
See All in Programming
The Less-Told Story of Socket Timeouts
coe401_
3
660
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
890
Programming with a DJ Controller — not vibe coding
m_seki
3
270
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
430
AIエージェントで業務改善してみた
taku271
0
540
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
350
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
120
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
250
AI-DLC Deep Dive
yuukiyo
9
4.8k
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
170
Vibe NLP for Applied NLP
inesmontani
PRO
0
500
GitHubCopilotCLIをはじめよう.pdf
htkym
0
280
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Typedesign – Prime Four
hannesfritz
42
3k
Ethics towards AI in product and experience design
skipperchong
2
260
A Tale of Four Properties
chriscoyier
163
24k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
180
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
540
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.4k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Are puppies a ranking factor?
jonoalderson
1
3.3k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Git: the NoSQL Database
bkeepers
PRO
432
67k
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