deno學習三 官方提供的方便deno 安裝方式


早起deno 使用了golang 開發,同時需要protobuf 進行數據的序列化以及反序列化處理
當前的deno 已經使用rust 進行了開發,同時官方提供的安裝方式也很方便了,不需要
那么復雜的編譯v8,處理依賴。。。。

新的安裝方式

mac 系統,使用python 腳本

  • 腳本
 
curl -L https://deno.land/x/install/install.py | python
  • 效果
curl -L https://deno.land/x/install/install.py | python
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 3089 100 3089 0 0 2490 0 0:00:01 0:00:01 --:--:-- 3016k
mkdir /Users/dalong/.deno
mkdir /Users/dalong/.deno/bin
Downloading https://github.com/denoland/deno/releases/download/v0.2.4/deno_osx_x64.gz
100.00% downloaded
DENO_EXE: /Users/dalong/.deno/bin/deno
Now manually add /Users/dalong/.deno/bin to your $PATH
Example:
  echo export PATH="/Users/dalong/.deno/bin":\$PATH >> $HOME/.bash_profile
 
 

簡單運行

  • 簡單測試
deno https://deno.land/thumb.ts
  • 效果
deno https://deno.land/thumb.ts
Downloading https://deno.land/thumb.ts...
Compiling https://deno.land/thumb.ts

說明

新版本的已經提供了一些標准庫,同時官方也提供了一個性能測試的報告,還是很有前途的

參考資料

https://github.com/denoland/deno
https://deno.land/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM