mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 09:20:12 +01:00
etnaviv: isa: Generate Rust FFI bindings for asm.h
We will work with etna_inst_* structs in Rust. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
This commit is contained in:
parent
59406a9d85
commit
15a784689e
2 changed files with 37 additions and 0 deletions
8
src/etnaviv/isa/bindings.h
Normal file
8
src/etnaviv/isa/bindings.h
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright © 2024 Igalia S.L.
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "asm.h"
|
||||||
|
|
@ -90,4 +90,33 @@ disasm = executable(
|
||||||
install: false,
|
install: false,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if with_tools.contains('etnaviv')
|
||||||
|
add_languages('rust', required: true)
|
||||||
|
rust = import('rust')
|
||||||
|
|
||||||
|
isa_bindings_rs = rust.bindgen(
|
||||||
|
input : 'bindings.h',
|
||||||
|
output : 'isa_bindings.rs',
|
||||||
|
include_directories : [inc_src],
|
||||||
|
args : [
|
||||||
|
'--disable-header-comment',
|
||||||
|
'--ignore-functions',
|
||||||
|
'--allowlist-type', 'etna_inst',
|
||||||
|
'--allowlist-type', 'isa_swiz',
|
||||||
|
'--default-enum-style', 'rust',
|
||||||
|
'--with-derive-default',
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
_libetnaviv_isa_bindings_gen = static_library(
|
||||||
|
'isa_bindings',
|
||||||
|
isa_bindings_rs,
|
||||||
|
gnu_symbol_visibility : 'hidden',
|
||||||
|
rust_abi : 'rust',
|
||||||
|
rust_args: [
|
||||||
|
'-Anon_camel_case_types',
|
||||||
|
],
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue