4 Commits

Author SHA1 Message Date
Phillip Cloud 62101039ce Add rustfmt.toml with edition=2018 (#74)
* Ignore all target/ directories

* Add rustfmt.toml with an edition
2019-10-18 17:30:20 -04:00
Phillip Cloud 8ecfd2fc73 chore(transport): Bump hyper and http-body versions (#64) 2019-10-09 17:12:50 -04:00
Adam Jacob 06ff619944 feat(build): Expose prost-build type_attributes and field_attribu… (#60)
* chore: Add tags to .gitignore

When generating ctags/universal-ctags, a 'tags' file is generated. This
commit adds any generted 'tags' file to .gitignore.

* feat(build): Expose type_attribute and field_attribute

This commit exposes the `type_attribute` and `field_attribute`
configuration settings from Prost. These are useful to tweak/extend the
generated types.

For example:

```
tonic_build::configure()
    .out_dir(tmp)
    .format(false)
    .type_attribute(".", "#[derive(Serialize, Deserialize)]")
    .type_attribute(".", "#[serde(rename_all = \"camelCase\")]")
    .field_attribute("in", "#[serde(rename = \"in\")]")
    .compile(&["tests/protos/wellknown.proto"], &["tests/protos"])
    .unwrap();
```

Would add the serde `Serialize` and `Deserialize` traits, while renaming
all the fields to camelCase, and having serde keep fields named `in`
named `in`, rather than Prost's `in_`, to every type generated by Prost.
2019-10-08 18:11:42 -04:00
Lucio Franco b827fdd950 Inital commit 2019-08-09 14:01:27 -04:00