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/

posted on 2018-12-27 08:26  荣锋亮  阅读(1614)  评论(0编辑  收藏  举报

导航