Explorar o código

Add some running help

Signed-off-by: Sean <sean@mess.org>
Sean %!s(int64=6) %!d(string=hai) anos
pai
achega
6e8c5653c8
Modificáronse 4 ficheiros con 53 adicións e 8 borrados
  1. 3 0
      docs/conf.py
  2. 0 6
      docs/index.rst
  3. 2 2
      docs/installing.rst
  4. 48 0
      docs/running.rst

+ 3 - 0
docs/conf.py

@@ -54,3 +54,6 @@ html_theme = 'sphinx_rtd_theme'
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
 html_static_path = ['_static']
+
+# See https://github.com/readthedocs/readthedocs.org/issues/2569
+master_doc = 'index'

+ 0 - 6
docs/index.rst

@@ -23,9 +23,3 @@ is supported, though.
    running
    language
 
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`

+ 2 - 2
docs/installing.rst

@@ -99,7 +99,7 @@ _________________________
 
 You will need Fedora 30 or later. Running the following::
 
-	sudo dnf install cargo llvm8.0-static llvm8.0-devel zlib-devel clang
+	sudo dnf install cargo llvm8.0-static llvm8.0-devel zlib-devel clang libffi-devel
 
 Installing LLVM from source
 ___________________________
@@ -141,7 +141,7 @@ Now run cmake to create the makefiles. Replace the *installdir* argument to ``CM
 	cmake -G Ninja -DLLVM_TARGETS_TO_BUILD=WebAssembly -DLLVM_ENABLE_ASSERTIONS=On -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=installdir ../llvm
 	cmake --build . --target install
 
-Once the build has succeeded, the *installdir*/bin has to be added to your path so the solang build can find this llvm config:
+Once the build has succeeded, the *installdir*/bin has to be added to your path so the solang build can find this llvm config::
 
 	export PATH=*installdir*/bin:$PATH
 

+ 48 - 0
docs/running.rst

@@ -0,0 +1,48 @@
+Running Solang
+==============
+
+The solang compiler is run on the command line. The solidity source file
+names are provided as command line arguments; the output is an optimized
+wasm file which is ready for deployment on a chain.
+
+Two blockchains are supported right now:
+`Hyperledger Burrow <https://github.com/hyperledger/burrow>`_ and
+`Parity Substrate <https://substrate.dev/>`_.
+
+.. note::
+
+  Depending on which target solang is compiling for, different language
+  features are supported. For example, when compiling for substrate, the
+  constructor can be overloaded with different prototypes. With burrow, only
+  one constructor prototype is allowed.
+
+  The Solidity langauge has notes for each difference.
+  
+Using solang on the command line
+--------------------------------
+
+When running solang on the command line, the following command line options
+are supported.
+
+--target
+  This takes one argument, which can either be ``burrow`` or ``substrate``.
+  The default is substrate.
+
+-o, --output
+  This option takes one argument, which is the directory where output should
+  be saved. The default is the current directory.
+  
+  .. FIXME this should be in the same directory as the solidity file
+
+-O
+  This takes one argument, which can either be ``none``, ``less``, ``default``,
+  or ``aggressive``. These correspond to llvm optimization levels.
+
+--help, -h
+  This displays a short description of all the options
+
+
+Using solang with Hyperledger Burrow
+------------------------------------
+
+This is documented in the `burrow documentation <https://hyperledger.github.io/burrow/#/reference/wasm>`_.