Files
wasmtime/lib/serde
Caroline Cullen 65a1a6bb28 Add serde functionality into lib. (#422)
* Adds decoration to the verifier errors.

example:

function %bad(i32) fast {
ebb0(v0: i32):
    brnz.i32 v0, ebb1
    return
    ^~~~~~

verifier inst1: Internal return not allowed with return_at_end=1

ebb1:
    trapz.i32 v0, user6
    return
}

Fixes #68

* Making it so that pretty_function_error and write_function_plain are both private.

* Changes write_ebb to decorate_ebb.
Adds documentation line to decorate_function.

* Removing Cargo.toml lib/serde addition

* Add serde functionality into lib.

* Fix so code is compatible with Rust version 1.25.0.

* Move ser/de functions to utility file, update description, remove borrow from arms.

* Remove commented out code.
2018-07-31 07:48:12 -07:00
..

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 lib/serde
cargo build
clif-json serialize -p test.clif