chore: remove the __vendored_luajit dependency, enable mlua/vendored by default (#252)

This commit is contained in:
Riccardo Mazzarini 2025-05-31 21:27:51 +02:00 committed by GitHub
parent 1674fdc36b
commit 5057f0ab05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 13 deletions

View file

@ -29,18 +29,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-msrv
- name: Install MSRV
uses: ./.github/actions/install-msrv
- name: Install Neovim ${{ matrix.neovim }}
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.neovim }}
- name: Install libluajit (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libluajit-5.1-dev
- name: Install libluajit (macOS)
if: runner.os == 'macOS'
run: brew install luajit
- name: Run tests
run: cargo test --workspace ${{ matrix.features }}
@ -49,10 +44,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-msrv
- name: Install MSRV with Clippy
uses: ./.github/actions/install-msrv
with:
components: clippy
- run: cargo clippy --all-features --workspace --tests -- -D warnings
- run: >
cargo clippy
--features neovim-nightly,libuv,mlua,test,test-terminator
--workspace
--tests
-- -D warnings
docs:
name: docs
@ -60,7 +61,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--cfg docsrs" cargo doc --features neovim-nightly
- run: >
RUSTFLAGS="-D warnings"
RUSTDOCFLAGS="--cfg docsrs"
cargo doc --features neovim-nightly
format:
name: format

View file

@ -41,19 +41,23 @@ license.workspace = true
keywords.workspace = true
[package.metadata.docs.rs]
features = ["neovim-nightly", "libuv", "mlua", "test", "__vendored_luajit"]
default-features = false
features = ["__docsrs", "neovim-nightly", "libuv", "mlua", "test"]
rustdoc-args = ["--cfg", "docsrs"]
[features]
default = ["__no_docsrs"]
neovim-0-10 = ["api/neovim-0-10"]
neovim-0-11 = ["api/neovim-0-10", "api/neovim-0-11"]
neovim-nightly = ["neovim-0-11", "api/neovim-nightly"]
__docsrs = ["mlua?/vendored"]
__no_docsrs = ["mlua?/module"]
libuv = ["dep:libuv"]
mlua = ["dep:mlua"]
test = ["macros/test", "dep:cargo_metadata"]
test-terminator = ["test", "libuv", "macros/test-terminator"]
__vendored_luajit = ["mlua/vendored"]
[dependencies]
api = { workspace = true }

View file

@ -20,8 +20,9 @@ thiserror = { workspace = true }
[target.'cfg(not(any(target_os = "windows", target_env = "msvc")))'.dependencies]
nvim-oxi = { path = "..", features = ["libuv", "mlua", "test"] }
# Enabling libuv will cause the build to fail on Windows.
[target.'cfg(any(target_os = "windows", target_env = "msvc"))'.dependencies]
nvim-oxi = { path = "..", features = ["mlua", "test", "__vendored_luajit"] }
nvim-oxi = { path = "..", features = ["mlua", "test"] }
[build-dependencies]
nvim-oxi = { path = "..", features = ["test"] }