Cè¨èªãã¡ã¤ã³ã§ããµãã«ã¼ãã³ã¨ã㦠Ruby ãå¼ã³ããã®ã§ã
ããã©ã¼ãã³ã¹ãåºãããã®ã§ C è¨èªã§å®è£
ããããã ãã©ãå©ä¾¿æ§ãèãã¦å°ã Ruby ã®ã©ã¤ãã©ãªãèªãã§å¦çãåã¾ãããï¼
http://www.sb.soft.iwate-pu.ac.jp/~yushi/memo/ruby_ext.html
ããã®ãµã¤ãã®ãããªãæ¡å¼µã¢ã¸ã¥ã¼ã«ãä½æãããã¨ããããæ¹ã ã¨ã©ããã¦ã主ã Ruby ã«ãªã£ã¦ãã¾ãã
ã¡ã¤ã³ããã°ã©ã ãèµ·åã¨ã³ããªã¼é¨å㯠C è¨èªã§ä½æãããã®ã§ããã®ããæ¹ã ã¨ãã¾ãè¡ããªãæ°ããããã¾ããèµ·åé¨å㯠Ruby ã§æ¸ãã¦ãå®ãã¸ãã¯ãã»ã¼Cè¨èªã§æ¸ããªãããé¨åçã« Ruby ãå¼ã¶æ¹å¼ãé¸ã¶ã®ãªãã°ä¸è¨ã§ãè¯ãã®ã ãããã©ããã
C# 㨠Ruby ã®é£æºãªããã£ã
http://jp.rubyist.net/magazine/?0021-RubyWithCSharp
ããã«ããã¨ã dll ãã¤ã³ãã¼ããã¦ã»ã¼ã¤ã³ã¿ã¼ããªã¿ãå
èµãããããªé°å²æ°ï¼ã§ã³ã¼ãã£ã³ã°ããã° C# -> Ruby ãå®ç¾ã§ããããã ã
ã¹ã¯ãªããèªä½ã¯ããã°ã©ã èµ·åæã«èªã¿è¾¼ã㧠eval ããã°ï¼ãã¶ãï¼ãããªã«ãªã¼ãã¼ããããããããªãã§ãããã
ãã§ãdll ãèªã¿è¾¼ãã®ã¯ C# ã®ç¹å¥ãªæ¹æ³ã§ã¯ãªããããªã®ã§ããããå¿ç¨ããã° Cè¨èªããã§ãå¼ã¹ããããããªããã»ã»ã»ãããã㯠windows ã®è©±ãªã®ã§ãLinux ã Unix ã®å ´åã¯msvcrt-ruby18.dllçãªããªã«ãããå¥éã®ã©ã¤ãã©ãªãããã®ã ãããã
ã¨ããããã§
ï¼æéã調ã¹ã¦ããªããã©ãæ¹éã¨ãã¦ã¯ä»¥ä¸ã®äºã¤ã§æ¤è¨ãã¹ãã
- ããã°ã©ã ã¨ã³ããªã¼é¨å㯠Ruby ã§æ¸ããå®ãã¸ãã¯ã¯ Cè¨èªã§å®è£ ããããã¾ã« C è¨èªãã Ruby ã®ã©ã¤ãã©ãªã使ãã
- Cè¨èªã§ããã°ã©ã ã¨ã³ããªã¼é¨åãæ¸ããå®ãã¸ãã¯ã Cè¨èªã§å®è£ ããããã¾ã« C è¨èªãã Ruby ã®ã©ã¤ãã©ãªã使ãã
1. ã®æ¹æ³ã¯æ¬æ«è»¢åãªæ°ãããããããã©ã¼ãã³ã¹ã«æ¯éãããããç®çãéæã§ããã°ã¬ã¯ã®é¨åã Ruby ã ãããæå¥ã¯è¨ããã¾ãã