Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Update README to document common feature flags for providers (websock… #1493

Merged
merged 3 commits into from
Jul 24, 2022
Merged
Changes from all 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
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,45 @@ in the transactions which are fetched over JSON-RPC.
- [ ] FFI Bindings (see note)
- [ ] CLI for common operations

### Websockets

Websockets support is turned on via the feature-flag `ws`:

```toml
[dependencies]

ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["ws"] }
```

### Interprocess Communication (IPC)

IPC support is turned on via the feature-flag `ipc`:

```toml
[dependencies]

ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["ipc"] }
```

### HTTP Secure (HTTPS)

If you are looking to connect to a HTTPS endpoint, then you need to enable the `rustls` or `openssl` feature.
feature-flags.

To enable `rustls`:
```toml
[dependencies]

ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["rustls"] }
```

To enable `openssl`:
```toml
[dependencies]

ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["openssl"] }
```

## Note on WASM and FFI bindings

You should be able to build a wasm app that uses ethers-rs (see the [example](./examples/ethers-wasm) for reference). If ethers fails to
Expand Down