Skip to content

Commit

Permalink
add crate for external specs
Browse files Browse the repository at this point in the history
  • Loading branch information
enjhnsn2 committed Jul 22, 2024
1 parent 1b6579b commit ad49eee
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions flux_support/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "flux_support"
version.workspace = true
authors.workspace = true
edition.workspace = true

[package.metadata.flux]
enabled = true

[dependencies]
11 changes: 11 additions & 0 deletions flux_support/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#[allow(dead_code)]
#[flux::sig(fn(x: bool[true]))]
pub fn assert(_x: bool) {}

#[flux::sig(fn(b:bool) ensures b)]
pub fn assume(b: bool) {
if !b {
panic!("assume fails")
}
}

0 comments on commit ad49eee

Please sign in to comment.