<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>

          真能折騰:用Rust實現(xiàn)一個Go腳本語言

          共 1054字,需瀏覽 3分鐘

           ·

          2021-10-25 21:52

          在 GitHub 發(fā)現(xiàn)一個項目:goscript,這個項目挺有意思。它計劃實現(xiàn) Go 語言規(guī)范,同時增加一些動態(tài)語言特性,打造一個類似 Python 或 Lua 這樣的動態(tài)語言,但語法是 Go 語言的。

          這個項目是使用 Rust 實現(xiàn)的,一方面希望可以像 Lua 一樣被嵌入使用,比如嵌入 Rust 中;另一方面也希望像 Python 一樣,可以單獨作為腳本語言使用。

          項目地址:https://github.com/oxfeeefeee/goscript,Star 數(shù):782,去年 4 月份啟動的項目。(目測我這一推廣,Star 數(shù)增加不少,

          目前官方提供了一種方式進行試驗:

          The project "engine" is the entry/wrapper. there are test cases in here[1] to browse through.

          • Make sure your Rust installation is up to date.
          • Clone this repository.
          • Go to goscript/engine
          • Run cargo test -- --nocapture

          扒了一下,發(fā)現(xiàn)這個項目的作者是國人。如果你對這塊感興趣可以關(guān)注下!

          此外,該項目還有具體應(yīng)用。我們知曉,Go 官方的 Playground,Go 的編譯運行是服務(wù)端處理的。但有一個 Playground:https://go-playground-wasm.vercel.app/,它是在瀏覽器運行 Go 代碼,也就是訪問這個網(wǎng)址后,即使斷網(wǎng)了,也可以運行 Go 代碼。這個項目使用的就是 goscript 和 WASM。

          文末「閱讀原文」可以直達項目首頁。

          參考資料

          [1]

          here: https://github.com/oxfeeefeee/goscript/tree/master/engine/tests



          推薦閱讀


          福利

          我為大家整理了一份從入門到進階的Go學(xué)習(xí)資料禮包,包含學(xué)習(xí)建議:入門看什么,進階看什么。關(guān)注公眾號 「polarisxu」,回復(fù)?ebook?獲取;還可以回復(fù)「進群」,和數(shù)萬 Gopher 交流學(xué)習(xí)。

          瀏覽 120
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

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

          手機掃一掃分享

          分享
          舉報
          <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>
                  美女自慰网站免费 | 精品视频一区二区三区女人 | 日韩欧美国产综合 | 亚洲日韩一区二区三区四区丨高清 | 国内一级黄色片 |