diff --git a/Docs.md b/Docs.md index 08bea8c2d3..6de796defd 100644 --- a/Docs.md +++ b/Docs.md @@ -19,7 +19,7 @@ scripts to download and install the binary. Using Shell: ``` -curl -L https://deno.land/x/install/install.sh | sh +curl -fL https://deno.land/x/install/install.sh | sh ``` Or using PowerShell: @@ -63,6 +63,88 @@ Or see the [doc website](https://deno.land/typedoc/index.html). If you are embedding deno in a Rust program, see [the rust docs](https://deno.land/rustdoc/deno/index.html). +## Build Instructions + +### Prerequisites: + +To ensure reproducible builds, deno has most of its dependencies in a git +submodule. However, you need to install separately: + +1. [Rust](https://www.rust-lang.org/en-US/install.html) >= 1.31.1 +2. [Node](https://nodejs.org/) +3. Python 2. + [Not 3](https://github.com/denoland/deno/issues/464#issuecomment-411795578). + +Extra steps for Mac users: + +1. [XCode](https://developer.apple.com/xcode/) +2. Openssl 1.1: `brew install openssl@1.1` (TODO: shouldn't be necessary) + +Extra steps for Windows users: + +1. Add `python.exe` to `PATH` (e.g. `set PATH=%PATH%;C:\Python27\python.exe`) +2. Get [VS Community 2017](https://www.visualstudio.com/downloads/) with + `Desktop development with C++` toolkit and make sure to select the following + required tools listed below along with all C++ tools. + - Windows 10 SDK >= 10.0.17134 + - Visual C++ ATL for x86 and x64 + - Visual C++ MFC for x86 and x64 + - C++ profiling tools +3. Enable `Debugging Tools for Windows`. Go to `Control Panel` → `Programs` → + `Programs and Features` → Select + `Windows Software Development Kit - Windows 10` → `Change` → `Change` → Check + `Debugging Tools For Windows` → `Change` -> `Finish`. + +### Build: + + # Fetch deps. + git clone --recurse-submodules https://github.com/denoland/deno.git + cd deno + ./tools/setup.py + + # You may need to ensure that sccache is running. + # (TODO it's unclear if this is necessary or not.) + # prebuilt/mac/sccache --start-server + + # Build. + ./tools/build.py + + # Run. + ./target/debug/deno tests/002_hello.ts + + # Test. + ./tools/test.py + + # Format code. + deno ./tools/format.ts + +Other useful commands: + + # Call ninja manually. + ./third_party/depot_tools/ninja -C target/debug + + # Build a release binary. + DENO_BUILD_MODE=release ./tools/build.py :deno + + # List executable targets. + ./third_party/depot_tools/gn ls target/debug //:* --as=output --type=executable + + # List build configuration. + ./third_party/depot_tools/gn args target/debug/ --list + + # Edit build configuration. + ./third_party/depot_tools/gn args target/debug/ + + # Describe a target. + ./third_party/depot_tools/gn desc target/debug/ :deno + ./third_party/depot_tools/gn help + + # Update third_party modules + git submodule update + +Environment variables: `DENO_BUILD_MODE`, `DENO_BUILD_PATH`, `DENO_BUILD_ARGS`, +`DENO_DIR`. + ## Tutorial ### An implementation of the unix "cat" program @@ -306,90 +388,6 @@ Current executable set to '../deno/target/debug/deno' (x86_64). (lldb) r ``` -## Build Instructions _(for advanced users only)_ - -### Prerequisites: - -To ensure reproducible builds, deno has most of its dependencies in a git -submodule. However, you need to install separately: - -1. [Rust](https://www.rust-lang.org/en-US/install.html) >= 1.31.1 -2. [Node](https://nodejs.org/) -3. Python 2. - [Not 3](https://github.com/denoland/deno/issues/464#issuecomment-411795578). -4. [ccache](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/ccache) - (Optional but helpful for speeding up rebuilds of V8.) - -Extra steps for Mac users: - -1. [XCode](https://developer.apple.com/xcode/) -2. Openssl 1.1: `brew install openssl@1.1` (TODO: shouldn't be necessary) - -Extra steps for Windows users: - -1. Add `python.exe` to `PATH` (e.g. `set PATH=%PATH%;C:\Python27\python.exe`) -2. Get [VS Community 2017](https://www.visualstudio.com/downloads/) with - `Desktop development with C++` toolkit and make sure to select the following - required tools listed below along with all C++ tools. - - Windows 10 SDK >= 10.0.17134 - - Visual C++ ATL for x86 and x64 - - Visual C++ MFC for x86 and x64 - - C++ profiling tools -3. Enable `Debugging Tools for Windows`. Go to `Control Panel` → `Programs` → - `Programs and Features` → Select - `Windows Software Development Kit - Windows 10` → `Change` → `Change` → Check - `Debugging Tools For Windows` → `Change` -> `Finish`. - -### Build: - - # Fetch deps. - git clone --recurse-submodules https://github.com/denoland/deno.git - cd deno - ./tools/setup.py - - # You may need to ensure that sccache is running. - # (TODO it's unclear if this is necessary or not.) - # prebuilt/mac/sccache --start-server - - # Build. - ./tools/build.py - - # Run. - ./target/debug/deno tests/002_hello.ts - - # Test. - ./tools/test.py - - # Format code. - deno ./tools/format.ts - -Other useful commands: - - # Call ninja manually. - ./third_party/depot_tools/ninja -C target/debug - - # Build a release binary. - DENO_BUILD_MODE=release ./tools/build.py :deno - - # List executable targets. - ./third_party/depot_tools/gn ls target/debug //:* --as=output --type=executable - - # List build configuration. - ./third_party/depot_tools/gn args target/debug/ --list - - # Edit build configuration. - ./third_party/depot_tools/gn args target/debug/ - - # Describe a target. - ./third_party/depot_tools/gn desc target/debug/ :deno - ./third_party/depot_tools/gn help - - # Update third_party modules - git submodule update - -Environment variables: `DENO_BUILD_MODE`, `DENO_BUILD_PATH`, `DENO_BUILD_ARGS`, -`DENO_DIR`. - ## Internals ### Internal: libdeno API. diff --git a/website/index.html b/website/index.html index 8599c39a89..d36c0da9fc 100644 --- a/website/index.html +++ b/website/index.html @@ -1,151 +1,246 @@ - - Deno - - - - - - -
- - + + Deno + + + + + + +
+ + -

Deno

+

Deno

- - - - - - - - - -
Linux & MacWindows
- - - -
+

+ A new way to JavaScript -

A new way to JavaScript + +

-

github.com/denoland/deno + + + + + + + + + + + + + + + + + + + + + + + +
Linux & MacWindows
deno + + + +
deno_std + +
+ deno_install + + + + +
registry
-

github.com/denoland/deno_std +

+ Documentation +

-

github.com/denoland/deno_install +

API Reference

-

github.com/denoland/registry +

+ Other Deno resources. +

-

Documentation +

Install

-

API Reference - -

Links to other Deno resources. - -

Getting started

- -

Install Deno into ~/.deno/bin -

With Shell

-
-curl -L https://deno.land/x/install/install.sh | sh
-export PATH=$HOME/.deno/bin:$PATH
-
-

With PowerShell

-
+      

With Shell

+
+curl -fL https://deno.land/x/install/install.sh | sh
+
+

With PowerShell

+
 iex (iwr https://deno.land/x/install/install.ps1)
-
+
-Try a Deno program. Install by bash alias. -This one serves a local directory in HTTP. -
+      

Mini-tutorial

+ + Try a Deno program. This one serves a local directory in HTTP. + +
 alias file_server="deno \
   https://deno.land/x/http/file_server.ts --allow-net"
-
+
-Run it: -
+      Run it:
+      
 % file_server .
 Downloading https://deno.land/x/http/file_server.ts...
 [...]
 HTTP server listening on http://0.0.0.0:4500/
-
+
-And if you ever want to upgrade to the latest published version: -
+      And if you ever want to upgrade to the latest published version:
+      
 file_server --reload
-
+
-

Benchmarks

+

Dig in...

-

Execution time

- This shows how much time total it takes to run a few simple deno programs: - tests/002_hello.ts - and - tests/003_relative_import.ts. - For deno to execute typescript, it must first compile it to JS. - A warm startup is when deno has a cached JS output already, so - it should be fast because it bypasses the TS compiler. - A cold startup is when deno must compile from scratch. -
+ Documentation -

Throughput

- Time it takes to pipe a certain amount of data through Deno. - echo_server.ts - and - cat.ts - Smaller is better. +

API Reference

-
+

+ Links to other Deno resources. +

-

Req/Sec

- Tests HTTP server performance. 10 keep-alive connections - do as many hello-world requests as possible. Bigger is better. - +

Continuous Benchmarks

-
+ These plots are updated on every commit to + master branch. -

Executable size

- deno ships only a single binary. We track its size here. -
+

Execution time

+ This shows how much time total it takes to run a few simple deno programs: + tests/002_hello.ts + and + tests/003_relative_import.ts. For deno to execute typescript, it must first compile it to JS. A warm + startup is when deno has a cached JS output already, so it should be fast + because it bypasses the TS compiler. A cold startup is when deno must + compile from scratch. +
-

Thread count

- How many threads various programs use. -
+

Throughput

+ Time it takes to pipe a certain amount of data through Deno. + echo_server.ts + and + cat.ts + Smaller is better. -

Syscall count

- How many total syscalls are performed when executing a given script. -
+
-

References

-

All benchmark data +

Req/Sec

+ Tests HTTP server performance. 10 keep-alive connections do as many + hello-world requests as possible. Bigger is better. +
- - +
  • + deno_net_http + is a web server written in TypeScript. It is comparable to + node_http. +
  • - - +
    + +

    Executable size

    + deno ships only a single binary. We track its size here. +
    + +

    Thread count

    + How many threads various programs use. +
    + +

    Syscall count

    + How many total syscalls are performed when executing a given script. +
    + +

    Historical benchmark data

    +
    + + + + + + - diff --git a/website/style.css b/website/style.css index d3bb3261d5..eaaf4b6fab 100644 --- a/website/style.css +++ b/website/style.css @@ -2,7 +2,7 @@ body { color: #111; background: #f0f0f0; - margin: 80px 0; + margin: 1em; font-family: Arial; font-size: 20px; }