X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Fmain.rs;h=dfbcb85192435f8e3226752c249194a1495ff756;hp=3a7bfd6c584d0d4f131ce7ea17ec2dc92487a474;hb=01b1418d0421f61d79a346bbdf5b3fe5076d1eb7;hpb=d4b750f56a7b110dc9ec241c19dfe2fd5e90fdaf diff --git a/c-bindings-gen/src/main.rs b/c-bindings-gen/src/main.rs index 3a7bfd6..dfbcb85 100644 --- a/c-bindings-gen/src/main.rs +++ b/c-bindings-gen/src/main.rs @@ -1,3 +1,11 @@ +// This file is Copyright its original authors, visible in version control +// history. +// +// This file is licensed under the Apache License, Version 2.0 +// or the MIT license , at your option. +// You may not use this file except in accordance with one or both of these +// licenses. + //! Converts a rust crate into a rust crate containing a number of C-exported wrapper functions and //! classes (which is exportable using cbindgen). //! In general, supports convering: @@ -1342,6 +1350,15 @@ fn convert_file<'a, 'b>(libast: &'a FullLibraryAST, crate_types: &mut CrateTypes let mut out = std::fs::OpenOptions::new().write(true).create(true).truncate(true) .open(new_file_path).expect("Unable to open new src file"); + writeln!(out, "// This file is Copyright its original authors, visible in version control").unwrap(); + writeln!(out, "// history and in the source files from which this was generated.").unwrap(); + writeln!(out, "//").unwrap(); + writeln!(out, "// This file is licensed under the license available in the LICENSE or LICENSE.md").unwrap(); + writeln!(out, "// file in the root of this repository or, if no such file exists, the same").unwrap(); + writeln!(out, "// license as that which applies to the original source files from which this").unwrap(); + writeln!(out, "// source was automatically generated.").unwrap(); + writeln!(out, "").unwrap(); + writeln_docs(&mut out, &attrs, ""); if module == "" {