Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
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
4 changes: 4 additions & 0 deletions cvlr-log/src/core.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
pub 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_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
4 changes: 3 additions & 1 deletion cvlr-nondet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ 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_u32, cvlr_nondet_u64,
};
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
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