110 releases (47 breaking)

0.114.0 Nov 20, 2024
0.113.0 Oct 22, 2024
0.110.1 Jul 22, 2024
0.106.0 Mar 20, 2024
0.66.0 Jul 16, 2020

#452 in Encoding

Download history 127/week @ 2024-08-17 9/week @ 2024-08-24 75/week @ 2024-09-14 215/week @ 2024-09-21 33/week @ 2024-09-28 468/week @ 2024-10-05 193/week @ 2024-10-12 135/week @ 2024-10-19 11/week @ 2024-10-26 378/week @ 2024-11-02 33/week @ 2024-11-09 122/week @ 2024-11-16 27/week @ 2024-11-23 3/week @ 2024-11-30

229 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.5–7.5MB
~134K SLoC