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
320
no_stdでもasyncしたい
lemolatoon
0
280
Rustの手続きマクロで黒魔術入門
lemolatoon
2
1.4k
Other Decks in Programming
See All in Programming
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
320
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
390
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
120
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
170
AHC070解法紹介
eijirou
0
120
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
190
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
210
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
110
MVNOの申込からeSIM開通までをiOSアプリでつなぐ- 本人確認・MNP・通信事業者基盤をまたぐ実装
satotakeshi
0
400
How I Stole PSI from Android Studio - DroidKaigi2026
worker8
0
130
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
140
FreeBSDでZabbixを動かす.pdf
kenkino
0
270
Featured
See All Featured
New Earth Scene 8
popppiees
4
2.6k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
A Modern Web Designer's Workflow
chriscoyier
699
190k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
910
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Designing for humans not robots
tammielis
254
26k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
Practical Orchestrator
shlominoach
192
12k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Designing for Timeless Needs
cassininazir
1
480
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