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
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
3
2.3k
Synchronizationを支える技術
s_shimotori
1
150
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
150
EventSourcingの理想と現実
wenas
6
2.1k
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
390
Vue.js学習の振り返り
hiro_xre
2
130
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.1k
Vue3の一歩踏み込んだパフォーマンスチューニング2024
hal_spidernight
3
3.1k
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
240
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
200
[PyCon Korea 2024 Keynote] 커뮤니티와 파이썬, 그리고 우리
beomi
0
110
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
430
Featured
See All Featured
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Designing on Purpose - Digital PM Summit 2013
jponch
115
6.9k
Writing Fast Ruby
sferik
626
61k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
92
16k
Building Adaptive Systems
keathley
38
2.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
107
49k
Facilitating Awesome Meetings
lara
49
6k
Making the Leap to Tech Lead
cromwellryan
132
8.9k
Producing Creativity
orderedlist
PRO
341
39k
Fireside Chat
paigeccino
32
3k
The Pragmatic Product Professional
lauravandoore
31
6.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ͷ࡞