unsafesc

Crates.iounsafesc
lib.rsunsafesc
version0.0.2
sourcesrc
created_at2018-11-06 05:32:24.034336
updated_at2018-11-14 01:16:15.920045
descriptionA Rust package for running unsafe superpowers in a controlled environment
homepage
repositoryhttps://github.com/realtable/unsafesc
max_upload_size
id94965
size5,545
Josh Quail (realtable)

documentation

README

unsafesc

crates.io travis-ci.com

home https://github.com/realtable/unsafesc
docs https://docs.rs/unsafesc
cargo https://crates.io/crates/unsafesc
build https://travis-ci.com/realtable/unsafesc

Summary

The unsafesc library provides an interface to Rust's four "unsafe superpowers", namely:

  • dereferencing a raw pointer,
  • calling an unsafe function or method,
  • accessing or modifying a mutable static variable, and
  • implementing an unsafe trait

If you were using regular (safe) Rust you wouldn't be able to use any of these unsafe functions because they have been "locked away" by the compiler. Alternatively, unsafe Rust enables them, but you have to make sure all the unsafe code doesn't have any undefined behaviour. You can also only use unsafe code/functions within other unsafe functions.

The unsafesc package provides the best of both worlds, i.e. providing access to unsafe superpowers while taking care of undefined behaviour. It also unlocks these superpowers from implementation within just unsafe functions.

Installation

cargo install unsafesc

Usage

In its current form, unsafesc is a placeholder package. In future its features will all be implemented, but for now there aren't any.

Commit count: 0

cargo fmt