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
390
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
推し活としてのrails new/oshikatsu_ha_iizo
sakahukamaki
3
1.7k
/←このスケジュール表に立ち向かう フロントエンド開発戦略 / A front-end development strategy to tackle a single-slash schedule.
nrslib
1
590
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
390
Realtime API 入門
riofujimon
0
110
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
230
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
340
WEBエンジニア向けAI活用入門
sutetotanuki
0
300
Kaigi on Rails 2024 - Rails APIモードのためのシンプルで効果的なCSRF対策 / kaigionrails-2024-csrf
corocn
5
3.4k
CSC509 Lecture 09
javiergs
PRO
0
110
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
170
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
480
OpenTelemetryでRailsのパフォーマンス分析を始めてみよう(KoR2024)
ymtdzzz
4
1.6k
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
A designer walks into a library…
pauljervisheath
202
24k
Docker and Python
trallard
40
3.1k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Code Reviewing Like a Champion
maltzj
519
39k
Making Projects Easy
brettharned
115
5.9k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Testing 201, or: Great Expectations
jmmastey
38
7k
The Cult of Friendly URLs
andyhume
78
6k
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ͷ࡞