When constructing a wapm_toml::Manifest, we call determine_target() which takes a cargo_metadata::Package (i.e. a parsed Cargo.toml) and returns a reference to the onecargo_metadata::Target in that Package. From there, we construct a wapm_toml::Manifest with a single wapm_toml::Module that corresponds to that Target (i.e. a WASI executable or WebAssembly library).
WAPM packages support multiple modules, so it'd be nice if our "autodiscovery" can generate a wapm_toml::Manifest containing multiple wapm_toml::Modules, where we have one Module per Target (e.g. if your crate contains a library and a binary, the WAPM package would make both available).
When constructing a
wapm_toml::Manifest
, we calldetermine_target()
which takes acargo_metadata::Package
(i.e. a parsedCargo.toml
) and returns a reference to the onecargo_metadata::Target
in thatPackage
. From there, we construct awapm_toml::Manifest
with a singlewapm_toml::Module
that corresponds to thatTarget
(i.e. a WASI executable or WebAssembly library).WAPM packages support multiple modules, so it'd be nice if our "autodiscovery" can generate a
wapm_toml::Manifest
containing multiplewapm_toml::Module
s, where we have oneModule
perTarget
(e.g. if your crate contains a library and a binary, the WAPM package would make both available).