diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index cbf45b6..099340b 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -9,15 +9,15 @@ env: name: Build documentation on new release jobs: doc: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | sudo apt-get install -y libboost1.74-all-dev libmpfr-dev libgmp-dev cmake wget unzip clang libstdc++-11-dev wget https://github.com/CGAL/cgal/releases/download/v5.6.1/CGAL-5.6.1-library.tar.xz - wget https://gitlab.com/SFCGAL/SFCGAL/-/archive/v1.5.0/SFCGAL-v1.5.0.zip + wget https://gitlab.com/SFCGAL/SFCGAL/-/archive/v2.0.0/SFCGAL-v2.0.0.zip tar -xf CGAL-5.6.1-library.tar.xz - unzip SFCGAL-v1.5.0.zip + unzip SFCGAL-v2.0.0.zip cd CGAL-5.6.1 && cmake . && sudo make install && cd .. cd $(ls -d */ | grep SFC) && cmake -DCMAKE_INSTALL_PREFIX=/usr . && make && sudo make install && cd .. - run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2f9fe1..3fc1bde 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,15 +7,15 @@ on: name: Build and run tests jobs: test: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | sudo apt-get install -y libboost1.74-all-dev libmpfr-dev libgmp-dev cmake wget unzip clang libstdc++-11-dev wget https://github.com/CGAL/cgal/releases/download/v5.6.1/CGAL-5.6.1-library.tar.xz - wget https://gitlab.com/SFCGAL/SFCGAL/-/archive/v1.5.0/SFCGAL-v1.5.0.zip + wget https://gitlab.com/SFCGAL/SFCGAL/-/archive/v2.0.0/SFCGAL-v2.0.0.zip tar -xf CGAL-5.6.1-library.tar.xz - unzip SFCGAL-v1.5.0.zip + unzip SFCGAL-v2.0.0.zip cd CGAL-5.6.1 && cmake . && sudo make install && cd .. cd $(ls -d */ | grep SFC) && cmake -DCMAKE_INSTALL_PREFIX=/usr . && make && sudo make install && cd .. - run: cargo test --all-features diff --git a/CHANGELOG.md b/CHANGELOG.md index 70e2336..e772392 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog All notable changes to this project will be documented in this file. +## [0.8.0] - 2024-10-31 +### Changed +- Generate bindings against latest SFCGAL version `2.0.0`. +- Update `bindgen` version to `0.70`. + ## [0.7.0] - 2024-04-16 ### Changed - Generate bindings against latest SFCGAL version `1.5.0`. diff --git a/Cargo.toml b/Cargo.toml index 2af7ffd..010151e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sfcgal-sys" -version = "0.7.0" +version = "0.8.0" authors = ["Matthieu Viry "] license = "MIT/Apache-2.0" edition = "2021" @@ -15,5 +15,5 @@ repository = "https://github.com/mthh/sfcgal-sys" categories = ["external-ffi-bindings"] [build-dependencies] -bindgen = "0.69" +bindgen = "0.70" cc = "1.0" diff --git a/README.md b/README.md index 4f59aeb..9ba847b 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,14 @@ [![Build](https://github.com/mthh/sfcgal-sys/actions/workflows/test.yml/badge.svg)](https://github.com/mthh/sfcgal-sys/actions/workflows/test.yml) [![Crates.io](https://img.shields.io/crates/v/sfcgal-sys.svg)](https://crates.io/crates/sfcgal-sys) -[![Documentation](https://img.shields.io/badge/documentation-0.7.0-green)](https://mthh.github.io/sfcgal-sys/sfcgal_sys/) +[![Documentation](https://img.shields.io/badge/documentation-0.8.0-green)](https://mthh.github.io/sfcgal-sys/sfcgal_sys/) -Rust low-level FFI bindings to [`SFCGAL`](https://sfcgal.gitlab.io/SFCGAL/) 1.5.x C API. +Rust low-level FFI bindings to [`SFCGAL`](https://sfcgal.gitlab.io/SFCGAL/) 2.0.x C API. Don't use this crate directly, prefer it's higher-level wrapper : [sfcgal-rs](https://github.com/mthh/sfcgal-rs). > [!IMPORTANT] -> Note that the required version of SFCGAL is currently 1.5.x (latest version - 2023-10-30). -> If you want to use SFCCAL 1.4.x, you can use the 0.6.x version of this crate / of [sfcgal-rs](https://github.com/mthh/sfcgal-rs). +> Note that the required version of SFCGAL is currently 2.0.x (latest version - 2024-10-10). +> If you want to use SFCCAL 1.5.x, you can use the 0.7.x version of this crate / of [sfcgal-rs](https://github.com/mthh/sfcgal-rs). ## Internals @@ -19,7 +19,7 @@ Then bindgen is run to generate these low-levels bindings. In addition to all the `sfcgal_` types and functions, this crate expose : - a Rust `initialize` function: it calls `sfcgal_init()` function then it calls a custom `w_sfcgal_init_handlers()` function which replace the error and warning handlers from `printf` to a char buffer. That `initialize` function internally uses `std::sync::Once` to ensure it's only called once. -- two C functions `w_sfcgal_get_last_error` and `w_sfcgal_get_last_warning` which repectively reads the buffer containing the error message and the buffer containing the warning message. +- two C functions `w_sfcgal_get_last_error` and `w_sfcgal_get_last_warning` which respectively reads the buffer containing the error message and the buffer containing the warning message. In the future it could probably be improved by not requiring SFCGAL to be installed as a system library.