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
puregoの活用例
Search
aethiopicuschan
March 28, 2024
Programming
0
450
puregoの活用例
EbitengineぷちConf #2での発表資料
aethiopicuschan
March 28, 2024
Tweet
Share
More Decks by aethiopicuschan
See All by aethiopicuschan
EbitengineでGUIツール作ってみた
aethiopicuschan
0
2.8k
Other Decks in Programming
See All in Programming
GitHub Copilot for Azureを使い倒したい
ymd65536
1
310
ASP.NETアプリケーションのモダナイゼーションについて
tomokusaba
0
240
Optimizing JRuby 10
headius
0
560
複雑なフォームの jotai 設計 / Designing jotai(state) for Complex Forms #layerx_frontend
izumin5210
6
1.5k
Instrumentsを使用した アプリのパフォーマンス向上方法
hinakko
0
230
開発者フレンドリーで顧客も満足?Platformの秘密
algoartis
0
160
Laravel × Clean Architecture
bumptakayuki
PRO
0
130
Fiber Scheduler vs. General-Purpose Parallel Client
hayaokimura
1
290
The Evolution of the CRuby Build System
kateinoigakukun
1
760
fieldalignmentから見るGoの構造体
kuro_kurorrr
0
130
20250426 GDGoC 合同新歓 - GDGoC のススメ
getty708
0
110
Creating Awesome Change in SmartNews! En
martin_lover
0
110
Featured
See All Featured
Unsuck your backbone
ammeep
671
57k
Practical Orchestrator
shlominoach
187
11k
KATA
mclloyd
29
14k
Code Reviewing Like a Champion
maltzj
523
40k
Done Done
chrislema
184
16k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
780
Optimizing for Happiness
mojombo
378
70k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
5
590
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Typedesign – Prime Four
hannesfritz
41
2.6k
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 σϞΛߦ͍·͢ɻ