minirust
A precise specification for "Rust lite / MIR plus"
File Explorer
Download Latest Version (.zip)- ci.yml
- expressions.md
- intrinsics.md
- locks.md
- operators.md
- statements.md
- terminators.md
- machine.md
- prelude.md
- representation.md
- syntax.md
- types.md
- values.md
- well-formed.md
- memory.md
- reborrow_settings.md
- state_machine.md
- state_machine_protected.md
- state_machine_unprotected.md
- tree.md
- basic.md
- concurrent.md
- interface.md
- intptrcast.md
- pointer.md
- prelude.md
- main.md
- target.md
- lib.rs
- Cargo.toml
- bb.rs
- chunks.rs
- constant.rs
- enums.rs
- function.rs
- main.rs
- program.rs
- rvalue.rs
- sysroot.rs
- ty.rs
- vtable.rs
- main.rs
- Cargo.lock
- Cargo.toml
- array_out_of_bounds.rs
- array_out_of_bounds.stderr
- assert.rs
- assert.stderr
- catch_unwind_abort.rs
- catch_unwind_abort.stderr
- catch_unwind_abort.stdout
- slice_out_of_bounds.rs
- slice_out_of_bounds.stderr
- struct_abort.rs
- struct_abort.stderr
- struct_abort.stdout
- struct_unwind.rs
- struct_unwind.stderr
- struct_unwind.stdout
- box-non-unpin.rs
- cell_inside_slice.rs
- cell_inside_slice_lazy_write_to_surrounding.rs
- cell_inside_struct.rs
- cell_lazy_write_to_surrounding.rs
- deallocate_interior_mut_protector.rs
- deallocate_zero_sized_protector.rs
- end_of_protector.rs
- no_implicit_writes.rs
- non_accessed_protector.rs
- protector_end_access_special_cases.rs
- rustc_no_writable_on_as_mut_ptr.rs
- sb_fails.rs
- spurious_read.rs
- transmute_unsafecell.rs
- tree_borrows.rs
- two_phase_interior_mut.rs
- zero_sized_cell_lazy_write_to_surrounding.rs
- align.rs
- align.stdout
- align_of_val.rs
- array.rs
- array.stdout
- atomic.rs
- atomic.stdout
- bool.rs
- calls.rs
- calls.stdout
- casts.rs
- casts.stdout
- catch_unwind.rs
- catch_unwind.stdout
- closure.rs
- closure_iterator_combinator.rs
- const.rs
- const_gap.rs
- const_gap.stdout
- drop.rs
- drop.stdout
- enum_direct_tag.rs
- enum_niche_tag.rs
- enums.rs
- exit.rs
- fn_def.rs
- fn_ptr.rs
- generic_promoted.rs
- generic_promoted.stdout
- generics.rs
- generics.stdout
- i64.rs
- i64.stdout
- if.rs
- if.stdout
- intrinsic_alloc_dealloc.rs
- intrinsic_alloc_dealloc.stdout
- iter.rs
- let_underscore_place_mention.rs
- locks.rs
- locks.stdout
- match.rs
- match.stdout
- mut_static.rs
- mut_static.stdout
- never.rs
- no_provenance_zero_sized.rs
- nullary_op.rs
- ops.rs
- overflow.rs
- overflow.stdout
- packed.rs
- packed.stdout
- ptr.rs
- ref.rs
- ref.stdout
- ref_mut.rs
- ref_mut.stdout
- relocation.rs
- relocation.stdout
- relocation2.rs
- relocation2.stdout
- repeat.rs
- repeat.stdout
- scalar_tuple.rs
- scalar_tuple.stdout
- size_of_val.rs
- slice.rs
- small_arrays.rs
- small_arrays.stdout
- spawn.rs
- spawn.stdout
- static.rs
- stderr.rs
- stderr.stderr
- stdlib_mir.rs
- stdout.rs
- stdout.stdout
- str.rs
- struct.rs
- struct.stdout
- trait.rs
- trait_object.rs
- trivial_generic.rs
- tuples.rs
- tuples.stdout
- union.rs
- union.stdout
- zero_size_access.rs
- zst.rs
- cell_inside_slice.rs
- cell_inside_slice.stderr
- cell_inside_struct.rs
- cell_inside_struct.stderr
- lazy_write_to_surrounding.rs
- lazy_write_to_surrounding.stderr
- mutable_ref_child_read_disabled.rs
- mutable_ref_child_read_disabled.stderr
- mutable_ref_child_write_disabled.rs
- mutable_ref_child_write_disabled.stderr
- mutable_ref_child_write_frozen.rs
- mutable_ref_child_write_frozen.stderr
- no_provenance_non_zero_sized.rs
- no_provenance_non_zero_sized.stderr
- offset_access_child_read_disabled.rs
- offset_access_child_read_disabled.stderr
- offset_access_child_write_disabled.rs
- offset_access_child_write_disabled.stderr
- offset_access_child_write_frozen.rs
- offset_access_child_write_frozen.stderr
- overlap_access_child_read_disabled.rs
- overlap_access_child_read_disabled.stderr
- overlap_access_child_write_disabled.rs
- overlap_access_child_write_disabled.stderr
- shared_ref_child_read_disabled.rs
- shared_ref_child_read_disabled.stderr
- as_mut_ptr.rs
- as_mut_ptr.stderr
- fnentry_invalidation.rs
- fnentry_invalidation.stderr
- ptr_write.rs
- ptr_write.stderr
- ptr_write_box.rs
- ptr_write_box.stderr
- ptr_write_unsafe_cell.rs
- ptr_write_unsafe_cell.stderr
- static_memory_modification.rs
- static_memory_modification.stderr
- child_write_conflicted_reserved.rs
- child_write_conflicted_reserved.stderr
- deallocate_strong_protector.rs
- deallocate_strong_protector.stderr
- foreign_read_active.rs
- foreign_read_active.stderr
- foreign_write_active.rs
- foreign_write_active.stderr
- foreign_write_frozen.rs
- foreign_write_frozen.stderr
- foreign_write_reserved.rs
- foreign_write_reserved.stderr
- non_accessed_conflicted_reserved.rs
- non_accessed_conflicted_reserved.stderr
- protector_end_read.rs
- protector_end_read.stderr
- protector_end_write.rs
- protector_end_write.stderr
- reservedim_spurious_write.rs
- reservedim_spurious_write.with.stderr
- reservedim_spurious_write.without.stderr
- zero_size.rs
- zero_size.stderr
- assume.rs
- assume.stderr
- catch_unwind.rs
- catch_unwind.stderr
- dangling_vtable.rs
- dangling_vtable.stderr
- deref_dangling_ref.rs
- deref_dangling_ref.stderr
- deref_null_ref.rs
- deref_null_ref.stderr
- deref_unaligned_ref.rs
- deref_unaligned_ref.stderr
- destroy_prov.rs
- destroy_prov.stderr
- div_by_zero.rs
- div_by_zero.stderr
- enum_mark_used_bytes.rs
- enum_mark_used_bytes.stderr
- enum_niche_discriminant.rs
- enum_niche_discriminant.stderr
- enum_ub_discriminant.rs
- enum_ub_discriminant.stderr
- inv_bool.rs
- inv_bool.stderr
- let_underscore_place_mention.rs
- let_underscore_place_mention.stderr
- nullptr.rs
- nullptr.stderr
- ptr_add_overflow.rs
- ptr_add_overflow.stderr
- ptr_byte_order_matters.rs
- ptr_byte_order_matters.stderr
- ptr_offset_from_unsigned.rs
- ptr_offset_from_unsigned.stderr
- ptr_offset_not_multiple.rs
- ptr_offset_not_multiple.stderr
- return_ref_to_local.rs
- return_ref_to_local.stderr
- slice_dangling.rs
- slice_dangling.stderr
- unaligned.rs
- unaligned.stderr
- unaligned_zst.rs
- unaligned_zst.stderr
- wrong_vtable.rs
- wrong_vtable.stderr
- rust.sh
- ui.rs
- Cargo.toml
- cov.sh
- main.rs
- Cargo.toml
- abort.rs
- align.rs
- assume.rs
- atomic.rs
- atomic_fetch.rs
- blocks.rs
- bool.rs
- builder_api.rs
- call.rs
- calling_convention.rs
- catch_unwind.rs
- compare_exchange.rs
- compute_align.rs
- compute_size.rs
- concurrency.rs
- data_race.rs
- dereferenceable.rs
- enum_discriminant.rs
- enum_downcast.rs
- enum_representation.rs
- expose.rs
- heap_intrinsics.rs
- ill_formed.rs
- int.rs
- locals.rs
- locks.rs
- main.rs
- mod.rs
- negative_index.rs
- no_preserve_padding.rs
- no_preserve_prov.rs
- null.rs
- packed.rs
- place_mention.rs
- print.rs
- ptr.rs
- ptr_offset.rs
- ptr_offset_from.rs
- raw_eq.rs
- return_.rs
- slice.rs
- spawn_join.rs
- switch.rs
- too_large_alloc.rs
- trait_object.rs
- uninit_read.rs
- unreachable.rs
- unsized_struct.rs
- unwind_payload.rs
- unwinding.rs
- wide_ptr.rs
- zst.rs
- lib.rs
- Cargo.toml
- cov.sh
- README.md
- expr.rs
- function.rs
- global.rs
- mod.rs
- statement.rs
- terminator.rs
- ty.rs
- ty_conv.rs
- expr.rs
- function.rs
- global.rs
- mod.rs
- ty.rs
- vtables.rs
- cli.rs
- json.rs
- lib.rs
- mock_write.rs
- run.rs
- Cargo.toml
- README.md
- Cargo.lock
- Cargo.toml
- README.md
- rustfmt.toml
- .gitignore
- LICENSE-APACHE
- LICENSE-MIT
- mini
- README.md
- rust-toolchain.toml
- specr.toml
# Installation Guide
1. Get the code
git clone https://github.com/minirust/minirust
Downloads the entire project code from GitHub to your computer.
cd minirust
Moves into the project folder you just downloaded.
2. Rust
Medium RecommendedPrerequisites
- Git Needed to download the project code from GitHub.
- Rust (rustup) Installing via rustup also installs cargo.
cd tooling
This project's files live in a subfolder, so move into it first.
cargo build --release
Compiles the Rust project.
cargo run
Builds and then immediately runs the program.
If cargo build finishes without errors, it worked. The executable is created under target/.
// repository documentation
Was this content helpful?
(0 ratings)
