pub trait Transform {
    // Required methods
    fn get_atoms_wapm_toml(
        &self,
        files: &BTreeMap<&Path, &Vec<u8>>
    ) -> Result<Vec<(String, PathBuf)>, Error>;
    fn get_dependencies(&self, wapm_toml: &str) -> Vec<(String, String)>;
    fn get_package_annotations(&self, wapm_toml: &str) -> Result<Wapm, Error>;
    fn get_fs_table(&self, wapm_toml: &str) -> Result<FileSystemMappings, Error>;
    fn get_modules(&self, wapm_toml: &str) -> Vec<(String, String, String)>;
    fn get_commands(
        &self,
        wapm_toml: &str,
        base_path: &Path,
        atom_kinds: &BTreeMap<String, String>
    ) -> Result<BTreeMap<String, WebcCommand>, Error>;
    fn get_bindings(
        &self,
        wapm_toml: &str,
        base_path: &Path,
        atom_kinds: &BTreeMap<String, String>
    ) -> Result<Vec<(String, String, Value)>, Error>;
    fn get_manifest_file_names(&self) -> Vec<PathBuf>;
    fn get_metadata_paths(&self, bindings: &[Value]) -> Vec<PathBuf>;
    fn get_wapm_manifest_file_name(&self) -> PathBuf;
}
Expand description

Methods for manipulating a wasmer.toml file and working with WAPM tarballs.

Required Methods§

source

fn get_atoms_wapm_toml( &self, files: &BTreeMap<&Path, &Vec<u8>> ) -> Result<Vec<(String, PathBuf)>, Error>

Given a file map, returns the file paths of the atoms in the FileMap

source

fn get_dependencies(&self, wapm_toml: &str) -> Vec<(String, String)>

source

fn get_package_annotations(&self, wapm_toml: &str) -> Result<Wapm, Error>

source

fn get_fs_table(&self, wapm_toml: &str) -> Result<FileSystemMappings, Error>

source

fn get_modules(&self, wapm_toml: &str) -> Vec<(String, String, String)>

source

fn get_commands( &self, wapm_toml: &str, base_path: &Path, atom_kinds: &BTreeMap<String, String> ) -> Result<BTreeMap<String, WebcCommand>, Error>

source

fn get_bindings( &self, wapm_toml: &str, base_path: &Path, atom_kinds: &BTreeMap<String, String> ) -> Result<Vec<(String, String, Value)>, Error>

source

fn get_manifest_file_names(&self) -> Vec<PathBuf>

source

fn get_metadata_paths(&self, bindings: &[Value]) -> Vec<PathBuf>

source

fn get_wapm_manifest_file_name(&self) -> PathBuf

Implementors§