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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
はじめてのPLATEAU
nokonoko1203
1
660
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
220
疎結合とは何か?ソフトウェア設計における結合バランスについて考える #phpcon_niigata
kajitack
2
390
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
250
Distance field of Julia set
kinakomoti321
0
330
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
270
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
610
SONY CISC-NEWS NWS-1750 + NWB-225 ハードウェアメンテとフレームバッファカラー対応 / KOF2026
tsutsui
0
120
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
680
Spec-driven Development with AI
simas
PRO
0
2.3k
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
330
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
4
570
The Limits of Empathy - UXLibs8
cassininazir
2
800
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Statistics for Hackers
jakevdp
799
230k
30 Presentation Tips
portentint
PRO
1
480
Code Review Best Practice
trishagee
74
20k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
480
Code Reviewing Like a Champion
maltzj
529
40k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
840
Game over? The fight for quality and originality in the time of robots
wayneb77
1
340
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
1k