summaryrefslogtreecommitdiff
path: root/deno2/README.md
blob: 2b05da52fd4422c11cc353a7d3017d6b57f234d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Deno Prototype 2

## Status

This code is a rewrite of the privileged parts of Deno. It will soon become
the root of the project.

There are several goals:

* Use the gn build system for fast builds, sane configuration, and easy
  linking into Chrome.

* Use V8 snapshots to improve startup time.

* Remove Golang. Although it has been working nicely, I am concerned the
  double GC will become a problem sometime down the road.

* Distribute a C++ library called libdeno, containing the snapshotted
  typescript runtime.

* Test the message passing and other functionality at that layer before
  involving higher level languages.

The contenders for building the privileged part of Deno are Rust and C++.
Thanks to Chrome and gn, using C++ to link into high level libraries is not
untenable. However, there's a lot of interest in Rust in the JS community and
it seems like a reasonable choice. TBD.

There are many people exploring the project, so care will be taken to keep the
original code functional while this is developed. However, once it's ready
the code in this deno2/ directory will be moved to the root.


## Prerequisites

Get Depot Tools and make sure it's in your path.
http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up

For linux you need these prereqs:

    sudo apt-get install libgtk-3-dev pkg-config ccache


## Build

First install the javascript deps.

    cd js; yarn install

TODO(ry) Remove the above step by a deps submodule.

Wrapper around the gclient/gn/ninja for end users. Try this first:

    ./tools/build.py --use_ccache --debug

If that doesn't work, or you need more control, try calling gn manually:

    gn gen out/Debug --args='cc_wrapper="ccache" is_debug=true '

Then build with ninja:

    ninja -C out/Debug/ deno


Other useful commands:

    gn args out/Debug/ --list # List build args
    gn args out/Debug/ # Modify args in $EDITOR