mesa/src/compiler
Paolo Bonzini 8ea232a9ae meson: rename Rust subprojects to NAME-SEMVER-rs
Use the convention for Rust subprojects that was adopted by Meson 1.5.0
and newer.

Distros would prefer to avoid vendored crate sources, and instead use
local sources from e.g. /usr/share/cargo/registry.  While Meson does not
support a local registry, it can be emulated with MESON_PACKAGE_CACHE_DIR.

However, because the distro might not be using the exact version of the
package, but only one that has the same semver, packagers need to add
some hacks to rewrite the wrap files.  For example, in Fedora:

    export MESON_PACKAGE_CACHE_DIR="%{cargo_registry}/"
    # So... Meson can't actually find them without tweaks
    %define inst_crate_nameversion() %(basename %{cargo_registry}/%{1}-*)
    %define rewrite_wrap_file() sed -e "/source.*/d" -e "s/%{1}-.*/%{inst_crate_nameversion %{1}}/" -i subprojects/%{1}.wrap
    %rewrite_wrap_file proc-macro2
    %rewrite_wrap_file quote
    %rewrite_wrap_file syn
    %rewrite_wrap_file unicode-ident
    %rewrite_wrap_file paste

Having a common convention for the name of Rust wraps makes it possible
to perform this transformation with a script without listing
the wraps one by one, and to share the script across multiple packages
(which will be useful when QEMU starts using Rust in a similar way to Mesa).

For an example of such a script, see
https://lore.kernel.org/r/20250722083507.678542-1-pbonzini@redhat.com/.

Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36284>
2025-07-24 17:52:34 +00:00
..
clc clc: add support for cl_ext_image_unorm_int_2_101010 2025-06-30 18:04:59 +00:00
glsl glsl,nir: factor out nir_opt_varyings_bulk 2025-07-23 14:15:57 +00:00
isaspec meson: do not compile libisaspec unless used 2025-03-25 08:32:47 +00:00
libcl libcl: Add more UINT_MAX variants 2025-06-20 10:11:52 +00:00
nir treewide: use SWAP macro 2025-07-23 19:49:47 +00:00
rust meson: rename Rust subprojects to NAME-SEMVER-rs 2025-07-24 17:52:34 +00:00
spirv nir,nak: Add a nir_texop_sample_pos_nv and plumb it through 2025-07-18 22:21:46 +00:00
builtin_types.py compiler: add float8 glsl types 2025-06-23 07:59:24 +00:00
builtin_types_c.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
builtin_types_h.py compiler: Generate files with newline at end 2025-06-24 14:01:04 +00:00
glsl_types.c compiler: add float8 glsl types 2025-06-23 07:59:24 +00:00
glsl_types.h nak: Add cooperative matrix lowering pass 2025-07-15 23:34:33 +00:00
meson.build nak: Move bitset to compiler crate 2024-08-07 21:08:18 +00:00
shader_enums.c nir: Add SYSTEM_VALUE_FRAG_COORD_Z/W. 2025-06-18 23:11:36 +00:00
shader_enums.h nir: Add SYSTEM_VALUE_FRAG_COORD_Z/W. 2025-06-18 23:11:36 +00:00
shader_info.h nir: add shader_info::prev_stage_has_xfb 2025-06-12 19:35:37 +00:00