Move generated files to `target/generated/bincode` (#600)

This commit is contained in:
trevyn 2022-11-03 12:13:09 +04:00 committed by GitHub
parent 68ae855052
commit cb46ce13b4
6 changed files with 8 additions and 8 deletions

View File

@ -108,4 +108,4 @@ Bincode will encode enum variants as a `u32`. If you're worried about storage si
Currently we have not found a compelling case to respect `#[repr(...)]`. You're most likely trying to interop with a format that is similar-but-not-quite-bincode. We only support our own protocol ([spec](https://github.com/bincode-org/bincode/blob/trunk/docs/spec.md)).
If you really want to use bincode to encode/decode a different protocol, consider implementing `Encode` and `Decode` yourself. `bincode-derive` will output the generated implementation in `target/<name>_Encode.rs` and `target/<name>_Decode.rs` which should get you started.
If you really want to use bincode to encode/decode a different protocol, consider implementing `Encode` and `Decode` yourself. `bincode-derive` will output the generated implementation in `target/generated/bincode/<name>_Encode.rs` and `target/generated/bincode/<name>_Decode.rs` which should get you started.

View File

@ -19,4 +19,4 @@ description = "Implementation of #[derive(Encode, Decode)] for bincode"
proc-macro = true
[dependencies]
virtue = "0.0.10"
virtue = "0.0.11"

View File

@ -25,4 +25,4 @@ This is supported by the structs in `src/generate`. The most notable points of t
For additional derive testing, see the test cases in `../tests`
For testing purposes, all generated code is outputted to the current `target` folder, under file name `<struct/enum name>_Encode.rs` and `<struct/enum name>_Decode.rs`. This can help with debugging.
For testing purposes, all generated code is outputted to the current `target/generated/bincode` folder, under file name `<struct/enum name>_Encode.rs` and `<struct/enum name>_Decode.rs`. This can help with debugging.

View File

@ -34,7 +34,7 @@ fn derive_encode_inner(input: TokenStream) -> Result<TokenStream> {
}
}
generator.export_to_file("Encode");
generator.export_to_file("bincode", "Encode");
generator.finish()
}
@ -67,7 +67,7 @@ fn derive_decode_inner(input: TokenStream) -> Result<TokenStream> {
}
}
generator.export_to_file("Decode");
generator.export_to_file("bincode", "Decode");
generator.finish()
}
@ -100,6 +100,6 @@ fn derive_borrow_decode_inner(input: TokenStream) -> Result<TokenStream> {
}
}
generator.export_to_file("BorrowDecode");
generator.export_to_file("bincode", "BorrowDecode");
generator.finish()
}

View File

@ -26,7 +26,7 @@ pub use self::decoder::DecoderImpl;
///
/// # Implementing this trait manually
///
/// If you want to implement this trait for your type, the easiest way is to add a `#[derive(bincode::Decode)]`, build and check your `target/` folder. This should generate a `<Struct name>_Decode.rs` file.
/// If you want to implement this trait for your type, the easiest way is to add a `#[derive(bincode::Decode)]`, build and check your `target/generated/bincode/` folder. This should generate a `<Struct name>_Decode.rs` file.
///
/// For this struct:
///

View File

@ -17,7 +17,7 @@ pub use self::encoder::EncoderImpl;
///
/// # Implementing this trait manually
///
/// If you want to implement this trait for your type, the easiest way is to add a `#[derive(bincode::Encode)]`, build and check your `target/` folder. This should generate a `<Struct name>_Encode.rs` file.
/// If you want to implement this trait for your type, the easiest way is to add a `#[derive(bincode::Encode)]`, build and check your `target/generated/bincode/` folder. This should generate a `<Struct name>_Encode.rs` file.
///
/// For this struct:
///