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
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- Thank you for making a pull request! Below are the recommended steps to validate that your PR will pass CI -->

## Checklist

- [ ] `cargo clippy` reports no issues
- [ ] `cargo doc` reports no issues
- [ ] [`cargo deny`](https://github.com/EmbarkStudios/cargo-deny/) issues have been fixed or added to `deny.toml`
- [ ] Human-readable change descriptions added to CHANGELOG.md under the "Unreleased" heading.
- [ ] If the change does not affect the user (or is a process change), preface the change with "Internal:"
- [ ] Add credit to yourself for each change: `Added new functionality. @githubname`

## Description

## Related Issues
44 changes: 37 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,66 @@ on:
branches: ["trunk"]
pull_request:

env:
CI_RUST_VERSION: "1.94"
CI_RUST_MSRV: "1.39"
RUSTFLAGS: "-Dwarnings"
RUSTDOCFLAGS: "-Dwarnings"

jobs:
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup component add rustfmt
- uses: cwfitzgerald/repo-common/.github/actions/install-rust@trunk
with:
version: ${{ env.CI_RUST_VERSION }}
components: rustfmt
- run: cargo fmt --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup component add clippy
- run: cargo clippy -- -D warnings
- uses: cwfitzgerald/repo-common/.github/actions/install-rust@trunk
with:
version: ${{ env.CI_RUST_VERSION }}
components: clippy
- run: cargo clippy --all-features -- -D warnings
- run: cargo doc --no-deps

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo test
- uses: cwfitzgerald/repo-common/.github/actions/install-rust@trunk
with:
version: ${{ env.CI_RUST_VERSION }}
- uses: taiki-e/install-action@cargo-nextest
- run: cargo nextest run
- run: cargo test --doc

deny:
name: Deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@cargo-deny
- run: cargo deny --all-features check

msrv:
name: MSRV (1.39)
runs-on: ubuntu-latest
env:
RUSTFLAGS: ""
RUSTDOCFLAGS: ""
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
- uses: cwfitzgerald/repo-common/.github/actions/install-rust@trunk
with:
toolchain: "1.39"
- run: cargo +1.39 check
version: ${{ env.CI_RUST_MSRV }}
- run: cargo check
- run: cargo check --no-default-features
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ target/
examples/generated-wasm

# Service
Cargo.lock
*.swp
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to cargo's version of [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Per Keep a Changelog there are 6 main categories of changes:
- Added
- Changed
- Deprecated
- Removed
- Fixed
- Security

#### Table of Contents

- [Unreleased](#unreleased)
- [v0.1.5](#v015)
- [v0.1.4](#v014)
- [v0.1.3](#v013)

## Unreleased

- Changed: Switched to `#![no_std]` with `alloc` dependency. @waywardmonkeys
- Changed: Updated MSRV from 1.36 to 1.39 to enable `no_std`.

## v0.1.5

- Added: `allocate_range_aligned` method for aligned sub-range allocation without wasting padding space.
- Added: Documentation comments for all public items.
- Added: README with usage examples, MSRV policy, and license info.
- Added: CI workflow with format, clippy, test, and MSRV jobs.
- Internal: Updated edition from 2015 to 2018.

## v0.1.4

- Fixed: `grow_to` incorrectly assumed the last free range was always at the end of the pool, corrupting the free list when the tail was allocated and an earlier range was free. @dbartussek
- Internal: Clippy lint fixes.

## v0.1.3

Initial release on separate repository (previously part of [gfx-rs](https://github.com/gfx-rs/gfx)).

## Diffs

- [Unreleased](https://github.com/gfx-rs/range-alloc/compare/v0.1.5...HEAD)
- [v0.1.5](https://github.com/gfx-rs/range-alloc/compare/v0.1.4...v0.1.5)
- [v0.1.4](https://github.com/gfx-rs/range-alloc/compare/v0.1.3...v0.1.4)
6 changes: 6 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ authors = ["the gfx-rs Developers"]
documentation = "https://docs.rs/range-alloc"
categories = ["memory-management"]
edition = "2018"
rust-version = "1.39"
readme = "README.md"
104 changes: 104 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Release Process

This document describes how to publish a new release of `range-alloc`.

## Prerequisites

- Push access to the default branch
- A crates.io API token with publish rights for all workspace crates
- `gh` CLI installed and authenticated (for creating the GitHub release)

## Steps

### 1. Determine the new version

Pick the new version number following cargo semver conventions. For this document,
we'll use `X.Y.Z` as a placeholder.

### 2. Update CHANGELOG.md

**a) Add the new version to the Table of Contents:**

Find the line:
```
- [Unreleased](#unreleased)
```
Add a new entry directly below it:
```
- [vX.Y.Z](#vXYZ)
```
(The anchor is the version with dots removed, e.g. `v0.2.0` -> `#v020`)

**b) Add a version heading under Unreleased:**

Find:
```
## Unreleased
```
Add a blank line and a new version section below it, moving all existing unreleased
items under the new heading:
```
## Unreleased

## vX.Y.Z

Released YYYY-MM-DD

- (move all previously unreleased items here)
```

**c) Update the Diffs section at the bottom:**

Find the existing unreleased diff link:
```
- [Unreleased](https://github.com/gfx-rs/range-alloc/compare/vPREVIOUS...HEAD)
```
Update it and add a new entry:
```
- [Unreleased](https://github.com/gfx-rs/range-alloc/compare/vX.Y.Z...HEAD)
- [vX.Y.Z](https://github.com/gfx-rs/range-alloc/compare/vPREVIOUS...vX.Y.Z)
```

### 3. Update Cargo.toml

Set the `version` field to the new version:
```toml
version = "X.Y.Z"
```

If this is a workspace, update `workspace.package.version` and any intra-workspace
dependency versions as needed.

### 4. Update README.md

Update any version references (dependency snippets, compatibility tables, etc.)
to reflect the new version.

### 5. Commit and tag

```bash
jj commit -m "Release vX.Y.Z"
jj tag create vX.Y.Z
jj git push
```

### 6. Publish to crates.io

```bash
cargo publish
```

### 7. Create the GitHub release

Extract the release notes from `CHANGELOG.md` and create a release:

```bash
gh release create vX.Y.Z --title "vX.Y.Z" --notes "<paste release notes here>"
```

### 8. Post-release

Verify:
- [ ] The crate is visible at https://crates.io/crates/range-alloc/X.Y.Z
- [ ] Docs are building at https://docs.rs/range-alloc/X.Y.Z
- [ ] The GitHub release exists at https://github.com/gfx-rs/range-alloc/releases/tag/vX.Y.Z
16 changes: 16 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[licenses]
allow = [
"Apache-2.0",
"MIT",
]

[bans]
multiple-versions = "deny"
skip = []

[sources]
unknown-registry = "deny"
unknown-git = "allow"

[advisories]
ignore = []
4 changes: 4 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>cwfitzgerald/repo-common"]
}
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "1.94"