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
Compile Time Code Weaving with Go
Search
Ian Eyberg
July 10, 2015
Technology
0
370
Compile Time Code Weaving with Go
Goweave is a project to implement compile-time code weaving with go.
Ian Eyberg
July 10, 2015
Tweet
Share
More Decks by Ian Eyberg
See All by Ian Eyberg
Creating Open Source Unikernel Packages
eyberg
0
56
Challenges and Opportunities - Unikernels in HPC && Cloud
eyberg
0
84
Climbing Out From the Digital Mud with Unikernels - HL2017
eyberg
0
170
Using Unikernels in Production Today
eyberg
0
230
Adventures In Building Unikernel Clouds
eyberg
0
110
No Parachute Introduction into Unikernel Orchestration
eyberg
0
250
You Say MicroServices - I say Unikernels
eyberg
1
210
The Current State of C++ Unikernels
eyberg
1
250
UniKernel Workflows
eyberg
0
96
Other Decks in Technology
See All in Technology
Digitization部 紹介資料
sansan33
PRO
1
3.8k
AIの電力問題を概観する
rmaruy
1
220
TechBull Membersの開発進捗どうですか!?
rvirus0817
0
220
大事なのは、AIの精度だけじゃない!〜1円のズレも許されない経理領域とAI〜
jun_nemoto
11
5.2k
令和最新版TypeScriptでのnpmパッケージ開発
lycorptech_jp
PRO
0
110
ゴリラ.vim #36 ~ Vim x SNS ~ スポンサーセッション
yasunori0418
1
360
Eight Engineering Unit 紹介資料
sansan33
PRO
0
3.2k
プロジェクトマネジメント実践論|現役エンジニアが語る!~チームでモノづくりをする時のコツとは?~
mixi_engineers
PRO
3
180
What's Next in OpenShift Q2 CY2025
redhatlivestreaming
1
820
GoogleのAI Agent
shukob
0
140
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
8
65k
“⾞が通れるほど⼤きな”セキュリティーホールを抑えながらログインしたい
taiseiue
0
160
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.3k
How STYLIGHT went responsive
nonsquared
100
5.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
25
2.8k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Automating Front-end Workflow
addyosmani
1370
200k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Balancing Empowerment & Direction
lara
1
89
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
Facilitating Awesome Meetings
lara
54
6.4k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Navigating Team Friction
lara
186
15k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
750
Transcript
Compile Time Code Weaving with Go https://github.com/deferpanic/goweave
I like your software but…
What sucks about Go?
Do you know about aspectj?
Really?
I’m not a code purist
“which is our full time job . write a program
to write a program” - rob pike / gopherfest 2015
None
Go is Actually a Decent Fit
Prior Art go fmt go fix go generate
go fix
No Wrapping I don’t want to update code && leave
the refs in it’s non-trivial I don’t want to hack it in/out each time I could forget in the future or not find all in the past
Aspect Contains behavior that is prominent in many places but
don’t really have anything to do with your business logic. Logging is a canonical example.
Pointcut an expression that details where to apply your behavior
CALL Before, after or wrap around calling a method. EXECUTE Before or after inside executing a method. WITHIN Every single call within a method.
Advice fmt.Println("Hello, 世界")
Logging
Monitoring
Performance Analysis
Debugging & Tracing
Undo Functionality
None
Behavior Mutation
Security
Transactions
Log every call to Itoa
Validation
Time Database Query Latencies
Ensure we log every panic in a goroutine
loom central place for storing .weave files you don’t have
to re-invent the wheel more eyes - better software
it’s really
HACKY
https://github.com/deferpanic/goweave https://github.com/deferpanic/loom