$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
puregoの活用例
Search
aethiopicuschan
March 28, 2024
Programming
0
400
puregoの活用例
EbitengineぷちConf #2での発表資料
aethiopicuschan
March 28, 2024
Tweet
Share
More Decks by aethiopicuschan
See All by aethiopicuschan
EbitengineでGUIツール作ってみた
aethiopicuschan
0
2.6k
Other Decks in Programming
See All in Programming
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
230
CSC305 Lecture 25
javiergs
PRO
0
110
HTTP compression in PHP and Symfony apps
dunglas
2
1k
5分ぐらいで分かる、トリミング機能の作り方
tsutsuitakumi
0
180
Vapor Revolution
kazupon
2
2.5k
CSC509 Lecture 12
javiergs
PRO
0
200
watsonx.ai Dojo #4 生成AIを使ったアプリ開発、応用編
oniak3ibm
PRO
2
270
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
350
カンファレンスでLTしました / kashiwarb5
nhayato
0
100
Thoughts and experiences on Rust and TypeScript
unvalley
2
210
Leverage LLMs in Java with LangChain4j and Quarkus
hollycummins
0
160
Jakarta EE meets AI
ivargrimstad
0
1.1k
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
A designer walks into a library…
pauljervisheath
204
24k
Scaling GitHub
holman
458
140k
A Tale of Four Properties
chriscoyier
157
23k
Statistics for Hackers
jakevdp
796
220k
Raft: Consensus for Rubyists
vanstee
136
6.7k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
1
72
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Faster Mobile Websites
deanohume
305
30k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Transcript
$IBO"FUIJPQJDVT&CJUFOHJOFͪ$POG QVSFHPͷ׆༻ྫ
ࣗݾհ w νϟϯɾΤνΦϐΫεͱਃ͠·͢ɻ w ҩྍܥϕϯνϟʔͰαʔόαΠυͷΤϯδχΞΛ͓ͯ͠Γ·͢ɻ w લճͷͪ$POGͰ-5͍͖ͤͯͨͩ͞·ͨ͠ɻ w IUUQTHJUIVCDPNBFUIJPQJDVTDIBO
QVSFHPͱͳʹ͔ w DHPΛΘͳ͘ͱ$ͷ͕ؔୟ͚Δʂ w IUUQTHJUIVCDPNFCJUFOHJOFQVSFHP
QVSFHPͱͳʹ͔ αϯϓϧίʔυ package main import ( "fmt" "runtime" "github.com/ebitengine/purego" )
func getSystemLibrary() string { switch runtime.GOOS { case "darwin": return "/usr/lib/libSystem.B.dylib" case "linux": return "libc.so.6" default: panic(fmt.Errorf("GOOS=%s is not supported", runtime.GOOS)) } } func main() { libc, err := purego.Dlopen(getSystemLibrary(), purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } var puts func(string) purego.RegisterLibFunc(&puts, libc, "puts") puts("Calling C from Go without Cgo!") } FCJUFOHJOFQVSFHPͷ3&"%.&͔ΒҾ༻
׆༻ྫͦͷ OBOPEBWPJDFWPYDPSFΛར༻͢ΔϥΠϒϥϦ w ʮͣΜͩΜʯͳͲͰ༗໊ͳ70*$&709ͷίΞϥΠϒϥϦΛୟ͘ɻ w JP3FBE$MPTFSͱͯ͠ѻ͑ΔXBWϑΝΠϧΛग़ྗ͢Δ͜ͱ͕Ͱ͖Δɻ w IUUQTHJUIVCDPNBFUIJPQJDVTDIBOOBOPEB
׆༻ྫͦͷ $VCJTN(P6OP ff i DJBM-JWF%$VCJTN4%,GPS(PMBOH w -JWF%ͷ$VCJTN$PSFϥΠϒϥϦΛୟ͘ɻ w &CJUFOHJOF͚ͷϨϯμϥΛ࣮ࡁΈɻ w
ຊͷۄʂ w IUUQTHJUIVCDPNBFUIJPQJDVTDIBODVCJTNHP
$VCJTN4%,ͷߏ IUUQTEPDTMJWFEDPNDVCJTNTELNBOVBMDVCJTNDPSFBQJSFGFSFODFΑΓҾ༻
׆༻ྫͦͷ $VCJTN(P6OP ff i DJBM-JWF%$VCJTN4%,GPS(PMBOH w σϞΛߦ͍·͢ɻ