aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-27 17:32:48 +0800
committerGitHub <noreply@github.com>2018-02-27 17:32:48 +0800
commitbffed2c7e4c341a686568bd6ce1d3859386f44ec (patch)
treeccc679427169691a36cc629ca5a69e03092e118f
parent415ac2ae87761919d37bd281a9808592d15e544e (diff)
parent3594f02d51aac4a99d3f1fefbd37fa27346b75ae (diff)
downloaddexon-solidity-bffed2c7e4c341a686568bd6ce1d3859386f44ec.tar.gz
dexon-solidity-bffed2c7e4c341a686568bd6ce1d3859386f44ec.tar.zst
dexon-solidity-bffed2c7e4c341a686568bd6ce1d3859386f44ec.zip
Merge pull request #3603 from ethereum/docs-solcjs
Fix links and clarify the solc-js section
-rw-r--r--docs/installing-solidity.rst10
-rw-r--r--docs/using-the-compiler.rst3
2 files changed, 9 insertions, 4 deletions
diff --git a/docs/installing-solidity.rst b/docs/installing-solidity.rst
index 8f30f199..e26870f0 100644
--- a/docs/installing-solidity.rst
+++ b/docs/installing-solidity.rst
@@ -29,18 +29,20 @@ Further options on this page detail installing commandline Solidity compiler sof
on your computer. Choose a commandline compiler if you are working on a larger contract
or if you require more compilation options.
+.. _solcjs:
+
npm / Node.js
=============
Use `npm` for a convenient and portable way to install `solcjs`, a Solidity compiler. The
`solcjs` program has less features than all options further down this page. Our
-`Using the compiler <using-the-compiler.html>` documentation assumes you are using
+:ref:`commandline-compiler` documentation assumes you are using
the full-featured compiler, `solc`. So if you install `solcjs` from `npm` then you will
-stop reading the documentation here and then continue to <https://github.com/ethereum/solc-js>,
+stop reading the documentation here and then continue to `solc-js <https://github.com/ethereum/solc-js>`_.
-Note: The `solc-js <https://github.com/ethereum/solc-js>` project is derived from the C++
+Note: The solc-js project is derived from the C++
`solc` by using Emscripten. `solc-js` can be used in JavaScript projects directly (such as Remix).
-Please refer to the `solc-js <https://github.com/ethereum/solc-js>`_ repository for instructions.
+Please refer to the solc-js repository for instructions.
.. code:: bash
diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst
index 42cc807a..66e3ac35 100644
--- a/docs/using-the-compiler.rst
+++ b/docs/using-the-compiler.rst
@@ -9,6 +9,9 @@ Using the compiler
Using the Commandline Compiler
******************************
+.. note::
+ This section doesn't apply to :ref:`solcjs <solcjs>`.
+
One of the build targets of the Solidity repository is ``solc``, the solidity commandline compiler.
Using ``solc --help`` provides you with an explanation of all options. The compiler can produce various outputs, ranging from simple binaries and assembly over an abstract syntax tree (parse tree) to estimations of gas usage.
If you only want to compile a single file, you run it as ``solc --bin sourceFile.sol`` and it will print the binary. Before you deploy your contract, activate the optimizer while compiling using ``solc --optimize --bin sourceFile.sol``. If you want to get some of the more advanced output variants of ``solc``, it is probably better to tell it to output everything to separate files using ``solc -o outputDirectory --bin --ast --asm sourceFile.sol``.