Adrian Taylor
ddc146ef9f
Adding tests for functions in other namespaces.
2020-10-26 15:17:02 -07:00
Adrian Taylor
d47af7a9d3
Tests for opaque C types in namepsaces
2020-10-26 15:17:02 -07:00
Adrian Taylor
585bb0bc56
Tests for namespaced extern trivial types
2020-10-26 15:17:02 -07:00
Adrian Taylor
5e79c64769
Tests for namespaced opaque extern types.
2020-10-26 15:17:02 -07:00
Adrian Taylor
9a158e408f
Adding tests for types in namespaces.
2020-10-26 15:17:02 -07:00
Adrian Taylor
cca5215060
Diagnostic improvement.
2020-10-22 17:56:53 -07:00
David Tolnay
e37ce2f4ee
Release 0.5.2
0.5.2
2020-10-16 13:32:07 -07:00
David Tolnay
a32ca3080b
Lockfile update
2020-10-16 13:31:09 -07:00
David Tolnay
743caa283c
Remove duplicated UniquePtr<C> impl in ui test
2020-10-16 13:22:47 -07:00
David Tolnay
441956e803
Match layout of C++ tests::E and struct E in Rust
2020-10-16 13:21:51 -07:00
David Tolnay
ca0f9da832
Format PR 361 with rustfmt
2020-10-16 13:18:54 -07:00
David Tolnay
35b3cd359b
Merge pull request #361 from adetaylor/trivial-alias-uniqueptr
...
Allow creation of UniquePtrs to trivial aliased types.
2020-10-16 13:15:40 -07:00
David Tolnay
33b1ae9564
Merge pull request 364 from adetaylor/make-cxx-h-available
2020-10-16 13:11:56 -07:00
David Tolnay
0e01d6406f
Expose cxx_gen::HEADER as a static &'static str
2020-10-16 13:06:48 -07:00
Adrian Taylor
c904f8a74f
Make cxx.h available to high level code generators.
...
At present, this file is available only from the git repository,
but higher level code generators may wish to ensure that they supply
a version of cxx.h corresponding precisely to the version of cxx
in use.
Specifically, such higher level code generators may wish to use
rust::Str and similar types in code which _they_ autogenerate,
and thus need a way to include definitions of such types. As
this code is autogenerated, it can't reasonably rummage around
the cxx git repository to find the correct cxx.h header.
To be even more specific, higher level code generators may wish
to pass rust::Str and/or rust::String types into C++, in order
to create UniquePtr<CxxString>s from Rust strings during function
calls.
2020-10-16 10:47:58 -07:00
David Tolnay
1137642ce4
Merge pull request #362 from Bromeon/bugfix/symlink-check
...
Fix Windows symlink test to give reproducible error messages
2020-10-13 14:17:31 -07:00
Jan Haller
595ac27632
Fix Windows symlink test to give reproducible error messages
...
After a `git clone -c core.symlinks=false` and `cargo test`, the script outputs a Git error as expected.
When running `cargo test` again, the error message changes to "symlink support needs to be enabled".
The test is done for an already existing directory, and the Windows mklink command _fails_ when the symlink exists already.
This commit deletes the link prior to the symlink creation.
2020-10-13 22:48:08 +02:00
Adrian Taylor
9f7ff2e3a6
Switch to build-time squashing of 'new' method.
2020-10-12 20:14:17 -07:00
Adrian Taylor
117d3baac7
Bazel/Buck test build fixups.
...
Sacrifices to satisfy the PR builder guardians.
2020-10-12 16:33:30 -07:00
Adrian Taylor
d75f7e2911
Allow creation of UniquePtrs to trivial aliased types.
2020-10-12 16:16:19 -07:00
David Tolnay
e35673d7de
Add VS Code C++ tools
2020-10-11 22:31:51 -07:00
David Tolnay
bd03ae4cd1
Update buck in devcontainer to match Actions
2020-10-11 22:30:28 -07:00
David Tolnay
9e45701891
Set default flavor of buck rust library build operations
...
Previously e.g. `buck build :cxx` was surprisingly a no-op, requiring
one to build `:cxx#check` or `:cxx#rlib-pic` in order to perform any
compiler invocation at all.
defaults.rust_library.type is a recent feature (landed in facebook/buck@c425eb93e1 ),
hence the bump of the Buck commit pulled in for CI.
2020-10-11 21:55:48 -07:00
David Tolnay
ccde860981
Tweak target dir finding heuristic
2020-10-11 17:53:50 -07:00
David Tolnay
251e99384f
Merge pull request #358 from dtolnay/symlink
...
Try to detect symlinking disabled on Windows
2020-10-11 03:56:41 -07:00
David Tolnay
2a0a80a260
Raise minimum supported Rust version to 1.43
2020-10-11 03:49:37 -07:00
David Tolnay
c9c197bff9
Try to detect symlinking disabled on Windows
2020-10-11 03:49:37 -07:00
David Tolnay
a00021934e
Emphasize difference between git builds vs crates.io
2020-10-11 03:10:34 -07:00
David Tolnay
188d9f1256
Display usable clone command on symlink error
2020-10-11 02:37:51 -07:00
David Tolnay
65b66f2091
Factor out common symlink check build script
2020-10-11 02:36:16 -07:00
David Tolnay
362c9f92b0
Touch up PR 356
2020-10-10 16:30:04 -07:00
David Tolnay
2fe955f421
Merge pull request #356 from adetaylor/add-some-tests
...
Add tests for ExternType.
2020-10-10 16:26:58 -07:00
Adrian Taylor
1931ccf65e
Attempt at BUCK and BUILD files.
2020-10-10 16:19:20 -07:00
Adrian Taylor
121cca4a06
Add tests for ExternType.
2020-10-10 16:01:26 -07:00
David Tolnay
52830f59d6
Release 0.5.1
0.5.1
2020-10-09 22:21:27 -07:00
David Tolnay
957503360b
Lockfile update
2020-10-09 22:17:10 -07:00
David Tolnay
2e18e5855d
Replace ::add-path with using Environment Files
...
https://github.com/dtolnay/cxx/issues/351
2020-10-09 22:13:48 -07:00
David Tolnay
ba97787b3c
Merge pull request #352 from dtolnay/vendor
...
Automatically run cargo vendor from bazel
2020-10-09 20:48:10 -07:00
David Tolnay
c4dcb91ae6
Automatically run cargo vendor from bazel
2020-10-09 20:40:42 -07:00
David Tolnay
61863c637f
Merge pull request #350 from dtolnay/clippy
...
Run clippy in CI
2020-10-09 20:40:11 -07:00
David Tolnay
753b8f743a
Suppress some currently triggering clippy lints
2020-10-09 20:30:52 -07:00
David Tolnay
9e43a055b6
Run clippy in CI
2020-10-09 20:30:52 -07:00
David Tolnay
df4b677abf
Merge pull request #349 from dtolnay/alias
...
Support functions having distinct Rust name and C++ name
2020-10-09 20:30:30 -07:00
David Tolnay
3bbcdbbbf6
Add test of cxx_/rust_name attributes
2020-10-09 20:22:23 -07:00
David Tolnay
938ca85856
Translate cxx_/rust_name from attribute to syntax tree
2020-10-09 20:22:23 -07:00
David Tolnay
1039a24ee4
Attribute parser for cxx_name and rust_name attributes
2020-10-09 20:22:22 -07:00
David Tolnay
e107c1b81d
Merge pull request #348 from dtolnay/alias
...
Store independent rust name and c++ name for extern functions
2020-10-09 20:22:01 -07:00
David Tolnay
1d673d82a7
Permit duplicate C++ names of extern functions
...
C++ has overloading so that's fine.
2020-10-09 19:44:02 -07:00
David Tolnay
a4641c738a
Store independent rust name and c++ name for extern functions
2020-10-09 19:12:17 -07:00
David Tolnay
f3a9afae50
Omit empty derive attribute
...
Previously an empty #[derive()] would appear distractingly in
macro-expanded code.
2020-10-08 23:22:15 -07:00