general:rust
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
general:rust [2022/08/26 10:13] – [Rust guides] sunkan | general:rust [2023/01/06 11:55] – sunkan | ||
---|---|---|---|
Line 9: | Line 9: | ||
* mkdir -p / | * mkdir -p / | ||
* cp -dR --preserve=timestamps rustc-1.XX.X-src/ | * cp -dR --preserve=timestamps rustc-1.XX.X-src/ | ||
+ | |||
+ | ====== Add WASM support ====== | ||
+ | Found good info here [[https:// | ||
+ | |||
+ | < | ||
+ | $ wget https:// | ||
+ | $ wget https:// | ||
+ | $ gpg --verify rust-std-1.66.0-wasm32-unknown-unknown.tar.xz.asc | ||
+ | |||
+ | $ tar xvaf rust-std-1.66.0-wasm32-unknown-unknown.tar.xz | ||
+ | |||
+ | $ rustc --print sysroot | ||
+ | / | ||
+ | |||
+ | # cd rust-std-1.66.0-wasm32-unknown-unknown/ | ||
+ | # cp --preserve=timestamps -R rust-std-wasm32-unknown-unknown/ | ||
+ | </ | ||
====== Compiling Rust code with MSVC ====== | ====== Compiling Rust code with MSVC ====== | ||
Line 38: | Line 55: | ||
====== Rust guides ====== | ====== Rust guides ====== | ||
- | [[http:// | + | [[http:// |
- | [[https:// | + | |
+ | [[https:// | ||
====== Rust memory ====== | ====== Rust memory ====== | ||
[[https:// | [[https:// | ||
+ | |||
+ | ====== Perf and Rust ====== | ||
+ | From [[https:// | ||
+ | The basic perf command is this: | ||
+ | |||
+ | < | ||
+ | perf record -F99 --call-graph dwarf XXX | ||
+ | </ | ||
+ | |||
+ | The -F99 tells perf to sample at 99 Hz, which avoids generating too much data for longer runs (why 99 Hz you ask? It is often chosen because it is unlikely to be in lockstep with other periodic activity). The --call-graph dwarf tells perf to get call-graph information from debuginfo, which is accurate. The XXX is the command you want to profile. So, for example, you might do: | ||
+ |
general/rust.txt · Last modified: 2023/02/21 11:05 by sunkan