92 releases (40 breaking)

new 0.107.2 May 7, 2024
0.107.0 Apr 22, 2024
0.106.0 Mar 20, 2024
0.103.0 Dec 20, 2023
0.66.0 Jul 16, 2020

#260 in Encoding

Download history 191/week @ 2024-02-19 431/week @ 2024-02-26 14/week @ 2024-03-04 132/week @ 2024-03-11 113/week @ 2024-03-18 150/week @ 2024-04-01 216/week @ 2024-04-08 94/week @ 2024-04-22 121/week @ 2024-04-29 104/week @ 2024-05-06

332 downloads per month

Apache-2.0 WITH LLVM-exception

4.5MB
102K 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

~7MB
~133K SLoC