Trust Me, I Know

r&b gospel, piano acid techno, edm grime · 3:57

Listen on 93

Lyrics

[Verse 1]
Most of Rust is safe by design
Memory protected, yours and mine
But sometimes we need to break the rules
Access the power of lower-level tools
Raw pointers dancing in the night
Dereferencing without compiler's sight

[Chorus]
Unsafe means "trust me, I know"
Wrap it in a block, control the flow
Five things you can do inside
Raw pointers you can now divide
Call functions from another land
Static mut in your command
Implement unsafe traits with care
Access union fields, beware

[Verse 2]
Foreign function calls across the bridge
C libraries on the language ridge
Static mutable global state
Handle with care, don't tempt fate
Raw pointers hold addresses bare
No borrow checker watching there

[Chorus]
Unsafe means "trust me, I know"
Wrap it in a block, control the flow
Five things you can do inside
Raw pointers you can now divide
Call functions from another land
Static mut in your command
Implement unsafe traits with care
Access union fields, beware

[Bridge]
Minimize the unsafe zone
Keep it small, make safety known
Document your invariants
Prove your code's inhabitants
Unsafe is not unsafe code
It's a shift in checking mode

[Verse 3]
Union fields share memory space
Only one at any place
Traits marked unsafe need a vow
That you'll uphold safety now
Sound abstractions built on trust
Safe interfaces are a must

[Chorus]
Unsafe means "trust me, I know"
Wrap it in a block, control the flow
Five things you can do inside
Raw pointers you can now divide
Call functions from another land
Static mut in your command
Implement unsafe traits with care
Access union fields, beware

[Outro]
Use unsafe when you must
But wrap it well with safety's trust
The power's there when you need more
But safe Rust should be your core

← Bang That Symbol, Let It Grow