Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1493 commits
Select commit Hold shift + click to select a range
a6c1f89
Add ui test of undeclared lifetime in extern C++ fn
dtolnay Sep 24, 2025
3036eb1
Improve diagnostics about undeclared lifetimes in C++ member fn
dtolnay Sep 24, 2025
541b0cc
Merge pull request #1651 from dtolnay/undeclaredlife
dtolnay Sep 24, 2025
3da6aad
Partition lifetimes of associated functions
dtolnay Sep 24, 2025
b18615f
Merge pull request #1652 from dtolnay/assocfnlife
dtolnay Sep 24, 2025
b3b28b4
Add ui test with incorrect lifetimes on self type
dtolnay Sep 25, 2025
a3266b2
Merge pull request #1653 from dtolnay/selflife
dtolnay Sep 25, 2025
c68c2f1
Improve diagnostic on undeclared lifetimes
dtolnay Sep 25, 2025
d0f22e5
Merge pull request #1654 from dtolnay/undeclaredlife
dtolnay Sep 25, 2025
aeb5637
Group associated functions by self type
dtolnay Sep 24, 2025
d995abe
Ignore similar_names pedantic clippy lint
dtolnay Sep 25, 2025
7dab4d2
Merge pull request #1655 from dtolnay/assocgroup
dtolnay Sep 25, 2025
0e07dbc
Lockfile update
dtolnay Sep 25, 2025
191684c
Release 1.0.186
dtolnay Sep 25, 2025
1a300d2
Simplify expansion of associated functions
dtolnay Sep 25, 2025
e8ef7db
Merge pull request #1656 from dtolnay/assocfn
dtolnay Sep 25, 2025
5abd802
Regenerate MODULE.bazel.lock with bazel 8.4.2
dtolnay Oct 2, 2025
3c8e15b
Work around expl_impl_clone_on_copy clippy bug
dtolnay Oct 8, 2025
335c8f9
Raise required compiler to Rust 1.82
dtolnay Oct 15, 2025
c64de4a
Remove support for compilers without &raw references
dtolnay Oct 15, 2025
6b128cc
Remove support for compilers without precise capturing
dtolnay Oct 15, 2025
9e33d82
Remove support for compilers without unsafe extern
dtolnay Oct 15, 2025
5528859
Inline UnsafeExtern
dtolnay Oct 15, 2025
722f225
Remove support for compilers without unsafe attribute
dtolnay Oct 15, 2025
140beab
Inline UnsafeAttr
dtolnay Oct 15, 2025
867fcdd
Inline ExportNameAttr
dtolnay Oct 15, 2025
61a2cd6
Drop unused rustversion dependency
dtolnay Oct 15, 2025
e541f42
Resolve borrow_as_ptr pedantic clippy lint
dtolnay Oct 15, 2025
3b78c0b
Merge pull request #1662 from dtolnay/up
dtolnay Oct 15, 2025
cac51dd
Raise required compiler to Rust 1.87
dtolnay Oct 15, 2025
4fe50c3
Update codespan-reporting to 0.13
dtolnay Oct 15, 2025
6e18d43
Merge pull request #1661 from dtolnay/codespan
dtolnay Oct 15, 2025
00d21a7
Handle build script for quote crate
dtolnay Oct 15, 2025
2a13dfc
Lockfile update
dtolnay Oct 15, 2025
c7c3c35
Release 1.0.187
dtolnay Oct 15, 2025
6f132ee
Bazel rules_rust 0.66.0
dtolnay Oct 18, 2025
170dc19
Update codespan-reporting to pull in ?Sized fix
dtolnay Oct 23, 2025
5193523
Instantiate emit_to_write_style with dynamically sized writer
dtolnay Oct 23, 2025
a3cc322
Generalize from WriteColor to WriteStyle
dtolnay Oct 23, 2025
4b3bd0d
Merge pull request #1663 from dtolnay/writestyle
dtolnay Oct 23, 2025
c14e87d
Revert "Raise required compiler to Rust 1.87"
dtolnay Oct 23, 2025
07a7488
Merge pull request #1664 from dtolnay/down
dtolnay Oct 23, 2025
2cf386d
Bazel rules_rust 0.67.0
dtolnay Oct 23, 2025
b7e53af
Update transitive deps of rules_rust
dtolnay Oct 23, 2025
e81ef78
Update target-triple dependency to v1
dtolnay Oct 27, 2025
e197216
Extract `is_implicit_impl_ok` from `Types::collect` into a method of …
anforowicz Jul 22, 2025
fdd4cf3
Provide `fn stringify_type` in `gen/src/write.rs`.
anforowicz Jun 25, 2025
18a1c1c
Support arbitrary inner type in `NamedImplKey`.
anforowicz Jul 23, 2025
8a60085
Encode patch-version in the prefix of cxx-generated symbols.
anforowicz Oct 27, 2025
cb395ca
More clearly document+implement when CXXVERSION is present or missing.
anforowicz Oct 28, 2025
82a3c63
Bump Bazel build to rustc 1.91.0
dtolnay Oct 30, 2025
8d1077b
Disable clippy precedence lint
dtolnay Nov 2, 2025
1e6e75f
Update ui test suite to nightly-2025-11-02
dtolnay Nov 2, 2025
1f0ed09
Update ui test suite to nightly-2025-11-04
dtolnay Nov 4, 2025
730d0f9
Pin documentation job to nightly-2025-11-06
dtolnay Nov 7, 2025
0305225
Bump Bazel build to rustc 1.91.1
dtolnay Nov 10, 2025
e0a8ce7
Don't track bridge files in `OUT_DIR`
phil-opp Nov 11, 2025
b0549b9
Merge pull request #1668 from phil-opp/dont-track-out-dir
dtolnay Nov 11, 2025
a03c175
Lockfile update
dtolnay Nov 11, 2025
3d68ed5
Release 1.0.188
dtolnay Nov 11, 2025
1f8c66a
Fix trailing comma from PR 988
dtolnay Nov 14, 2025
1cbc3e3
Merge pull request #1658 from anforowicz/arbitrary-inner-type-in-name…
dtolnay Nov 15, 2025
5b98f6f
Touch up PR 1658
dtolnay Sep 30, 2025
883758d
Change allow(dead_code) to conditional expect(dead_code)
dtolnay Nov 15, 2025
5799251
Fix NamedImplKey::symbol doc comment to match constructor
dtolnay Nov 15, 2025
7856eb3
Reword comments from PR 1658
dtolnay Nov 14, 2025
e5e001f
Import std::fmt
dtolnay Oct 25, 2025
4f1a0f8
Skip runtime borrow check during write to OutFile
dtolnay Nov 14, 2025
97f2eb5
Require InfallibleWrite trait bounds in every _to_generic_writer
dtolnay Nov 14, 2025
80cb7b6
Skip stringify where possible
dtolnay Nov 14, 2025
1c8e467
One write_atom function suffices
dtolnay Nov 14, 2025
2bf8bbe
One write_space_after_type function suffices
dtolnay Nov 14, 2025
444cea6
Rename mangle::type_ -> mangle::typename
dtolnay Nov 14, 2025
86e9569
Mangle type parameters using a C++ namespace and C++ name
dtolnay Nov 14, 2025
9f7ea4c
Eliminate interpolation of symbols into Rust identifiers
dtolnay Nov 15, 2025
e3ba7b7
Delete unreachable cases from mangle::typename
dtolnay Nov 15, 2025
6581ef9
Restore missing lifetimes on CxxVector element type
dtolnay Nov 15, 2025
82921bc
Rename back to generics::split_for_impl
dtolnay Nov 15, 2025
d0cd0df
Drop lifetime name from error messages containing type name
dtolnay Nov 15, 2025
3c4b75f
Fix abort message on panic during drop of Box and Vec
dtolnay Nov 15, 2025
c92a4e7
Convert panics involving C++ type traits to use C++ type names
dtolnay Nov 15, 2025
69161cb
Impls always use generics from type declaration
dtolnay Nov 15, 2025
f0a0e24
Merge pull request #1669 from dtolnay/pr1658
dtolnay Nov 15, 2025
f2da79c
Add test that mangling of type names covers C++ namespace.
anforowicz Nov 17, 2025
3f0919f
Add test coverage for `UniquePtr<StructWithLifetime<>>`.
anforowicz Nov 17, 2025
baf8f5c
Add unit test to check which lifetime name is used in `impl`s.
anforowicz Nov 17, 2025
071a560
Merge pull request 1670 from anforowicz/test-that-original-lifetimes-…
dtolnay Nov 20, 2025
c434dc2
Merge pull request #1665 from anforowicz/encode-patch-version-in-pref…
dtolnay Nov 20, 2025
6248e8b
Fill in compile-time environment for Buck
dtolnay Nov 20, 2025
8fbe75f
Touch up PR 1665
dtolnay Nov 20, 2025
093150d
Parse the real package version from Cargo.toml
dtolnay Nov 20, 2025
458252e
Pass version to Bazel targets
dtolnay Nov 20, 2025
fc9c986
Update actions/checkout@v5 -> v6
dtolnay Nov 20, 2025
b3066ae
Lockfile update
dtolnay Nov 20, 2025
6c3e01d
Release 1.0.189
dtolnay Nov 20, 2025
bce7115
Fix spacing of enum variant static assertion
dtolnay Nov 28, 2025
e91be57
Merge pull request #1675 from dtolnay/assertvariant
dtolnay Nov 28, 2025
79105d1
Lockfile update
dtolnay Nov 28, 2025
95eef18
Release 1.0.190
dtolnay Nov 28, 2025
2901aa8
Fix typo in "Some other build system" page
dtolnay Dec 3, 2025
7fe95b8
Bazel rules_rust 0.68.0
dtolnay Dec 5, 2025
6ad76c0
Bazel rules_rust 0.68.1
dtolnay Dec 10, 2025
8f0bc62
Use `Box::new_uninit` instead of `Box::new(MaybeUninit::uninit())`.
anforowicz Dec 11, 2025
dac1d46
Regenerate MODULE.bazel.lock with bazel 8.5.0
dtolnay Dec 12, 2025
5dca810
Bump Bazel build to rustc 1.92.0
dtolnay Dec 12, 2025
3957731
Merge pull request #1682 from anforowicz/use-box-new-uninit
dtolnay Dec 12, 2025
1cecef2
Resolve ptr_as_ptr pedantic clippy lint
dtolnay Dec 14, 2025
ce4758c
Resolve ptr_cast_constness pedantic clippy lint
dtolnay Dec 14, 2025
3458624
Resolve ref_as_ptr pedantic clippy lint
dtolnay Dec 14, 2025
48cbc0a
Merge pull request #1683 from dtolnay/ptrcast
dtolnay Dec 14, 2025
17ba90c
Ignore GCC 15's new mismatched-new-delete
dtolnay Dec 14, 2025
133292f
Merge pull request #1686 from dtolnay/mismatchnewdelete
dtolnay Dec 14, 2025
1e7f23c
Lockfile update
dtolnay Dec 14, 2025
6ab7caa
Release 1.0.191
dtolnay Dec 14, 2025
66774a5
Replace `fn local_type` in `generics.rs` with more granular functions.
anforowicz Dec 11, 2025
de37eeb
Avoid duplicate errors for `impl UniquePtr<Vec<u8>> {}`.
anforowicz Dec 15, 2025
7a9cad2
Add support for `Vec<Box<T>>`.
anforowicz Jul 23, 2025
7b522fe
Merge pull request #1681 from anforowicz/vec-of-box
dtolnay Dec 16, 2025
7672ce9
Touch up PR 1681
dtolnay Dec 12, 2025
0d80b35
Release 1.0.192
dtolnay Dec 16, 2025
73933cf
dev: update cxx dev dependency version
Saviq Dec 17, 2025
4108ec2
Merge pull request #1687 from Saviq/patch-1
dtolnay Dec 18, 2025
f41788a
Force identical cxx-gen patch version for dev dependency
dtolnay Dec 18, 2025
bbab242
Update actions/upload-artifact@v4 -> v5
dtolnay Dec 19, 2025
cd508fc
Update actions/upload-artifact@v5 -> v6
dtolnay Dec 20, 2025
a4a3e6a
Pin nightly in CI to avoid cargo custom_build.rs regression
dtolnay Jan 10, 2026
edb7e28
Revert "Pin nightly in CI to avoid cargo custom_build.rs regression"
dtolnay Jan 12, 2026
7e138d7
Revert "Pin documentation job to nightly-2025-11-06"
dtolnay Jan 12, 2026
c55200d
Update ui test suite to nightly-2026-01-19
dtolnay Jan 19, 2026
71d56f2
Update to Bazel 9.0.0
dtolnay Jan 20, 2026
fc6095c
Update Bazel's Xcode and macOS SDK
dtolnay Jan 20, 2026
b64be89
Merge pull request #1693 from dtolnay/bazel
dtolnay Jan 20, 2026
193a1ae
Update ui test suite to nightly-2026-01-21
dtolnay Jan 21, 2026
78e81fd
Add cc_library load in additive_build_file_content
dtolnay Jan 21, 2026
9ebf150
Merge pull request #1695 from dtolnay/load
dtolnay Jan 21, 2026
dfae530
Lockfile update
dtolnay Jan 21, 2026
2afbf8e
Release 1.0.193
dtolnay Jan 21, 2026
8affa65
Drop support for Bazel 7
dtolnay Jan 21, 2026
2523f56
Merge pull request #1696 from dtolnay/bazel
dtolnay Jan 21, 2026
d2446ec
Add BCR presubmit on Bazel 9
dtolnay Jan 21, 2026
349f1b2
Merge pull request #1697 from dtolnay/bazel
dtolnay Jan 21, 2026
255e7af
Release 1.0.194
dtolnay Jan 21, 2026
0478c9f
Bump Bazel build to rustc 1.93.0
dtolnay Jan 22, 2026
887cee1
Raise required compiler to Rust 1.85
dtolnay Feb 10, 2026
786a24f
Update ui test suite to nightly-2026-02-13
dtolnay Feb 13, 2026
53819dc
Bump Bazel build to rustc 1.93.1
dtolnay Feb 13, 2026
85a67d9
Update ui test suite to nightly-2026-02-15
dtolnay Feb 15, 2026
b491606
Bazel rules_rust 0.69.0
dtolnay Feb 26, 2026
46e04d9
Update ui test suite to nightly-2026-03-06
dtolnay Mar 6, 2026
b43dc1f
Bump Bazel build to rustc 1.94.0
dtolnay Mar 6, 2026
95d46ef
Regenerate MODULE.bazel.lock with bazel 9.0.1
dtolnay Mar 11, 2026
9634c7d
Update ui test suite to nightly-2026-03-16
dtolnay Mar 16, 2026
b3cf711
Bump Bazel build to rustc 1.94.1
dtolnay Mar 27, 2026
37d928a
Update third-party buck targets with new short version naming
dtolnay Apr 20, 2026
68788ec
Bump Bazel build to rustc 1.95.0
dtolnay Apr 20, 2026
d2f2fae
Regenerate MODULE.bazel.lock with bazel 9.1.0
dtolnay Apr 21, 2026
7a44a82
Bazel rules_rust 0.70.0
dtolnay Apr 23, 2026
ff00424
Update wasi-sdk to 28.0
dtolnay Apr 24, 2026
e9deaad
Update wasi-sdk to 29.0
dtolnay Apr 24, 2026
3a69aef
Update wasi-sdk to 30.0
dtolnay Apr 24, 2026
f45a7df
Update wasi-sdk to 31.0
dtolnay Apr 24, 2026
ad5e8f4
Update wasi-sdk to 32.0
dtolnay Apr 24, 2026
27f79c8
Merge pull request #1705 from dtolnay/wasisdk
dtolnay Apr 24, 2026
b6b8c5c
Switch from snap to setup-firefox action
dtolnay May 2, 2026
0cbbf15
Merge pull request #1706 from dtolnay/firefox
dtolnay May 2, 2026
fb660b1
Resolve useless_borrows_in_formatting clippy lint
dtolnay May 18, 2026
83c529b
Update wasi-sdk to 33.0
dtolnay May 18, 2026
6d0a743
Merge pull request #1711 from dtolnay/wasi
dtolnay May 18, 2026
b274b75
Update ui test suite to nightly-2026-05-19
dtolnay May 19, 2026
ebbabf2
Merge pull request #1713 from dtolnay/ui
dtolnay May 19, 2026
3f472d9
Skip WebAssembly CI job on simple PR merges
dtolnay May 19, 2026
ec41fbc
Revert "Update ui test suite to nightly-2026-05-19"
qaijuang May 21, 2026
a36fc61
Merge pull request #1714 from qaijuang/revert-b274b75
dtolnay May 21, 2026
3cfec17
Delete bazel compatibility_level attribute
dtolnay May 28, 2026
3933e00
Bump bazel modules
dtolnay May 28, 2026
9772ff6
Regenerate MODULE.bazel.lock
dtolnay May 28, 2026
e30b0fa
Bump Bazel build to rustc 1.96.0
dtolnay May 28, 2026
8c28dc3
Disable std_instead_of_core clippy restriction
dtolnay May 31, 2026
74d4410
Update actions/checkout@v6 -> v7
dtolnay Jun 20, 2026
a5e5eb5
Update actions/upload-artifact@v6 -> v7
dtolnay Jun 24, 2026
c269a9a
Ignore needless_late_init clippy lint
dtolnay Jul 1, 2026
fa30911
Bazel rules_rust 0.71.0
dtolnay Jul 2, 2026
fadfb36
Bazel rules_rust 0.71.1
dtolnay Jul 2, 2026
eed76d7
Bazel rules_rust 0.71.2
dtolnay Jul 2, 2026
e36c63a
Bazel rules_rust 0.71.3
dtolnay Jul 2, 2026
f5a7a24
Switch to link_deps for Rust Bazel targets depending on C++
dtolnay Jul 2, 2026
6318091
Merge pull request #1725 from dtolnay/rules_rust
dtolnay Jul 2, 2026
a9a9cf2
Run starlark linter in CI
dtolnay Jul 2, 2026
ccf7654
Set step name for starlark lint workflow step
dtolnay Jul 2, 2026
ed52eb8
Merge pull request #1726 from dtolnay/starlarklint
dtolnay Jul 2, 2026
d1352ea
Run buildifier in CI for .bazel files
dtolnay Jul 2, 2026
4d14fd8
Run buildifier in CI for .bzl files
dtolnay Jul 2, 2026
3b0f3c7
Run buildifier in CI for BUCK files
dtolnay Jul 2, 2026
c55c187
Merge pull request #1727 from dtolnay/buildifier
dtolnay Jul 2, 2026
2e8759f
Bump Bazel build to rustc 1.96.1
dtolnay Jul 2, 2026
b3fb917
Lockfile update
dtolnay Jul 2, 2026
59443cf
Add Miri-compatible mock CxxString implementation
dtolnay Jul 4, 2026
79d8ac3
Merge pull request #1730 from dtolnay/miri
dtolnay Jul 4, 2026
19fd30d
Add regression test for issue 1729
dtolnay Jul 4, 2026
91649e6
Test that let_cxx_string implementation does not contain unsync refer…
dtolnay Jul 4, 2026
884ff7e
Move StackString internals into UnsafeCell
dtolnay Jul 4, 2026
c38adfe
Fix uninitialized string drop on panic in let_cxx_string expression
dtolnay Jul 4, 2026
5f2e82e
Merge pull request #1731 from dtolnay/letstring
dtolnay Jul 4, 2026
c39c127
Release 1.0.195
dtolnay Jul 4, 2026
26b289d
Rename gen -> bridge to unblock 2024 edition keyword
dtolnay Jul 4, 2026
49d4d73
Merge pull request #1732 from dtolnay/genkeyword
dtolnay Jul 4, 2026
1c5b94f
Sort package.exclude in Cargo.toml
dtolnay Jul 4, 2026
a8ccff3
Fill in unsafe extern blocks
dtolnay Jul 4, 2026
eca64d8
Merge pull request #1733 from dtolnay/edition
dtolnay Jul 4, 2026
725f5b1
Make export_name attributes unsafe
dtolnay Jul 4, 2026
80c8e15
Merge pull request #1734 from dtolnay/edition
dtolnay Jul 4, 2026
f1f1532
Make no_mangle attributes unsafe
dtolnay Jul 4, 2026
47a82d1
Merge pull request #1735 from dtolnay/edition
dtolnay Jul 5, 2026
8789c04
Resolve unsafe_op_in_unsafe_fn for 2024 edition
dtolnay Jul 4, 2026
0d337d2
Merge pull request #1736 from dtolnay/edition
dtolnay Jul 5, 2026
95ce0dc
Update to Rust 2024 edition
dtolnay Jul 4, 2026
ab7d7f4
Reformat with rustfmt 2024 style edition
dtolnay Jul 4, 2026
328eaca
Merge pull request #1737 from dtolnay/edition
dtolnay Jul 5, 2026
eae54e0
Release 1.0.196
dtolnay Jul 5, 2026
2b4a7d7
Add let_cxx_string RefUnwindSafe marker trait test
dtolnay Jul 5, 2026
2e46dcf
Make stack frames containing StackString RefUnwindSafe
dtolnay Jul 5, 2026
f181316
Merge pull request #1738 from dtolnay/asyncstring
dtolnay Jul 5, 2026
ed2fca7
Use link_deps in Cargo bazel metadata
dtolnay Jul 7, 2026
021d954
Merge pull request #1741 from dtolnay/bazelmetadata
dtolnay Jul 7, 2026
e590c84
Lockfile update
dtolnay Jul 7, 2026
db90df0
Release 1.0.197
dtolnay Jul 7, 2026
9dcd6d6
Bump Bazel build to rustc 1.97.0
dtolnay Jul 9, 2026
03bae8b
Replace apt emscripten with emsdk
dtolnay Jul 10, 2026
dc817f7
Install emsdk using setup-emsdk action
dtolnay Jul 10, 2026
33b21de
Merge pull request #1742 from dtolnay/emsdk
dtolnay Jul 10, 2026
b1aaed3
Regenerate MODULE.bazel.lock with bazel 9.2.0
dtolnay Jul 14, 2026
7055a83
Bump Bazel build to rustc 1.97.1
dtolnay Jul 16, 2026
006be77
Lockfile update
dtolnay Jul 18, 2026
03c55d6
Update to syn 3
dtolnay Jul 18, 2026
a035252
Merge pull request #1744 from dtolnay/syn3
dtolnay Jul 18, 2026
2ac8f56
Release 1.0.198
dtolnay Jul 18, 2026
aeb2e3d
Lockfile update to drop syn 2 dependencies
dtolnay Jul 19, 2026
965dc8d
Bazel rules_rust 0.72.0
dtolnay Jul 27, 2026
7c1843c
Bazel rules_rust 0.73.0
dtolnay Jul 31, 2026
2305cfc
Raise required compiler to Rust 1.88
dtolnay Aug 3, 2026
18c31db
Resolve collapsible_if clippy lints
dtolnay Aug 3, 2026
0f5dff8
Merge pull request #1745 from dtolnay/up
dtolnay Aug 3, 2026
c34b3c3
Update book's npm dependencies
dtolnay Aug 3, 2026
0bb6383
Fix emscripten linker choice in CI
dtolnay Aug 6, 2026
aef9d07
Merge pull request #1746 from dtolnay/emscripten
dtolnay Aug 6, 2026
17ce830
Ignore assert_is_empty pedantic clippy lint
dtolnay Aug 8, 2026
b4c35c3
Suppress clone_on_copy clippy lint
dtolnay Aug 8, 2026
7a12111
Merge pull request #1747 from dtolnay/clonecopy
dtolnay Aug 8, 2026
f753a01
Lockfile update
dtolnay Aug 8, 2026
986a6dd
Release 1.0.199
dtolnay Aug 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
buck-out/
target/
tools/buck/buck2/
19 changes: 19 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
###############################################################################
## Bazel Configuration Flags
##
## `.bazelrc` is a Bazel configuration file.
## https://bazel.build/docs/best-practices#bazelrc-file
###############################################################################

build --enable_platform_specific_config
build:linux --@rules_rust//:extra_rustc_flags=-Clink-arg=-fuse-ld=lld
build:linux --cxxopt=-std=c++17
build:macos --cxxopt=-std=c++17

###############################################################################
## Custom user flags
##
## This should always be the last thing in the `.bazelrc` file to ensure
## consistent behavior when setting flags in that file as `.bazelrc` files are
## evaluated top to bottom.
###############################################################################

try-import %workspace%/user.bazelrc
9 changes: 9 additions & 0 deletions .bcr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Bazel Central Registry

When the ruleset is released, we want it to be published to the
Bazel Central Registry automatically:
<https://registry.bazel.build>

This folder contains configuration files to automate the publish step.
See <https://github.com/bazel-contrib/publish-to-bcr/blob/main/templates/README.md>
for authoritative documentation about these files.
3 changes: 3 additions & 0 deletions .bcr/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fixedReleaser:
login: dtolnay
email: dtolnay@gmail.com
16 changes: 16 additions & 0 deletions .bcr/metadata.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"homepage": "https://cxx.rs",
"maintainers": [
{
"github": "dtolnay",
"github_user_id": 1940490,
"email": "dtolnay@gmail.com",
"name": "David Tolnay"
}
],
"repository": [
"github:dtolnay/cxx"
],
"versions": [],
"yanked_versions": {}
}
15 changes: 15 additions & 0 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
matrix:
platform:
- macos_arm64
- ubuntu2404
- windows
bazel: [8.x, 9.x]
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@cxx.rs//...'
test_targets:
- '@cxx.rs//...'
5 changes: 5 additions & 0 deletions .bcr/source.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"integrity": "",
"strip_prefix": "{REPO}-{VERSION}",
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{VERSION}.tar.gz"
}
25 changes: 19 additions & 6 deletions .buckconfig
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
[repositories]
repo = .
[cells]
root = .
prelude = tools/buck/prelude
toolchains = tools/buck/toolchains
ovr_config = tools/buck/prelude
buck = none
none = none

[external_cells]
prelude = bundled

[cell_aliases]
config = prelude
fbcode = none
fbsource = none

[project]
# Hide BUCK files under target/package/ from `buck build ...`. Otherwise:
# $ buck build ...
# //target/package/cxx-0.3.0/tests:ffi references non-existing file or directory 'target/package/cxx-0.3.0/tests/ffi/lib.rs'
ignore = target
#
# Also hide some Bazel-managed directories that contain symlinks to the repo root.
ignore = \
.git, \
bazel-bin, \
bazel-cxx, \
bazel-out, \
bazel-testlogs, \
target

[parser]
target_platform_detector_spec = target://...->ovr_config//platforms:default
target_platform_detector_spec = target:root//...->prelude//platforms:default
Empty file added .buckroot
Empty file.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
AlwaysBreakTemplateDeclarations: true
MaxEmptyLinesToKeep: 3
ReflowComments: false
11 changes: 7 additions & 4 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ Checks:
clang-diagnostic-*,
cppcoreguidelines-*,
modernize-*,
-cppcoreguidelines-avoid-const-or-ref-data-members,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-const-cast,
-cppcoreguidelines-pro-type-member-init,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-special-member-functions,
-modernize-use-default-member-init,
-modernize-use-equals-default,
-modernize-concat-nested-namespaces,
-modernize-return-braced-init-list,
-modernize-type-traits,
-modernize-use-constraints,
-modernize-use-nodiscard,
-modernize-use-ranges,
-modernize-use-trailing-return-type,
HeaderFilterRegex: cxx\.h
1 change: 0 additions & 1 deletion .clippy.toml

This file was deleted.

26 changes: 11 additions & 15 deletions .devcontainer/build.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
FROM mcr.microsoft.com/vscode/devcontainers/rust:1
FROM mcr.microsoft.com/devcontainers/rust:bookworm

RUN apt-get update \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends openjdk-11-jdk lld \
&& rustup default nightly 2>&1 \
&& rustup component add rust-analyzer-preview rustfmt clippy 2>&1 \
&& wget -q -O bin/install-bazel https://github.com/bazelbuild/bazel/releases/download/4.0.0/bazel-4.0.0-installer-linux-x86_64.sh \
&& wget -q -O bin/buck https://jitpack.io/com/github/facebook/buck/a5f0342ae3/buck-a5f0342ae3-java11.pex \
&& wget -q -O bin/buildifier https://github.com/bazelbuild/buildtools/releases/latest/download/buildifier \
&& wget -q -O tmp/watchman.zip https://github.com/facebook/watchman/releases/download/v2020.09.21.00/watchman-v2020.09.21.00-linux.zip \
&& chmod +x bin/install-bazel bin/buck bin/buildifier \
&& bin/install-bazel \
&& unzip tmp/watchman.zip -d tmp \
&& mv tmp/watchman-v2020.09.21.00-linux/bin/watchman bin \
&& mv tmp/watchman-v2020.09.21.00-linux/lib/* /usr/local/lib \
&& mkdir -p /usr/local/var/run/watchman \
&& rm tmp/watchman.zip
&& apt-get -y install --no-install-recommends clang lld zstd \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& wget -q -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 \
&& wget -q -O /tmp/buck.zst https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst \
&& wget -q -O /usr/local/bin/buildifier https://github.com/bazelbuild/buildtools/releases/latest/download/buildifier-linux-amd64 \
&& unzstd /tmp/buck.zst -o /usr/local/bin/buck \
&& chmod +x /usr/local/bin/bazel /usr/local/bin/buck /usr/local/bin/buildifier \
&& rm /tmp/buck.zst \
&& rustup component add rust-analyzer rust-src
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"extensions": [
"BazelBuild.vscode-bazel",
"matklad.rust-analyzer",
"ms-vscode.cpptools",
"rust-lang.rust-analyzer",
"vadimcn.vscode-lldb"
]
}
5 changes: 3 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
third-party/BUCK linguist-generated
third-party/bazel/** linguist-generated
/MODULE.bazel.lock linguist-generated
/third-party/BUCK linguist-generated
/third-party/bazel/** linguist-generated
30 changes: 30 additions & 0 deletions .github/workflows/buck2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Buck2

on:
push:
workflow_dispatch:
schedule: [cron: "40 1,13 * * *"]

permissions:
contents: read

jobs:
buck2:
name: Buck2 on ${{matrix.os == 'ubuntu' && 'Linux' || matrix.os == 'macos' && 'macOS' || matrix.os == 'windows' && 'Windows' || '???'}}
runs-on: ${{matrix.os}}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
timeout-minutes: 45
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: rust-src
- uses: dtolnay/install-buck2@latest
- run: buck2 run demo
- run: buck2 build ...
- run: buck2 test ...
- name: Run buck2 starlark lint
run: git ls-files ':(glob)tools/buck/**/*.bzl' | xargs buck2 starlark lint
Loading