96 releases (43 breaking)

new 0.110.1 Jul 22, 2024
0.108.1 May 22, 2024
0.106.0 Mar 20, 2024
0.103.0 Dec 20, 2023
0.66.0 Jul 16, 2020

#310 in Encoding

Download history 1/week @ 2024-03-26 151/week @ 2024-04-02 214/week @ 2024-04-09 39/week @ 2024-04-16 56/week @ 2024-04-23 122/week @ 2024-04-30 102/week @ 2024-05-07 77/week @ 2024-05-14 179/week @ 2024-05-21 1/week @ 2024-05-28 5/week @ 2024-06-04 125/week @ 2024-06-18 5/week @ 2024-06-25 2/week @ 2024-07-02

132 downloads per month

Apache-2.0 WITH LLVM-exception

4MB
100K 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

~7.5MB
~143K SLoC