Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Make the package field optional #35

Merged
merged 2 commits into from
Mar 29, 2024
Merged

Make the package field optional #35

merged 2 commits into from
Mar 29, 2024

Conversation

ayys
Copy link
Member

@ayys ayys commented Mar 29, 2024

in wasmer.toml, the package field will now be optional. This is to add support
for unnamed packages.

Unnamed packages are useful when you don't want to publish and maintain a
package just for an app. In that case, you can simply associate the package with
a webc hash, instead associating it with a package name/version etc.

in wasmer.toml, the package field will now be optional. This is to add support
for unnamed packages.

Unnamed packages are useful when you don't want to publish and maintain a
package just for an app. In that case, you can simply associate the package with
a webc hash, instead associating it with a package name/version etc.
Copy link

github-actions bot commented Mar 29, 2024

⏱ Workflow Timer ⏱

Run Compile and Test
main 34s
ef818bd 27s

🤖 Beep. Boop. I'm a bot. If you find any issues, please report them to https://github.com/Michael-F-Bryan/workflow-timer.

src/lib.rs Outdated
Comment on lines 745 to 753
if let Some(mut package) = manifest.package.clone() {
if package.readme.is_none() {
package.readme = locate_file(path, README_PATHS);
}

if manifest.package.license_file.is_none() {
manifest.package.license_file = locate_file(path, LICENSE_PATHS);
if package.license_file.is_none() {
package.license_file = locate_file(path, LICENSE_PATHS);
}
manifest.package = Some(package);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would call manifest.package.as_mut to modify the package in-place to prevent cloning and then rewriting the original package. But it doesn't block from merging.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oooh nice! thanks for the tip, I didn't know about as_mut.

@ayys ayys requested a review from maminrayej March 29, 2024 11:38
@ayys ayys merged commit b3d1bf2 into main Mar 29, 2024
4 checks passed
@ayys ayys deleted the make-package-optional branch March 29, 2024 11:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants