File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,15 @@ fn fail_if_in_dev_environment() -> Result<()> {
90
90
Ok ( ( ) )
91
91
}
92
92
93
+ /// Give users a better error message than "404" if we're on an unsupported platform.
94
+ fn fail_if_unsupported_target ( ) -> Result < ( ) > {
95
+ // This is basically going to be reduced to a compile-time constant
96
+ match TARGET {
97
+ "x86_64-unknown-linux-gnu" | "x86_64-apple-darwin" => Ok ( ( ) ) ,
98
+ _ => bail ! ( "Kani does not support this platform (Rust target {})" , TARGET ) ,
99
+ }
100
+ }
101
+
93
102
/// Sets up Kani by unpacking/installing to `~/.kani/kani-VERSION`
94
103
fn setup ( use_local_bundle : Option < OsString > ) -> Result < ( ) > {
95
104
let kani_dir = kani_dir ( ) ;
@@ -115,6 +124,7 @@ fn setup(use_local_bundle: Option<OsString>) -> Result<()> {
115
124
} else {
116
125
let filename = download_filename ( ) ;
117
126
println ! ( "[2/6] Downloading Kani release bundle: {}" , & filename) ;
127
+ fail_if_unsupported_target ( ) ?;
118
128
let bundle = base_dir. join ( filename) ;
119
129
Command :: new ( "curl" )
120
130
. args ( & [ "-sSLf" , "-o" ] )
You can’t perform that action at this time.
0 commit comments