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
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
2k
Remix on Hono on Cloudflare Workers
yusukebe
1
300
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
Click-free releases & the making of a CLI app
oheyadam
2
120
Micro Frontends Unmasked Opportunities, Challenges, Alternatives
manfredsteyer
PRO
0
110
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
110
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
230
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
300
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.8k
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.2k
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
Visualization
eitanlees
145
15k
A Tale of Four Properties
chriscoyier
156
23k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Making Projects Easy
brettharned
115
5.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
What's new in Ruby 2.0
geeforr
343
31k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
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ͷ࡞