~chiefnoah/bare_proc

A procedural macro to generate Rust types from BARE schema files
Bump versions, add ignores for generated names
Refactor, argless union variants

clone

read-only
https://git.sr.ht/~chiefnoah/bare_proc
read/write
git@git.sr.ht:~chiefnoah/bare_proc

You can also use your local clone with git send-email.

#bare_proc

bare_proc is a proc-macro that implements a parser-generator for the BARE message format.

It relies on serde using serde_bare to implement serialization.

#Usage

Define you BARE schema in a .bare file:

type User struct {
  name: str
  key: data[128]
  id: uint
}

Then in a corresponding Rust file:

bare_schema!("schema.bare");

which will expand roughly the following:

#[derive(Serialize, Deserialize, PartialEq, Eq, Debug)]
struct User {
    name: String,
    key: Vec<u8>,
    id: u64,
}

#License

bare_proc is licensed under MIT.