Debian Codegraph @

test cases/rust/40 cargo dep multiple version/meson.build

raw
1 project('package test', 'rust', default_options: ['rust_std=2021'])
2
3 rust = import('rust')
4 cargo_ws = rust.workspace()
5
6 hello_rs = cargo_ws.subproject('hello')
7 assert(hello_rs.name() == 'hello')
8 assert(hello_rs.version() == '3.0.0')
9 assert(hello_rs.api() == '3')
10
11 answer_rs = cargo_ws.subproject('answer', '2')
12 assert(answer_rs.name() == 'answer')
13 assert(answer_rs.version() == '2.1.0')
14 assert(answer_rs.api() == '2')
15
16 e = executable('package-test', 'src/main.rs',
17 dependencies: [hello_rs.dependency(), answer_rs.dependency()],
18 )