FINSENTY54

几处早莺争暖树,谁家新燕啄春泥。

0%

gcc ARM内联汇编 与 预处理

预处理

define 编译预处理时,对程序中所有出现的“宏名”,都用宏定义中的字符串去代换

#开头都是预编译指令

阅读全文 »

UPX

upx == 加壳?
代码压缩器,执行时解码后运行
PS .\upx.exe -1 -o notepad_upx.exe D:\RCE\notepad.exe

阅读全文 »

Result<T, E>

Rust doesn’t have exceptions. Instead, it has the type Result<T, E> for recoverable errors and the panic! macro that stops execution when the program encounters an unrecoverable error.

When the panic! macro executes, your program will print a failure message, unwind and clean up the stack, and then quit.

阅读全文 »

Debug

The Debug trait enables us to print our struct in a way that is useful for developers so we can see its value while we’re debugging our code.

阅读全文 »

rust

All data stored on the stack must have a known, fixed size. Data with an unknown size at compile time or a size that might change must be stored on the heap instead.

Pushing to the stack is faster than allocating on the heap because the allocator never has to search for a place to store new data;

阅读全文 »

运行命令

cargo doc --open
rustup doc
cargo new --vcs=git
cargo build
cargo run
cargo check 更快编译,但不生成可执行文件
cargo build --release 生成的执行文件运行更快
benchmark基准测试

阅读全文 »