Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase 1.0.150 #17

Merged
merged 294 commits into from
Mar 26, 2025
Merged
Changes from 4 commits
Commits
Show all changes
294 commits
Select commit Hold shift + click to select a range
3967cb4
meson: define project version
WavyEbuilder Nov 12, 2024
48f7e60
meson: disable dollar-in-identifier-extension warnings
WavyEbuilder Nov 12, 2024
88ddad9
Merge pull request 1394 from WavyEbuilder/meson-dollar-id
dtolnay Nov 12, 2024
13fc06b
Declare meson version compatibility of subprojects
dtolnay Nov 12, 2024
60d7154
Turn on rust-2024-compatibility lints in test crate
dtolnay Nov 12, 2024
3383018
Resolve 2024 lints on extern blocks
dtolnay Nov 12, 2024
2e408c9
Resolve 2024 lints on attributes
dtolnay Nov 12, 2024
02cc40e
Ignore edition lint on handwritten extern blocks in test crate
dtolnay Nov 12, 2024
e4f1a56
Resolve 2024 lints on impl Trait lifetime captures
dtolnay Nov 12, 2024
7a661bb
Make 2024 edition syntax conditional on compiler version
dtolnay Nov 12, 2024
fd173e0
Add rustversion crate to third-party deps
dtolnay Nov 12, 2024
77063f4
Add rustversion dependency to bazel build
dtolnay Nov 12, 2024
5db0535
Add rustversion dependency to buck build
dtolnay Nov 12, 2024
f50438e
Add rustversion dependency to meson build
dtolnay Nov 12, 2024
7c8ef12
Merge pull request #1395 from dtolnay/edition2024
dtolnay Nov 12, 2024
cdbb582
Lockfile update
dtolnay Nov 12, 2024
598353e
Release 1.0.130
dtolnay Nov 12, 2024
147d904
Delete meson build
dtolnay Nov 12, 2024
7e437f3
Merge pull request #1396 from dtolnay/meson
dtolnay Nov 12, 2024
efbf596
Add CI job on Rust 1.82 to test unsafe attrs
dtolnay Nov 12, 2024
2cc91e5
Define toolchains//:test
dtolnay Nov 13, 2024
93041e2
Delete unused buck cell alias
dtolnay Nov 13, 2024
6360fea
Add rules_cc as bazel_dep
phongt Nov 13, 2024
21d7186
Merge pull request #1397 from phongt/add_bazel_dep_rules_cc
dtolnay Nov 13, 2024
aa832dc
Add rules_cc 0.1.0 to bazel lockfile
dtolnay Nov 13, 2024
d077e42
Sort bazel dependencies alphabetically
dtolnay Nov 13, 2024
cff4757
Resolve unnecessary_map_or clippy lints
dtolnay Nov 16, 2024
90c69e9
Raise cxxbridge-cmd requires Rust version to 1.70
dtolnay Nov 16, 2024
3c2e2db
Ignore uninlined_format_args pedantic clippy lint
dtolnay Nov 16, 2024
a1eb235
Sort CI jobs in descending order by compiler version
dtolnay Nov 16, 2024
f3cd913
Raise required compiler to rust 1.71
dtolnay Nov 16, 2024
b353d5e
Raise required compiler to rust 1.73
dtolnay Nov 16, 2024
3e414bd
Switch C++ std::hash<T> implementations to foldhash
dtolnay Nov 16, 2024
cb0467c
Add foldhash crate to third-party deps
dtolnay Nov 16, 2024
ac9f6ff
Add foldhash dependency to bazel build
dtolnay Nov 16, 2024
cf9f18a
Add foldhash dependency to buck build
dtolnay Nov 16, 2024
547a0ed
Merge pull request #1401 from dtolnay/foldhash
dtolnay Nov 16, 2024
a2fe88c
`impl<T> Write for UniquePtr<T> where ... Pin<&a mut T> : Write`.
anforowicz Nov 22, 2024
0fc0797
Merge pull request #1405 from anforowicz/write-trait-blanket-impl-for…
dtolnay Nov 22, 2024
89a0417
Touch up PR 1405
dtolnay Nov 22, 2024
3c5cf5c
Release 1.0.131
dtolnay Nov 22, 2024
0d8ed21
Bump Bazel build to rustc 1.83.0
dtolnay Nov 28, 2024
689bbd1
Disallow incompatible cxxbridge-cmd version appearing in the same loc…
dtolnay Dec 1, 2024
53e6b97
Merge pull request #1408 from dtolnay/lock
dtolnay Dec 1, 2024
6362aac
Release 1.0.132
dtolnay Dec 1, 2024
58cd415
Move cxxbridge-cmd from dependencies to build-dependencies
dtolnay Dec 1, 2024
9272381
Merge pull request #1409 from dtolnay/builddep
dtolnay Dec 1, 2024
efdd853
Release 1.0.133
dtolnay Dec 1, 2024
25f8c84
Regenerate MODULE.bazel.lock with Bazel 8.0.0
dtolnay Dec 9, 2024
1d4fe98
Mark all generated impl blocks with #[automatically_derived]
dtolnay Dec 11, 2024
6f538a7
Merge pull request #1412 from dtolnay/automaticallyderived
dtolnay Dec 11, 2024
d29a013
Lockfile update
dtolnay Dec 11, 2024
d472b95
Release 1.0.134
dtolnay Dec 11, 2024
31fe48d
Make bazel supply cxx.h only to compilation
dtolnay Dec 12, 2024
1181d10
Bazel rules_rust 0.55.6
dtolnay Dec 12, 2024
3190072
Bazel rules_rust 0.56.0
dtolnay Dec 16, 2024
4f0d547
Friendlier message when `cxx::CxxString` is used in a `#[cxx::bridge]`.
anforowicz Dec 13, 2024
86e8c0c
Suppress `unused_unsafe` warnings within the generated code.
anforowicz Dec 16, 2024
18689a1
Merge pull request #1414 from anforowicz/cxx-qualifier-friendly-error…
dtolnay Dec 17, 2024
043817c
Merge pull request #1415 from anforowicz/unsafe-warning-from-generate…
dtolnay Dec 17, 2024
b10e1bc
Resolve semicolon_if_nothing_returned clippy lint in test
dtolnay Dec 17, 2024
55998da
Touch up PR 1415
dtolnay Dec 17, 2024
b993099
Lockfile update
dtolnay Dec 17, 2024
ee011db
Release 1.0.135
dtolnay Dec 17, 2024
7ae867a
Add support for Bazel common attributes [1] in `rust_cxx_bridge`.
wmatthews-google Dec 24, 2024
c6f9191
Merge pull request #1416 from wmatthews-google/bazel-common-attributes
dtolnay Dec 24, 2024
cdf98a1
Format PR 1416 with buildifier
dtolnay Dec 24, 2024
e580f4c
Merge pull request #892 from adetaylor/add-as-unique-ptr
dtolnay Dec 25, 2024
9737c10
Touch up PR 892
dtolnay Dec 25, 2024
37a533a
Invert the dependency between UniquePtr as_ptr and as_ref
dtolnay Dec 25, 2024
8ea95e8
Update more UniquePtr methods to use as_ptr and as_mut_ptr
dtolnay Dec 25, 2024
dc4b034
Merge pull request #1417 from dtolnay/uptrasptr
dtolnay Dec 25, 2024
af1c738
Lockfile update
dtolnay Dec 25, 2024
d54e446
Release 1.0.136
dtolnay Dec 25, 2024
fb82424
Resolve manual_let_else clippy lints in experimental-enum-variants-fr…
dtolnay Dec 27, 2024
e247ca0
Delete clippy suppressions that are no longer triggered
dtolnay Dec 27, 2024
47ec95b
Bump Bazel build to rustc 1.84.0
dtolnay Jan 9, 2025
97d7b79
Update clang-tidy from Clang 11 to Clang 18
dtolnay Jan 18, 2025
a75dadf
Suppress new clang-tidy checks
dtolnay Jan 18, 2025
16c5e26
Merge pull request #1421 from dtolnay/clang-tidy
dtolnay Jan 18, 2025
1c90cdb
chore: update rules_cc
wep21 Jan 19, 2025
1e8a5aa
Merge pull request 1422 from wep21/update-rules-cc
dtolnay Jan 19, 2025
47cdf12
Lockfile update
dtolnay Jan 19, 2025
c5fe795
Release 1.0.137
dtolnay Jan 19, 2025
d221226
Bazel rules_rust 0.57.0
dtolnay Jan 21, 2025
0ea0ca6
Bazel rules_rust 0.57.1
dtolnay Jan 23, 2025
e26474a
More precise gitignore patterns
dtolnay Jan 23, 2025
8a742f1
Perform mdbook js patching more exactly
dtolnay Jan 25, 2025
93a141e
Merge pull request #1424 from dtolnay/jspatch
dtolnay Jan 25, 2025
f206ea2
Format build.js with prettier 3.4.2
dtolnay Jan 25, 2025
dc96ade
Update html-entities
dtolnay Jan 25, 2025
d0856d5
Touch up hljs in build.js
dtolnay Jan 25, 2025
0415dda
Fix missing close span on last boring line
dtolnay Jan 25, 2025
632d188
Merge pull request #1425 from dtolnay/hljs
dtolnay Jan 25, 2025
d9caaa2
Update cheerio to 1.0.0
dtolnay Jan 25, 2025
a4dadee
Merge pull request #1426 from dtolnay/cheerio
dtolnay Jan 25, 2025
12e0f69
Ignore target directory created by Cargo in third-party
dtolnay Jan 25, 2025
7371ceb
Add ESLint configuration
dtolnay Jan 25, 2025
a50b483
Run ESLint in CI
dtolnay Jan 25, 2025
e9b06f3
Resolve no-undef lint in build.js
dtolnay Jan 25, 2025
7118ff7
Merge pull request #1427 from dtolnay/eslint
dtolnay Jan 25, 2025
9898f30
Ignore macOS linker warning
dtolnay Jan 26, 2025
b0be94b
Update devcontainer image
dtolnay Jan 25, 2025
9288757
Merge pull request #1428 from dtolnay/devcontainer
dtolnay Jan 26, 2025
d47e4a3
Resolve unnecessary_semicolon pedantic clippy lint
dtolnay Jan 30, 2025
8e1e731
Update ui test suite to nightly-2025-02-03
dtolnay Feb 3, 2025
861252d
feat: add `CxxString::as_c_str() -> &CStr`
nyurik Feb 5, 2025
b3aa79f
Merge pull request #1431 from nyurik/as_c_str
dtolnay Feb 5, 2025
4782535
Resolve std_instead_of_core clippy lint from PR 1431
dtolnay Feb 5, 2025
ac4f8b0
Format PR 1431 with rustfmt
dtolnay Feb 5, 2025
7e1e42b
Touch up PR 1431
dtolnay Feb 5, 2025
6a217fc
Raise minimum compiler for test suite to 1.77
dtolnay Feb 5, 2025
684c07e
Deduplicate std::string -> C string conversion
dtolnay Feb 5, 2025
1d208e2
Lockfile update
dtolnay Feb 5, 2025
94be9e5
Swap CxxString::as_c_str and CxxString::to_str in documentation
dtolnay Feb 5, 2025
9dd602d
Improve documentation of CxxString::as_c_str
dtolnay Feb 5, 2025
7117237
Document that CxxString::as_ptr is not for writing
dtolnay Feb 5, 2025
58f7176
Release 1.0.138
dtolnay Feb 5, 2025
8b42fb9
Tweak `rust::Slice` to become a C++20 `contiguous_range`.
anforowicz Feb 5, 2025
24cc295
Merge pull request #1432 from anforowicz/slice-contiguous-range
dtolnay Feb 8, 2025
d33599d
Format C++ code with clang-format 15
dtolnay Feb 8, 2025
2488899
Format C++ code with clang-format 18
dtolnay Feb 8, 2025
c6bb3b9
Merge pull request #1433 from dtolnay/clangfmt
dtolnay Feb 8, 2025
99b7cb5
Update iterator_category of Vec iterators in doc
dtolnay Feb 8, 2025
7599a50
Merge pull request #1434 from dtolnay/veciterator
dtolnay Feb 8, 2025
f8f351e
Synchronize reference qualification of operator= to docs
dtolnay Feb 8, 2025
5cf6b4f
Merge pull request #1435 from dtolnay/operatorassign
dtolnay Feb 8, 2025
bcaf8b4
Lockfile update
dtolnay Feb 8, 2025
178f408
Release 1.0.139
dtolnay Feb 8, 2025
bc83620
Cover C++20 in CI (fixing `char8_t`-related problem there).
anforowicz Feb 5, 2025
4ff8185
Merge pull request 1437 from anforowicz/cxx20-coverage
dtolnay Feb 9, 2025
8bcd6b1
Document char8_t rust::String constructors
dtolnay Feb 9, 2025
a8582e9
Merge pull request #1439 from dtolnay/char8t
dtolnay Feb 9, 2025
1484582
Format PR 1437 with clang-format
dtolnay Feb 9, 2025
09d9f00
Skip reflowing C++ comments
dtolnay Feb 9, 2025
754119b
Reword auto comment
dtolnay Feb 9, 2025
bad4095
Mark operator+(difference_type, Slice<T>::iterator) as noexcept
dtolnay Feb 9, 2025
0eb5b5e
Merge pull request #1440 from dtolnay/noexceptplus
dtolnay Feb 9, 2025
abb06c9
Move rust::String char8_t constructors to cxx.cc
dtolnay Feb 9, 2025
e067e71
Release 1.0.140
dtolnay Feb 9, 2025
8f5c798
Unset doc-scrape-examples for lib target
dtolnay Feb 10, 2025
855a683
Update ui test suite to nightly-2025-02-12
dtolnay Feb 12, 2025
fb8fdc0
Rebuild bazel lockfile with Bazel 8.1.0
dtolnay Feb 13, 2025
6ee5d40
Add <ranges> for std::ranges::contiguous_range
atetubou Feb 19, 2025
0243229
Merge pull request #1442 from atetubou/add_ranges_include
dtolnay Feb 19, 2025
be38b9d
Move ranges header to cxx.h
dtolnay Feb 19, 2025
8d3ed92
Merge pull request #1443 from dtolnay/rangesheader
dtolnay Feb 19, 2025
987e97e
Lockfile update
dtolnay Feb 19, 2025
926094d
Release 1.0.141
dtolnay Feb 19, 2025
d3ff539
Convert html links to intra-doc links
dtolnay Feb 20, 2025
17fb358
Point standard library links to stable
dtolnay Feb 20, 2025
55bba4c
Point standard library links to stable
dtolnay Feb 20, 2025
2379562
Bump Bazel build to rustc 1.84.1
dtolnay Feb 20, 2025
aeec460
Bump Bazel build to rustc 1.85.0
dtolnay Feb 20, 2025
0c114be
One more stable standard library crate
dtolnay Feb 20, 2025
94e8e46
Revert "Bump Bazel build to rustc 1.85.0"
dtolnay Feb 20, 2025
ecdb96a
feat: add `PartialEq`
enricobottazzi Feb 25, 2025
501eb1a
feat: update based on suggestion
enricobottazzi Feb 26, 2025
33f3fa8
Add template deduction guide for Slice constructor
JonathonReinhart Feb 27, 2025
bdf2e39
Disable clippy in CI due to ICE
dtolnay Feb 28, 2025
5702ef8
Merge pull request 1449 from JonathonReinhart/add-Slice-ctor-deductio…
dtolnay Feb 28, 2025
6aa9501
Touch up tests of std::span -> rust::Slice deduction
dtolnay Feb 28, 2025
db3aaac
Lockfile update
dtolnay Feb 28, 2025
4b4e1c1
Release 1.0.142
dtolnay Feb 28, 2025
fd2cbf9
Bazel rules_rust 0.58.0
dtolnay Mar 3, 2025
40ce673
Update rules_cc to 0.1.1
dtolnay Mar 3, 2025
eec0377
Merge pull request #1453 from dtolnay/rulescc
dtolnay Mar 3, 2025
9c0a988
Revert "Disable clippy in CI due to ICE"
dtolnay Mar 3, 2025
1dab889
Ignore elidable_lifetime_names pedantic clippy lint
dtolnay Mar 3, 2025
0bb4ad8
Resolve unnecessary_debug_formatting pedantic clippy lint
dtolnay Mar 3, 2025
557daaf
`impl<T> Seek for UniquePtr<T> where ... Pin<&a mut T> : Seek`.
anforowicz Mar 3, 2025
dcd0448
Merge pull request #1454 from anforowicz/seek-trait-forwarding
dtolnay Mar 3, 2025
41e8d9a
Forward Seek::seek_relative on Rust 1.80+
dtolnay Mar 3, 2025
497aa82
Ignore incompatible_msrv clippy warning
dtolnay Mar 3, 2025
25f383f
Merge pull request #1455 from dtolnay/seekrelative
dtolnay Mar 3, 2025
7e1d3ec
Merge pull request #1446 from MachinaIO/feat/partial-eq-trait
dtolnay Mar 3, 2025
f6fba5d
More UniquePtr trait impls: Eq, PartialOrd, Ord, Hash
dtolnay Mar 3, 2025
3ba3586
Merge pull request #1456 from dtolnay/uniqueptrtraits
dtolnay Mar 3, 2025
c5fe877
More SharedPtr trait impls
dtolnay Mar 3, 2025
cf43403
Merge pull request #1457 from dtolnay/sharedptrtraits
dtolnay Mar 3, 2025
6ddbcb0
Lockfile update
dtolnay Mar 3, 2025
03b025d
Release 1.0.143
dtolnay Mar 3, 2025
5ae3a93
Switch to standard feature-test macros
dtolnay Mar 4, 2025
82765ef
Merge pull request #1458 from dtolnay/feature
dtolnay Mar 4, 2025
20004df
macro: ensure that cfg attrs are set for type alias verify generation
ahayzen-kdab Mar 7, 2025
e2d0d2c
Merge pull request #1464 from ahayzen-kdab/cfg-on-type-alias
dtolnay Mar 12, 2025
dc9949f
Lockfile update
dtolnay Mar 12, 2025
af59a50
Release 1.0.144
dtolnay Mar 12, 2025
89adb63
Fixed missing bzlmod dependencies
UebelAndre Mar 13, 2025
c4d1b6e
Updated bzlmod to support Bazel 8
UebelAndre Mar 13, 2025
c509f17
Update use of bazel_skylib run_binary to use modern naming.
UebelAndre Mar 13, 2025
c15b48b
Merge pull request #1466 from UebelAndre/master
dtolnay Mar 13, 2025
2384542
Sort bazel deps
dtolnay Mar 13, 2025
dcc80b5
Release 1.0.145
dtolnay Mar 13, 2025
9e4ce0f
Added support for 'publish-to-bcr' tool
UebelAndre Mar 13, 2025
c368cbc
Remove version from MODULE.bazel
UebelAndre Mar 13, 2025
45f67ce
Align Bazel preferred linkages with Buck
dtolnay Mar 14, 2025
77cdec7
Merge pull request #1470 from dtolnay/linkstatic
dtolnay Mar 14, 2025
141c572
Use a shorter Bazel output base for Windows CI
UebelAndre Mar 13, 2025
9313b9a
Merge pull request #1468 from UebelAndre/windows
dtolnay Mar 14, 2025
7351ca0
Touch up PR 1468
dtolnay Mar 14, 2025
e97f5df
Merge pull request #1467 from UebelAndre/bazel
dtolnay Mar 14, 2025
b32f656
Release 1.0.146
dtolnay Mar 14, 2025
71f71b1
Add strip_prefix to unblock automated Bazel module publish
mortenmj Mar 14, 2025
5d7c3b8
Use {REPO} as well
mortenmj Mar 14, 2025
9c4eb4b
Merge pull request #1473 from mortenmj/patch-1
dtolnay Mar 14, 2025
448a142
Set a real email in bcr metadata
dtolnay Mar 14, 2025
eed5af3
Update name in bcr metadata
dtolnay Mar 14, 2025
ef6b541
Sort bcr metadata in same order as upstream's schema
dtolnay Mar 14, 2025
f4f9d3d
Update bcr homepage to match Cargo.toml homepage
dtolnay Mar 14, 2025
5a17e6a
Use consistent 2-space indent in bcr metadata json
dtolnay Mar 14, 2025
99f858e
Release 1.0.147
dtolnay Mar 14, 2025
8dc631f
Bazel rules_rust 0.59.1
dtolnay Mar 14, 2025
6cb993f
Delete redundant moduleRoots from bcr config
dtolnay Mar 15, 2025
9da48f5
Merge pull request #1474 from dtolnay/bcrconfig
dtolnay Mar 15, 2025
a3f2ad4
Add GitHub workflow to upload release archives with stable hash
dtolnay Mar 15, 2025
4f57ad7
Merge pull request #1475 from dtolnay/releasearchive
dtolnay Mar 15, 2025
efea3dd
Fix Bazel presubmit build targets
dtolnay Mar 15, 2025
88f0a4e
Merge pull request #1476 from dtolnay/presubmit
dtolnay Mar 15, 2025
3770da2
Release 1.0.148
dtolnay Mar 15, 2025
fcf96bf
Supply GitHub token to release workflow
dtolnay Mar 15, 2025
470e23a
Merge pull request #1477 from dtolnay/token
dtolnay Mar 15, 2025
4e94343
No need for export on ASSET_NAME env
dtolnay Mar 15, 2025
ab42011
Move tgz asset name to step's env
dtolnay Mar 15, 2025
46dfc21
Inline the expression for asset name
dtolnay Mar 15, 2025
52ed18d
Split asset publish into consecutive steps
dtolnay Mar 15, 2025
118f7e9
Merge pull request #1478 from dtolnay/asset
dtolnay Mar 15, 2025
915a28b
Include Bazel on Windows in lockfile verification
dtolnay Mar 15, 2025
33084ba
Merge pull request #1479 from dtolnay/bazellockfile
dtolnay Mar 15, 2025
0cf1c34
Short MODULE.bazel function calls on single line
dtolnay Mar 18, 2025
a2a8b6d
Bump Bazel build to rustc 1.85.0
dtolnay Mar 18, 2025
2f5d85a
Bump Bazel build to rustc 1.85.1
dtolnay Mar 18, 2025
1e2047d
Account for source tar filepaths surpassing xargs size limit
dtolnay Mar 18, 2025
bf69d45
Merge pull request #1481 from dtolnay/xargstar
dtolnay Mar 18, 2025
a1d2457
Expand long name of tar flags
dtolnay Mar 18, 2025
49aa829
Use sed split character that is not yaml comment character
dtolnay Mar 18, 2025
aef9a60
Do not apply tar transform to symbolic link targets
dtolnay Mar 18, 2025
a0b3185
Merge pull request #1482 from dtolnay/tarsymlink
dtolnay Mar 18, 2025
474f046
Lockfile update
dtolnay Mar 18, 2025
ba6590d
Release 1.0.149
dtolnay Mar 18, 2025
67a17c9
Disable special handling of filepaths that start with dash
dtolnay Mar 19, 2025
2cd3d73
Pass filepaths to tar with null separator
dtolnay Mar 19, 2025
c748bcb
Deterministic tar flags
dtolnay Mar 19, 2025
86cd652
Merge pull request #1483 from dtolnay/tar
dtolnay Mar 19, 2025
8ad2b56
Bazel rules_rust 0.59.2
dtolnay Mar 20, 2025
473ce4c
Update codespan-reporting to 0.12
dtolnay Mar 23, 2025
e37172b
Merge pull request #1485 from dtolnay/codespanreporting
dtolnay Mar 23, 2025
71017d5
Lockfile update
dtolnay Mar 23, 2025
66f1995
Release 1.0.150
dtolnay Mar 23, 2025
8a619cf
Merge remote-tracking branch 'upstream/master'
kuecks Mar 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
module(name = "cxx.rs")
module(
name = "cxx.rs",
version = "1.0.144",
bazel_compatibility = [">=7.2.1"],
compatibility_level = 1,
)

bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_rust", version = "0.58.0")
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "bazel_features", version = "1.21.0")

rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
@@ -13,4 +20,8 @@ use_repo(rust, "rust_toolchains")
register_toolchains("@rust_toolchains//:all")

crate_repositories = use_extension("//tools/bazel:extension.bzl", "crate_repositories")
use_repo(crate_repositories, "crates.io")
use_repo(
crate_repositories,
"crates.io",
"vendor",
)
358 changes: 0 additions & 358 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion tools/bazel/extension.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
load("//third-party/bazel:defs.bzl", _crate_repositories = "crate_repositories")
"""CXX bzlmod extensions"""

load("@bazel_features//:features.bzl", "bazel_features")
load("//third-party/bazel:crates.bzl", _crate_repositories = "crate_repositories")

def _crates_vendor_remote_repository_impl(repository_ctx):
repository_ctx.symlink(repository_ctx.attr.build_file, "BUILD.bazel")
@@ -17,6 +20,11 @@ def _crate_repositories_impl(module_ctx):
build_file = "//third-party/bazel:BUILD.bazel",
)

metadata_kwargs = {}
if bazel_features.external_deps.extension_metadata_has_reproducible:
metadata_kwargs["reproducible"] = True
return module_ctx.extension_metadata(**metadata_kwargs)

crate_repositories = module_extension(
implementation = _crate_repositories_impl,
)
9 changes: 5 additions & 4 deletions tools/bazel/rust_cxx_bridge.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# buildifier: disable=module-docstring
"""CXX Bridge rules."""

load("@bazel_skylib//rules:run_binary.bzl", "run_binary")
load("@rules_cc//cc:defs.bzl", "cc_library")

@@ -31,11 +32,11 @@ def rust_cxx_bridge(name, src, deps = [], **kwargs):
src + ".cc",
],
args = [
"$(location %s)" % src,
"$(execpath %s)" % src,
"-o",
"$(location %s.h)" % src,
"$(execpath %s.h)" % src,
"-o",
"$(location %s.cc)" % src,
"$(execpath %s.cc)" % src,
],
tool = "@cxx.rs//:codegen",
**kwargs