Skip to content
This repository was archived by the owner on Jan 8, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# paths = ["/path/to/override"] # path dependency overrides

[alias] # command aliases
install_stellar = "install --locked stellar-cli --version 21.0.0 --force --root ./target stellar-cli --debug"
install_soroban = "install --git https://github.com/AhaLabs/soroban-tools --rev c7fb7e08ba8efa9828d9df863d991558f269e35b --root ./target soroban-cli --debug"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason behind this change?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I though it was part of the dependencies needed for an update, if not I can rollback that change and update the Dockerfile accorndingly 🫡

Copy link
Member

@leighmcculloch leighmcculloch Aug 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example shouldn't have any special logic for installing the CLI and definitely shouldn't be installing an arbitrary commit from another repo.

Fwiw that commit sha is not currently present on any branch or tag of the stellar/stellar-cli or AhaLabs/soroban-tools repos, meaning that the commit could be from any fork and may contain history and code from anywhere.

Imo we should direct folks to the getting started help where several options for installing the CLI exist.

Why: For some folks installing the CLI from source is impossible or at least a high barrier due to resource limitations, or dependencies they don't have installed. The main install instructions for the CLI include ways to install binaries without from source, and folks should use them where possible.

So the improvement should be imo to remove this bespoke install_stellar command and ask users to install the stellar-cli themselves.

b = "build --target wasm32-unknown-unknown --release"
# c = "check"
# t = "test"
Expand Down
28 changes: 17 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
# Based on Preview 7
# https://soroban.stellar.org/docs/reference/releases

FROM ubuntu:22.04

RUN apt update && apt install -y curl
ENV PATH="/root/.cargo/bin:${PATH}"
ENV PATH="$PATH:/workspace/target/bin"
ENV IS_USING_DOCKER=true
ENV SOROBAN_CLI_REVISION="c7fb7e08ba8efa9828d9df863d991558f269e35b"
ENV GIT_REVISION=$SOROBAN_CLI_REVISION

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rust_install.sh
RUN sh rust_install.sh -y
RUN echo $PATH
ENV PATH="$PATH:/root/.cargo/bin"
RUN rustup target add wasm32-unknown-unknown
RUN apt update && \
apt install -y curl build-essential && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
rustup target add wasm32-unknown-unknown

RUN apt install -y build-essential
# WORKDIR /
RUN mkdir /workspace
WORKDIR /workspace
ENV IS_USING_DOCKER=true

COPY .cargo /root/.cargo

RUN cargo install_soroban

WORKDIR /workspace/target/bin

CMD ["./soroban", "--version"]
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ backed by smart contracts on Stellar.
# Getting Started

## Install Dependencies

--------------------
1. `rustc` >= 1.71.0 with the `wasm32-unknown-unknown` target installed. See https://soroban.stellar.org/docs/getting-started/setup#install-rust . If you have already a lower version, the easiest way to upgrade is to uninstall (`rustup self uninstall`) and install it again.
2. `soroban-cli`. See https://soroban.stellar.org/docs/getting-started/setup#install-the-soroban-cli
3. If you want to run everything locally: `docker` (you can run both Standalone and Futurenet backends with it)
2. `soroban-cli`. See https://soroban.stellar.org/docs/getting-started/setup#install-the-soroban-cli, but instead of `cargo install soroban-cli`, run `cargo install_soroban`. This is an alias set up in [.cargo/config.toml](./.cargo/config.toml), which pins the local soroban-cli to a specific version. If you add `./target/bin/` [to your PATH](https://linuxize.com/post/how-to-add-directory-to-path-in-linux/), then you'll automatically use this version of `soroban-cli` when you're in this directory.
3. If you want to run everything locally use: `make build-docker` (you can run both Standalone and Futurenet backends with it)
4. Node.js v18
5. [Freighter Wallet](https://www.freighter.app/) ≥[v5.0.2](https://github.com/stellar/freighter/releases/tag/2.9.1). Or from the Firefox / Chrome extension store. Once installed, enable "Experimental Mode" in the settings (gear icon).
6. If you want to skip step (1) and (2) and avoid installing specific `rustc` or `soroban-cli` versions, build the `soroban-preview` docker image:

make build-docker
make build-docker

7. **NOTE** - Follow the instructions below for Futurenet or Standalone and ensure that you have funded your wallet address that you intend to use from browser, otherwise the dapp display will be blank and a 'Account not found' will be printed on browser's console only.

Expand Down