<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          RubyFluxRuby代碼轉(zhuǎn)Java的工具

          聯(lián)合創(chuàng)作 · 2023-10-02 01:36

          RubyFlux 是一個編譯器,用來將 Ruby 代碼轉(zhuǎn)成對應的 Java 代碼,并可在 JVM 中運行,而無需其他運行環(huán)境的要求。

          每個 Ruby 類生成一個對應的 Java 文件。

          使用示例:

          # The file we want to compile
          
          $ cat fib.rb
          def fib(a)
            if a < 2
              a
            else
              fib(a - 1) + fib(a - 2)
            end
          end
          
          puts fib(40)
          
          # First need to build the compiler's jar
          
          $ mvn package
          <maven noise>
          
          # Provide the target file to 'rake run'.
          #
          # The Ruby sources are translated to .java and all support code is copied out
          # of RubyFlux for the compilation step. That source is then compiled and run.
          # to compile
          
          $ rake run[fib.rb]
          jruby -I target:src/main/ruby src/main/ruby/ruby_flux.rb fib.rb
          javac fib.java
          java fib
          102334155
          瀏覽 27
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  日韩在线一级片 | 日韩一级二级三级 | 五月丁香日本aa | 奇米7777狠狠狠狠视频 | 婷婷丁香亚洲日韩 |