astd 0.0.1

A drop-in replacement for std in no-std environments, with full abseil backend.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![allow(stable_features)]
#![feature(volatile)]

use std::ptr::{read_volatile, write_volatile};

#[test]
fn volatile_fat_ptr() {
    let mut x: &'static str = "test";
    unsafe {
        let a = read_volatile(&x);
        assert_eq!(a, "test");
        write_volatile(&mut x, "foo");
        assert_eq!(x, "foo");
    }
}