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
53
Challenges and Opportunities - Unikernels in HPC && Cloud
eyberg
0
80
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
95
Other Decks in Technology
See All in Technology
アジャイルな開発チームでテスト戦略の話は誰がする? / Who Talks About Test Strategy?
ak1210
1
830
RaspberryPi CM4(CM5も)面白いぞ!
nonnoise
0
110
株式会社Awarefy(アウェアファイ)会社説明資料 / Awarefy-Company-Deck
awarefy
3
12k
OPENLOGI Company Profile for engineer
hr01
1
20k
手を動かしてレベルアップしよう!
maruto
0
250
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
3
540
OCI Success Journey OCIの何が評価されてる?疑問に答える事例セミナー(2025年2月実施)
oracle4engineer
PRO
2
220
Pwned Labsのすゝめ
ken5scal
2
570
AIエージェント入門
minorun365
PRO
33
20k
Охота на косуль у древних
ashapiro
0
130
OPENLOGI Company Profile
hr01
0
60k
大規模アジャイルフレームワークから学ぶエンジニアマネジメントの本質
staka121
PRO
3
1.6k
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
51
11k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
11
1.3k
Rails Girls Zürich Keynote
gr2m
94
13k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Agile that works and the tools we love
rasmusluckow
328
21k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Music & Morning Musume
bryan
46
6.4k
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