Skip to content

Commit

Permalink
Support for CxxVector<*mut T> and CxxVector<*const T>
Browse files Browse the repository at this point in the history
  • Loading branch information
makai410 committed Sep 27, 2024
1 parent 9629375 commit 6fccd3a
Show file tree
Hide file tree
Showing 38 changed files with 2,893 additions and 2,080 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,13 @@ jobs:
name: ${{matrix.name || format('Rust {0}', matrix.rust)}}
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ${{matrix.os || 'ubuntu'}}-latest
runs-on: ${{matrix.os}}-latest
strategy:
fail-fast: false
matrix:
rust: [nightly, beta, stable, 1.67.0, 1.70.0, 1.74.0]
os: [ubuntu]
include:
- rust: nightly
- rust: beta
- rust: stable
- rust: 1.67.0
- rust: 1.70.0
- rust: 1.74.0
- name: Cargo on macOS
rust: nightly
os: macos
Expand Down Expand Up @@ -59,7 +55,7 @@ jobs:
echo RUSTFLAGS=$RUSTFLAGS >> $GITHUB_ENV
echo exclude=--exclude cxx-test-suite ${{matrix.rust == '1.70.0' && '--exclude cxxbridge-cmd' || ''}} >> $GITHUB_OUTPUT
env:
RUSTFLAGS: ${{env.RUSTFLAGS}} ${{matrix.os && github.event_name != 'schedule' && '--cfg skip_ui_tests' || ''}}
RUSTFLAGS: ${{env.RUSTFLAGS}} ${{matrix.os != 'ubuntu' && github.event_name != 'schedule' && '--cfg skip_ui_tests' || ''}}
id: testsuite
shell: bash
- run: cargo run --manifest-path demo/Cargo.toml
Expand All @@ -71,6 +67,11 @@ jobs:
- run: cargo check --no-default-features
env:
RUSTFLAGS: --cfg compile_error_if_alloc --cfg cxx_experimental_no_alloc ${{env.RUSTFLAGS}}
- uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu' && matrix.rust == 'nightly' && always()
with:
name: Cargo.lock
path: Cargo.lock

reindeer:
name: Reindeer
Expand Down Expand Up @@ -145,6 +146,8 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
env:
RUSTFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cxx"
version = "1.0.126"
version = "1.0.128"
authors = ["David Tolnay <[email protected]>"]
categories = ["development-tools::ffi", "api-bindings", "no-std"]
description = "Safe interop between Rust and C++"
Expand All @@ -23,15 +23,15 @@ alloc = []
std = ["alloc"]

[dependencies]
cxxbridge-macro = { version = "=1.0.126", path = "macro" }
cxxbridge-macro = { version = "=1.0.128", path = "macro" }
link-cplusplus = "1.0.9"

[build-dependencies]
cc = "1.0.83"
cxxbridge-flags = { version = "=1.0.126", path = "flags", default-features = false }
cxxbridge-flags = { version = "=1.0.128", path = "flags", default-features = false }

[dev-dependencies]
cxx-build = { version = "=1.0.126", path = "gen/build" }
cxx-build = { version = "=1.0.128", path = "gen/build" }
cxx-gen = { version = "0.7", path = "gen/lib" }
cxx-test-suite = { version = "0", path = "tests/ffi" }
rustversion = "1.0.13"
Expand Down
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module(name = "cxx.rs")

bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_rust", version = "0.49.3")
bazel_dep(name = "rules_rust", version = "0.50.0")

rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
versions = ["1.80.1"],
versions = ["1.81.0"],
)
use_repo(rust, "rust_toolchains")

Expand Down
Loading

0 comments on commit 6fccd3a

Please sign in to comment.