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
54
Challenges and Opportunities - Unikernels in HPC && Cloud
eyberg
0
81
Climbing Out From the Digital Mud with Unikernels - HL2017
eyberg
0
160
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
200
The Current State of C++ Unikernels
eyberg
1
250
UniKernel Workflows
eyberg
0
96
Other Decks in Technology
See All in Technology
データベースの負荷を紐解く/untangle-the-database-load
emiki
2
560
EMConf JP 2025 懇親会LT / EMConf JP 2025 social gathering
sugamasao
2
210
エンジニアのキャリアパスと、 その中で自分が大切にしていること
noteinc
3
740
x86-64 Assembly Essentials
latte72
4
620
Pwned Labsのすゝめ
ken5scal
2
580
サイト信頼性エンジニアリングとAmazon Web Services / SRE and AWS
ymotongpoo
7
1.9k
【内製開発Summit 2025】イオンスマートテクノロジーの内製化組織の作り方/In-house-development-summit-AST
aeonpeople
2
1.2k
OPENLOGI Company Profile
hr01
0
60k
Amazon Athenaから利用時のGlueのIcebergテーブルのメンテナンスについて
nayuts
0
120
開発組織を進化させる!AWSで実践するチームトポロジー
iwamot
2
570
アジャイルな開発チームでテスト戦略の話は誰がする? / Who Talks About Test Strategy?
ak1210
1
870
20250304_赤煉瓦倉庫_DeepSeek_Deep_Dive
hiouchiy
2
140
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Typedesign – Prime Four
hannesfritz
41
2.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
The Language of Interfaces
destraynor
156
24k
Music & Morning Musume
bryan
46
6.4k
Designing Experiences People Love
moore
140
23k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
580
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