mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
add platform tip
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
This commit is contained in:
parent
034d149b3a
commit
65ff29faa3
1 changed files with 1 additions and 0 deletions
|
|
@ -48,6 +48,7 @@ Execute `cargo fmt --all` to fix the formatting.
|
|||
- Use a debug build of the compiler. We have many asserts enabled in the debug compiler that can alert you to something going wrong. When building from source, build the debug compiler with `cargo build --bin roc`, the binary is at roc/target/debug/roc. When using roc through a nix flake like in [basic-cli](https://github.com/roc-lang/basic-cli), use `rocPkgs.cli-debug` instead of `rocPkgs.cli`.
|
||||
- At the bottom of [.cargo/config.toml](https://github.com/roc-lang/roc/blob/main/.cargo/config.toml) we have useful debug flags that activate certain debug prints.
|
||||
- For Roc code; minimize the code that produces the issue.
|
||||
- If you plan to look at the data used and produced inside the compiler, try to reproduce your issue with a very simple platform like our [minimal Rust platform](https://github.com/roc-lang/roc/tree/main/examples/platform-switching/rust-platform) instead of for example basic-cli.
|
||||
- For segmentation faults:
|
||||
+ In general we recommend using linux to investigate, it has better tools for this.
|
||||
+ Use `roc build myApp.roc --linker=legacy` followed by `valgrind ./myApp`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue