Skip to content

Commit

Permalink
Miscellaneous chores (#1)
Browse files Browse the repository at this point in the history
- Test no-std compatibility in CI
- Add badges to the crate readme
- Configure Dependabot
  • Loading branch information
slowli committed Sep 25, 2023
2 parents 06fcb6c + 6183ea3 commit 0f0c1ab
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 4 deletions.
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
time: "03:00"
groups:
dev-dependencies:
dependency-type: "development"
minor-changes:
update-types:
- "minor"
- "patch"
open-pull-requests-limit: 10
assignees:
- slowli
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,28 @@ jobs:
- name: Run doc tests
run: cargo test --workspace --doc

build-nostd:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.nightly }}
targets: thumbv7m-none-eabi

- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-nostd-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-nostd-cargo

- name: Build library
run: cargo build -p compile-fmt --lib --target thumbv7m-none-eabi -Z avoid-dev-deps

document:
if: github.event_name == 'push'
needs:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "compile-fmt"
version = "0.1.0"
edition = "2021"
# FIXME: add rust-version
rust-version = "1.65"
authors = ["Alex Ostrovski <ostrovski.alex@gmail.com>"]
license = "MIT OR Apache-2.0"
keywords = ["format", "compile-time", "const"]
Expand Down
2 changes: 1 addition & 1 deletion LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2023-current Developers of const-fmt
Copyright 2023-current Developers of compile-fmt

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Compile-Time Formatting

[![Build Status](https://github.com/slowli/compile-fmt/workflows/CI/badge.svg?branch=main)](https://github.com/slowli/compile-fmt/actions)
[![License: MIT OR Apache-2.0](https://img.shields.io/badge/License-MIT%2FApache--2.0-blue)](https://github.com/slowli/compile-fmt#license)
![rust 1.65+ required](https://img.shields.io/badge/rust-1.65+-blue.svg?label=Required%20Rust)
![no_std supported](https://img.shields.io/badge/no__std-tested-green.svg)

**Documentation:**
[![crate docs (main)](https://img.shields.io/badge/main-yellow.svg?label=docs)](https://slowli.github.io/compile-fmt/compile_fmt/)

This crate allows formatting values in compile time (e.g., in `const fn`s). The formatted values
are not required to be constants; e.g., arguments or local vars in `const fn` can be formatted.
The formatting logic is space-efficient; i.e., it allocates the least amount of bytes
Expand Down Expand Up @@ -70,11 +78,11 @@ See crate docs for more examples of usage.

## License

`const-fmt` is licensed under either of [Apache License, Version 2.0](LICENSE-APACHE)
`compile-fmt` is licensed under either of [Apache License, Version 2.0](LICENSE-APACHE)
or [MIT license](LICENSE-MIT) at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in `const-fmt` by you, as defined in the Apache-2.0 license,
for inclusion in `compile-fmt` by you, as defined in the Apache-2.0 license,
shall be dual licensed as above, without any additional terms or conditions.

[`const_panic`]: https://crates.io/crates/const_panic
Expand Down

0 comments on commit 0f0c1ab

Please sign in to comment.