112 releases (48 breaking)

new 0.115.1 Jan 14, 2025
0.115.0 Dec 20, 2024
0.114.0 Nov 20, 2024
0.110.1 Jul 22, 2024
0.66.0 Jul 16, 2020

#448 in Encoding

Download history 51/week @ 2024-09-26 276/week @ 2024-10-03 362/week @ 2024-10-10 145/week @ 2024-10-17 28/week @ 2024-10-24 291/week @ 2024-10-31 119/week @ 2024-11-07 74/week @ 2024-11-14 73/week @ 2024-11-21 6/week @ 2024-11-28 112/week @ 2024-12-19 2/week @ 2024-12-26 1/week @ 2025-01-02 57/week @ 2025-01-09

172 downloads per month

Apache-2.0 WITH LLVM-exception

4.5MB
104K SLoC

This crate performs serialization of the Cranelift IR.

This crate is structured as an optional ability to serialize and deserialize cranelift IR into JSON format.

Status

Cranelift IR can be serialized into JSON.

Deserialize is a work in progress, as it currently deserializes into the serializable data structure that can be utilized by serde instead of the actual Cranelift IR data structure.

Building and Using Cranelift Serde

clif-json usage:

clif-json serialize [-p] <file>
clif-json deserialize <file>

Where the -p flag outputs Cranelift IR as pretty JSON.

For example to build and use clif-json:

cd cranelift-serde
cargo build
clif-json serialize -p test.clif

Dependencies

~5–6.5MB
~125K SLoC