A dummy package.

Public Library0.1.0updated 3 months ago2.31 KB
COPY
wapm install mohit/hello-world

Need help using WAPM?

Get started here

Files

  • Readme.md

Cargo WAPM

(API Docs)

A cargo sub-command for publishing Rust crates to the WebAssembly Package Manager.

Getting Started

You can install the cargo wapm command directly from GitHub.

You will also need to install the wapm CLI and authenticate with WAPM.

Once you have done that, open the Cargo.toml for your crate and add a metadata section to tell cargo wapm how your crate will be packaged.

The abi argument tells cargo wapm which target to use when compiling to WebAssembly.

ABITarget Triple
nonewasm32-unknown-unknown
wasiwasm32-wasi
emscriptenwasm32-emscripten

You also need to add cdylib to the crate-type list. You should also add the rlib crate type if other crates depend on this crate (integration tests, doc tests, examples, etc.).

Now the Cargo.toml is up to date, we can do a dry run to make sure everything is correct.

We can see that some files have been written to the target/wapm/ folder.

If you are happy with the generated files, remove the --dry-run command to publish the crate for real.

The cargo wapm command doesn't take care of any version bumping, so the version being published is read directly from Cargo.toml. Check out the cargo release tool if you something that can manage routine release tasks like bumping versions, tagging commits, or updating your changelog.

Workspaces

Normally, the cargo wapm command will only publish the crate in the current directory.

However, by using the --workspace flag you can publish every crate in the current workspace as long as they have a [package.metadata.wapm] section in their Cargo.toml. The --exclude argument lets you skip a particular crate while publishing.

License

This project is licensed under the Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0).

It is recommended to always use cargo-crev to verify the trustworthiness of each of your dependencies, including this one.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

The intent of this crate is to be free of soundness bugs. The developers will do their best to avoid them, and welcome help in analysing and fixing them.

<1klast week

Latest version

0.1.0

Latest updated

3 months ago

Unpackaged size

2.31 KB

License

Apache-2.0

Collaborators

    Run it in the browser