David Tolnay
ed6ba4a63c
Add ForeignName wrapper around non-Rust names
2021-01-01 17:57:14 -08:00
David Tolnay
84ed6adda5
Track independent Rust/C++ names on struct fields and fn args
2021-01-01 15:46:10 -08:00
David Tolnay
3abed4794a
Generate all explicit and implicit impls based on one map
2021-01-01 14:28:38 -08:00
David Tolnay
77a5e758e6
Rename RustName -> NamedType
2021-01-01 14:15:26 -08:00
David Tolnay
95bc57fc47
Remove RustName::to_symbol in favor of explicit resolve
2021-01-01 13:36:49 -08:00
David Tolnay
bbcd75c0d1
Pull in syn 1.0.57 for const Punctuated::new support
2021-01-01 13:04:55 -08:00
David Tolnay
e352c1e140
Add wrapper to prevent iteration of unordered maps
2020-12-31 17:15:56 -08:00
David Tolnay
4c6052d749
Key impls by an enum rather than by Type
2020-12-31 15:31:28 -08:00
David Tolnay
5573e529e5
Emit docs on struct fields into generated C++ code
2020-12-31 11:07:52 -08:00
David Tolnay
3fab70e0de
Release 1.0.25
2020-12-31 10:51:19 -08:00
David Tolnay
5b41c09e9a
Defer Cargo links metadata printing until after code generation
...
This results in slightly less noise when code generation produces an
error during a Cargo build.
Before:
process didn't exit successfully: `/git/example-cxx/target/debug/build/example-f20ef12178a95a23/build-script-build` (exit code: 1)
--- stdout
cargo:CXXBRIDGE_PREFIX=example
cargo:CXXBRIDGE_DIR0=/git/example-cxx/target/debug/build/example-188c8410ffc8bb7d/out/cxxbridge/include
cargo:CXXBRIDGE_DIR1=/git/example-cxx/target/debug/build/example-188c8410ffc8bb7d/out/cxxbridge/crate
--- stderr
error[cxxbridge]: extern type with lifetimes is not supported yet
┌─ src/main.rs:9:21
│
9 │ type Object<'a>;
│ ^^ extern type with lifetimes is not supported yet
After:
process didn't exit successfully: `/git/example-cxx/target/debug/build/example-f20ef12178a95a23/build-script-build` (exit code: 1)
--- stderr
error[cxxbridge]: extern type with lifetimes is not supported yet
┌─ src/main.rs:9:21
│
9 │ type Object<'a>;
│ ^^ extern type with lifetimes is not supported yet
2020-12-30 20:11:33 -08:00
David Tolnay
524ff68081
Fix span placement on extern C++ type
2020-12-30 17:29:12 -08:00
David Tolnay
067638ea15
Store passthrough attributes for diagnostic lint levels
2020-12-30 16:50:05 -08:00
David Tolnay
4486f7261e
Preserve doc comments on enum variants
2020-12-30 00:01:26 -08:00
David Tolnay
b478fcbf0f
Add C++ symbol visibility annotations for Rust functions and impls
2020-12-29 16:48:02 -08:00
David Tolnay
1eadd2639a
Extract function for writing cxx_impl_annotations
2020-12-29 16:42:08 -08:00
David Tolnay
a5b8c38dc4
Release 1.0.24
2020-12-29 16:04:24 -08:00
David Tolnay
6064592053
Recognize .hh and .hpp as header extensions in cxxbridge-cmd
2020-12-29 15:53:01 -08:00
David Tolnay
9e3df911c5
Resolve redundant_closure_for_method_calls pedantic clippy lint
2020-12-29 15:33:28 -08:00
David Tolnay
6208af9ab5
Resolve map_flatten pedantic clippy lint
2020-12-29 15:30:56 -08:00
David Tolnay
05aa672b1e
Suppress all currently triggered clippy pedantic lints
2020-12-29 15:28:02 -08:00
David Tolnay
515cef8044
Format PR 613 with rustfmt 1.4.30-nightly
2020-12-29 15:19:55 -08:00
Per Mosegaard
ce088848c5
add support for .hh and .hpp headers
2020-12-29 21:10:14 +00:00
David Tolnay
ee3123241f
Store additional token information with extern type lifetimes
2020-12-28 22:12:28 -08:00
David Tolnay
3d2ef674a4
Add lifetimes to ExternType and TypeAlias syntax tree
2020-12-28 21:04:11 -08:00
David Tolnay
cb9408df8b
Release 1.0.23
2020-12-28 18:38:44 -08:00
David Tolnay
7a48785a8e
Add upgrade conversion from WeakPtr to SharedPtr
2020-12-28 18:09:55 -08:00
David Tolnay
85b6bc4a39
Add downgrade conversion from SharedPtr to WeakPtr
2020-12-28 18:06:17 -08:00
David Tolnay
215e77fbec
Add Rust std::weak_ptr binding
2020-12-28 17:41:20 -08:00
David Tolnay
7f056cdf46
Release 1.0.22
2020-12-28 11:42:43 -08:00
David Tolnay
8729da81ae
Clean up guards from C++ standard library type shims
...
These shims are only emitted into the cc file, not any headers, so there
is no way they would end up more than once in the compiled code.
2020-12-27 22:34:12 -08:00
David Tolnay
f7af2655c7
Clean up some unneeded guards on Box and Vec externs
...
These blocks contain extern function declarations only, not definitions.
It's okay for declarations to be repeated so the guard serves no
purpose.
2020-12-27 22:23:45 -08:00
David Tolnay
725bf505b4
Reuse Slice<T>'s iterator for Vec iteration too
2020-12-27 13:38:44 -08:00
David Tolnay
e1df7ddba0
Eliminate Vec stride symbol in favor of size_of
2020-12-27 13:29:06 -08:00
David Tolnay
5ce110e807
Update Slice implementation to respect runtime size_of
2020-12-27 13:19:45 -08:00
David Tolnay
eee622c4ac
Obtain accurate alignment for empty slice of opaque Rust type
2020-12-27 13:08:09 -08:00
David Tolnay
6f92baa8ff
Obtain Slice iterator stride in a way that works for opaque types
2020-12-27 12:59:47 -08:00
David Tolnay
78dd535756
Add checked and unchecked indexing to rust::Slice
2020-12-27 12:32:22 -08:00
David Tolnay
ee6ecfcf91
Add rust::size_of, align_of accessors that work for opaque types
2020-12-27 12:20:25 -08:00
David Tolnay
7506863fa4
Move is_complete type trait to header
2020-12-27 12:20:25 -08:00
David Tolnay
358bc4b383
Connect opaque type layout accessors to Rust symbols
2020-12-27 11:54:54 -08:00
David Tolnay
6ba262f630
Emit private layout struct for all opaque types
2020-12-27 00:54:53 -08:00
David Tolnay
8d067de62e
Set rust::Opaque as base class of all opaque Rust types
2020-12-26 21:15:37 -08:00
David Tolnay
158972019a
Release 1.0.21
2020-12-23 11:37:21 -08:00
David Tolnay
767e00d195
Add mutable indexing for CxxVector
2020-12-21 17:23:33 -08:00
David Tolnay
e6f6214c00
Store enum variant name as Pair
2020-12-21 16:26:41 -08:00
David Tolnay
c2a4c78a13
Inline Pair construction
2020-12-21 15:55:31 -08:00
David Tolnay
20cc2d35bd
Expose Pair construction only from differing idents
2020-12-21 15:01:07 -08:00
David Tolnay
c5ef010349
Release 1.0.20
2020-12-21 13:34:59 -08:00
David Tolnay
5b1d863c1e
Join trivial reasons in one message
2020-12-21 13:13:35 -08:00