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
how to embed mruby
Search
Tomoyuki Sahara
June 02, 2013
Programming
2
400
how to embed mruby
English translation is
https://speakerdeck.com/tsahara/how-to-embed-mruby-en
.
Tomoyuki Sahara
June 02, 2013
Tweet
Share
More Decks by Tomoyuki Sahara
See All by Tomoyuki Sahara
IPv6 家庭用ルータ SWG 報告
tsahara
0
120
IPv6 RFC 改版の提案はなぜ議論紛糾したのか?
tsahara
2
2.1k
DNS と TLS のビミョーな関係
tsahara
1
550
IPv6 Path MTU in the World and Japan
tsahara
1
20k
how to embed mruby (en)
tsahara
0
130
Other Decks in Programming
See All in Programming
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1k
MCP with Cloudflare Workers
yusukebe
2
220
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
5
750
Haze - Real time background blurring
chrisbanes
1
520
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
情報漏洩させないための設計
kubotak
3
360
ドメインイベント増えすぎ問題
h0r15h0
2
360
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
命名をリントする
chiroruxx
1
420
Featured
See All Featured
Designing Experiences People Love
moore
138
23k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Making Projects Easy
brettharned
116
5.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Become a Pro
speakerdeck
PRO
26
5k
The Pragmatic Product Professional
lauravandoore
32
6.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Building Adaptive Systems
keathley
38
2.3k
A designer walks into a library…
pauljervisheath
205
24k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Docker and Python
trallard
42
3.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
Transcript
mrubyͷΈࠐΈ͔ͨ ࠤݪ۩ UTBIBSB!JJKBEKQ גࣜձࣾΠϯλʔωοτΠχγΞςΟϒ $PQZSJHIU $ *OUFSOFU*OJUJBUJWF+BQBO*OD"MMSJHIUTSFTFSWFE
͡Ίʹ ࠒͷͰ͢
NSVCZͱ mruby is the lightweight implementation of the Ruby language...
https://github.com/mruby/mruby google://mruby/
CPU: ARM 32bit Memory: 128MB FlashROM: 32MB OS: NetBSD 4"8
XXXTBDNKQTBX NSVCZΛͬͨϧʔλ
ͳͥNSVCZΛͬͨͷ͔ interface.ge1.ipv4.address : 192.168.0.1/24 interface.wlan0.service : enable interface.wlan0.ssid : guest
interface.wlan0.security : wpa-psk-aes route.ipv4.0.destination : default route.ipv4.0.gateway : 100.100.0.1 dhcp.server.0.interface : wlan0 dhcp.server.0.pool.address : 192.168.0.4/24 dhcp.server.0.pool.count : 100 ίϯϑΟά ύʔζݕূධՁө mruby!
NSVCZΛಈ͔͢ CPU ARM 32bit ˡͦͦ͜͜;ͭ͏ Memory 128MB ˡ·͊·͊͋Δ FlashROM 32MB
ˡݫ͠Ί OS NetBSD ˡ͍͓ͪ͏6OJY 㲈;ͭ͏ͷ1$ ͨͩ͠ශऑ 㲈;ͭ͏ͷ1$ ͨͩ͠ශऑ 㱤ಈ͔͚ͩ͢ͳΒ͘͠ͳ͍
ͬͨ͜ͱ • ػೳ֦ு • ෆ۩߹मਖ਼ • ҆ఆ൛ϦϦʔεͷ࡞ • ϑΝʔϜΣΞͷΈೖΕ
Of cource it runs NetBSD
ιϑτΣΞͷΈࠐΈ NetBSD ϑΝʔϜΣΞ OpenSSL KAME NTPD Quagga ಠࣗιϑτΣΞ mruby
ιʔείʔυͷऔಘ % wget http://www.openssl.org/ source/openssl-1.0.1e.tar.gz
NSVCZͷ҆ఆ൛ % wget http://www.mruby.org/ source/mruby-1.0.0.tar.gz ͋Γ·ͤΜɻ
ͬͨ͜ͱ • ػೳ֦ு • ෆ۩߹मਖ਼ • ҆ఆ൛ϦϦʔεͷ࡞ ←New! • ϑΝʔϜΣΞͷΈೖΕ
NSVCZPOHJUIVC
JJKNSVCZ
ϒϥϯνຊ Ћ ϒϥϯν ༻్ NBTUFS NSVCZNSVCZ JJK ։ൃ൛ T ҆ఆ൛
ͦͷଞ QVMMSFRVFTU༻ͳͲɺ͍ࣺͯ
NSVCZNSVCZ JJKNSVCZ NBTUFS NBTUFS JJK T EBJMZ ࣗಈ EBJMZ ࣗಈ·ͨखಈ
ෆఆظ ϨϏϡʔ͖खಈ
ͬͨ͜ͱ • ػೳ֦ு • ෆ۩߹मਖ਼ • ҆ఆ൛ϦϦʔεͷ࡞ • ϑΝʔϜΣΞͷΈೖΕ
Πϯϙʔτखॱ work=$HOME/mruby-import % cd $work % git checkout -b s1
Πϯϙʔτखॱ % make % make test % ./test/posix/all.sh
Πϯϙʔτखॱ usr=$NetBSD/usr.bin/mruby % cp src/y.tab.c mrblib/mrblib.c $usr % vi $usr/Makefile
Πϯϙʔτखॱ dist=$NetBSD/dist/mruby % make clean % rm -r $dist/* %
cp -r * $dist
Πϯϙʔτखॱ % cd $dist; svn add ... % svn ci
$dist $usr
ͬͨ͜ͱ • ػೳ֦ு • ෆ۩߹मਖ਼ • ҆ఆ൛ϦϦʔεͷ࡞ • ϑΝʔϜΣΞͷΈೖΕ
Bug, Bug, Bug!
ͬͨ͜ͱ • ػೳ֦ு • ෆ۩߹मਖ਼ ←New! • ҆ఆ൛ϦϦʔεͷ࡞ • ϑΝʔϜΣΞͷΈೖΕ
҆ఆԽ w σόοάڥͷඋ w όοΫτϨʔε w lSFRVJSFzʹΑΔϞδϡʔϧׂ w ٯΞηϯϒϥ BQQNSCEVNQ
w ςετϑϨʔϜϫʔΫ NSVCZNUFTU w σόοΨ NSVCZNEFCVH
ͬͨ͜ͱ • ػೳ֦ு • ෆ۩߹मਖ਼ • ҆ఆ൛ϦϦʔεͷ࡞ • ϑΝʔϜΣΞͷΈೖΕ
ʮ͑ 3VCZͳͷʹ ͕ແ͍ͷ ʯ
ͬͨ͜ͱ • ػೳڧԽ ←New! • ෆ۩߹मਖ਼ • ҆ఆ൛ϦϦʔεͷ࡞ • ϑΝʔϜΣΞͷΈೖΕ
֦ு w6OJYґଘͷػೳͷՃ w*0 'JMF 4PDLFU 3FHFYQ &SSOP wطଘϞδϡʔϧͷڧԽ w"SSBZ
4USJOH
JJKNSVCZ mruby-io mruby-socket mruby-regexp-pcre mruby-errno mruby-simple-random mruby-env mruby-require mruby-pack mruby-mock
mruby-syslog mruby-mtest mruby-tempfile mruby-process mruby-pcap mruby-dir (more...)
ʂ • ػೳڧԽ • ෆ۩߹मਖ਼ • ҆ఆ൛ϦϦʔεͷ࡞ • ϑΝʔϜΣΞͷΈೖΕ
ࠓޙ w ΈࠐΜͩNSVCZͷ׆༻ w ࣍ͷ҆ఆ൛Tͷ࡞