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
360
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
55
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
220
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
YOLOv10~v12
tenten0727
3
840
ブラウザのレガシー・独自機能を愛でる-Firefoxの脆弱性4選- / Browser Crash Club #1
masatokinugawa
1
370
FinOps_Demo
tkhresk
0
130
Beyond {shiny}: The Future of Mobile Apps with R
colinfay
1
330
Automatically generating types by running tests
sinsoku
1
310
食べログが挑む!飲食店ネット予約システムで自動テスト無双して手動テストゼロを実現する戦略
hagevvashi
1
150
Creating Awesome Change in SmartNews
martin_lover
1
220
Android는 어떻게 화면을 그릴까?
davidkwon7
0
100
Would you THINK such a demonstration interesting ?
shumpei3
1
140
CBになったのでEKSのこともっと知ってもらいたい!
daitak
1
150
IVRyにおけるNLP活用と NLP2025の関連論文紹介
keisukeosone
0
180
テキスト解析で見る PyCon APAC 2025 セッション&スピーカートレンド分析
negi111111
0
270
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
30k
Designing for humans not robots
tammielis
252
25k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.6k
GitHub's CSS Performance
jonrohan
1030
460k
A better future with KSS
kneath
239
17k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.4k
Mobile First: as difficult as doing things right
swwweet
223
9.6k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Six Lessons from altMBA
skipperchong
27
3.7k
Fireside Chat
paigeccino
37
3.4k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
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