Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the README to the crate in crates.io #1948

Closed
Razican opened this issue Mar 16, 2022 · 0 comments
Closed

Add the README to the crate in crates.io #1948

Razican opened this issue Mar 16, 2022 · 0 comments
Labels
documentation update documentation E-Easy Easy enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@Razican
Copy link
Member

Razican commented Mar 16, 2022

Currently, we don't have the README linked in crates.io:
https://crates.io/crates/boa_engine

We should add it there, to give a bit more information about the crate. This might require adding the README to the package (we are excluding some stuff, so this might be some of it)

@Razican Razican added enhancement New feature or request good first issue Good for newcomers E-Easy Easy documentation update documentation labels Mar 16, 2022
@Razican Razican added this to the v0.15.0 milestone Mar 16, 2022
@bors bors bot closed this as completed in 520b81e Mar 17, 2022
Razican pushed a commit that referenced this issue Jun 8, 2022
This Pull Request closes #1948.

It changes the following:

- set `readme` in `boa_engine` so `README.md` will be published to crates.io
- remove unnecessary `exclude` field from `Cargo.toml` in all apps

I was unsure whether using a path outside of the workspace root was allowed for `readme` since it [doesn't get included in the release tarball](rust-lang/cargo#5911), but this exact path is used by [juniper](https://github.com/graphql-rust/juniper/blob/master/juniper/Cargo.toml#L13) and [seems to work there](https://crates.io/crates/juniper). I believe `cargo publish` does a bit more than just uploading the tarball, including pulling the `readme` from any arbitrary path.

The default behaviour of `cargo package`/`cargo publish` if neither `exclude` or `include` is specified is to include all files from the package root, excluding

- dotfiles
- .gitignore'd files
- subpackages (any subdirectory with a `Cargo.toml` file)
- the `/target` directory

There's no need to explicitly exclude files from the parent directory since they're already excluded by default. This can be verified by running `cargo package --list` inside any workspace app:

```plain
$ cd boa_wasm
$ cargo package --list
.gitignore
Cargo.toml
Cargo.toml.orig
src/lib.rs
```

You can read more [here](https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation update documentation E-Easy Easy enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant