91 releases (40 breaking)

new 0.107.1 May 3, 2024
0.106.2 Apr 11, 2024
0.106.0 Mar 20, 2024
0.103.0 Dec 20, 2023
0.66.0 Jul 16, 2020

#534 in Parser implementations

Download history 187/week @ 2024-02-18 388/week @ 2024-02-25 59/week @ 2024-03-03 132/week @ 2024-03-10 112/week @ 2024-03-17 3/week @ 2024-03-24 147/week @ 2024-03-31 206/week @ 2024-04-07 13/week @ 2024-04-14 90/week @ 2024-04-21 85/week @ 2024-04-28

405 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
~136K SLoC