150 releases (93 breaking)

new 0.108.1 May 22, 2024
0.107.2 May 7, 2024
0.106.0 Mar 20, 2024
0.103.0 Dec 20, 2023
0.17.0 Jul 24, 2018

#40 in No standard library

Download history 4204/week @ 2024-01-31 6753/week @ 2024-02-07 7053/week @ 2024-02-14 6318/week @ 2024-02-21 6214/week @ 2024-02-28 7423/week @ 2024-03-06 7416/week @ 2024-03-13 7368/week @ 2024-03-20 6527/week @ 2024-03-27 6951/week @ 2024-04-03 6608/week @ 2024-04-10 6281/week @ 2024-04-17 6101/week @ 2024-04-24 5799/week @ 2024-05-01 5857/week @ 2024-05-08 4257/week @ 2024-05-15

22,944 downloads per month
Used in 46 crates (35 directly)

Apache-2.0 WITH LLVM-exception

4MB
97K SLoC

This crate provides module-level functionality, which allow multiple functions and data to be emitted with Cranelift and then linked together.

This crate is structured as an optional layer on top of cranelift-codegen. It provides additional functionality, such as linking, however users that require greater flexibility don't need to use it.

A module is a collection of functions and data objects that are linked together. The Module trait that defines a common interface for various kinds of modules. Most users will use one of the following Module implementations:

  • JITModule, provided by cranelift-jit, which JITs code to memory for direct execution.
  • ObjectModule, provided by cranelift-object, which emits native object files.

lib.rs:

Top-level lib.rs for cranelift_module.

Dependencies

~5MB
~89K SLoC