commit | 6dda542cf5fef5b8bdaf7aef3b26e63ac9641345 | [log] [tgz] |
---|---|---|
author | Alex Crichton <alex@alexcrichton.com> | Mon Oct 30 14:07:37 2017 -0700 |
committer | Alex Crichton <alex@alexcrichton.com> | Mon Oct 30 14:07:37 2017 -0700 |
tree | bb60950de70c69fbaae326fba1e13cd4f5a10f06 | |
parent | e919de990df3cde676605732c53b0f98510d6baf [diff] |
Clarify wording of license information in README. This text historically was copied verbatim from rust-lang/rust's own README [1] with the intention of licensing projects the same as rustc's own license, namely a dual MIT/Apache-2.0 license. The clause about "various BSD-like licenses" isn't actually correct for almost all projects other than rust-lang/rust and the wording around "both" was slightly ambiguous. This commit updates the wording to match more precisely what's in the standard library [2], namely clarifying that there aren't any BSD-like licenses in this repository and that the source is licensable under either license, at your own discretion. [1]: https://github.com/rust-lang/rust/tree/f0fe716dbcbf2363ab8f929325d32a17e51039d0#license [2]: https://github.com/rust-lang/rust/blob/f0fe716dbcbf2363ab8f929325d32a17e51039d0/src/libstd/lib.rs#L5-L9
A small shim over the proc_macro
crate in the compiler intended to multiplex the current stable interface (as of 2017-07-05) and the upcoming richer interface.
The upcoming support has features like:
The hope is that libraries ported to proc_macro2
will be trivial to port to the real proc_macro
crate once the support on nightly is stabilize.
This crate by default compiles on the stable version of the compiler. It only uses the stable surface area of the proc_macro
crate upstream in the compiler itself. Usage is done via:
[dependencies] proc-macro2 = "0.1"
followed by
extern crate proc_macro; extern crate proc_macro2; #[proc_macro_derive(MyDerive)] pub fn my_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input: proc_macro2::TokenStream = input.into(); let output: proc_macro2::TokenStream = { /* transform input */ }; output.into() }
If you'd like you can enable the unstable
feature in this crate. This will cause it to compile against the unstable and nightly-only features of the proc_macro
crate. This in turn requires a nightly compiler. This should help preserve span information, however, coming in from the compiler itself.
You can enable this feature via:
[dependencies] proc-macro2 = { version = "0.1", features = ["unstable"] }
Serde is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Serde by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.