use std::path::{Path, PathBuf};
use crate::{asset_path, c_asset_path};
pub fn resources() -> PathBuf {
Path::new(env!("CARGO_MANIFEST_DIR")).join("resources")
}
pub fn packages() -> PathBuf {
Path::new(env!("CARGO_MANIFEST_DIR"))
.join("tests")
.join("packages")
}
pub fn php() -> (PathBuf, PathBuf, PathBuf) {
let root = Path::new(env!("CARGO_MANIFEST_DIR"));
let resources = resources().join("php");
(
root.join("tests").join("wasm").join("php.wasm"),
resources.clone(),
resources.join("db"),
)
}
pub fn python() -> PathBuf {
c_asset_path().join("python-0.1.0.wasmer")
}
pub fn coreutils() -> PathBuf {
Path::new(env!("CARGO_MANIFEST_DIR"))
.join("tests")
.join("webc")
.join("coreutils-1.0.16-e27dbb4f-2ef2-4b44-b46a-ddd86497c6d7.webc")
}
pub fn bash() -> PathBuf {
Path::new(env!("CARGO_MANIFEST_DIR"))
.join("tests")
.join("webc")
.join("bash-1.0.16-f097441a-a80b-4e0d-87d7-684918ef4bb6.webc")
}
pub fn wabt() -> PathBuf {
c_asset_path().join("wabt-1.0.37.wasmer")
}
pub fn static_server() -> PathBuf {
c_asset_path().join("staticserver.webc")
}
pub fn qjs() -> PathBuf {
c_asset_path().join("qjs.wasm")
}
pub fn hello() -> PathBuf {
Path::new(env!("CARGO_MANIFEST_DIR"))
.join("tests")
.join("webc")
.join("hello-0.1.0-665d2ddc-80e6-4845-85d3-4587b1693bb7.webc")
}
pub fn qjs_wasmer_toml() -> PathBuf {
c_asset_path().join("qjs-wasmer.toml")
}
pub fn fib() -> PathBuf {
asset_path().join("fib.wat")
}
pub fn wat_no_start() -> PathBuf {
asset_path().join("no_start.wat")
}