master
build 19 lines 806 Bytes
Raw
1 _common_cfg = run_command(rustc_args,
2 '--config-headers', config_host_h, files('Cargo.toml'),
3 capture: true, check: true).stdout().strip().splitlines()
4
5 _common_rs = cargo_ws.package('common').library(rust_args: _common_cfg)
6 cargo_ws.package('common').override_dependency(declare_dependency(link_with: _common_rs))
7
8 common_rs = declare_dependency(link_with: [_common_rs])
9
10 rust.test('rust-common-tests', _common_rs,
11 suite: ['unit', 'rust'])
12
13 # Doctests are essentially integration tests, so they need the same dependencies.
14 # Note that running them requires the object files for C code, so place them
15 # in a separate suite that is run by the "build" CI jobs rather than "check".
16 rust.doctest('rust-common-doctests',
17 _common_rs,
18 dependencies: common_rs,
19 suite: ['doc', 'rust'])