Skip to content

Commit

Permalink
fix(common): visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
refcell committed Sep 26, 2024
1 parent 0e8db07 commit c78b286
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/common/src/io.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! This module contains the [ClientIO] struct, which is used to perform various IO operations
//! This module contains the `ClientIO` struct, which is used to perform various IO operations
//! inside of the FPVM kernel within a `client` program.
use crate::{errors::IOResult, BasicKernelInterface, FileDescriptor};
Expand All @@ -7,16 +7,16 @@ use cfg_if::cfg_if;
cfg_if! {
if #[cfg(target_arch = "mips")] {
#[doc = "Concrete implementation of the [BasicKernelInterface] trait for the `MIPS32rel1` target architecture."]
pub type ClientIO = crate::cannon::io::CannonIO;
pub(crate) type ClientIO = crate::cannon::io::CannonIO;
} else if #[cfg(target_arch = "riscv64")] {
#[doc = "Concrete implementation of the [BasicKernelInterface] trait for the `riscv64` target architecture."]
pub type ClientIO = crate::asterisc::io::AsteriscIO;
pub(crate) type ClientIO = crate::asterisc::io::AsteriscIO;
} else if #[cfg(target_os = "zkvm")] {
#[doc = "Concrete implementation of the [BasicKernelInterface] trait for the `SP1` target architecture."]
pub type ClientIO = crate::zkvm::io::ZkvmIO;
pub(crate) type ClientIO = crate::zkvm::io::ZkvmIO;
} else {
#[doc = "Concrete implementation of the [BasicKernelInterface] trait for the `native` target architecture."]
pub type ClientIO = native_io::NativeIO;
pub(crate) type ClientIO = native_io::NativeIO;
}
}

Expand Down Expand Up @@ -58,7 +58,7 @@ pub fn exit(code: usize) -> ! {

/// Native IO Module
#[cfg(not(any(target_arch = "mips", target_arch = "riscv64", target_os = "zkvm")))]
pub mod native_io {
pub(crate) mod native_io {
use crate::{
errors::{IOError, IOResult},
io::FileDescriptor,
Expand All @@ -72,7 +72,7 @@ pub mod native_io {

/// Mock IO implementation for native tests.
#[derive(Debug)]
pub struct NativeIO;
pub(crate) struct NativeIO;

impl BasicKernelInterface for NativeIO {
fn write(fd: FileDescriptor, buf: &[u8]) -> IOResult<usize> {
Expand Down

0 comments on commit c78b286

Please sign in to comment.