Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit

These are small changes related to getting Ruby working with Immix.

**Implemented `get_forwarded_object` for ImmixSpace.** `mmtk-core`
didn't use the `get_forwarded_object` method. In theory, we can let Ruby
support copying GC without that method. The `trace_object` method is
sufficient to forward all fields. However, it feels odd to have that
method exposed as a method of `ObjectReference` but not implemented for
Immix. It is a nice debugging tool. It is also useful during weak
reference processing where the VM wants to forward weak fields, but not
expand the transitive closure.

**Removed an assertion that the plan must be non-moving when scanning
non-moving roots.** Now that we already have object pinning for Immix,
it is no longer relevant.

Git stats


Failed to load latest commit information.

MMTk project chat

MMTk is a framework for the design and implementation of memory managers. This repository hosts the Rust port of MMTk.



We maintain an up to date list of the prerequisite for building MMTk and its bindings in the mmtk-dev-env repository.


MMTk can build with a stable Rust toolchain. The minimal supported Rust version is 1.57.0, and MMTk is tested with 1.59.0.

$ cargo build

MMTk also provides a list of optional features that users can choose from. A full list of available features can be seen by examining Cargo.toml. By passing the --features flag to the Rust compiler, we conditionally compile feature-related code. For example, you can optionally enable sanity checks by adding sanity to the set of features you want to use.

You can pass the --release flag to the cargo build command to use the optimizing compiler of Rust for better performance.

The artefact produced produced by the build process can be found under target/debug (or target/release for the release build). shows the builds tested by the CI.


MMTk does not run standalone. You would need to integrate MMTk with a language implementation. You can either try out one of the VM bindings we have been working on, or implement your own binding in your VM for MMTk. You can also implement your own GC algorithm in MMTk, and run it with supported VMs. You can find up-to-date API documentation for mmtk-core here:

Try out our current bindings

We maintain three VM bindings for MMTk. These bindings are accessible in the following repositories:

For more information on these bindings, please visit their repositories.

Implement your binding

MMTk provides a bi-directional interface with the language VM.

  1. MMTk exposes a set of APIs. The language VM can call into MMTk by using those APIs.
  2. MMTk provides a trait VMBinding that each language VM must implement. MMTk use VMBinding to call into the VM.

To integrate MMTk with your language implementation, you need to provide an implementation of VMBinding, and you can optionally call MMTk's API for your needs.

For more information, you can refer to our porting guide for VM implementors.

Implement your GC

MMTk is a suite of various GC algorithms (known as plans in MMTk). MMTk provides reusable components that make it easy to construct your own GC based on those components. For more information, you can refer to our tutorial for GC implementors.


We use both unit tests and VM binding tests to test MMTk in the CI.

Unit tests

MMTk uses Rust's testing framework for unit tests. For example, you can use the following to run unit tests.

$ cargo test

A full list of all the unit tests we run in our CI can be found here.

VM binding tests

MMTk is also tested with the VM bindings we are maintaining by running standard test/benchmark suites for the VMs. For details, please refer to each VM binding repository.

Contributing to MMTk

Thank you for your interest in contributing to MMTk. We appreciate all the contributors. Generally you can contribute to MMTk by either reporting MMTk bugs you encountered or submitting your patches to MMTk. For details, you can refer to our contribution guidelines.