Add more documentation about Module and Backend.

This commit is contained in:
Dan Gohman
2018-09-05 15:19:14 -07:00
parent 437a657899
commit f3c46ad2a2
4 changed files with 28 additions and 2 deletions

View File

@@ -10,6 +10,15 @@ use ModuleNamespace;
use ModuleResult;
/// A `Backend` implements the functionality needed to support a `Module`.
///
/// Two notable implementations of this trait are:
/// - `SimpleJITBackend`, defined in [cranelift-simplejit], which JITs
/// the contents of a `Module` to memory which can be directly executed.
/// - `FaerieBackend`, defined in [cranelift-faerie], which writes the
/// contents of a `Module` out as a native object file.
///
/// [cranelift-simplejit]: https://docs.rs/cranelift-simplejit/
/// [cranelift-faerie]: https://docs.rs/cranelift-faerie/
pub trait Backend
where
Self: marker::Sized,