mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-18 22:11:02 +00:00
small docs fixes (#426)
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
@@ -45,7 +45,7 @@ Unlike with the EVM, where heap memory usage is gas metered, our heap size is st
|
||||
|
||||
LLVM is a special non Rust dependency. We interface its builder interface via the [inkwell](https://crates.io/crates/inkwell) wrapper crate.
|
||||
|
||||
We use upstream LLVM, but release and use our custom builds. We require the compiler builtins specifically built for the PVM rv64e target and always leave assertions on. Furthermore, we need cross builds because `resolc` itself targets emscripten and musl. The [revive-llvm-builer](https://crates.io/crates/revive-llvm-builder) functions as a cross-platform build script and is used to build and release the LLVM dependency.
|
||||
We use upstream LLVM, but release and use our custom builds. We require the compiler builtins specifically built for the PVM `rv64emacb` target and always leave assertions on. Furthermore, we need cross builds because `resolc` itself targets emscripten and musl. The [revive-llvm-builer](https://crates.io/crates/revive-llvm-builder) functions as a cross-platform build script and is used to build and release the LLVM dependency.
|
||||
|
||||
We also maintain the [lld-sys crate](https://crates.io/crates/lld-sys) for interfacing with `LLD`. The LLVM linker is used during the compilation process, but we don't want to distribute another binary.
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Valid levels are the following:
|
||||
- `s`: Optimize for code size.
|
||||
- `z`: Aggressively optimize for code size.
|
||||
|
||||
By default, `-O3` is applied.
|
||||
By default, `-Oz` is applied.
|
||||
|
||||
### Stack size
|
||||
```bash
|
||||
@@ -31,11 +31,11 @@ By default, `-O3` is applied.
|
||||
PVM is a register machine with a traditional stack memory space for local variables. This controls the total amount of stack space the contract can use.
|
||||
|
||||
You are incentivized to keep this value as small as possible:
|
||||
1. Increasing the stack size will increase startup costs.
|
||||
1. Increasing the stack size will increase gas costs due to increased startup costs.
|
||||
2. The stack size contributes to the total memory size a contract can use, which includes the contract's code size.
|
||||
|
||||
Default value: 32768
|
||||
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> If the contract uses more stack memory than configured, it will compile fine but eventually revert execution at runtime!
|
||||
@@ -52,7 +52,7 @@ You are incentivized to keep this value as small as possible:
|
||||
2.The heap size contributes to the total memory size a contract can use, which includes the contract's code size
|
||||
|
||||
Default value: 65536
|
||||
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> If the contract uses more heap memory than configured, it will compile fine but eventually revert execution at runtime!
|
||||
|
||||
Reference in New Issue
Block a user