Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ syn = "2"
macrotest = "1"
trybuild = "1"

cvlr = { path = "cvlr", version = "=0.6.1" }
cvlr = { path = "cvlr", default-features = false, version = "=0.6.1" }
Comment thread
1arie1 marked this conversation as resolved.
Outdated
cvlr-asserts = { path = "cvlr-asserts", version = "=0.6.1" }
cvlr-mathint = { path = "cvlr-mathint", version = "=0.6.1" }
cvlr-nondet = { path = "cvlr-nondet", default-features = false, version = "=0.6.1" }
Expand Down
4 changes: 4 additions & 0 deletions cvlr-asserts/src/core.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
mod rt_decls {
#[cfg_attr(
all(target_family = "wasm", target_os = "none"),
link(wasm_import_module = "cvlr")
)]
extern "C" {
pub fn CVT_assume(_c: bool);
pub fn CVT_assert(_c: bool);
Expand Down
4 changes: 4 additions & 0 deletions cvlr-asserts/src/log.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
mod rt_decls {
#[cfg_attr(
all(target_family = "wasm", target_os = "none"),
link(wasm_import_module = "cvlr")
)]
extern "C" {
#![allow(improper_ctypes)]
// duplicated to avoid cvlr-assert depend on any other cvlr crate
Expand Down
6 changes: 5 additions & 1 deletion cvlr-log/src/core.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
pub mod rt_decls {
#[allow(improper_ctypes)]
#[cfg_attr(
all(target_family = "wasm", target_os = "none"),
link(wasm_import_module = "cvlr")
)]
#[allow(improper_ctypes)]
extern "C" {
pub fn CVT_calltrace_print_tag(tag: &str);

Expand Down
4 changes: 4 additions & 0 deletions cvlr-mathint/src/nativeint_u64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ pub struct NativeIntU64(u64);
mod rt_decls {
type BoolU64 = u64;

#[cfg_attr(
all(target_family = "wasm", target_os = "none"),
link(wasm_import_module = "cvlr")
)]
extern "C" {
pub fn CVT_nativeint_u64_eq(_: u64, _: u64) -> BoolU64;
pub fn CVT_nativeint_u64_lt(_: u64, _: u64) -> BoolU64;
Expand Down
3 changes: 2 additions & 1 deletion cvlr-nondet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ pub mod havoc;
pub use core::{nondet, nondet_with, Nondet};

pub use option::nondet_option;
pub use scalars::{cvlr_nondet_small_i128, cvlr_nondet_small_u128};
pub use scalars::{cvlr_nondet_small_i128, cvlr_nondet_small_u128,
cvlr_nondet_u64, cvlr_nondet_u32};
4 changes: 4 additions & 0 deletions cvlr-nondet/src/scalars.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
use crate::Nondet;

mod rt_decls {
#[cfg_attr(
all(target_family = "wasm", target_os = "none"),
link(wasm_import_module = "cvlr")
)]
#[allow(improper_ctypes)]
extern "C" {
// Definition of external functions that represent getting arbitrary values
Expand Down
1 change: 1 addition & 0 deletions cvlr-spec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
//! // Define a simple spec - cvlr_true uses eval_with_states for ensures
//! let spec = cvlr_spec(cvlr_true::<Counter>(), cvlr_true::<Counter>());
//! ```
#![no_std]

mod combinators;
mod formula;
Expand Down
4 changes: 4 additions & 0 deletions cvlr/src/u128_arith.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
mod rt_decls {
#[cfg_attr(
all(target_family = "wasm", target_os = "none"),
link(wasm_import_module = "cvlr")
)]
#[allow(improper_ctypes)]
extern "C" {
pub fn CVT_u128_leq(x: u128, y: u128) -> bool;
Expand Down
Loading