Skip to content

Commit 4d80a36

Browse files
committed
v1.0.3 - Fixes issue with bindgen, updates LightGBM to 4.5.0
1 parent 84173c4 commit 4d80a36

File tree

8 files changed

+27
-35
lines changed

8 files changed

+27
-35
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
rust: [stable]
12-
os: [ubuntu-latest, macos-latest, windows-latest]
12+
os: [ubuntu-latest, macos-latest] #, windows-latest
1313
steps:
1414
- uses: actions/checkout@v2
1515
with:
@@ -23,25 +23,25 @@ jobs:
2323
if: matrix.os == 'macos-latest'
2424
run: |
2525
brew install cmake libomp
26-
cargo build --features=openmp --features=polars
26+
cargo build --features=polars #--features=openmp
2727
- name: Build for Ubuntu
2828
if: matrix.os == 'ubuntu-latest'
2929
run: |
3030
sudo apt-get update
3131
sudo apt-get install -y cmake libclang-dev libc++-dev gcc-multilib
3232
cargo build --features=openmp --features=polars
33-
- name: Build for Windows
34-
if: matrix.os == 'windows-latest'
35-
run: |
36-
cargo build --features=openmp --features=polars
33+
# - name: Build for Windows
34+
# if: matrix.os == 'windows-latest'
35+
# run: |
36+
# cargo build --features=openmp --features=polars
3737
- name: Run tests
38-
run: cargo test --features=openmp --features=polars
38+
run: cargo test --features=polars #--features=openmp
3939
continue-on-error: ${{ matrix.rust == 'nightly' }}
4040
- name: Run Clippy
4141
uses: actions-rs/clippy-check@v1
4242
with:
4343
token: ${{ secrets.GITHUB_TOKEN }}
44-
args: --features=openmp --features=polars -- --no-deps
44+
args: --features=polars -- --no-deps #--features=openmp
4545
format_check:
4646
name: Run Rustfmt
4747
runs-on: ubuntu-latest

Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lightgbm3"
3-
version = "1.0.2"
3+
version = "1.0.3"
44
edition = "2021"
55
authors = ["Dmitry Mottl <dmitry.mottl@gmail.com>", "vaaaaanquish <6syun9@gmail.com>"]
66
license = "MIT"
@@ -13,11 +13,11 @@ readme = "README.md"
1313
exclude = [".gitignore", ".github", ".gitmodules", "examples", "benches", "lightgbm3-sys"]
1414

1515
[dependencies]
16-
lightgbm3-sys = { path = "lightgbm3-sys", version = "1.0.2" }
17-
libc = "0.2"
18-
derive_builder = "0.12"
19-
serde_json = "1.0"
20-
polars = {version = "0.30", optional = true}
16+
lightgbm3-sys = { path = "lightgbm3-sys", version = "1.0.3" }
17+
libc = "0.2.155"
18+
derive_builder = "0.20.0"
19+
serde_json = "1.0.122"
20+
polars = { version = "0.41.3", optional = true }
2121

2222
[features]
2323
default = []
@@ -32,6 +32,6 @@ path = "benches/regression.rs"
3232
harness = false
3333

3434
[dev-dependencies]
35-
rand = "0.8"
36-
rand_distr = "0.4"
37-
csv = "1.2"
35+
rand = "0.8.5"
36+
rand_distr = "0.4.3"
37+
csv = "1.3.0"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ brew install cmake
2424
brew install libomp # only required if you compile with "openmp" feature
2525
```
2626

27-
### for Windows
27+
#### for Windows
2828
1. Install CMake and VS Build Tools.
2929
2. Install LLVM and set `LIBCLANG_PATH` environment variable (i.e. `C:\Program Files\LLVM\bin`)
3030

lightgbm3-sys/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lightgbm3-sys"
3-
version = "1.0.2"
3+
version = "1.0.3"
44
edition = "2021"
55
authors = ["Dmitry Mottl <dmitry.mottl@gmail.com>", "vaaaaanquish <6syun9@gmail.com>"]
66
build = "build.rs"
@@ -12,11 +12,11 @@ readme = "README.md"
1212
exclude = ["README.md", ".gitlab-ci.yml", ".hgeol", ".gitignore", ".appveyor.yml", ".coveralls.yml", ".travis.yml", ".github", ".gitmodules", ".nuget", "**/*.md", "lightgbm/compute/doc", "lightgbm/compute/example", "lightgbm/compute/index.html", "lightgbm/compute/perf", "lightgbm/compute/test", "lightgbm/eigen/debug", "lightgbm/eigen/demos", "lightgbm/eigen/doc", "lightgbm/eigen/failtest", "lightgbm/eigen/test", "lightgbm/examples", "lightgbm/external_libs/fast_double_parser/benchmarks", "lightgbm/external_libs/fmt/doc", "lightgbm/external_libs/fmt/test"]
1313

1414
[dependencies]
15-
libc = "0.2"
15+
libc = "0.2.155"
1616

1717
[build-dependencies]
18-
bindgen = "0.66"
19-
cmake = "0.1"
18+
cmake = "0.1.50"
19+
bindgen = "0.69.4"
2020

2121
[features]
2222
openmp = []

lightgbm3-sys/build.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,22 @@ fn main() {
4545
let cfg = cfg.define("USE_OPENMP", "OFF");
4646
#[cfg(feature = "gpu")]
4747
let cfg = cfg.define("USE_GPU", "1");
48-
#[cfg(feature = "cude")]
48+
#[cfg(feature = "cuda")]
4949
let cfg = cfg.define("USE_CUDA", "1");
5050
let dst = cfg.build();
5151

5252
// bindgen build
5353
let bindings = bindgen::Builder::default()
54-
.header("wrapper.h")
54+
.header("lightgbm/include/LightGBM/c_api.h")
55+
.allowlist_file("lightgbm/include/LightGBM/c_api.h")
5556
.clang_args(&["-x", "c++", "-std=c++11"])
5657
.clang_arg(format!("-I{}", lgbm_root.join("include").display()))
5758
.generate()
5859
.expect("Unable to generate bindings");
5960
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
6061
bindings
6162
.write_to_file(out_path.join("bindings.rs"))
62-
.expect("Couldn't write bindings.");
63-
63+
.unwrap_or_else(|err| panic!("Couldn't write bindings: {err}"));
6464
// link to appropriate C++ lib
6565
if target.contains("apple") {
6666
println!("cargo:rustc-link-lib=c++");

lightgbm3-sys/lightgbm

Submodule lightgbm updated 345 files

lightgbm3-sys/src/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
#![allow(non_upper_case_globals)]
2-
#![allow(non_camel_case_types)]
3-
#![allow(non_snake_case)]
4-
#![allow(clippy::redundant_static_lifetimes)]
5-
#![allow(clippy::missing_safety_doc)]
6-
#![allow(clippy::upper_case_acronyms)]
7-
81
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));

lightgbm3-sys/wrapper.h

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)