docs: add note about wasm and ffi to readme (#607)

* docs: add note about wasm and ffi to readme

* Apply suggestions from code review

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
James Prestwich 2021-11-22 10:24:48 -08:00 committed by GitHub
parent 1d65c9394f
commit 63475cb462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 4 deletions

View File

@ -30,6 +30,7 @@ ethers = { git = "https://github.com/gakonst/ethers-rs" }
## Running the tests ## Running the tests
Tests require the following installed: Tests require the following installed:
1. [`solc`](https://solidity.readthedocs.io/en/latest/installing-solidity.html). We also recommend using [solc-select](https://github.com/crytic/solc-select) for more flexibility. 1. [`solc`](https://solidity.readthedocs.io/en/latest/installing-solidity.html). We also recommend using [solc-select](https://github.com/crytic/solc-select) for more flexibility.
2. [`ganache-cli`](https://github.com/trufflesuite/ganache-cli#installation) 2. [`ganache-cli`](https://github.com/trufflesuite/ganache-cli#installation)
@ -61,6 +62,7 @@ ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["celo"] }
``` ```
Celo's transactions differ from Ethereum transactions by including 3 new fields: Celo's transactions differ from Ethereum transactions by including 3 new fields:
- `fee_currency`: The currency fees are paid in (None for CELO, otherwise it's an Address) - `fee_currency`: The currency fees are paid in (None for CELO, otherwise it's an Address)
- `gateway_fee_recipient`: The address of the fee recipient (None for no gateway fee paid) - `gateway_fee_recipient`: The address of the fee recipient (None for no gateway fee paid)
- `gateway_fee`: Gateway fee amount (None for no gateway fee paid) - `gateway_fee`: Gateway fee amount (None for no gateway fee paid)
@ -81,10 +83,25 @@ in the transactions which are fetched over JSON-RPC.
- [x] Hardware Wallet Support - [x] Hardware Wallet Support
- [x] Parity APIs (`tracing`, `parity_blockWithReceipts`) - [x] Parity APIs (`tracing`, `parity_blockWithReceipts`)
- [x] Geth TxPool API - [x] Geth TxPool API
- [ ] WASM Bindings - [ ] WASM Bindings (see note)
- [ ] FFI Bindings - [ ] FFI Bindings (see note)
- [ ] CLI for common operations - [ ] CLI for common operations
## 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
compile in WASM, please
[open an issue](https://github.com/gakonst/ethers-rs/issues/new/choose).
There is currently no plan to provide an official JS/TS-accessible library
interface. we believe [ethers.js](https://docs.ethers.io/v5/) serves that need
very well.
Similarly, you should be able to build FFI bindings to ethers-rs. If ethers
fails to compile in c lib formats, please
[open an issue](https://github.com/gakonst/ethers-rs/issues/new/choose).
There is currently no plan to provide official FFI bindings, and as ethers-rs is
not yet stable 1.0.0, its interface may change significantly between versions.
## Getting Help ## Getting Help
First, see if the answer to your question can be found in the [API documentation](https://docs.rs/ethers). If the answer First, see if the answer to your question can be found in the [API documentation](https://docs.rs/ethers). If the answer
@ -105,6 +122,7 @@ issues itself: `cargo +nightly clippy --fix -Z unstable-options`
## Related Projects ## Related Projects
This library would not have been possibly without the great work done in: This library would not have been possibly without the great work done in:
- [`ethers.js`](https://github.com/ethers-io/ethers.js/) - [`ethers.js`](https://github.com/ethers-io/ethers.js/)
- [`rust-web3`](https://github.com/tomusdrw/rust-web3/) - [`rust-web3`](https://github.com/tomusdrw/rust-web3/)
- [`ethcontract-rs`](https://github.com/gnosis/ethcontract-rs/) - [`ethcontract-rs`](https://github.com/gnosis/ethcontract-rs/)