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
Writing PHP extensions in Rust
Search
Christian Rades
November 18, 2022
Technology
82
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Writing PHP extensions in Rust
Christian Rades
November 18, 2022
More Decks by Christian Rades
See All by Christian Rades
Untangling graphs
crades
0
15
Your first PHP extension
crades
0
51
Go Reduce, reuse and recycle! PHP to GO!
crades
0
74
Static Code Analysis: Judging a Forest by Its Trees
crades
0
41
Other Decks in Technology
See All in Technology
子育てエンジニアの可処分時間が減っても成長を諦めない戦い方
sudoakiy
6
4.3k
go-sqletch
moznion
0
130
freeeらしさをAIとともに作る / Creating the freee Experience with AI
ymrl
0
220
分析AIエージェントを育てる、動く環境を育てる
codatum
1
740
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
8
1.9k
カンファレンスに参加した後の浮遊感とセルフケア
pauli
0
320
使いこなすために知っておきたい Azure SRE Agent アンチパターン
torumakabe
2
450
AI時代だからこそ推したい!Gitコマンド再入門
munakata
0
170
初対面のメンバーがチームを組み、Claude Codeでゼロからサービスをリリース
mkdev10
1
120
Kiro Crewをはじめよう
kizawa2020
1
120
MCPゲートウェイを作って運用してわかったこと — Agent時代の権限管理の現在地
mtpooh
10
3.3k
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
580
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
4
530
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Large-scale JavaScript Application Architecture
addyosmani
516
110k
Building AI with AI
inesmontani
PRO
1
1.3k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
340
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
Making the Leap to Tech Lead
cromwellryan
135
10k
Design in an AI World
tapps
1
350
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
400
We Have a Design System, Now What?
morganepeng
55
8.4k
Transcript
Twig as an Extension An Experiment powered by Rust
Hi everyone! My name Christian principal engineer at shopware @C_Rades
@
[email protected]
Titel hinzufügen
Why ? Reduce the reliance on opcache Maybe improve the
speed of rendering Have fun and learn about interpreters
How to ? The basics
Greeting
Hello World
Function calls
Calling a PHP function
Calling a function from rust
Method calls
Calling a php method
Calling a php method 2
Calling a method from rust
Calling a method from rust
Rust lifetimes are hard*
Escape hatches
Clone() • References need to ful fi l lifetimes •
So just use “owned” types • Comes in many fl avours • &str -> String • &Foo -> Foo
Zval::shallow_clone() • A little different for PHP values • It
copies the Zval without duplicating its content • &Zval -> Zval
A php obj as parameter
Thank you • The repo: https://github.com/Christian-Rades/Tape • The rust crate:
https://davidcole1340.github.io/ext-php-rs/introduction.html • Learning rust: https://doc.rust-lang.org/book/ • Learning Lifetimes: https://rust-unof fi cial.github.io/too-many-lists/