From 1f1b180d94e29c69ca46f2b3cb9a625f2b7d58d8 Mon Sep 17 00:00:00 2001 From: RJ Date: Wed, 9 Dec 2015 13:54:26 -0600 Subject: [PATCH 1/6] Create for_Ze_Devs.md tentative means to get a dev environment set up for the compiler on OS X --- docs/for_Ze_Devs.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 docs/for_Ze_Devs.md diff --git a/docs/for_Ze_Devs.md b/docs/for_Ze_Devs.md new file mode 100644 index 000000000..67fd6f4c5 --- /dev/null +++ b/docs/for_Ze_Devs.md @@ -0,0 +1,31 @@ +## Preparing for Compiler Development on OS X + +# Requirements +- OS X Yosemite (10.10.5) +- Homebrew +- Xcode + +# Set up Homebrew +``` +brew update +brew install boost --c++11 # this takes a while +brew install cmake qt5 cryptopp miniupnpc leveldb gmp libmicrohttpd libjson-rpc-cpp +brew install llvm --HEAD --with-clang +``` + +# Clone source repo and run this script +``` +git clone --recursive https://github.com/ethereum/webthree-umbrella.git +webthree-helpers/scripts/ethupdate.sh --no-push --simple-pull --project solidity #update solidity repo +./webthree-helpers/scripts/ethbuild.sh --no-git --build-type Debug --project solidity --all --cores 4 -DFATDB=0 -DEVMJIT=0 -DETHASHCL=0 #install solidity +``` + +# Bringing it all together +clone your forked repo, then: + +``` +cd ~/webthree-helpers/solidity +mv build ../../yourForkedRepo +``` + +you are now ready to develop :) From dfea21209e991cc9f65d4d54c4665d234dadb081 Mon Sep 17 00:00:00 2001 From: RJ Date: Wed, 9 Dec 2015 13:57:05 -0600 Subject: [PATCH 2/6] Update for_Ze_Devs.md --- docs/for_Ze_Devs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/for_Ze_Devs.md b/docs/for_Ze_Devs.md index 67fd6f4c5..e5feff23d 100644 --- a/docs/for_Ze_Devs.md +++ b/docs/for_Ze_Devs.md @@ -1,4 +1,4 @@ -## Preparing for Compiler Development on OS X +### Preparing for Compiler Development on OS X # Requirements - OS X Yosemite (10.10.5) From 2385f2ffbc4350f1021b1aed6089861fb6261180 Mon Sep 17 00:00:00 2001 From: RJ Date: Wed, 9 Dec 2015 14:04:06 -0600 Subject: [PATCH 3/6] Update for_Ze_Devs.md --- docs/for_Ze_Devs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/for_Ze_Devs.md b/docs/for_Ze_Devs.md index e5feff23d..757017861 100644 --- a/docs/for_Ze_Devs.md +++ b/docs/for_Ze_Devs.md @@ -10,14 +10,14 @@ brew update brew install boost --c++11 # this takes a while brew install cmake qt5 cryptopp miniupnpc leveldb gmp libmicrohttpd libjson-rpc-cpp -brew install llvm --HEAD --with-clang +brew install llvm --HEAD --with-clang #only required if you plan on using DEVMJIT ``` # Clone source repo and run this script ``` git clone --recursive https://github.com/ethereum/webthree-umbrella.git webthree-helpers/scripts/ethupdate.sh --no-push --simple-pull --project solidity #update solidity repo -./webthree-helpers/scripts/ethbuild.sh --no-git --build-type Debug --project solidity --all --cores 4 -DFATDB=0 -DEVMJIT=0 -DETHASHCL=0 #install solidity +./webthree-helpers/scripts/ethbuild.sh --no-git --build-type Debug --project solidity --all --cores 4 -DFATDB=0 -DEVMJIT=0 -DETHASHCL=0 #install solidity ``` # Bringing it all together From 8223abaf2074610c77b2f46b5f1c367c49195d31 Mon Sep 17 00:00:00 2001 From: RJ Date: Wed, 9 Dec 2015 20:45:17 -0600 Subject: [PATCH 4/6] Update for_Ze_Devs.md --- docs/for_Ze_Devs.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/for_Ze_Devs.md b/docs/for_Ze_Devs.md index 757017861..2e2231757 100644 --- a/docs/for_Ze_Devs.md +++ b/docs/for_Ze_Devs.md @@ -8,16 +8,27 @@ # Set up Homebrew ``` brew update -brew install boost --c++11 # this takes a while -brew install cmake qt5 cryptopp miniupnpc leveldb gmp libmicrohttpd libjson-rpc-cpp -brew install llvm --HEAD --with-clang #only required if you plan on using DEVMJIT +brew install boost --c++11 # this takes a while +brew install cmake cryptopp miniupnpc leveldb gmp libmicrohttpd libjson-rpc-cpp +#for Mix IDE and Alethzero only +brew install xz d-bus +brew install llvm --HEAD --with-clang +brew install qt5 --with-d-bus # add --verbose if long waits with a stale screen drive you crazy as well ``` -# Clone source repo and run this script +# The Long Wait + +Run this if you plan on installing solidity only, ignore errors at the end as they relate only to Alethzero and Mix ``` git clone --recursive https://github.com/ethereum/webthree-umbrella.git webthree-helpers/scripts/ethupdate.sh --no-push --simple-pull --project solidity #update solidity repo -./webthree-helpers/scripts/ethbuild.sh --no-git --build-type Debug --project solidity --all --cores 4 -DFATDB=0 -DEVMJIT=0 -DETHASHCL=0 #install solidity +./webthree-helpers/scripts/ethbuild.sh --no-git --project solidity --all --cores 4 #install solidity +``` +if you opted to install Alethzero and Mix: +``` +git clone --recursive https://github.com/ethereum/webthree-umbrella.git +cd webthree-umbrella && mkdir -p build && cd build +cmake .. ``` # Bringing it all together From b344bbac5d7156562e9fed4beee08efa43f2c9b8 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 10 Dec 2015 11:35:54 +0100 Subject: [PATCH 5/6] Improved index page. --- docs/index.rst | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 92cf24e35..efe82ff9e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,13 +1,34 @@ -Welcome to Solidity's documentation! -==================================== - -See also `Russian version (русский перевод) `_. +Solidity +======== Solidity is a high-level language whose syntax is similar to that of JavaScript and it is designed to compile to code for the Ethereum Virtual Machine. As you will see, it is quite easy to create contracts for voting, crowdfunding, blind auctions, multi-signature wallets and more. +.. note:: + The best way to try out Solidity right now is using the + `Browser-Based Compiler `_ + (it can take a while to load, please be patient). + +Useful links +------------ + +* `Ethereum `_ + +* `Browser-Based Compiler `_ + +* `Changelog `_ + +* `Story Backlog `_ + +* `Source Code `_ + +* `Gitter Chat `_ + +Language Documentation +---------------------- + On the next pages, we will first see a :ref:`simple smart contract ` written in Solidity followed by the basics about :ref:`blockchains ` and the :ref:`Ethereum Virtual Machine `. @@ -22,19 +43,18 @@ The last and most extensive section will cover all aspects of Solidity in depth. If you still have questions or ideas for improving Solidity or this documentation, please feel free to come to out `gitter channel `_. -Index and Search -================== - -* :ref:`genindex` -* :ref:`search` +See also `Russian version (русский перевод) `_. Contents ======== +:ref:`Keyword Index `, :ref:`Search Page ` + .. toctree:: :maxdepth: 2 introduction-to-smart-contracts.rst + installing-solidity.rst solidity-by-example.rst solidity-in-depth.rst style-guide.rst From 3ce73e0bd34f1de8874e39ee6511b72728b869ed Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 10 Dec 2015 12:22:53 +0100 Subject: [PATCH 6/6] Added build guide. --- docs/for_Ze_Devs.md | 42 ----------- docs/installing-solidity.rst | 140 +++++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+), 42 deletions(-) delete mode 100644 docs/for_Ze_Devs.md create mode 100644 docs/installing-solidity.rst diff --git a/docs/for_Ze_Devs.md b/docs/for_Ze_Devs.md deleted file mode 100644 index 2e2231757..000000000 --- a/docs/for_Ze_Devs.md +++ /dev/null @@ -1,42 +0,0 @@ -### Preparing for Compiler Development on OS X - -# Requirements -- OS X Yosemite (10.10.5) -- Homebrew -- Xcode - -# Set up Homebrew -``` -brew update -brew install boost --c++11 # this takes a while -brew install cmake cryptopp miniupnpc leveldb gmp libmicrohttpd libjson-rpc-cpp -#for Mix IDE and Alethzero only -brew install xz d-bus -brew install llvm --HEAD --with-clang -brew install qt5 --with-d-bus # add --verbose if long waits with a stale screen drive you crazy as well -``` - -# The Long Wait - -Run this if you plan on installing solidity only, ignore errors at the end as they relate only to Alethzero and Mix -``` -git clone --recursive https://github.com/ethereum/webthree-umbrella.git -webthree-helpers/scripts/ethupdate.sh --no-push --simple-pull --project solidity #update solidity repo -./webthree-helpers/scripts/ethbuild.sh --no-git --project solidity --all --cores 4 #install solidity -``` -if you opted to install Alethzero and Mix: -``` -git clone --recursive https://github.com/ethereum/webthree-umbrella.git -cd webthree-umbrella && mkdir -p build && cd build -cmake .. -``` - -# Bringing it all together -clone your forked repo, then: - -``` -cd ~/webthree-helpers/solidity -mv build ../../yourForkedRepo -``` - -you are now ready to develop :) diff --git a/docs/installing-solidity.rst b/docs/installing-solidity.rst new file mode 100644 index 000000000..83c7ac18e --- /dev/null +++ b/docs/installing-solidity.rst @@ -0,0 +1,140 @@ +################### +Installing Solidity +################### + +Browser-Solidity +================ + +If you just want to try Solidity for small contracts, you +can try `browser-solidity `_ +which does not need any installation. If you want to use it +without connection to the Internet, you can also just save the page +locally or clone http://github.com/chriseth/browser-solidity. + +NPM / node.js +============= + +This is probably the most portable and most convenient way to install Solidity locally. + +A platform-independent JavaScript library is provided by compiling the C++ source +into JavaScript using Emscripten for browser-solidity and there is also an NPM +package available. + +To install it, simply use + +:: + + npm install solc + +Details about the usage of the nodejs package can be found in the +`repository `_. + +Binary Packages +=============== + +Binary packages of Solidity together with its IDE Mix are available through +the `C++ bundle `_ of +Ethereum. + +Building from Source +==================== + +Building Solidity is quite similar on MacOS X, Ubuntu and probably other Unices. +This guide starts explaining how to install the dependencies for each platform +and then shows how to build Solidity itself. + +MacOS X +------- + + +Requirements: + +- OS X Yosemite (10.10.5) +- Homebrew +- Xcode + +Set up Homebrew: + +.. code-block:: bash + + brew update + brew install boost --c++11 # this takes a while + brew install cmake cryptopp miniupnpc leveldb gmp libmicrohttpd libjson-rpc-cpp + # For Mix IDE and Alethzero only + brew install xz d-bus + brew install llvm --HEAD --with-clang + brew install qt5 --with-d-bus # add --verbose if long waits with a stale screen drive you crazy as well + +Ubuntu +------ + +Below are the build instructions for the latest versions of Ubuntu. The best +supported platform as of December 2014 is Ubuntu 14.04, 64 bit, with at least 2 +GB RAM. All our tests are done with this version. Community contributions for +other versions are welcome! + +Install dependencies: + +Before you can build the source, you need several tools and dependencies for the application to get started. + +First, update your repositories. Not all packages are provided in the main +Ubuntu repository, those you'll get from the Ethereum PPA and the LLVM archive. + +.. note:: + + Ubuntu 14.04 users, you'll need the latest version of cmake. For this, use: + `sudo apt-add-repository ppa:george-edison55/cmake-3.x` + +Now add all the rest: + +.. code-block:: bash + + sudo apt-get -y update + sudo apt-get -y install language-pack-en-base + sudo dpkg-reconfigure locales + sudo apt-get -y install software-properties-common + sudo add-apt-repository -y ppa:ethereum/ethereum + sudo add-apt-repository -y ppa:ethereum/ethereum-dev + sudo apt-get -y update + sudo apt-get -y upgrade + +Use the following command to add the develop packages: + +.. code-block:: bash + + sudo apt-get -y install build-essential git cmake libboost-all-dev libgmp-dev libleveldb-dev libminiupnpc-dev libreadline-dev libncurses5-dev libcurl4-openssl-dev libcryptopp-dev libjson-rpc-cpp-dev libmicrohttpd-dev libjsoncpp-dev libedit-dev libz-dev + +Building +-------- + +Run this if you plan on installing Solidity only, ignore errors at the end as +they relate only to Alethzero and Mix + +.. code-block:: bash + + git clone --recursive https://github.com/ethereum/webthree-umbrella.git + cd webthree-umbrella + ./webthree-helpers/scripts/ethupdate.sh --no-push --simple-pull --project solidity # update Solidity repo + ./webthree-helpers/scripts/ethbuild.sh --no-git --project solidity --all --cores 4 # build Solidity + +If you opted to install Alethzero and Mix: + +.. code-block:: bash + + git clone --recursive https://github.com/ethereum/webthree-umbrella.git + cd webthree-umbrella && mkdir -p build && cd build + cmake .. + +If you want to help developing Solidity, +you should fork Solidity and add your personal fork as a second remote: + +.. code-block:: bash + + cd webthree-umbrella/solidity + git remote add personal git@github.com:username/solidity.git + +Note that webthree-umbrella uses submodules, so solidity is its own git +repository, but its settings are not stored in `.git/config`, but in +`webthree-umbrella/.git/modules/solidity/config`. + +