meson: Add pest rust dependencies

Including its dependency ucd-trie.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: @LingMan
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
This commit is contained in:
Christian Gmeiner
2024-01-18 16:13:39 +01:00
committed by Marge Bot
parent 87ad3ca0ac
commit e28ff81869
13 changed files with 169 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
project(
'once_cell',
'rust',
version : '1.8.0',
license :'MIT OR Apache-2.0',
)
rust_args = [
'--cfg', 'feature="std"'
]
lib = static_library(
'once_cell',
'src/lib.rs',
rust_args : rust_args,
override_options : ['rust_std=2018', 'build.rust_std=2018'],
rust_abi : 'rust',
native : true,
)
dep_once_cell = declare_dependency(
link_with : [lib],
)

View File

@@ -0,0 +1,21 @@
project(
'pest',
'rust',
version : '2.7.11',
license :'MIT OR Apache-2.0',
)
ucd = subproject('ucd-trie').get_variable('lib')
lib = static_library(
'pest',
'src/lib.rs',
override_options : ['rust_std=2021', 'build.rust_std=2021'],
link_with : [ucd],
rust_abi : 'rust',
native : true,
)
dep_pest = declare_dependency(
link_with : [lib, ucd],
)

View File

@@ -0,0 +1,22 @@
project(
'pest_derive',
'rust',
version : '2.7.11',
license :'MIT OR Apache-2.0',
)
pest = subproject('pest').get_variable('lib')
pest_generator = subproject('pest_generator').get_variable('lib')
rust = import('rust')
lib = rust.proc_macro(
'pest_derive',
'src/lib.rs',
override_options : ['rust_std=2021', 'build.rust_std=2021'],
link_with : [pest, pest_generator],
)
dep_pest_derive = declare_dependency(
link_with : [lib, pest, pest_generator],
)

View File

@@ -0,0 +1,30 @@
project(
'pest_generator',
'rust',
version : '2.7.11',
license :'MIT OR Apache-2.0',
)
pest = subproject('pest').get_variable('lib')
pest_meta = subproject('pest_meta').get_variable('lib')
quote = subproject('quote').get_variable('lib')
pm2 = subproject('proc-macro2').get_variable('lib')
syn = subproject('syn').get_variable('lib')
rust_args = [
'--cfg', 'feature="std"',
]
lib = static_library(
'pest_generator',
'src/lib.rs',
rust_args : rust_args,
override_options : ['rust_std=2021', 'build.rust_std=2021'],
link_with : [pest, pest_meta, pm2, quote, syn],
rust_abi : 'rust',
native : true,
)
dep_pest_generator = declare_dependency(
link_with : [lib, pest, pest_meta, quote, syn],
)

View File

@@ -0,0 +1,22 @@
project(
'pest_meta',
'rust',
version : '2.7.11',
license :'MIT OR Apache-2.0',
)
once_cell = subproject('once_cell').get_variable('lib')
pest = subproject('pest').get_variable('lib')
lib = static_library(
'pest_meta',
'src/lib.rs',
override_options : ['rust_std=2021', 'build.rust_std=2021'],
link_with : [once_cell, pest],
rust_abi : 'rust',
native : true,
)
deb_pest_meta = declare_dependency(
link_with : [lib, once_cell, pest],
)

View File

@@ -0,0 +1,14 @@
project(
'ucd_trie',
'rust',
version : '0.1.6',
license : '(MIT or Apache-2.0) AND Unicode-DFS-2016)',
)
lib = static_library(
'ucd_trie',
'src/lib.rs',
override_options : ['rust_std=2018', 'build.rust_std=2018'],
rust_abi : 'rust',
native : true,
)