From a136d1cb001d9e3b95ff13547564134a80343e9b Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Tue, 4 Feb 2020 14:44:21 -0500 Subject: [PATCH] add documentation mentions of cranelift-object where appropriate This change makes it slightly more obvious that `cranelift-object` can be used in lieu of `cranelift-faerie`. --- cranelift/docs/index.rst | 5 +++++ cranelift/module/README.md | 3 +++ cranelift/module/src/backend.rs | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cranelift/docs/index.rst b/cranelift/docs/index.rst index 9951f6d9e9..457cd3bacf 100644 --- a/cranelift/docs/index.rst +++ b/cranelift/docs/index.rst @@ -46,6 +46,11 @@ Rust Crate Documentation This crate manages compiling multiple functions and data objects together. +`cranelift-object `_ + This crate provides a object-based backend for `cranelift-module`, which + emits native object files using the + `object `_ library. + `cranelift-faerie `_ This crate provides a faerie-based backend for `cranelift-module`, which emits native object files using the diff --git a/cranelift/module/README.md b/cranelift/module/README.md index 35f973e916..07e7bd998d 100644 --- a/cranelift/module/README.md +++ b/cranelift/module/README.md @@ -13,8 +13,11 @@ following `Backend` implementations: - `SimpleJITBackend`, provided by [cranelift-simplejit], which JITs code to memory for direct execution. + - `ObjectBackend`, provided by [cranelift-object], which emits native + object files. - `FaerieBackend`, provided by [cranelift-faerie], which emits native object files. [cranelift-simplejit]: https://crates.io/crates/cranelift-simplejit +[cranelift-object]: https://crates.io/crates/cranelift-object [cranelift-faerie]: https://crates.io/crates/cranelift-faerie diff --git a/cranelift/module/src/backend.rs b/cranelift/module/src/backend.rs index 89b610bdba..27472d042b 100644 --- a/cranelift/module/src/backend.rs +++ b/cranelift/module/src/backend.rs @@ -17,13 +17,16 @@ use std::string::String; /// A `Backend` implements the functionality needed to support a `Module`. /// -/// Two notable implementations of this trait are: +/// Three 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. +/// - `ObjectBackend`, defined in [cranelift-object], which writes the +/// contents of a `Module` out as a native object file. /// - `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-object]: https://docs.rs/cranelift-object/ /// [cranelift-faerie]: https://docs.rs/cranelift-faerie/ pub trait Backend where