Skip to content

Commit 4acce64

Browse files
committed
docs: Add v1.36 blog post. (#1975)
* Update deps. * Start on blog post. * Add blog. * Add image. * Update build.
1 parent 27feff3 commit 4acce64

6 files changed

Lines changed: 169 additions & 57 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@
5252

5353
- Added new toolchain WASM APIs.
5454
- `extend_project_graph` - Extend projects with toolchain specific info.
55-
- `extend_task_command` - Extend the command process with parameters.
56-
- `extend_task_script` - Extend the script process with parameters.
55+
- `extend_task_command` - Extend the command child process with parameters.
56+
- `extend_task_script` - Extend the script child process with parameters.
57+
- `locate_dependencies_root` - Locate the package dependencies workspace root.
5758
- `parse_manifest` - Parse a manifest file to extract dependencies.
5859
- `parse_lock` - Parse a lock file to extract resolved dependencies.
5960
- WASM

Cargo.lock

Lines changed: 27 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ COPY --from=build-gnu /out/target/ /target/
4545
FROM messense/rust-musl-cross:x86_64-musl AS base-musl-amd64
4646
RUN apt-get update
4747
RUN apt install --no-install-recommends -y libssl-dev pkg-config musl-tools wget
48+
RUN rustup toolchain list
4849

4950
# RUN echo "Building OpenSSL" && \
5051
# ln -s /usr/include/x86_64-linux-gnu/asm /usr/include/x86_64-linux-musl/asm && \
@@ -62,7 +63,7 @@ RUN apt install --no-install-recommends -y libssl-dev pkg-config musl-tools wget
6263
# ENV OPENSSL_STATIC true
6364
# ENV OPENSSL_DIR /musl
6465

65-
RUN cargo install cargo-chef --version ^0.1
66+
# RUN cargo install cargo-chef --version ^0.1
6667
WORKDIR /app
6768
COPY .cargo .cargo
6869
COPY rust-toolchain.toml .
@@ -90,6 +91,7 @@ RUN mkdir -p /out && cp --parents target/*/release/moon /out/
9091
FROM messense/rust-musl-cross:aarch64-musl AS base-musl-arm64
9192
RUN apt-get update
9293
RUN apt install --no-install-recommends -y libssl-dev pkg-config musl-tools wget
94+
RUN rustup toolchain list
9395

9496
# RUN wget https://musl.cc/aarch64-linux-musl-cross.tgz && \
9597
# tar zxvf aarch64-linux-musl-cross.tgz && \

website/blog/2025-04-16_moon-v1.35.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ slug: moon-v1.35
33
title: moon v1.35 - Action graph improvements, task priorities, and more!
44
authors: [milesj]
55
tags: [action, graph, task, priority, experiment, terminal, theme]
6-
image: ./img/moon/v1.34.png
6+
image: ./img/moon/v1.35.png
77
---
88

99
With this release, we're taking yet another step to supporting plugins.
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
slug: moon-v1.36
3+
title: moon v1.36 - Toolchain plugins beta, optimized remote caching, and codegen improvements
4+
authors: [milesj]
5+
tags: [toolchain, wasm, plugin, remote, cache, integrity, codegen, template]
6+
image: ./img/moon/v1.36.png
7+
---
8+
9+
In this release, we're very excited to fully release toolchain plugins!
10+
11+
<!--truncate-->
12+
13+
## Beta release of toolchain WASM plugins
14+
15+
Two months ago we announced [alpha toolchain plugins](./moon-v1.33) with support for tier 3, but not
16+
tier 2. The reason for this was that tier 3 is powered by [proto APIs](/docs/proto/wasm-plugin),
17+
which already existed! We simply hooked them up to moon. The bulk of the remaining plugin work was
18+
tier 2 support, which we are excited to announce has been completed! The following APIs have been
19+
implemented:
20+
21+
- `extend_project_graph` - Extend projects with toolchain specific info.
22+
- `extend_task_command` - Extend the command child process with parameters.
23+
- `extend_task_script` - Extend the script child process with parameters.
24+
- `locate_dependencies_root` - Locate the package dependencies workspace root.
25+
- `parse_manifest` - Parse a manifest file to extract dependencies.
26+
- `parse_lock` - Parse a lock file to extract resolved dependencies.
27+
28+
And the following surface areas have been integrated with:
29+
30+
- In the project graph:
31+
- Extend projects with dependencies, tasks, and an alias.
32+
- In the action pipeline:
33+
- Added `SetupEnvironment` action that executes the `setup_environment` API.
34+
- Added `InstallDependencies` action that executes the `install_dependencies` API.
35+
- When running tasks:
36+
- Extend the command/script with additional parameters before executing.
37+
- Inject dependency and lock information into the hash.
38+
- With Docker:
39+
- Updated `docker prune` to utilize the new WASM APIs for toolchain plugins.
40+
41+
As of this release, all 27 APIs have been implemented, and toolchain plugins are now available for
42+
general use! However, they are still quite unstable, not fully tested, and the APIs may change
43+
between releases, but you can start using them today if you're feeling adventurous!
44+
45+
With all this said, we do not have documentation yet. We plan to slowly work on this across the next
46+
few releases. In the meantime, check out the following resources for more information:
47+
48+
- [`moon_pdk`](https://docs.rs/moon_pdk/) - Rust plugin development kit.
49+
- Existing [toolchain plugins](https://github.com/moonrepo/plugins/tree/master/toolchains).
50+
- In development [Rust toolchain](https://github.com/moonrepo/plugins/pull/48).
51+
52+
## Optimized remote caching
53+
54+
Like the past few releases, we've made some improvements to the remote caching layer.
55+
56+
To start, we're adding a new
57+
[`unstable_remote.cache.verifyIntegrity`](/docs/config/workspace#verifyintegrity) setting, that will
58+
verify the digest (hash) of downloaded blobs to ensure they aren't corrupted or incomplete. We
59+
currently check the file size, but this will also now check the content. This setting will slightly
60+
degrade performance but ensure reliability.
61+
62+
```yaml title=".moon/workspace.yml"
63+
unstable_remote:
64+
cache:
65+
verifyIntegrity: true
66+
```
67+
68+
While we're on the topic of reliability, we're also introducing an implicit rollback mechanic that
69+
will remove partially downloaded or incomplete blobs if hydration ever fails at some point. This
70+
will also run between executions to ensure there are no stale artifacts lying around.
71+
72+
And lastly, we've parallelized the blob existence checks, reducing the amount of large requests for
73+
heavy tasks, and reworked how we inherit `MOON_REMOTE_*` environment variables.
74+
75+
## Improved code generation
76+
77+
It's been a while since we've added new features to code generation, but thanks to some great
78+
requests from the community, we have 2 this release!
79+
80+
### Archive URLs
81+
82+
The first is that [remote archives](/docs/guides/codegen#archive-urls) (zip, tar, etc) can be used
83+
as template locations. The archive will then be downloaded and unpacked into `~/.moon/templates`.
84+
85+
```yaml title=".moon/workspace.yml"
86+
generator:
87+
templates:
88+
- 'https://domain.com/some/path/to/archive.zip'
89+
```
90+
91+
### Array and object types
92+
93+
The second is that we now support `array` and `object`
94+
[variable types](/docs/config/template#variables) in `template.yml`. The values within each of these
95+
collections can be any JSON-compatible type.
96+
97+
```yaml title="template.yml"
98+
variables:
99+
type:
100+
type: 'array'
101+
prompt: 'Type?'
102+
default: ['app', 'lib']
103+
metadata:
104+
type: 'object'
105+
prompt: 'Metadata?'
106+
default:
107+
internal: true
108+
```
109+
110+
These variables and their nested values can then be accessed within templates using dot or bracket
111+
notation.
112+
113+
```twig
114+
{{ type[0] }}
115+
{{ metadata.internal }}
116+
```
117+
118+
## Other changes
119+
120+
View the [official release](https://github.com/moonrepo/moon/releases/tag/v1.36.0) for a full list
121+
of changes.
122+
123+
- Added `--host` and `--port` options to `moon action-graph`, `moon task-graph`, and
124+
`moon project-graph`.
125+
- Added `--stdin` option to `moon ci` and `moon run`, which will allow touched files to be passed
126+
via stdin, instead of running VCS commands to determine them.
127+
- Removed the restriction around `moon.{yml,pkl}` not being allowed as a task input. However, will
128+
not be included when using `**/*`.
129+
130+
## What's next?
131+
132+
Now that toolchain plugins are in beta, we can take the next step in migrating an existing platform
133+
into a toolchain.
134+
135+
- Migrate the Rust toolchain to a WASM plugin.

website/blog/img/moon/v1.36.png

1010 KB
Loading

0 commit comments

Comments
 (0)