Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Release

on:
push:
tags: ["v*"]

permissions:
contents: write

jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-latest
target: x86_64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v4

- name: Tag must match the crate version
shell: bash
run: |
tag="${GITHUB_REF_NAME#v}"
version="$(grep -m1 '^version = ' Cargo.toml | cut -d'"' -f2)"
if [ "$tag" != "$version" ]; then
echo "tag v$tag does not match Cargo.toml version $version"
exit 1
fi

- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}

- run: cargo build --release -p meowscript-cli --target ${{ matrix.target }}

- name: Package
shell: bash
run: |
name="meowscript-${{ matrix.target }}"
mkdir -p "dist/$name"
cp README.md CHANGELOG.md "dist/$name/"
cp -r examples "dist/$name/examples"
case "${{ matrix.target }}" in
*windows*)
cp "target/${{ matrix.target }}/release/meowscript.exe" "dist/$name/"
(cd dist && 7z a -tzip "$name.zip" "$name" > /dev/null)
;;
*)
cp "target/${{ matrix.target }}/release/meowscript" "dist/$name/"
(cd dist && tar -czf "$name.tar.gz" "$name")
;;
esac
ls -la dist

- uses: actions/upload-artifact@v4
with:
name: meowscript-${{ matrix.target }}
path: |
dist/*.zip
dist/*.tar.gz
if-no-files-found: error

release:
name: Publish release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true

- name: Release notes from CHANGELOG.md
run: |
version="${GITHUB_REF_NAME#v}"
awk -v v="$version" '
$0 ~ "^## " v "( |$)" { on = 1; next }
/^## / && on { exit }
on { print }
' CHANGELOG.md > notes.md
if [ ! -s notes.md ]; then
echo "No changelog entry for $version." > notes.md
fi
cat notes.md

- name: Checksums
run: cd dist && sha256sum * > SHA256SUMS.txt && cat SHA256SUMS.txt

- uses: softprops/action-gh-release@v2
with:
name: MeowScript ${{ github.ref_name }}
body_path: notes.md
files: dist/*
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Changelog

Each release has a section here. The release workflow uses the matching section as the GitHub release notes.

## 0.1.0 (2026-10-08)

The first release of the rewritten interpreter. The previous code, kept in git history, was a learning project that had stopped compiling; this is a new implementation with the same keywords.

### Language

- `scratch`, `amew`, `pawction`, `purrhaps`/`meowtually`, `tail`, `furrever`, `hiss`, `continue`, `furreal`, `pawckage`, `purrfect`, `clawful`, and the `'s` possessive, as before.
- New: `mew` (null), `&&` and `||`, `fur item ~ things` loops, `furrever` with a condition, named `pawction` declarations, `amew` into object keys and furrball elements, string escapes, block comments, and `purrhaps` as an expression.
- Furrballs and objects are reference types. Blocks, loops, and calls each open a scope.
- Operators use Python's precedence. Only `mew` and `clawful` are falsy. Dividing by zero is an error.
- Errors report a line and column with a caret, and unknown names get a "did you mean" hint.

### Standard library

- Always available: `meow`, `purr`, `log`, `length`.
- `nya:clawtility`, `nya:furrball`, `nya:whiskers`, `nya:catculator`, `nya:rundamn`, and `nya:scratchpad`, about 70 functions in all, every one with an arity check.
- `pawckage "./file.meow"` imports another file, resolved relative to the importing file.

### Command line

- `meowscript FILE`, `meowscript eval CODE`, `meowscript packages`, and a REPL that keeps reading while a block is open.
- Prebuilt binaries for Windows x64, macOS (Apple silicon and Intel), and Linux (x64 and arm64). They are not code-signed, so Windows and macOS show a warning on first run.

### Playground

- The interpreter runs in the browser as WebAssembly inside a Web Worker, with a Stop button, streamed output, and a docs page whose library reference comes from the interpreter itself.

### Known limits

- `kibble` (input) and file pawckages don't work in the browser.
- Reference cycles between closures and their scopes are never freed; long REPL sessions grow.
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,12 @@ and commit the results in `site/public/wasm` and `site/src/generated`. CI checks
## Pull requests

Say what changed and why. If it changes the language, show a before and after.

## Releasing

1. Set the new version in `Cargo.toml` (the `[workspace.package]` entry and the `meowscript` dependency) and in `site/package.json`, then run `cargo build` so `Cargo.lock` follows.
2. In `site/`, run `pnpm build:wasm && pnpm sync`, so the playground and docs report the new version.
3. Add a section to `CHANGELOG.md` headed `## X.Y.Z (YYYY-MM-DD)`. The release workflow uses it as the release notes.
4. Merge to master, then tag it: `git tag vX.Y.Z && git push origin vX.Y.Z`.

The Release workflow builds the CLI for Windows x64, macOS (both chips), and Linux (x64 and arm64), and publishes a GitHub release with the archives and a `SHA256SUMS.txt`. It refuses a tag whose version differs from `Cargo.toml`. The download page links to `releases/latest/download/<asset>`, so the asset names must stay the same across releases.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ members = [
]

[workspace.package]
version = "1.0.0"
version = "0.1.0"
edition = "2024"
repository = "https://github.com/AlenVelocity/MeowScript"
rust-version = "1.88"

[workspace.dependencies]
meowscript = { path = "crates/meowscript", version = "1.0.0" }
meowscript = { path = "crates/meowscript", version = "0.1.0" }
indexmap = "2"

[profile.release]
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ Meow-sterious! name error: `cuont` hasn't been `scratch`ed yet; did you mean `co

## Install

With a Rust toolchain:
Prebuilt binaries for Windows x64, macOS (Apple silicon and Intel), and Linux (x64 and arm64) are on the [releases page](https://github.com/AlenVelocity/MeowScript/releases/latest), with a `SHA256SUMS.txt`. The [download page](https://meowscript.vercel.app/download) picks the right file for each platform and explains the unsigned-binary warnings on Windows and macOS. Unpack the archive and put `meowscript` on your PATH.

With a Rust toolchain (1.88 or newer):

```bash
cargo install --git https://github.com/AlenVelocity/MeowScript meowscript-cli
cargo install --git https://github.com/AlenVelocity/MeowScript --tag v0.1.0 meowscript-cli
```

```
Expand All @@ -71,6 +73,8 @@ meowscript eval "1 + 2" # evaluate a snippet
meowscript packages # what the nya: pawckages contain
```

Changes between versions are in [CHANGELOG.md](CHANGELOG.md).

## Layout

```
Expand Down
2 changes: 2 additions & 0 deletions site/content/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ The exclamation tells you the kind: *Meowch!* for syntax, *Meow-sterious!* for a

## The command line

Prebuilt binaries are on the [download page](/download). With a Rust toolchain you can also build it yourself:

```
cargo install --git https://github.com/AlenVelocity/MeowScript meowscript-cli

Expand Down
2 changes: 1 addition & 1 deletion site/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meowscript-site",
"version": "1.0.0",
"version": "0.1.0",
"private": true,
"engines": {
"node": "24.x"
Expand Down
Binary file modified site/public/wasm/meowscript_bg.wasm
Binary file not shown.
102 changes: 102 additions & 0 deletions site/src/app/download/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
import type { Metadata } from "next";
import Link from "next/link";
import { CodeBlock } from "@/components/CodeBlock";
import { SiteFooter } from "@/components/SiteFooter";
import { SiteHeader } from "@/components/SiteHeader";
import { stdlib } from "@/generated/stdlib";

export const metadata: Metadata = {
title: "Download",
description: "Prebuilt MeowScript binaries for Windows, macOS, and Linux, and how to build from source.",
};

const RELEASES = "https://github.com/AlenVelocity/MeowScript/releases";
const LATEST = `${RELEASES}/latest/download`;

const builds = [
{ os: "Windows", chip: "x64", file: "meowscript-x86_64-pc-windows-msvc.zip" },
{ os: "macOS", chip: "Apple silicon", file: "meowscript-aarch64-apple-darwin.tar.gz" },
{ os: "macOS", chip: "Intel", file: "meowscript-x86_64-apple-darwin.tar.gz" },
{ os: "Linux", chip: "x64", file: "meowscript-x86_64-unknown-linux-gnu.tar.gz" },
{ os: "Linux", chip: "arm64", file: "meowscript-aarch64-unknown-linux-gnu.tar.gz" },
];

export default function DownloadPage() {
const version = `v${stdlib.version}`;
return (
<>
<SiteHeader />
<main className="mx-auto w-full max-w-[1120px] flex-1 px-4 pt-6 pb-16 sm:px-6 sm:pt-10">
<div className="max-w-[72ch]">
<h1 className="font-display text-[36px] font-extrabold sm:text-[44px]">Download</h1>
<p className="mt-3 text-text-soft">
The command line build runs <code>.meow</code> files, has a REPL, and can read and write files, which the
playground can&apos;t. The current release is {version}. Every release, with checksums, is on the{" "}
<a href={RELEASES} className="text-text underline decoration-line underline-offset-4 hover:text-accent">
releases page
</a>
.
</p>

<ul className="mt-8 divide-y divide-line border-y border-line">
{builds.map((b) => (
<li key={b.file}>
<a
href={`${LATEST}/${b.file}`}
className="group flex min-h-14 items-center justify-between gap-4 py-3 hover:text-accent"
>
<span>
<span className="font-display text-[18px] font-bold">{b.os}</span>
<span className="ml-2 text-muted">{b.chip}</span>
</span>
<span className="shrink-0 text-[13px] text-muted group-hover:text-accent">{b.file}</span>
</a>
</li>
))}
</ul>

<h2 className="mt-12 font-display text-[24px] font-bold">After downloading</h2>
<p className="mt-2 text-text-soft">
The archive holds the <code>meowscript</code> program, the README, and the example programs. Unpack it
anywhere and either run it from that folder or put it on your PATH.
</p>
<CodeBlock
plain
code={`meowscript examples/hello.meow
meowscript # the REPL; type scram to leave`}
/>
<ul className="mt-4 space-y-3 text-text-soft">
<li>
<strong className="text-text">Windows</strong> may say the publisher is unknown, because the binary is
not signed. Choose <em>More info</em>, then <em>Run anyway</em>.
</li>
<li>
<strong className="text-text">macOS</strong> blocks unsigned downloads until you clear the quarantine
flag: run <code>xattr -d com.apple.quarantine ./meowscript</code> once, or right-click the file and
choose Open.
</li>
<li>
<strong className="text-text">Linux</strong> needs nothing extra. The tarball keeps the executable
bit.
</li>
</ul>

<h2 className="mt-12 font-display text-[24px] font-bold">Build from source</h2>
<p className="mt-2 text-text-soft">With a Rust toolchain (1.88 or newer), cargo can build and install it:</p>
<CodeBlock
plain
code={`cargo install --git https://github.com/AlenVelocity/MeowScript --tag ${version} meowscript-cli`}
/>
<p className="mt-4 text-text-soft">
The commands and the REPL are described at the end of the{" "}
<Link href="/docs#the-command-line" className="text-text underline decoration-line underline-offset-4 hover:text-accent">
reference
</Link>
.
</p>
</div>
</main>
<SiteFooter />
</>
);
}
7 changes: 6 additions & 1 deletion site/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ export default function Home() {
Run it on your own machine
</h2>
<p className="mt-2 max-w-[62ch] text-muted">
The command line build adds a REPL and file access. It needs a Rust toolchain.
The command line build adds a REPL and file access. Prebuilt binaries for Windows, macOS, and Linux are on
the{" "}
<Link href="/download" className="text-text underline decoration-line underline-offset-4 hover:text-accent">
download page
</Link>
, or build it with cargo:
</p>
<div className="max-w-[720px]">
<CodeBlock
Expand Down
3 changes: 3 additions & 0 deletions site/src/components/SiteHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export function SiteHeader() {
<Link href="/docs" className="py-2 hover:text-text">
Docs
</Link>
<Link href="/download" className="py-2 hover:text-text">
Download
</Link>
<a href="https://github.com/AlenVelocity/MeowScript" className="py-2 hover:text-text">
GitHub
</a>
Expand Down
2 changes: 1 addition & 1 deletion site/src/generated/stdlib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface StdlibDoc {
}

export const stdlib: StdlibDoc = {
"version": "1.0.0",
"version": "0.1.0",
"prelude": [
{
"name": "meow",
Expand Down
Loading