{"id":27300,"date":"2023-05-01T18:42:01","date_gmt":"2023-12-13T19:09:29","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2\/"},"modified":"2025-08-12T01:54:49","modified_gmt":"2025-08-11T17:54:49","slug":"%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2\/","title":{"rendered":"\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09"},"content":{"rendered":"<p># \u7c21\u4ecb<br \/>\nmruby\u662fRuby\u7684\u8f15\u91cf\u7d1a\u7248\u672c\u3002<br \/>\nmruby\/c\u5247\u662f\u4f7f\u7528mruby\u7de8\u8b6f\u5668\u7684\u66f4\u5c0f\u578bRuby\u57f7\u884c\u74b0\u5883\u3002<\/p>\n<p>mruby\u62e5\u6709Ruby\u7684\u57fa\u672c\u529f\u80fd\uff0c<br \/>\nmruby\u7f16\u8bd1\u5668\u662f\u7531Ruby\u7f16\u8bd1\u5668\u7684\u677e\u672c\u884c\u5f18\u5148\u751f\u7f16\u5199\u7684\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u57fa\u672c\u7684Ruby\u7a0b\u5e8f\u53ef\u4ee5\u5728mruby\u548cmruby\/c\u4e2d\u8fd0\u884c\u3002<\/p>\n<p>\u7530\u4e2d\u548c\u660e\u5148\u751f\u7684mruby\u8bfe\u7a0b\u6211\u542c\u8fc7\u4e24\u6b21\u3002<br \/>\n\u8fd9\u662f\u6211\u7b2c\u4e09\u6b21\u542c\u7530\u4e2d\u548c\u660e\u5148\u751f\u7684mruby\/c\u8bfe\u7a0b\u3002<\/p>\n<p>\u6211\u4e4b\u524d\u4e00\u76f4\u5f88\u611f\u5174\u8da3\uff0c\u4f46\u4e00\u76f4\u6ca1\u6709\u60f3\u5230\u81ea\u5df1\u8be5\u505a\u4ec0\u4e48\u3002<\/p>\n<p>\u6211\u548cswest\u76846\u4f4d\u4e0eRuby\u3001mruby\u3001mruby\/c\u76f8\u5173\u7684\u4eba\u58eb\u4ea4\u8c08\u8fc7\u3002<br \/>\n\u8fd9\u662f\u6211\u7b2c\u4e00\u6b21\u548c\u677e\u672c\u884c\u5f18\u5148\u751f\u4ee5\u53caRuby\u3001mruby\u3001mruby\/c\u7684\u76f8\u5173\u4eba\u58eb\u540c\u65f6\u8fdb\u884c\u5bf9\u8bdd\u3002<\/p>\n<p>\u53c2\u4e0e\u8ba8\u8bba\u7684\u53c2\u4e0e\u8005\u56de\u7b54\u9053\uff1a\u201c\u5982\u679c\u8fdb\u884c\u9759\u6001\u89e3\u51b3\u7684\u8bdd\uff0c\u5e94\u8be5\u53ef\u4ee5\u5728mruby\u7f16\u8bd1\u5668\u4e2d\u652f\u6301\u5173\u952e\u5b57\u53c2\u6570\u7684\u529f\u80fd\u3002\u201d<\/p>\n<p>\u5728swest\u4f1a\u8bae\u7684\u8ba8\u8bba\u4e2d\uff0c\u6709\u4e00\u4e2a\u5173\u4e8e\u5b9e\u73b0\u97f3\u4e50\u76f8\u5173\u7a0b\u5e8f\u4fbf\u6377\u7684\u5ef6\u8fdf\u65b9\u6848\u63d0\u51fa\u4e86\u4e00\u4e2a\u5f88\u597d\u7684\u5efa\u8bae\u3002<\/p>\n<p>\u7a81\u7136\u6211\u6709\u4e86\u52a8\u529b\uff0c\u51b3\u5b9a\u5c1d\u8bd5mruby\/c\uff0c\u4e8e\u662f\u5728\u7f51\u4e0a\u641c\u7d22\u4e86\u201cmruby\/c\u201d\u3002<\/p>\n<p>\u65e0\u6cd5\u627e\u5230\u6587\u7ae0\u7684\u65e5\u671f\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u94fe\u63a5\u3002<br \/>\nhttps:\/\/github.com\/mrubyc\/mrubyc\/releases\/tag\/release1.1<\/p>\n<p>\u6839\u6e90\u5728\u4e8e https:\/\/github.com\/mrubyc\/mrubyc\u3002<\/p>\n<p>\u5c1d\u8bd5\u4e0b\u8f7dMaster\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657c205bd0c9c81e0f5bce78\/13-0.png\" alt=\"mruby.png\" \/>\u74b0\u5883\uff1aMac OS Sierra 10.12.6<br \/>\n\u578b\u53f7\uff1aMac mini\uff082014\u5e74\u5e95\uff09<br \/>\n\u5904\u7406\u5668\uff1a3Ghz \u82f1\u7279\u5c14 Core i7<br \/>\n\u5185\u5b58\uff1a16GB 16000MHz DDR3<br \/>\n\u786c\u76d8\uff1a999.35GB\uff0c\u7a7a\u95f2611.15GB<\/p>\n<pre class=\"post-pre\"><code>$ cc --version\r\nApple LLVM version 9.0.0 (clang-900.0.39.2)\r\nTarget: x86_64-apple-darwin16.7.0\r\nThread model: posix\r\nInstalledDir: \/Library\/Developer\/CommandLineTools\/usr\/bin\r\n<\/code><\/pre>\n<p>\u5728\u4e0b\u9762\u7684README.md\u6587\u6863\u4e2d\u6ca1\u6709\u63d0\u5230\uff0c\u4f46\u662f\u9700\u8981\u53e6\u5916\u5b89\u88c5mruby\u7f16\u8bd1\u5668\u3002<\/p>\n<p>\u8bf7\u95ee\u60a8\u9700\u8981\u5c06\u60a8\u63d0\u4f9b\u7684\u53e5\u5b50\u300cmruby\u7f16\u8bd1\u5668\uff08mrbc.exe\uff09\u662f\u901a\u8fc7\u7f16\u8bd1\u5f00\u6e90\u7248\u7684mruby\u521b\u5efa\uff0c\u6216\u8005\u60a8\u53ef\u4ee5\u4ece\u4e0a\u9762\u94fe\u63a5\u4e2d\u4e0b\u8f7d\u300d\u7ffb\u8bd1\u6210\u4e2d\u6587\u3002<\/p>\n<p>##MRuby<\/p>\n<p>##MRuby\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u5d4c\u5165\u5f0fRuby\u89e3\u91ca\u5668\uff0c\u9002\u7528\u4e8e\u5d4c\u5165\u5f0f\u7cfb\u7edf\u548c\u53ef\u5d4c\u5165\u5230\u5176\u4ed6\u8f6f\u4ef6\u4e2d\u7684\u60c5\u51b5\u3002<\/p>\n<pre class=\"post-pre\"><code>$ brew install mruby\r\n<\/code><\/pre>\n<p>\u4ece\u73b0\u5728\u5f00\u59cb\u7528\u6700\u65b0\u7684\u7248\u672c\u53f71.4.1\uff08\u622a\u81f32018\u5e749\u67083\u65e5\uff09\u3002<\/p>\n<p>\u5728\u8fdb\u884c\u7814\u7a76\u65f6\u7684\u4e00\u4e2a\u4f8b\u5b50\uff1a<br \/>\nhttps:\/\/researchmap.jp\/jo449djb8-1778110\/#_1778110<\/p>\n<p>\u54aa\u7ea2\u5b9d\u77f3\uff08Mruby\uff09<\/p>\n<pre class=\"post-pre\"><code>## Documents\r\n\r\n[How to compile?](doc\/compile.md)\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code># How to compile?\r\n\r\nTo make mruby\/c sample programs, just `make` in top directory. `Makefile` generates mruby\/c VM library `libmrubyc.a` and mruby\/c executables.\r\n\r\n#mruby\/c executables\r\n\r\nThree mruby\/c executables are generated in \/sample_c directory.\r\n\r\nmrubyc is a mruby\/c VM for one mruby byte-code file. This program executes one mrb file.\r\n\r\nmrubyc basic_sample01.mrb\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> make\r\n<span class=\"gp\">cd mrblib ;<\/span> make all\r\n<span class=\"go\">make[1]: Nothing to be done for `all'.\r\n<\/span><span class=\"gp\">cd src ;<\/span> make all\r\n<span class=\"go\">\/Library\/Developer\/CommandLineTools\/usr\/bin\/make libmrubyc.a\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o alloc.o alloc.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o class.o class.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o console.o console.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o global.o global.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o keyvalue.o keyvalue.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o load.o load.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o rrt0.o rrt0.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o static.o static.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o symbol.o symbol.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o value.o value.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o vm.o vm.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o hal\/hal.o hal\/hal.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o c_array.o c_array.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o c_hash.o c_hash.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o c_numeric.o c_numeric.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o c_math.o c_math.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o c_range.o c_range.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o c_string.o c_string.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o mrblib.o mrblib.c\r\nar rv libmrubyc.a alloc.o class.o console.o global.o keyvalue.o load.o rrt0.o static.o symbol.o value.o vm.o hal\/hal.o c_array.o c_hash.o c_numeric.o c_math.o c_range.o c_string.o mrblib.o\r\nar: creating archive libmrubyc.a\r\na - alloc.o\r\na - class.o\r\na - console.o\r\na - global.o\r\na - keyvalue.o\r\na - load.o\r\na - rrt0.o\r\na - static.o\r\na - symbol.o\r\na - value.o\r\na - vm.o\r\na - hal\/hal.o\r\na - c_array.o\r\na - c_hash.o\r\na - c_numeric.o\r\na - c_math.o\r\na - c_range.o\r\na - c_string.o\r\na - mrblib.o\r\n\/Library\/Developer\/CommandLineTools\/usr\/bin\/ranlib: file: libmrubyc.a(c_math.o) has no symbols\r\n<\/span><span class=\"gp\">cd ext ;<\/span> make all\r\n<span class=\"go\">\/Library\/Developer\/CommandLineTools\/usr\/bin\/make libmrubyc_ext.a \r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG -I..\/src    -c -o c_ext.o c_ext.c\r\nar rv libmrubyc_ext.a c_ext.o\r\nar: creating archive libmrubyc_ext.a\r\na - c_ext.o\r\n<\/span><span class=\"gp\">cd sample_c ;<\/span> make all\r\n<span class=\"go\">cc -g -I ..\/src -I ..\/ext -Wall -Wpointer-arith -L ..\/src -o mrubyc main.c ..\/src\/libmrubyc.a ..\/ext\/libmrubyc_ext.a\r\ncc -g -I ..\/src -I ..\/ext -Wall -Wpointer-arith -L ..\/src -o mrubyc_sample main_sample.c ..\/src\/libmrubyc.a ..\/ext\/libmrubyc_ext.a\r\ncc -g -I ..\/src -I ..\/ext -Wall -Wpointer-arith -L ..\/src -o mrubyc_concurrent main_concurrent.c ..\/src\/libmrubyc.a ..\/ext\/libmrubyc_ext.a\r\ncc -g -I ..\/src -I ..\/ext -Wall -Wpointer-arith -L ..\/src -o mrubyc_myclass main_myclass.c ..\/src\/libmrubyc.a ..\/ext\/libmrubyc_ext.a\r\n<\/span><\/code><\/pre>\n<pre class=\"post-pre\"><code>$ mrubyc basic_sample01.mrb\r\n-bash: mrubyc: command not found\r\n$ ..\/sample_c\/mrubyc basic_sample01.rb \r\nError: Illegal bytecode.\r\n<\/code><\/pre>\n<p>\u7f16\u8bd1\u5e76\u6267\u884c\uff08compile and go\uff09<br \/>\n\u4f7f\u7528mrbc\u5c06rb\u7f16\u8bd1\u4e3amrb\u3002<br \/>\n\u7136\u540e\uff0c\u4f7f\u7528mrubyc\u8fdb\u884c\u6267\u884c\u3002<\/p>\n<pre class=\"post-pre\"><code>$ mrbc basic_sample01.rb\r\n$ ..\/sample_c\/mrubyc basic_sample01.mrb \r\n30\r\n-10\r\n30\r\n<\/code><\/pre>\n<p>\u6e90\u4ee3\u7801\u5185\u5bb9\u3002<\/p>\n<pre class=\"post-pre\"><code>a = 10\r\nb = 20\r\nc = a + b\r\nputs c\r\n\r\nd = a - b\r\nputs d\r\n\r\na = a * 2\r\nb = b \/ 2\r\nc = a + b\r\nputs c\r\n<\/code><\/pre>\n<p># \u8bfe\u9898\uff08issue\uff09<br \/>\n## \u8bfe\u98981<br \/>\n\u5173\u4e8emrubyc\u3001mrubyc_concurrent\u7684\u8def\u5f84\u5efa\u8bae\u5207\u5206\u65b9\u5f0f\u3002<\/p>\n<p>\u7b2c\u4e8c\u9898\uff1a<br \/>\n\u6587\u4ef6\u5939\u4e2d\u201csample\u201d\u6587\u4ef6\u7684\u6269\u5c55\u540d\u662frb\u3002<br \/>\n\u9700\u8981\u5f15\u5165mruby\uff0c\u5e76\u901a\u8fc7mrbc\u8fdb\u884c\u7f16\u8bd1\u4ee5\u751f\u6210mrb\u3002\uff08\u4e0d\u5305\u542b\u6b65\u9aa4\u8bf4\u660e\uff09<\/p>\n<p>##\u95ee\u98983<br \/>\n\u65e0\u6cd5\u4f7f\u7528brew\u5b89\u88c5mrubyc\uff0c\u65e0\u6cd5\u4f7f\u7528ruby_c\u5f15\u5165\u3002<br \/>\n\u82e5\u80fd\u591f\u901a\u8fc7brew\u4e00\u8d77\u5b89\u88c5mruby\uff0c\u5c06\u4f1a\u5f88\u597d\u3002<\/p>\n<p>\u5728mrubyc-master\u4e2d\uff0c<br \/>\n\u51fa\u73fe\u4e86\u300c\/Library\/Developer\/CommandLineTools\/usr\/bin\/ranlib: file: libmrubyc.a(c_math.o) \u4e2d\u6c92\u6709\u7b26\u865f\u300d\u7684\u932f\u8aa4\u3002release1.1\u7248\u672c\u5247\u6c92\u6709\u76f8\u61c9\u7684\u6587\u4ef6\uff0c\u56e0\u6b64\u4e0d\u6703\u6709\u8b66\u544a\u3002<\/p>\n<p>##\u95ee\u98985<br \/>\n\u6211\u65e0\u6cd5\u719f\u7ec3\u4f7f\u7528mruby\/c IDE\u3002<br \/>\n\u5982\u4f55\u624d\u80fd\u6b63\u786e\u7f16\u8bd1\u5462\uff1f<br \/>\n\u6211\u66fe\u7ecf\u5e94\u8be5\u5df2\u7ecf\u88ab\u6559\u8fc7\u4e00\u6b21\u4e86\uff0c\u53ef\u662f&#8230;\u3002<\/p>\n<p>\u5728\u5e94\u5bf9Ruby\u7684\u89c4\u8303\u6269\u5c55\u65f6\uff0c\u5e94\u91c7\u53d6\u4f55\u79cd\u65b9\u5f0f\u6765\u5e94\u5bf9mruby\/c\uff1f<\/p>\n<p>\u4e0a\u8ff0\u7684\u5185\u5bb9\u5305\u62ec\u5173\u952e\u5b57\u53c2\u6570\u3002<\/p>\n<p>\u5982\u4f55\u5b9e\u73b0\u97f3\u4e50\u6f14\u594f\u6240\u9700\u7684\u540c\u673a\u6784\u9020\u3002<\/p>\n<p>\u4eceSWEST\u7684\u53d1\u8a00\u4e2d\u3002<\/p>\n<p>\u5b66\u4e60\u5c06\u7279\u5b9a\u7684CPU\u79fb\u690d\u5230\u5176\u4ed6\u8bbe\u5907\u65b9\u6cd5<\/p>\n<p>\u53ef\u4ee5\u5c06TOPPERS\/SSP\u5305\u542b\u5728\u5185\u5417\uff1f<\/p>\n<p>\u5982\u679c\u8981\u5c07\u914d\u7f6e\u5668\u66f4\u6539\u70baRuby\u7cfb\u7d71\u3002<\/p>\n<p>\u5bf9\u4e8e\u8bfe\u989810\uff0c\u6211\u4e0d\u6e05\u695a&#8221;master&#8221;\u548c&#8221;release1.1&#8243;\u4e4b\u95f4\u7684\u5173\u7cfb\u3002<\/p>\n<p>##\u95ee\u989811<br \/>\n\u6b63\u5728\u5c1d\u8bd5\u5728Docker\u4e2d\u5f15\u5165mruby\/c\u3002\u76ee\u524d\u8fd8\u4e0d\u592a\u987a\u5229\u3002<\/p>\n<p>\u5728Docker Hub\u6ce8\u518c\u8d26\u53f7\u3002<\/p>\n<pre class=\"post-pre\"><code>$ docker pull kaizenjapan\/mrubyc\r\nUsing default tag: latest\r\nlatest: Pulling from kaizenjapan\/mrubyc\r\n55cbf04beb70: Pull complete \r\n1607093a898c: Pull complete \r\n9a8ea045c926: Pull complete \r\nd4eee24d4dac: Pull complete \r\nb59856e9f0ab: Pull complete \r\n34d336b2fcd6: Pull complete \r\ncc1ab820e4eb: Pull complete \r\na27cf78a7a17: Pull complete \r\n3144ee375031: Pull complete \r\n64338bafac63: Pull complete \r\nDigest: sha256:15ee5f97aaad81e7e0650b2f9223e5634bb2c01a70111fea27387a105840047b\r\nStatus: Downloaded newer image for kaizenjapan\/mrubyc:latest\r\nKM-S05:sample_ruby administrator$ docker images\r\nREPOSITORY                              TAG                 IMAGE ID            CREATED             SIZE\r\nkaizenjapan\/mrubyc                      latest              0d4197b2f770        20 minutes ago      1.86GB\r\n$ docker run -it kaizenjapan\/mrubyc\r\nroot@f5fb4d1350a8:\/# ls\r\n1.3.0.zip  boot  etc   lib    media  mruby-1.3.0  opt\troot  sbin  sys  usr\r\nbin\t   dev\t home  lib64  mnt    mrubyc\t  proc\trun   srv   tmp  var\r\nroot@f5fb4d1350a8:\/# cd mrubyc\r\nroot@f5fb4d1350a8:\/mrubyc# cd sample_ruby\r\nroot@f5fb4d1350a8:\/mrubyc\/sample_ruby# \/mruby-1.3.0\/bin\/mrbc basic_sample01.rb\r\nroot@f5fb4d1350a8:\/mrubyc\/sample_ruby# ..\/sample_c\/mrubyc basic_sample01.mrb\r\n30\r\n-10\r\n30\r\n<\/code><\/pre>\n<p>\u5982\u679c\u8981\u4f7f\u7528gcc\uff0c\u8bf7\u4ecedocker\u7684gcc\u5b98\u65b9\u5e93\u4e2d\u62c9\u53d6\u3002<\/p>\n<pre class=\"post-pre\"><code>$ docker pull gcc\r\nUsing default tag: latest\r\nlatest: Pulling from library\/gcc\r\n55cbf04beb70: Pull complete \r\n1607093a898c: Pull complete \r\n9a8ea045c926: Pull complete \r\nd4eee24d4dac: Pull complete \r\nb59856e9f0ab: Pull complete \r\n34d336b2fcd6: Pull complete \r\ncc1ab820e4eb: Pull complete \r\na27cf78a7a17: Pull complete \r\n3144ee375031: Pull complete \r\nDigest: sha256:728cb48fde7df7a788d7fee93567e2841624aeaaea7e07fd42326836663d4066\r\nStatus: Downloaded newer image for gcc:latest\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>$ docker run -it --name gcc gcc\r\nroot@685f0be9ffee:\/# apt-get update\r\nIgn:1 http:\/\/deb.debian.org\/debian stretch InRelease\r\nGet:2 http:\/\/security.debian.org\/debian-security stretch\/updates InRelease [94.3 kB]\r\nGet:3 http:\/\/deb.debian.org\/debian stretch-updates InRelease [91.0 kB]\r\nGet:4 http:\/\/deb.debian.org\/debian stretch Release [118 kB]      \r\nGet:5 http:\/\/security.debian.org\/debian-security stretch\/updates\/main amd64 Packages [392 kB]\r\nGet:6 http:\/\/deb.debian.org\/debian stretch-updates\/main amd64 Packages [5148 B]\r\nGet:7 http:\/\/deb.debian.org\/debian stretch Release.gpg [2434 B]               \r\nGet:8 http:\/\/deb.debian.org\/debian stretch\/main amd64 Packages [7099 kB]\r\nFetched 7801 kB in 9s (797 kB\/s)                                                                                                             \r\nReading package lists... Done\r\n\r\n# apt-get update\r\n(\u7565)\r\n# apt-get install mruby\r\nReading package lists... Done\r\nBuilding dependency tree       \r\nReading state information... Done\r\nThe following NEW packages will be installed:\r\n  mruby\r\n0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.\r\nNeed to get 296 kB of archives.\r\nAfter this operation, 2091 kB of additional disk space will be used.\r\nErr:1 http:\/\/deb.debian.org\/debian stretch\/main amd64 mruby amd64 1.2.0+20161228+git30d5424a-1\r\n  Could not resolve 'deb.debian.org'\r\nE: Failed to fetch http:\/\/deb.debian.org\/debian\/pool\/main\/m\/mruby\/mruby_1.2.0+20161228+git30d5424a-1_amd64.deb  Could not resolve 'deb.debian.org'\r\nE: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?\r\nroot@685f0be9ffee:\/# apt-get install mruby --fix-missing?\r\nE: Command line option --fix-missing? is not understood in combination with the other options\r\n\r\n<\/code><\/pre>\n<p>\u8fd9\u4e2a\u90e8\u5206\u8fd8\u672a\u5b8c\u6210\uff0c\u5c06\u9010\u6b65\u6dfb\u52a0\u5185\u5bb9\u3002<\/p>\n<h3>\u6885\u8036\u5e01\u53d1\u5e031.1\u7248<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657c205bd0c9c81e0f5bce78\/52-0.png\" alt=\"mrubyc1.png\" \/><\/p>\n<pre class=\"post-pre\"><code>$ cd src\r\n$ ls\r\nDoxyfile\tc_ext.h\t\tc_string.c\tconsole.h\tlibmrubyc.a\tstatic.c\tvm.h\r\nMakefile\tc_hash.c\tc_string.h\terrorcode.h\tload.c\t\tstatic.h\tvm_config.h\r\nalloc.c\t\tc_hash.h\tc_symbol.c\tglobal.c\tload.h\t\tsymbol.c\r\nalloc.h\t\tc_numeric.c\tc_symbol.h\tglobal.h\tmrubyc.h\tsymbol.h\r\nc_array.c\tc_numeric.h\tclass.c\t\thal\t\topcode.h\tvalue.c\r\nc_array.h\tc_range.c\tclass.h\t\thal_posix\trrt0.c\t\tvalue.h\r\nc_ext.c\t\tc_range.h\tconsole.c\thal_psoc5lp\trrt0.h\t\tvm.c\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>$ make\r\ncd src ; make all\r\nif [ ! -e hal ]; then ln -s hal_posix hal; fi\r\n\/Library\/Developer\/CommandLineTools\/usr\/bin\/make libmrubyc.a\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o alloc.o alloc.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o class.o class.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o console.o console.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o global.o global.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o load.o load.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o rrt0.o rrt0.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o static.o static.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o symbol.o symbol.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o value.o value.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o vm.o vm.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o hal\/hal.o hal\/hal.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o c_array.o c_array.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o c_hash.o c_hash.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o c_ext.o c_ext.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o c_numeric.o c_numeric.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o c_range.o c_range.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o c_string.o c_string.c\r\ncc -Wall -Wpointer-arith -g -DMRBC_DEBUG     -c -o c_symbol.o c_symbol.c\r\nar rv libmrubyc.a alloc.o class.o console.o global.o load.o rrt0.o static.o symbol.o value.o vm.o hal\/hal.o c_array.o c_hash.o c_ext.o c_numeric.o c_range.o c_string.o c_symbol.o\r\nar: creating archive libmrubyc.a\r\na - alloc.o\r\na - class.o\r\na - console.o\r\na - global.o\r\na - load.o\r\na - rrt0.o\r\na - static.o\r\na - symbol.o\r\na - value.o\r\na - vm.o\r\na - hal\/hal.o\r\na - c_array.o\r\na - c_hash.o\r\na - c_ext.o\r\na - c_numeric.o\r\na - c_range.o\r\na - c_string.o\r\na - c_symbol.o\r\ncd sample_c ; make all\r\ncc -g -I ..\/src -Wall -Wpointer-arith -L ..\/src -o mrubyc main.c ..\/src\/libmrubyc.a\r\ncc -g -I ..\/src -Wall -Wpointer-arith -L ..\/src -o mrubyc_sample main_sample.c ..\/src\/libmrubyc.a\r\ncc -g -I ..\/src -Wall -Wpointer-arith -L ..\/src -o mrubyc_concurrent main_concurrent.c ..\/src\/libmrubyc.a\r\ncc -g -I ..\/src -Wall -Wpointer-arith -L ..\/src -o mrubyc_myclass main_myclass.c ..\/src\/libmrubyc.a\r\n$ cd sample_ruby\r\n$ mrbc basic_sample01.rb \r\n$ ..\/sample_c\/mrubyc basic_sample01.mrb \r\n30\r\n-10\r\n30\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u662f\u4e2d\u6587\u7684\u53c2\u8003\u8d44\u6599:<\/p>\n<p>\u53c2\u8003\u8d44\u6599(reference)\uff1ahttps:\/\/github.com\/mrubyc\/mrubyc\/issues\/57<\/p>\n<p>\u6587\u66f8\u5c65\u6b74\uff1a<br \/>\n\u7248\u672c0.10 \u521d\u7a3f 2018\u5e7409\u670803\u65e5 \u4e0a\u5348<br \/>\n\u7248\u672c0.11 \u8ffd\u8a18 mrubyc\/issues\/57 2018\u5e7409\u670803\u65e5 \u4e0a\u5348<br \/>\n\u7248\u672c0.12 \u8ffd\u8a18 libmrubyc.a(c_math.o) \u6ca1\u6709\u7b26\u53f7 2018\u5e7409\u670803\u65e5 \u4e2d\u5348<br \/>\n\u7248\u672c0.13 \u8ffd\u8a18 mrbc\u63cf\u8ff0 2018\u5e7409\u670803\u65e5 \u4e0b\u5348<br \/>\n\u7248\u672c0.14 \u8ffd\u8a18 \u8868\u984c\uff08Mac\u7de8\uff09\u8bfe\u98989 2018\u5e7409\u670803\u65e5 \u665a\u4e0a<br \/>\n\u7248\u672c0.15 \u8ffd\u8bb0 \u7b80\u4ecb, \u6539\u4e3a\u8bfe\u989810 2018\u5e7409\u670803\u65e5 \u665a\u4e0a<br \/>\n\u7248\u672c0.16 \u6dfb\u52a0docker\u9879\u76ee\uff0c\u4fee\u6539\u4e3a\u8bfe\u989811 2018\u5e7409\u670804\u65e5 \u665a\u4e0a<br \/>\n\u7248\u672c0.17 \u6ce8\u518cdocker hub 2018\u5e7409\u670805\u65e5 \u665a\u4e0a<br \/>\n\u7248\u672c0.18 \u8ffd\u52a0URL 2023\u5e7402\u670828\u65e5<\/p>\n<h3>\u8c22\u8c22\u60a8\u9605\u8bfb\u5230\u6700\u540e\u3002\u8bf7\u7ed9\u6211\u4e00\u4e2a\u8d5e?\uff0c\u8fd8\u8bf7\u5173\u6ce8\u4e00\u4e0b\u3002<\/p>\n<h4>\u975e\u5e38\u611f\u8c22\u60a8\u5c06\u6587\u7ae0\u8bfb\u5230\u6700\u540e\u4e00\u53e5\u3002\u8bf7\u70b9\u51fb\u559c\u6b22\u7684\u56fe\u6807?\u5e76\u5173\u6ce8\u6211\uff0c\u4eab\u53d7\u5e78\u798f\u751f\u6d3b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p># \u7c21\u4ecb mruby\u662fRuby\u7684\u8f15\u91cf\u7d1a\u7248\u672c\u3002 mruby\/c\u5247\u662f\u4f7f\u7528mruby\u7de8\u8b6f\u5668\u7684\u66f4\u5c0f\u578bRuby\u57f7\u884c\u74b0\u5883\u3002 [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-27300","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u5c1d\u8bd5\u5f15\u5165mruby-c\uff08mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5-2\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u5c1d\u8bd5\u5f15\u5165mruby-c\uff08mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-13T19:09:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-11T17:54:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657c205bd0c9c81e0f5bce78\/13-0.png\" \/>\n<meta name=\"author\" content=\"\u65b0, \u97f5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u65b0, \u97f5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2\/\",\"name\":\"\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-12-13T19:09:29+00:00\",\"dateModified\":\"2025-08-11T17:54:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\"},\"description\":\"\u5173\u4e8e\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\",\"name\":\"\u65b0, \u97f5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"caption\":\"\u65b0, \u97f5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09 - Blog - Silicon Cloud","description":"\u5173\u4e8e\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09\u7684\u6280\u672f\u6587\u7ae0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u5c1d\u8bd5\u5f15\u5165mruby-c\uff08mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5-2\/","og_locale":"zh_CN","og_type":"article","og_title":"\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09","og_description":"\u5173\u4e8e\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u5c1d\u8bd5\u5f15\u5165mruby-c\uff08mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5-2\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-12-13T19:09:29+00:00","article_modified_time":"2025-08-11T17:54:49+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657c205bd0c9c81e0f5bce78\/13-0.png"}],"author":"\u65b0, \u97f5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u65b0, \u97f5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2\/","name":"\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-12-13T19:09:29+00:00","dateModified":"2025-08-11T17:54:49+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9"},"description":"\u5173\u4e8e\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u6211\u5c1d\u8bd5\u5f15\u5165mruby\/c\uff08Mac\u7248\uff09\u4ee5\u89e3\u51b3\u7b2c11\u4e2a\u95ee\u9898\uff08\u89e3\u51b3\u529e\u6cd5\u4e4b\u4e00\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9","name":"\u65b0, \u97f5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","caption":"\u65b0, \u97f5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e5%b0%9d%e8%af%95%e5%bc%95%e5%85%a5mruby-c%ef%bc%88mac%e7%89%88%ef%bc%89%e4%bb%a5%e8%a7%a3%e5%86%b3%e7%ac%ac11%e4%b8%aa%e9%97%ae%e9%a2%98%ef%bc%88%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95-2\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=27300"}],"version-history":[{"count":3,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27300\/revisions"}],"predecessor-version":[{"id":111103,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27300\/revisions\/111103"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=27300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=27300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=27300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}