Commit Graph

89 Commits (1fbb2376ba72af30bb9575b384d55af4582c4cd3)

Author SHA1 Message Date
Alaric Senat 1fbb2376ba Merge branch 'fix/valist-abi' into 'master'
libvlc-sys: fix cross-platform va_list layout

See merge request videolan/vlc-rs!20
2026-08-25 14:58:49 +02:00
Alaric Senat 90729e2bd4 libvlc-sys: fix cross-platform va_list layout
bindgen spells the log callback's va_list parameter the way the host
that ran it does. The bindings are generated once and compiled
everywhere, so that spelling only happens to be right on the generating
host.
This was alright for most hosts but is fragile on aarch64 where va_list
is a plain 32 bytes struct.

Given we only forward the list to vsnprintf, extracting and simplifying
the cross-platform rust implementation from the unstable std-lib is
cheap and sound. We will just have to re-export the official type once
it's stablilized.
2026-08-25 14:57:31 +02:00
Alaric Senat cd6d404a1b libvlc-sys: re-generate the bindings
The previous bindings were built on an arbitrary host (my machine)
rather than the stable MSRV container we use for the CI.
2026-08-25 14:57:31 +02:00
Alaric Senat 0946aabed6 ci: run the build with --locked
`--locked` fails the job when a change bumps a dependency without
refreshing the committed lock file.
2026-08-19 15:10:13 +02:00
Alaric Senat 2304a20a86 ci: run the test suite instead of a bare build
`cargo build --all` never built the test or example targets. `cargo test
--workspace --all-targets` compiles everything and will run future tests.
2026-08-19 15:10:13 +02:00
Alaric Senat 05e15816d8 ci: cancel superseded pipelines
Force-pushing a branch several times in a row leaves the older pipelines
running to completion against commits nobody is waiting on. Mark the job
interruptible so GitLab can reclaims the runners.
2026-08-19 15:09:32 +02:00
Alaric Senat a63e4d4015 ci: force cargo to output colors
Gitlab CI supports ANSI color codes, which cargo does not output
with no TTY.
2026-08-19 14:56:38 +02:00
Alaric Senat 612fb75aac ci: stop sourcing the cargo env
The image now puts $CARGO_HOME/bin on PATH itself.
2026-08-19 14:56:38 +02:00
Alaric Senat 651c5e743b build: commit the lock file
cargo 1.82 has no MSRV-aware resolution, so a dependency publishing a
release that needs a newer toolchain would break the build on a change
that touched nothing. Pinning the resolution makes builds reproducible.

Consumers ignore the lock file of a dependency, so this constrains
nothing downstream. Committing it for libraries is the current cargo
recommendation.
2026-08-19 14:45:49 +02:00
Alaric Senat 1fd3d08b6e xtask: commit the lock file
bindgen's output is a committed source file, so the version producing it
has to be pinned like any other input. With `bindgen = "0.72"` floating,
a patch release that changes formatting silently changes the generated
bindings.

`--locked` on the alias keeps cargo from quietly updating it when the
manifest disagrees.
2026-08-19 14:43:27 +02:00
Alaric Senat 1a19deb9d0 ci: bump the CI image 2026-08-19 14:42:03 +02:00
Alaric Senat ce44dd0030 libvlc-sys: regenerate bindings via `cargo xtask bindgen` 2026-07-24 10:05:32 +02:00
Alaric Senat 0d57a4e242 build: replace the use-bindgen feature with a `cargo xtask bindgen` tool
Generating the FFI bindings at consumer build time is unecessary. The
`use-bindgen` Cargo feature was non-additive, and forced bindgen +
libclang onto every build that opted in, for a decision that is really
about the maintainer's environment, not the public API.

Move binding generation out of the build entirely, following the xtask
pattern[^1]:

- build.rs is reduced to locating and linking libvlc.
- Regeneration lives in a `xtask` crate, run with `cargo xtask bindgen`.

[^1]: <https://github.com/matklad/cargo-xtask>
2026-07-24 10:05:32 +02:00
Alaric Senat 13e5713e30 build: probe pkg-config once and drop the redundant vlc link
pkg-config was probed up to three times per build: once inside
generate_bindings for the header include paths, once for linking, and
then main unconditionally emitted `cargo:rustc-link-lib=vlc` on top of the
directives the successful probe already prints, libvlc ended up on
the link line two or three times.

Probe a single time in main and thread the resulting Library into
generate_bindings for its include paths. Drop the manual rustc-link-lib
line, since a successful pkg_config probe emits it.
2026-07-23 12:01:58 +02:00
Alaric Senat fe83e031af build: require libvlc >= 3.0.0 via pkg-config 2026-07-23 12:01:58 +02:00
Alaric Senat 656aa597fa build: bump bindgen to 0.72 and migrate to the allowlist API
bindgen 0.59, relied on the now-deprecated whitelist_* builder methods
and the bare CargoCallbacks unit struct. Move to 0.72 and its current
API.
2026-07-23 12:01:58 +02:00
Alaric Senat 9be21665c8 build: fix MSRV to 1.82
Found with cargo-msrv. The new requirement is brought by a subsequent
bindgen update
2026-07-23 12:01:58 +02:00
Alaric Senat 14198a352d build: bump rust edition
This is needed for a bindgen update and the crate will benefit from the
new languages features
2026-07-23 12:01:58 +02:00
Romain Roffé 12a22eb8a4 build: Use pkg-config to find vlc 2022-05-09 14:26:33 +02:00
Romain Roffé 55310d8bd3 Move libvlc link to libvlc-sys 2022-02-25 16:16:32 +01:00
Romain Roffé 34bd7b2988 Use bindgen
binding.rs generation with bindgen is optional.

By default, a pre-generated binding.rs is copied in OUT_DIR. This allows
for example to build on Windows and link against a standard VLC
installation.

Feature "use-bindgen" will trigger binding generation.
2022-02-25 16:05:10 +01:00
Rene Richter 6c4a081099 Add EventManager::detach method 2022-01-26 03:15:14 +00:00
Romain Roffé 6133d47ca7 media: Add add_option() method 2022-01-25 13:30:48 +01:00
Pierre Réveillon 14dd7928bd CI: Add Gitlab CI 2021-11-22 02:53:55 +00:00
Martin Finkel 21c4cb25f5 Merge branch 'windows-build' into 'master'
Improve linking on Windows

See merge request mfkl/vlc-rs!1
2021-07-21 06:25:32 +00:00
Markus Røyset 80b31f723e Adjust rustc-link-lib directive 2021-04-13 21:18:30 +02:00
Markus Røyset 37e72976d6 Add support for building on Windows 2021-04-13 20:22:58 +02:00
T. Okubo 8e18b13beb
Merge pull request #7 from Spiideo/vlm-broadcast
VLM support
2019-11-25 20:34:07 +09:00
Raniz 93560d3e10 Update for Rust 2018 2019-11-25 11:48:12 +01:00
Raniz ab7c27e8cb Merge branch 'master' into vlm-broadcast 2019-11-25 11:43:53 +01:00
Raniz d379d70a1c VLM as a separate module
* Refactored VLM methods into a VLM trait in it's own module
* Added more VLM methods
2019-11-25 11:43:23 +01:00
Raniz cd3b94f83b Add support for VLM events 2019-11-25 11:43:23 +01:00
Raniz 31a5840407 Merge remote-tracking branch '0xpr03/master' 2019-11-25 11:43:23 +01:00
Raniz a5499802ab Add method for adding VODs to VLM 2019-11-25 11:43:22 +01:00
T. Okubo 97898ed074
Merge pull request #5 from alexandre-janniaux/change-edition-2018/MR
Update repository to Rust edition 2018
2019-11-19 18:24:39 +09:00
Raniz b13d7ead4b Add methods for handling VLM broadcasts to Instance 2019-11-18 13:49:40 +01:00
Alexandre Janniaux f771e6210c cargo: update edition to 2018 2019-11-15 18:43:24 +01:00
Alexandre Janniaux 7e09da35b6 media_list: fix crate path 2019-11-15 18:43:24 +01:00
Alexandre Janniaux 2f066ce170 media_library: fix crate path 2019-11-15 18:43:24 +01:00
Alexandre Janniaux 3061aaa977 video: fix crate path 2019-11-15 18:43:24 +01:00
Alexandre Janniaux 7b60a12911 audio: fix crate path 2019-11-15 18:43:24 +01:00
Alexandre Janniaux 56fc69eb3e media_player: fix whitespace 2019-11-15 18:43:24 +01:00
Alexandre Janniaux 23a16997af media_player: fix crate path 2019-11-15 18:43:24 +01:00
Alexandre Janniaux a1d51ebb7a media: fix whitespace 2019-11-15 18:43:24 +01:00
Alexandre Janniaux b4346a2573 media: fix crate path 2019-11-15 18:43:24 +01:00
Alexandre Janniaux 8ccb60ef9a core: fix whitespaces 2019-11-15 18:43:24 +01:00
Alexandre Janniaux 3dd635a5e8 core: fix crate path 2019-11-15 18:43:24 +01:00
Alexandre Janniaux 092377878c media_player: fix missing dyn 2019-11-15 18:43:24 +01:00
Alexandre Janniaux 4fc958841d core: fix missing dyn 2019-11-15 18:43:24 +01:00
Alexandre Janniaux b18049f978 audio: fix obsolete unnamed parameter 2019-11-15 18:43:24 +01:00