Installation
Make sure you've installed and configured a few dependencies.
IMPORTANT: For local installations, you need root access to run docker
. Make sure to follow all the steps with root
access to prevent conflicts and confusions on the deployment process which requires root permission.
#
Dependencies- Rustc
- Cargo
- Cargo Generate
- Archwayd
- Docker (for Linux users, it's recommended to run the Docker daemon in Rootless Mode)
- Node.js
- Archway Developer CLI
#
Rustcrustc
, provided by the Rust project maintainers, is the compiler for the Rust programming language. rustc
takes your Rust source code and produces binary code as a library or an executable.
To install Rust, follow the instructions for your operating system at https://www.rust-lang.org/tools/install.
#
CargoCargo is the Rust package manager, like go get
for Golang or npm
is for JavaScript. Cargo comes with Rust if you installed rustc
using rustup
.
If you didn't install rustc
with rustup
, or don't have cargo
in your command line path, see the instructions for installing Cargo at https://doc.rust-lang.org/cargo/getting-started/installation.html.
#
Cargo GenerateThe cargo-generate
tool creates a new Rust project quickly by leveraging a pre-existing code base.
Archway uses cargo-generate
and cargo-run-script
to provide and manage project templates for dApp development.
To install cargo-generate
with vendored-openssl
, and the cargo-run-script
module, run the commands:
cargo install cargo-generate --features vendored-opensslcargo install cargo-run-script
#
Archwaydarchwayd
is an implementation of a Cosmos zone with wasm
smart contracts enabled.
Originally forked from the cosmos/gaia repository, archwayd
adds new modules for developer rewards and for executing wasm
, but otherwise the archwayd
binary functions just like gaiad
.
To build archwayd
, install it from source or use the archwaynetwork/archwayd
Docker container.
#
Install Archwayd from SourceGet source code:
git clone [email protected]:archway-network/archway.gitcd archway
Build and install:
make install
info
Note: Building archwayd from source requires Go 1.17+
For full installation and configuration parameters, see https://github.com/archway-network/archway/blob/main/README.md.
#
Install Archwayd Using DockerGet source code:
git clone [email protected]:archway-network/archway.gitcd archway
Build and install:
docker build -t archway-network/archwayd:latest .
Or pull from Docker Hub:
docker pull archwaynetwork/archwayd:latest
tip
To simplify using the Docker container, set an alias with the home path and the proper image tag (replacing <network-name>
), like:
alias archwayd="docker run --rm -it -v ~/.archway:/root/.archway archwaynetwork/archwayd:<network-name>"
After setting this alias, you can use the other archwayd
commands without typing the verbose Docker run command.
For more information on running archwayd
with the archway-network/archwayd
Docker container, see https://github.com/archway-network/archway#dockerized.
#
Node.js and Npmnpm
is a package manager for JavaScript and Node.js. Archway uses npm
for installing and updating the developer CLI.
For installing node.js
and npm
, see instructions for your operating system at https://docs.npmjs.com/downloading-and-installing-node-js-and-npm.
info
@archwayhq/cli
requires Node.js version 14 or higher, but some older versions in the beta
release track required Node.js version 17. You can check which version you have installed using the command archway --version
.
#
Archway Developer CLIInstall the Archway developer CLI using npm
, see Downloading and installing Node.js and npm.
npm install -g @archwayhq/cli
caution
Note: If you are running archwayd
using Docker, and not running in Rootless Mode, you may need to install the Archway developer CLI as root
, or give yourself permissions to the directory on your file system (for example, sudo chown YOUR_USERNAME:YOUR_GROUPNAME -R ~/.archway
).