diff --git a/lib/llvm-backend/src/intrinsics.rs b/lib/llvm-backend/src/intrinsics.rs index f4a48ad60..52f88cfc6 100644 --- a/lib/llvm-backend/src/intrinsics.rs +++ b/lib/llvm-backend/src/intrinsics.rs @@ -1,3 +1,8 @@ +//! Code for dealing with LLVM and VM intrinsics. +//! +//! Intrinsics are built-in operations. LLVM intrinsics are used to precisely +//! compute values. VM intrinsics are used to interact with the host VM. + use inkwell::{ attributes::{Attribute, AttributeLoc}, builder::Builder, @@ -34,6 +39,7 @@ fn type_to_llvm_ptr<'ctx>(intrinsics: &Intrinsics<'ctx>, ty: Type) -> PointerTyp } } +/// Struct containing LLVM and VM intrinsics. pub struct Intrinsics<'ctx> { pub ctlz_i32: FunctionValue<'ctx>, pub ctlz_i64: FunctionValue<'ctx>, @@ -151,6 +157,7 @@ pub struct Intrinsics<'ctx> { } impl<'ctx> Intrinsics<'ctx> { + /// Create an [`Intrinsics`] for the given [`Context`]. pub fn declare(module: &Module<'ctx>, context: &'ctx Context) -> Self { let void_ty = context.void_type(); let i1_ty = context.bool_type(); diff --git a/lib/runtime/src/lib.rs b/lib/runtime/src/lib.rs index b26dc50e9..6a3ad1981 100644 --- a/lib/runtime/src/lib.rs +++ b/lib/runtime/src/lib.rs @@ -78,7 +78,7 @@ //! //! # Additional Notes: //! -//! The `wasmer-runtime` is build to support compiler multiple backends. +//! `wasmer-runtime` is built to support multiple compiler backends. //! Currently, we support the Singlepass, [Cranelift], and LLVM compilers //! with the [`wasmer-singlepass-backend`], [`wasmer-clif-backend`], and //! wasmer-llvm-backend crates, respectively. @@ -145,7 +145,7 @@ pub mod units { } pub mod types { - //! Various types. + //! Types used in the Wasm runtime and conversion functions. pub use wasmer_runtime_core::types::*; }