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
1.7k
【Rust × C++】 夢の共演を試した話
2023 セキュリティ・キャンプLT会で話した内容です。
lemolatoon
August 10, 2023
Tweet
Share
More Decks by lemolatoon
See All by lemolatoon
スマホから Youtube Shortsを見られないようにする
lemolatoon
29
36k
お家miniPCを使ってミリしらでkubernetes clusterたててみる
lemolatoon
1
220
no_stdでもasyncしたい
lemolatoon
0
260
Rustの手続きマクロで黒魔術入門
lemolatoon
2
1.3k
Other Decks in Programming
See All in Programming
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.4k
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
240
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
450
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
130
SQL Server 2025 LT
odashinsuke
0
120
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
36k
AtCoder Conference 2025
shindannin
0
850
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
230
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
140
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
490
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Exploring anti-patterns in Rails
aemeredith
2
220
Google's AI Overviews - The New Search
badams
0
880
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
99
The browser strikes back
jonoalderson
0
280
Become a Pro
speakerdeck
PRO
31
5.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Evolving SEO for Evolving Search Engines
ryanjones
0
89
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
120
Git: the NoSQL Database
bkeepers
PRO
432
66k
Amusing Abliteration
ianozsvald
0
79
A Tale of Four Properties
chriscoyier
162
23k
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