File tree Expand file tree Collapse file tree 7 files changed +57
-0
lines changed Expand file tree Collapse file tree 7 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,9 @@ pub struct KaniArgs {
114114 /// Kani will only compile the crate. No verification will be performed
115115 #[ structopt( long, hidden_short_help( true ) ) ]
116116 pub only_codegen : bool ,
117+ /// Run Kani on all packages in the workspace.
118+ #[ structopt( long) ]
119+ pub workspace : bool ,
117120
118121 /// Specify the value used for loop unwinding in CBMC
119122 #[ structopt( long) ]
Original file line number Diff line number Diff line change @@ -52,6 +52,10 @@ impl KaniSession {
5252 args. push ( "build" . into ( ) ) ;
5353 }
5454
55+ if self . args . workspace {
56+ args. push ( "--workspace" . into ( ) ) ;
57+ }
58+
5559 args. push ( "--target" . into ( ) ) ;
5660 args. push ( build_target. into ( ) ) ;
5761
Original file line number Diff line number Diff line change 1+ # Copyright Kani Contributors
2+ # SPDX-License-Identifier: Apache-2.0 OR MIT
3+
4+ [package ]
5+ name = " ws-flag"
6+ version = " 0.1.0"
7+ edition = " 2021"
8+
9+ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
10+
11+ [workspace ]
12+ members = [
13+ " libcrate" ,
14+ ]
15+
16+
17+ [dependencies ]
18+
19+ [package .metadata .kani .flags ]
20+ workspace = true
Original file line number Diff line number Diff line change 1+ 2 successfully verified harnesses
Original file line number Diff line number Diff line change 1+ # Copyright Kani Contributors
2+ # SPDX-License-Identifier: Apache-2.0 OR MIT
3+
4+ [package ]
5+ name = " libcrate"
6+ version = " 0.1.0"
7+ edition = " 2021"
8+
9+ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
10+
11+ [dependencies ]
Original file line number Diff line number Diff line change 1+ // Copyright Kani Contributors
2+ // SPDX-License-Identifier: Apache-2.0 OR MIT
3+
4+ //! test in sub-crate.
5+
6+ #[ kani:: proof]
7+ fn check_libcrate_proof ( ) {
8+ assert ! ( 1 == 1 ) ;
9+ }
Original file line number Diff line number Diff line change 1+ // Copyright Kani Contributors
2+ // SPDX-License-Identifier: Apache-2.0 OR MIT
3+
4+ //! test in top crate.
5+
6+ #[ kani:: proof]
7+ fn check_toplevel_proof ( ) {
8+ assert ! ( 1 == 1 ) ;
9+ }
You can’t perform that action at this time.
0 commit comments