general:rust
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
general:rust [2022/11/16 09:36] – sunkan | general:rust [2023/02/21 11:05] (current) – 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 24: | Line 41: | ||
</ | </ | ||
+ | ====== Cross compiling for ARMv7 ====== | ||
+ | Make sure to have the necessary external libraries available if needed. | ||
+ | Example with librrd (and its dependencies) | ||
+ | |||
+ | < | ||
+ | # Needs librrd-dev: | ||
+ | |||
+ | # | ||
+ | #| Status=Not/ | ||
+ | #|/ Err? | ||
+ | #||/ Name | ||
+ | # | ||
+ | #ii librrd-dev: | ||
+ | </ | ||
+ | |||
+ | Then to compile for armv7-unknown-linux-gnueabihf | ||
+ | < | ||
+ | cargo build -r --target armv7-unknown-linux-gnueabihf --config target.armv7-unknown-linux-gnueabihf.linker=\" | ||
+ | </ | ||
====== Rust error handling ====== | ====== Rust error handling ====== |
general/rust.1668591370.txt.gz · Last modified: 2022/11/16 09:36 by sunkan