Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
puregoの活用例
Search
aethiopicuschan
March 28, 2024
Programming
600
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
puregoの活用例
EbitengineぷちConf #2での発表資料
aethiopicuschan
March 28, 2024
Transcript
8 slides
$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 σϞΛߦ͍·͢ɻ
More Decks by aethiopicuschan
See All by aethiopicuschan
EbitengineでGUIツール作ってみた
aethiopicuschan
0
3.3k
Other Decks in Programming
See All in Programming
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
140
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
2
500
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
190
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
680
はじめてのKubernetesコントリビューション
nasa9084
0
230
AppFunctionsの内部実装を紐解く
hiroaki404
0
110
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.2k
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
420
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
700
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
170
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
3
210
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
390
Featured
See All Featured
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
550
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
880
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
How to Ace a Technical Interview
jacobian
280
24k
Building Adaptive Systems
keathley
44
3.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
BBQ
matthewcrist
90
10k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
590
Done Done
chrislema
187
17k