Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
fix: remove deprecated bpf-sdk, localnet, and examples
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Removed binaries solana-localnet and solana-bpf-sdk-install.
Please install the Solana CLI tools to download the BPF SDK and to
install the solana-test-validator binary intead.
  • Loading branch information
jstarry committed Mar 19, 2021
1 parent f46f346 commit e9b08b5
Show file tree
Hide file tree
Showing 26 changed files with 33 additions and 472 deletions.
7 changes: 0 additions & 7 deletions web3.js/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ doc
# VIM swap files
*.sw*

# bpf-sdk
/bpf-sdk
/bpf-sdk.tar.bz2

# fixtures
/test/fixtures

# `solana-test-validator` ledger location
test-ledger/

Expand Down
7 changes: 7 additions & 0 deletions web3.js/.releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"repositoryUrl": "[email protected]:solana-labs/solana-web3.js.git",
"preset": "conventionalcommits",
"presetConfig": {
"issueUrlFormat": "{{host}}/{{owner}}/solana/issues/{{id}}"
}
}
4 changes: 0 additions & 4 deletions web3.js/.travis/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ sudo apt-get install -y libssl-dev --allow-unauthenticated
sudo apt-get install -y libssl1.1 --allow-unauthenticated
clang-7 --version

curl https://sh.rustup.rs -sSf | sh -s -- -y
PATH=$HOME/.cargo/bin:$PATH
rustup --version

sh -c "$(curl -sSfL https://release.solana.com/edge/install)"
PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"
solana --version
2 changes: 0 additions & 2 deletions web3.js/.travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@ test -r lib/index.esm.js
npm run doc
npm run lint
npm run codecov
make -C examples/bpf-c-noop/
cargo build-bpf --manifest-path examples/bpf-rust-noop/Cargo.toml
npm run test:live-with-test-validator
npm run test:browser-with-test-validator
65 changes: 10 additions & 55 deletions web3.js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,17 @@ $ npm install --save @solana/web3.js
<script src="https://unpkg.com/@solana/[email protected]/lib/index.iife.min.js"></script>
```

## Development Environment Setup

### Development Environment Setup
To build and run tests:
1. Install Rust from https://rustup.rs/
2. Install the latest Solana release from https://docs.solana.com/cli/install-solana-cli-tools
Install the latest Solana release from https://docs.solana.com/cli/install-solana-cli-tools

### Run test validator

**Use `solana-test-validator` from the latest Solana release**

### BPF program development

**Use `cargo build-bpf` from the latest Solana release**

## Usage

Expand Down Expand Up @@ -84,61 +90,10 @@ activate it:
node_modules/@solana/web3.js/module.flow.js
```

## Examples
See the [examples/](https://github.com/solana-labs/solana-web3.js/tree/master/examples) directory for small snippets.

Standalone examples:
* Message feed (BPF Rust and C): https://github.com/solana-labs/example-messagefeed
* Tic-tac-toe (BPF C): https://github.com/solana-labs/example-tictactoe
* Web wallet: https://github.com/solana-labs/example-webwallet

## Releases
Releases are available on [Github](https://github.com/solana-labs/solana-web3.js/releases)
and [npmjs.com](https://www.npmjs.com/package/@solana/web3.js)

Each Github release features a tarball containing API documentation and a
minified version of the module suitable for direct use in a browser environment
(&lt;script&gt; tag)

## Deprecated

### Local Network

**Please use `solana-test-validator` from the latest Solana release instead of the information in this section**

The `solana-localnet` program is provided to easily start a test Solana cluster
locally on your machine. Docker must be installed. The JSON RPC endpoint of
the local cluster is `http://localhost:8899`.

To start, first fetch the latest Docker image by running:
```bash
$ npx solana-localnet update
```

Then run the following command to start the cluster
```bash
$ npx solana-localnet up
```

While the cluster is running logs are available with:
```bash
$ npx solana-localnet logs -f
```

Stop the cluster with:
```bash
$ npx solana-localnet down
```

### BPF program development

**Please use `cargo build-bpf` from the latest Solana release instead of the information in this section**

The Solana BPF SDK is located in the `bpf-sdk/` subdirectory if you installed
solana-web3.js from npmjs.com.

From a git clone, run `npm run bpf-sdk:install` to fetch the latest BPF SDK.

Additionally Rust must be installed to build Rust BPF programs such as
`examples/bpf-rust-noop/`. See https://www.rust-lang.org/install.html for
installation details.
38 changes: 0 additions & 38 deletions web3.js/bin/bpf-sdk-install.sh

This file was deleted.

161 changes: 0 additions & 161 deletions web3.js/bin/localnet.sh

This file was deleted.

10 changes: 0 additions & 10 deletions web3.js/examples/README.md

This file was deleted.

24 changes: 0 additions & 24 deletions web3.js/examples/account.html

This file was deleted.

10 changes: 0 additions & 10 deletions web3.js/examples/account.js

This file was deleted.

1 change: 0 additions & 1 deletion web3.js/examples/bpf-c-noop/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion web3.js/examples/bpf-c-noop/makefile

This file was deleted.

19 changes: 0 additions & 19 deletions web3.js/examples/bpf-c-noop/src/noop/noop.c

This file was deleted.

Loading

0 comments on commit e9b08b5

Please sign in to comment.