36 releases (21 breaking)

Uses new Rust 2021

new 0.88.1 Sep 26, 2022
0.87.1 Aug 31, 2022
0.86.1 Jul 21, 2022
0.82.2 Mar 31, 2022
0.66.0 Jul 16, 2020

#731 in WebAssembly

Download history 133/week @ 2022-06-05 2/week @ 2022-06-12 21/week @ 2022-06-19 29/week @ 2022-06-26 32/week @ 2022-07-03 56/week @ 2022-07-10 111/week @ 2022-07-17 96/week @ 2022-07-24 105/week @ 2022-07-31 6/week @ 2022-08-07 1/week @ 2022-08-14 75/week @ 2022-08-21 16/week @ 2022-08-28 73/week @ 2022-09-04 37/week @ 2022-09-11 24/week @ 2022-09-18

150 downloads per month

Apache-2.0 WITH LLVM-exception

3.5MB
85K 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

~4.5MB
~89K SLoC