Skip to content

Commit 423269c

Browse files
committed
Text improvements
1 parent a04721f commit 423269c

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

docs/background/lang-comparison.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -181,22 +181,22 @@ and a single mismatched byte can cause the call to fail silently.
181181

182182
## Comparison Table
183183

184-
| | ink! | Pure Rust | Solidity |
185-
|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|-------------------------------------------------------|
186-
| **Language** | Rust (safe, statically typed) with ink! macros for higher-level abstractions | Rust (no macros or framework) | Solidity (purpose-built for smart contracts) |
187-
| **Safety Model** | Rust guarantees (ownership, no nulls, memory safety, …) | Rust safety, but high bug risk due to DIY framework (e.g. for storage interactions) | Manual safety patterns; reentrancy common |
188-
| **Tooling** | `cargo-contract`, [ink! analyzer](https://marketplace.visualstudio.com/items?itemName=ink-analyzer.ink-analyzer), [`pop-cli`](https://github.com/r0gue-io/pop-cli), [phink!](https://github.com/srlabs/phink), … | None | Hardhat, Foundry, Truffle, Remix |
189-
| **UI frameworks** | [ink!athon](https://inkathon.xyz/), dedot, PAPI, [Typink](/tutorials/frontend-development/typink-erc20), polkadot-js, … | None | Very mature Web3 ecosystem: ethers.js, wagmi, web3.js |
190-
| **Documentation** | Extensive, verbose docs on https://use.ink/docs/v6, crate-level docs on e.g. https://docs.rs/ink_env/6.0.0-beta.1/ink_env/ | None | Widely available |
191-
| **Polkadot SDK Integration** | Native support for typical `polkadot-sdk` types (`Balance`, `AccountId`, `VersionedXcm`, etc.) | None | None |
192-
| **Developer Ergonomics** | High: macros for storage, events, traits, testing | Very low: everything must be implemented manually | Extensive tooling & IDE support |
193-
| **Testing Environments** | Elaborate End-to-End testing framework | Must implement your own test harness | Foundry/Hardhat; very mature |
194-
| **Contract Model** | Function-based message/constructor model | No model provided; must implement dispatch & ABI | Function-based ABI, msg.sender model |
195-
| **Datastructures** | High-level datastructures, optimized for smart contracts (small footprint, lazy loading) | None | Basic mappings, arrays, structs |
196-
| **Storage Handling** | [`ink::storage`](https://docs.rs/ink_storage/6.0.0-beta.1/ink_storage/), `[`Mapping`](../datastructures/mapping/)`, derive macros for layout and codecs | Manual storage layout + serialization | Solidity storage keywords & slot model |
197-
| **ABI / Metadata** | Supports ink! metadata (SCALE-based) + Solidity ABI | Fully manual ABI definitions | Native ABI; industry standard |
198-
| **Cross-Contract Calls** | Rust traits as type-safe interfaces for calling Solidity or ink! contracts | Manual SCALE (or other) encoding/decoding, not type-safe | Built into EVM |
199-
| **Contract Verification** | Supported through ink! metadata and tooling; verifiable via Docker container | No support, must build verification tooling manually | Etherscan-style source verification |
200-
| **Zero Knowledge** | Can integrate with Polkadot-native ZK primitives at the Rust level ([example](https://github.com/use-ink/ink-examples/tree/main/zk-cross-contract-calls-solidity-verifiers)) | Possible, but fully manual | Growing zkEVM ecosystem |
201-
| **Productivity** | High | Highest flexibility, lowest productivity | High |
202-
| **Recommended Use Case** | Polkadot smart contracts | Highly efficient low-level contracts (e.g. for isolated business logic parts) | EVM-chain smart contracts, L1/L2 ecosystems |
184+
| | ink! | Pure Rust | Solidity |
185+
|------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|-------------------------------------------------------|
186+
| **Language** | Rust (safe, statically typed) with ink! macros for higher-level abstractions | Rust (no macros or framework) | Solidity (purpose-built for smart contracts) |
187+
| **Safety Model** | Rust guarantees (ownership, no nulls, memory safety, …) | Rust safety, but high bug risk due to DIY framework (e.g. for storage interactions) | Manual safety patterns; reentrancy common |
188+
| **Tooling** | `cargo-contract`, [ink! analyzer](https://marketplace.visualstudio.com/items?itemName=ink-analyzer.ink-analyzer), [`pop-cli`](https://github.com/r0gue-io/pop-cli), [phink!](https://github.com/srlabs/phink), … | None | Hardhat, Foundry, Truffle, Remix |
189+
| **UI frameworks** | [ink!athon](https://inkathon.xyz/), dedot, PAPI, [Typink](/tutorials/frontend-development/typink-erc20), polkadot-js, … | None | Very mature Web3 ecosystem: ethers.js, wagmi, web3.js |
190+
| **Documentation** | Extensive, verbose docs on [use.ink/docs](https://use.ink/docs), crate-level docs for all crates ([`ink_env`](https://docs.rs/ink_env/6.0.0-beta.1/ink_env/), [`ink_storage`](https://docs.rs/ink_env/6.0.0-beta.1/ink_storage/), …) | None | Widely available |
191+
| **Polkadot SDK Integration** | Native support for typical `polkadot-sdk` types (`Balance`, `AccountId`, `VersionedXcm`, etc.) | None | None |
192+
| **Developer Ergonomics** | High: macros for storage, events, traits, testing | Very low: everything must be implemented manually | Extensive tooling & IDE support |
193+
| **Testing Environments** | Elaborate End-to-End testing framework | Must implement your own test harness | Foundry/Hardhat; very mature |
194+
| **Contract Model** | Function-based message/constructor model | No model provided; must implement dispatch & ABI | Function-based ABI, msg.sender model |
195+
| **Datastructures** | High-level datastructures, optimized for smart contracts (small footprint, lazy loading) | None | Basic mappings, arrays, structs |
196+
| **Storage Handling** | [`ink::storage`](https://docs.rs/ink_storage/6.0.0-beta.1/ink_storage/), [`Mapping`](../datastructures/mapping/)`, derive macros for layout and codecs | Manual storage layout + serialization | Solidity storage keywords & slot model |
197+
| **ABI / Metadata** | Supports ink! metadata (SCALE-based) + Solidity ABI | Fully manual ABI definitions | Native ABI; industry standard |
198+
| **Cross-Contract Calls** | Rust traits as type-safe interfaces for calling Solidity or ink! contracts | Manual SCALE (or other) encoding/decoding, not type-safe | Built into EVM |
199+
| **Contract Verification** | Supported through ink! metadata and tooling; verifiable via Docker container | No support, must build verification tooling manually | Etherscan-style source verification |
200+
| **Zero Knowledge** | Can integrate with Polkadot-native ZK primitives at the Rust level ([example](https://github.com/use-ink/ink-examples/tree/main/zk-cross-contract-calls-solidity-verifiers)) | Possible, but fully manual | Growing zkEVM ecosystem |
201+
| **Productivity** | High | Highest flexibility, lowest productivity | High |
202+
| **Recommended Use Case** | Polkadot smart contracts | Highly efficient low-level contracts (e.g. for isolated business logic parts) | EVM-chain smart contracts, L1/L2 ecosystems |

0 commit comments

Comments
 (0)