8000 GitHub - sarvex/rust-memory-model at 765ae3682b0b787923f489f25cce1c191fdd1c62
[go: up one dir, main page]

Skip to content

Collecting examples and information to help design a memory model for Rust.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

sarvex/rust-memory-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

This repository is intended to help us develop a coherent and clear "memory model" for Rust. The goal of a memory model specifically is to define:

  • what kinds of aliasing and accesses unsafe code can perform;
  • what kinds of transformations and optimizations the compiler can do.

This in turn implies the kinds of things that unsafe code can rely on.

We're still in the 'data gathering' stage of this effort. Therefore, this repository currently consists of a series of examples scraped from various comment threads. Each example is defined by a markdown file based on template.md. These examples are broken into two categories:

  • litmus_tests -- bits of unsafe code that someone might write; eventually, we may decide that some of these bits of unsafe code are illegal and hence might trigger undefined behavior.
  • optimizations -- transformations the compiler might want to perform; eventually, we may decide that some of these bits of unsafe code are illegal and hence the compiler could not do them.

Naturally these two things are in tension. That is, the more optimizations the compiler can do, the fewer litmus tests will be legal. Eventually, it would be nice to have a chart indicating which tests are in conflict with which optimizations.

About

Collecting examples and information to help design a memory model for Rust.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0