Commit Graph

26 Commits

Author SHA1 Message Date
UebelAndre e97988273b
Updated docs to use mdbook (#2834)
This updates docs to be built using
[mdbook](https://rust-lang.github.io/mdBook/) for improved readability
and search-ability. Note that the raw markdown from stardoc is still
committed to the repo and can be easily viewed at any commit to ensure
users are able to get the correct docs for their current version of
rules_rust.
2024-09-05 17:51:48 +00:00
Oliver Graff 6080e4985d
Use newer macos runners (#2732) 2024-07-09 03:16:33 +00:00
Daniel Wagner-Hall c014c618f9
crate_universe docs: Split bzlmod from workspace (#2700)
Previously the bzlmod symbols were not documented at all, and in places
they are different from the WORKSPACE versions.

This at least hosts both.

Fixes #2696
2024-06-21 14:51:12 +00:00
UebelAndre 5b0a6a9721
Update cross to fix crate_universe builds in releases (#2645)
Fix is demonstrated by
https://github.com/UebelAndre/rules_rust/actions/runs/9018414504
2024-05-09 14:33:10 +00:00
Daniel Wagner-Hall b2e52a20c9
Use # not / as a sed escape character (#2412)
The base64-encoding we use may contain / characters, so we pick a
different character to we don't need to worry about escaping the
replacement string.
2024-01-10 07:28:55 -08:00
David Tolnay 597b4bcc49
Switch from `sha256` to `integrity` in release notes (#2389)
`integrity` is preferred because it works for both `http_archive`
(legacy) and `archive_override` (bzlmod). `sha256` only works for
`http_archive`. Context: https://github.com/bazelbuild/bazel/pull/20156

I confirmed that `xxd` and `base64` commands are available in the GitHub
ubuntu-20.04 runner:

![Screenshot from 2024-01-02
17-24-23](https://github.com/bazelbuild/rules_rust/assets/1940490/a30e58c4-fd78-4c37-969d-1938b2dc2215)

and that this produces an integrity string that checks out with what
Bazel wants. See
17f46ec7a5
for a successful use of `integrity` with `http_archive`:

```starlark
# WORKSPACE.bazel

http_archive(
    name = "rules_rust",
    integrity = "sha256-p2HVTknbBvhjRo5rukoTJSsb1Jno9wbaZeJ5s7y8XFI=",
    urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.36.2/rules_rust-v0.36.2.tar.gz"],
)
```

and https://github.com/dtolnay/cxx/pull/1294 for a successful use of
`integrity` with `archive_override`.

```starlark
# MODULE.bazel

archive_override(
    module_name = "rules_rust",
    integrity = "sha256-p2HVTknbBvhjRo5rukoTJSsb1Jno9wbaZeJ5s7y8XFI=",
    urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.36.2/rules_rust-v0.36.2.tar.gz"],
)
```

`sha256` does not work in `archive_override`.

```console
ERROR: Traceback (most recent call last):
	File "/git/cxx/MODULE.bazel", line 5, column 17, in <toplevel>
		archive_override(
Error in archive_override: archive_override() got unexpected keyword argument 'sha256'
ERROR: Error computing the main repository mapping: error executing MODULE.bazel file for <root>
```
2024-01-03 10:43:54 +00:00
David Tolnay e6a1ee48cd
Include examples/bzlmod in release tgz for BCR presubmit (#2379)
Fixes #2378.

```console
$ tar -czf .github/rules_rust.tar.gz --exclude=".git" --exclude=".github" --exclude="crate_universe/target" examples/bzlmod --exclude="examples" .

$ tar tf .github/rules_rust.tar.gz | rg examples
examples/bzlmod/
examples/bzlmod/hello_world/
examples/bzlmod/hello_world/WORKSPACE.bzlmod
examples/bzlmod/hello_world/hello_world_test.sh
examples/bzlmod/hello_world/.gitignore
examples/bzlmod/hello_world/WORKSPACE.bazel
examples/bzlmod/hello_world/src/
examples/bzlmod/hello_world/src/main.rs
examples/bzlmod/hello_world/BUILD.bazel
examples/bzlmod/hello_world/MODULE.bazel
examples/bzlmod/hello_world/third-party/
examples/bzlmod/hello_world/third-party/Cargo.lock
examples/bzlmod/hello_world/third-party/BUILD.bazel
examples/bzlmod/hello_world/third-party/extension.bzl
examples/bzlmod/hello_world/third-party/crates/
examples/bzlmod/hello_world/third-party/crates/defs.bzl
examples/bzlmod/hello_world/third-party/crates/BUILD.anyhow-1.0.77.bazel
examples/bzlmod/hello_world/third-party/crates/crates.bzl
examples/bzlmod/hello_world/third-party/crates/BUILD.bazel
examples/bzlmod/hello_world/third-party/crates/alias_rules.bzl
examples/bzlmod/hello_world/third-party/Cargo.toml
examples/bzlmod/hello_world/.bazelrc
```
2023-12-29 00:55:06 +00:00
UebelAndre 76daee3047
Added support for multiple javascript rule sets to wasm_bindgen package (#2284)
This PR converts the core `rust_wasm_bindgen` rule into a standalone
rule that users can user to write custom interfaces into any
rules/targets they desire while also supporting interfaces for existing
Javascript rule sets. Users loading the root `@rules_rust//wasm_bindgen`
symbols will be using the core Rust rules, where users loading symbols
from the new sub directories `rules_nodejs` and `rules_js` will have
variants that offer better integrations.
2023-11-27 14:20:45 +00:00
UebelAndre ea4282ff93
Added github action to publish cargo-bazel binaries. (#2134)
closes https://github.com/bazelbuild/rules_rust/issues/2131
2023-09-04 08:11:44 -07:00
UebelAndre 4bd44d03ec
Added Rust 1.71.0 (#2062)
https://blog.rust-lang.org/2023/07/13/Rust-1.71.0.html
2023-07-27 10:19:55 +00:00
Daniel Wagner-Hall d787525049
Exclude target directory from release tars (#1922)
Right now our release tars are ~40MB and contain about 125MB of compiled
rust output which shouldn't be used - the release actually instructs
Bazel to download the compiled executables from elsewhere.
2023-04-17 17:43:05 +01:00
UebelAndre 927a364cbc
Update Release github pipeline to trigger automatically (#1757) 2023-01-05 16:04:19 +00:00
UebelAndre 7d03e05f81
Fix release pipeline (#1756) 2023-01-05 14:47:14 +00:00
Alex Rodionov 8bb25b8b78
Support Windows ARM64 (aarch64-pc-windows-msvc) (#1664) 2022-11-20 18:01:20 -08:00
UebelAndre c349df2a69
Remove Google mirror from Starlark snippet in release notes (#1604) 2022-10-24 14:28:41 -07:00
UebelAndre 76360dd354
Implement rules archive release artifact in github action. (#1501)
* Implement rules archive release artifact in github action.

* Remove distro package and dependencies
2022-08-08 13:17:53 +01:00
UebelAndre 26e01c8386
cache the release archive in release actions (#1201) 2022-03-21 07:51:30 -07:00
UebelAndre 80d197205a
Added release workflow (#1195)
* Added release workflow

* Addressed PR feedback
2022-03-16 08:00:25 -07:00
UebelAndre fc396284a1
Added `default_edition` and `default_version` to `rust_common` (#897) 2021-08-19 07:42:51 -07:00
UebelAndre 2788357e43
Added github actions for performing releases (#713)
* Added github actions for performing releases

* Regenerate documentation

* Handle documentation updates

* Updated sha256 check

* Added warning to rendered version.bzl files
2021-05-05 08:10:07 -07:00
Daniel Wagner-Hall ce294858db
Avoid downloading multiple resolvers (#694)
Instead, download just the one that's needed for the host platform.
2021-04-19 09:07:36 -07:00
UebelAndre bee1140ec3
Updated tag message for crate_universe releases (#687) 2021-04-09 08:06:33 -07:00
Daniel Wagner-Hall 1371c9194c
Remove commit and push step of actions (#686)
We need to work out how users should consume these binaries, but for now
this reliably fails so let's stop doing it.

Instead, `cat` out what the the contents of the generated file _would_
be, for easy copy and paste by people working on the rules.
2021-04-08 17:46:31 +01:00
UebelAndre 81abea6cb9
crate_universe github actions no longer run on forks (#685)
This github action should not run on forks. This prevents each job from being kicked off in cases where users open a PR from their fork if they make changes on their `main` branch.
2021-04-08 16:53:45 +01:00
UebelAndre 8c566338ad
Fixed error handling when a commit fails to be pushed back to the main branch for new crate_universe binaries (#681) 2021-04-07 10:52:21 -07:00
UebelAndre a3c2741207
Added bootstrapping for crate_universe (#663)
* Added bootstrap script for crate_universe and github action for auto-releasing new binaries

* Addressed PR feedback

Co-authored-by: Daniel Wagner-Hall <dawagner@gmail.com>

* Updated local dev documentation

* Add announce_rc to crate_universe.bazelrc

* Addressed buildifier defect

* Addressed additional user feedback

* Apply suggestions from code review

Co-authored-by: Daniel Wagner-Hall <dawagner@gmail.com>

* Fixed missing extension for windows.

Co-authored-by: Daniel Wagner-Hall <dawagner@gmail.com>
2021-04-07 10:11:43 -07:00