Skip to content

Commit

Permalink
Stub out WASI support to make things compile
Browse files Browse the repository at this point in the history
  • Loading branch information
xen0n authored and soc committed May 11, 2019
1 parent 169a953 commit 88294e4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ cfg_if! {
} else if #[cfg(target_os = "redox")] {
mod redox;
use redox as sys;
} else if #[cfg(target_os = "wasi")] {
mod wasi;
use wasi as sys;
} else {
mod lin;
use lin as sys;
Expand Down
22 changes: 22 additions & 0 deletions src/wasi.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// TODO: flesh this out once actual WASI APIs for this are designed.
//
// For now here are just enough definitions to make things *compile*.

use std::path::PathBuf;

pub fn home_dir() -> Option<PathBuf> { None }
pub fn cache_dir() -> Option<PathBuf> { None }
pub fn config_dir() -> Option<PathBuf> { None }
pub fn data_dir() -> Option<PathBuf> { None }
pub fn data_local_dir() -> Option<PathBuf> { None }
pub fn runtime_dir() -> Option<PathBuf> { None }
pub fn executable_dir() -> Option<PathBuf> { None }
pub fn audio_dir() -> Option<PathBuf> { None }
pub fn desktop_dir() -> Option<PathBuf> { None }
pub fn document_dir() -> Option<PathBuf> { None }
pub fn download_dir() -> Option<PathBuf> { None }
pub fn font_dir() -> Option<PathBuf> { None }
pub fn picture_dir() -> Option<PathBuf> { None }
pub fn public_dir() -> Option<PathBuf> { None }
pub fn template_dir() -> Option<PathBuf> { None }
pub fn video_dir() -> Option<PathBuf> { None }

0 comments on commit 88294e4

Please sign in to comment.