elfredo-0.1.1 doesn't have any documentation.
elfredo
There are two main components to any project that uses elfredo:
- Customizing your embeditor to mach your datatype (step 1)
- Calling the
get_embedded_data
method to retrieve the embedded data (step 2)
After these two are implemented you end up with two binaries:
- [app executable].elf - Your editable app
- [embeditor executable].elf - The binary that you use to change the embedded data
Steps to integrate (See ./example
):
- Write your configurable data structure in the embeditor binary:
// my_embeditor.rs
use run_embeditor;
use ;
- Read the configurations by using elfredo's api:
// main.rs
use get_embedded_data;
use Person;
- Embed new data to the elf
john@ubuntu:/mnt/hgfs/elfredo/example$ cat person.json
{
"name": "Ronald",
"id": 5
}
john@ubuntu:/mnt/hgfs/elfredo/example$ cargo run --bin embeditor ../target/debug/example person.json
Compiling elfredo v0.1.0 (/mnt/hgfs/elfredo)
Compiling example v0.1.0 (/mnt/hgfs/elfredo/example)
Finished dev [unoptimized + debuginfo] target(s) in 24.99s
Running `/mnt/hgfs/elfredo/target/debug/embeditor ../target/debug/example person.json`
"/tmp/.tmpXh5QHg"
john@ubuntu:/mnt/hgfs/elfredo/example$ ../target/debug/example
Person { name: "Ronald", id: 5 }