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
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Changelog

## Unreleased
## 2.0.0-beta.15 (2026-11-24)

Amber 2.0.0-beta.15 makes TLS opt-in. On crystal-alpha 1.22.3-incremental-1,
an `amber new -d sqlite` app with a scaffold links no libssl, libcrypto,
libz, libiconv or PCRE2 without any build flag, and peaked at 18.2 MiB of
RSS under load at the 8 MiB heap on an M4 Mac mini, against 20.0 MiB for the
beta.14 app on the same compiler. An app that serves HTTPS itself or sends
mail with `use_tls` adds `require "amber/tls"`. Responses are compressed
with Brotli when the client asks for it, and the vendored Mica and Beryl
move to their current releases. Apps pin asset_pipeline 0.40.0.

**TLS is opt-in: `require "amber/tls"`.** Amber no longer compiles its TLS
listener into every app. An app that serves HTTPS itself (`server.ssl`) or
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ _Amber makes building web applications fast, simple, and enjoyable - with fewer

# Welcome! Introducing Amber

**Amber 2.0.0-beta.14 is available for testing.** It is a pre-release: use it
**Amber 2.0.0-beta.15 is available for testing.** It is a pre-release: use it
for evaluation and new projects that can tolerate breaking changes, not for
production workloads. The supported beta path is an ECR web application
created by the standalone [Amber CLI](https://github.com/amberframework/amber_cli).
Expand Down Expand Up @@ -133,7 +133,7 @@ The generated `shard.yml` pins this framework beta:
dependencies:
amber:
github: amberframework/amber
version: 2.0.0-beta.14
version: 2.0.0-beta.15
```

[Read the complete beta installation guide](docs/beta-installation.md),
Expand Down
78 changes: 78 additions & 0 deletions RELEASE_NOTES_V2_BETA15.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Amber 2.0.0-beta.15

Amber 2.0.0-beta.15 makes TLS opt-in, so a default app on crystal-alpha links
no OpenSSL without a build flag, and compresses responses with Brotli when the
client asks for it.

## TLS is opt-in: `require "amber/tls"`

Amber no longer compiles its TLS listener into every app, and its own files
require `http/server` instead of `http`, so Amber brings in no
`HTTP::Client`. On crystal-alpha 1.22.3-incremental-1, whose `http/server`
leaves TLS out unless a program asks for it, an `amber new -d sqlite` app with
a Post scaffold links none of libssl, libcrypto, libz,
libiconv or PCRE2 without any build flag (`otool -L` shows none, and `nm -u`
shows no `SSL_`, `BIO_`, `ERR_`, `X509_` or `EVP_` import). It serves `GET /`,
accepts the scaffold's form `POST`, passes its 12 specs, and peaked at 18.2
MiB of RSS under load at the 8 MiB starting heap on an M4 Mac mini, against
20.0 MiB for the beta.14 app built by the same compiler.

An app that serves HTTPS itself (`server.ssl`) or sends mail over SMTP
STARTTLS (mailer `use_tls`) adds one line to `config/application.cr`, right
after `require "amber"`:

```crystal
require "amber/tls"
```

`amber new --tls` writes it. Without it, a server whose settings ask for TLS
stops at start, before it forks or binds, with
`Amber::Exceptions::TLSNotCompiledIn`, whose message names
`require "amber/tls"`. A `--tls` app served HTTPS with a self-signed
certificate (`curl -k` 200); it links OpenSSL, and peaked at 18.9 MiB over
plain HTTP and 32.2 MiB under 32 concurrent HTTPS connections.

On stock Crystal, `http/server` still requires `openssl`; `-Dwithout_openssl`
keeps its meaning there, and it cannot be combined with `require "amber/tls"`.

## Brotli content coding

`Amber::Pipe::Compression` offers Brotli, gzip and deflate and picks the one
the client accepts best, with `Accept-Encoding` q-values honored (RFC 9110,
section 12.5.3); on a tie Brotli comes first. Brotli comes from a pinned copy
of Mica's pure-Crystal encoder at quality 5, so an app links no libbrotli
(`Compression.new(brotli_quality: nil)` offers gzip and deflate only). A body
shorter than 1,024 bytes is sent without a content coding.
`Amber::Pipe::Static` serves a precompressed `file.br` as well as `file.gz`.
In a generated app, `GET /posts/new` with `Accept-Encoding: br` comes back
with `Content-Encoding: br`. A page answered from asset_pipeline's page cache,
such as the generated home page, is stored as gzip and identity only, unless
the app is built with `-Dasset_pipeline_brotli`.

## Vendored Mica and Beryl

- Mica moves to amberframework/mica `84812fd1` (component `compression`): the
Brotli writer sizes its tables to a short body (amberframework/mica#34),
Brotli decoding is at least as fast as libbrotlidec 1.2.1
(amberframework/mica#35), and the Deflate and Zlib readers stop at the end
of the stream (amberframework/mica#38). The encoder stays the Z6b port of
libbrotlienc 1.2.1.
- Beryl moves to amberframework/beryl `b1df8cc1`: the hashes, HMAC, HKDF and
AEADs Amber calls run with the processor's Data Independent Timing mode on
(amberframework/beryl#9) and give the same bytes. The copy also carries the
public-key code (F3b) and the x86-64 timing fix (amberframework/beryl#18),
which Amber does not call.

Both are pinned by commit and per-file sha256.

`CHANGELOG.md` has the complete list.

## Upgrading

Use Amber CLI 2.0.16 for new apps; it pins Amber `v2.0.0-beta.15`, Grant
`v0.26.0` and asset_pipeline `v0.40.0`, and `amber new --tls` makes an app
that serves HTTPS itself. For an existing app, pin the Amber and
asset_pipeline release commits in `shard.yml`, run
`minecart update amber asset_pipeline`, and, if the app serves HTTPS itself
or sends mail with `use_tls`, add `require "amber/tls"` after
`require "amber"` in `config/application.cr`.
12 changes: 6 additions & 6 deletions docs/beta-installation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Amber V2 Beta Installation and Support

This is the release contract for Amber `2.0.0-beta.14` and Amber CLI `2.0.15`.
A project generated by Amber CLI 2.0.15 pins this framework beta by commit.
This is the release contract for Amber `2.0.0-beta.15` and Amber CLI `2.0.16`.
A project generated by Amber CLI 2.0.16 pins this framework beta by commit.
The goal is a repeatable first run, not a promise that every experimental
generator is production-ready.

Expand Down Expand Up @@ -46,7 +46,7 @@ amber --version
The fully qualified command follows Homebrew's tap-trust model and trusts only
the `amber_cli` formula. The installed executables are `amber` and `amber-lsp`.

The expected CLI version is `2.0.15` or newer. If another executable is found,
The expected CLI version is `2.0.16` or newer. If another executable is found,
run `command -v amber` and use the troubleshooting section below.

## Install a release archive
Expand All @@ -57,11 +57,11 @@ Choose the archive that matches the supported machine:
- x86_64 Linux: `amber_cli-linux-x86_64.tar.gz`
- ARM64 Linux: `amber_cli-linux-arm64.tar.gz`

The following example installs CLI `v2.0.15`. On Linux, replace the two
The following example installs CLI `v2.0.16`. On Linux, replace the two
`darwin-arm64` occurrences with `linux-x86_64` or `linux-arm64`.

```bash
version=v2.0.15
version=v2.0.16
asset=amber_cli-darwin-arm64.tar.gz
curl -fLO "https://github.com/amberframework/amber_cli/releases/download/${version}/${asset}"
curl -fLO "https://github.com/amberframework/amber_cli/releases/download/${version}/${asset}.sha256"
Expand All @@ -84,7 +84,7 @@ dependencies in PowerShell:
```bash
git clone https://github.com/amberframework/amber_cli.git
cd amber_cli
git checkout v2.0.15
git checkout v2.0.16
shards install
```

Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ web app using ECR templates and the standalone Amber CLI.
- A platform and installation method listed in the beta support guide
- Crystal 1.20 or newer (but earlier than Crystal 2.0)
- Git and `shards`
- Amber CLI 2.0.15 or newer
- Amber CLI 2.0.16 or newer

Follow the [beta installation guide](beta-installation.md) if `amber --version`
does not work yet.
Expand All @@ -24,7 +24,7 @@ shards install
`--type web` is explicit so the command remains reproducible as more app types
are added. The generated application uses:

- Amber `2.0.0-beta.14` from `amberframework/amber`
- Amber `2.0.0-beta.15` from `amberframework/amber`
- ECR templates
- typed, sectioned environment configuration
- a manifest-backed static-asset pipeline for CSS, JavaScript, images, fonts,
Expand Down Expand Up @@ -128,7 +128,7 @@ branch:
dependencies:
amber:
github: amberframework/amber
version: 2.0.0-beta.14
version: 2.0.0-beta.15

crystal: ">= 1.20.0, < 2.0"
```
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ says what each default does, so you keep it when you change things.
| 8 KB collector blocks for your programs | the `agent-crystal` Homebrew formula on arm64 macOS |
| 8 MiB starting heap, page cache, stateless views | apps from Amber CLI 2.0.12 and later |
| `-Dwithout_openssl` (cookies on Beryl) | Amber 2.0.0-beta.14, Grant 0.26.0 and asset_pipeline 0.39.0 (apps from Amber CLI 2.0.15) |
| No OpenSSL without a flag; TLS through `require "amber/tls"` | Amber 2.0.0-beta.15 and asset_pipeline after 0.39.0, on crystal-alpha with the opt-in TLS standard library |
| No OpenSSL without a flag; TLS through `require "amber/tls"` | Amber 2.0.0-beta.15 and asset_pipeline 0.40.0 (apps from Amber CLI 2.0.16), on crystal-alpha 1.22.3-incremental-1 and later |
| `-Dwithout_zlib` (gzip on Mica) | Amber 2.0.0-beta.14, Grant 0.26.0 and asset_pipeline 0.39.0 (apps from Amber CLI 2.0.15) |

Unless a section says otherwise, numbers were measured on an Apple M1 Max
Expand Down
12 changes: 6 additions & 6 deletions docs/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ crystal spec
amber watch
```

The generated project uses ECR. Amber CLI 2.0.15 pins it to `2.0.0-beta.14`. See the
The generated project uses ECR. Amber CLI 2.0.16 pins it to `2.0.0-beta.15`. See the
[beta installation guide](beta-installation.md) for direct binary installation,
supported platforms, and the exact verification procedure. New web apps use
Grant with SQLite and Micrate migrations by default. Authentication generators
Expand Down Expand Up @@ -73,7 +73,7 @@ dependencies:
dependencies:
amber:
github: amberframework/amber
version: 2.0.0-beta.14
version: 2.0.0-beta.15
# No redis dependency needed for default configuration
```

Expand Down Expand Up @@ -358,7 +358,7 @@ dependencies:
dependencies:
amber:
github: amberframework/amber
version: 2.0.0-beta.14
version: 2.0.0-beta.15
pg:
github: will/crystal-pg
granite:
Expand Down Expand Up @@ -596,7 +596,7 @@ earlier pipe set as it is, but code that runs after it and uses
dependencies:
amber:
github: amberframework/amber
version: 2.0.0-beta.14
version: 2.0.0-beta.15
```

### Add to shard.yml (as needed)
Expand All @@ -615,8 +615,8 @@ is published.

## Migration Checklist

- [ ] Install Amber CLI 2.0.15 or newer from `amberframework/amber_cli`
- [ ] Update `shard.yml` to point to `amberframework/amber` at `2.0.0-beta.14` and remove bundled dependencies
- [ ] Install Amber CLI 2.0.16 or newer from `amberframework/amber_cli`
- [ ] Update `shard.yml` to point to `amberframework/amber` at `2.0.0-beta.15` and remove bundled dependencies
- [ ] Run `shards install`
- [ ] Replace `YAML.mapping` with `YAML::Serializable` in all custom types
- [ ] Rename all `.slang` templates to `.ecr` and convert syntax
Expand Down
10 changes: 5 additions & 5 deletions scripts/check_beta_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ set -euo pipefail

shard_version="$(awk '/^version:/ { print $2; exit }' shard.yml)"
source_version="$(sed -n 's/.*VERSION = "\([^"]*\)".*/\1/p' src/amber/version.cr)"
test "$shard_version" = "2.0.0-beta.14"
test "$shard_version" = "2.0.0-beta.15"
test "$source_version" = "$shard_version"

files=(README.md docs/README.md docs/getting-started.md docs/beta-installation.md docs/migration-guide.md RELEASE_NOTES_V2_BETA8.md)
grep -F 'brew install amberframework/amber_cli/amber_cli' docs/beta-installation.md
grep -F 'version: 2.0.0-beta.14' docs/getting-started.md
grep -F 'version=v2.0.15' docs/beta-installation.md
grep -F 'git checkout v2.0.15' docs/beta-installation.md
grep -F 'Amber CLI 2.0.15 or newer' docs/getting-started.md docs/migration-guide.md
grep -F 'version: 2.0.0-beta.15' docs/getting-started.md
grep -F 'version=v2.0.16' docs/beta-installation.md
grep -F 'git checkout v2.0.16' docs/beta-installation.md
grep -F 'Amber CLI 2.0.16 or newer' docs/getting-started.md docs/migration-guide.md
if grep -R -F 'Process.fork' src; then
echo "Amber V2 must compile with Crystal's default multithreaded runtime" >&2
exit 1
Expand Down
2 changes: 1 addition & 1 deletion scripts/release_checksums.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# paste the output into the release notes, so an installer can download the
# asset and check its sha256, or compare the tree hash with a checkout.
#
# Usage: scripts/release_checksums.sh v2.0.0-beta.14
# Usage: scripts/release_checksums.sh v2.0.0-beta.15
set -euo pipefail

ref="${1:?usage: scripts/release_checksums.sh <tag-or-commit>}"
Expand Down
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: amber

version: 2.0.0-beta.14
version: 2.0.0-beta.15

authors:
- Amber Team and Contributors <amberframework.org>
Expand Down
2 changes: 1 addition & 1 deletion src/amber/version.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Amber
VERSION = "2.0.0-beta.14"
VERSION = "2.0.0-beta.15"
end
Loading