Xianqiao Wang

Xianqiao Wang

Some records of life and study

  • Home

Rust unsafe

https://rustwiki.org/zh-CN/rust-by-example/unsafe.html

不安全代码块主要用于四件事情:
  • 解引用裸指针
  • 通过 FFI 调用函数(这已经在之前的章节介绍过了)
  • 调用不安全的函数
  • 内联汇编(inline assembly)


Published by Xianqiao Wang on December 24th, 2019

  • Rust
  • RSS

© 2025 Xianqiao's Site.

Design by Fabien Penso. Powered by Postach.io