diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..18dfb92 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: + push: + branches: + - boilerplate + - dev + - idiomatic + - master + - rc1 + - rc2 + - rc3 + pull_request: + +permissions: + contents: read + +defaults: + run: + shell: bash + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checking out code + uses: actions/checkout@v4 + + - name: Build + run: cargo build --verbose + + - name: Run tests + run: cargo test --verbose + + - name: Publish dry-run + run: cargo publish --dry-run diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ef599a6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# directories (by name) + +/_build/ +/_build-ci/ +/scratch/ +/target/ + + +# directories (by pattern) + + +# files (by name) + +.DS_Store + + +# files (by pattern) + +**/*.rs.bk # These are backup files generated by rustfmt + +*~ +*.swp +*.tmp +*.zip diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..3167ff3 --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,21 @@ +# woad.Rust - Authors + + +## Major Contributors + +| Name | GitHub | +| ----------- | --------------------------------- | +| Matt Wilson | [mwsis](https://github.com/mwsis) | + + +## Defect reports, fixes and suggestions (for which we are very grateful) + +| Name | GitHub | +| ------- | ------ | +| \ | | + + +Contributions are welcomed. + + + diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..be8fc3e --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,9 @@ +# woad.Rust - Changes + + +## 0.0.0 - 15th August 2026 + +* initial project scaffolding; + + + diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..9252f09 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "woad" +version = "0.0.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..f578aca --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,61 @@ +# ########################################################## +# Package + +[package] + +authors = [ + "Matt Wilson ", +] +categories = [ + "command-line-interface", +] +description = "Minimal ANSI terminal colour codes, for Rust" +edition = "2021" +homepage = "https://github.com/synesissoftware/woad.Rust" +keywords = [ + "ansi", + "colour", + "sgr", + "terminal", + "tty", +] +license = "BSD-3-Clause" +name = "woad" +readme = "README.md" +repository = "https://github.com/synesissoftware/woad.Rust" +version = "0.0.0" + + +# ########################################################## +# Targets + +[lib] +name = "woad" +path = "src/lib.rs" + + +# ########################################################## +# Features + +[features] + +default = [ +] + +# General features: +# +# - "null-feature" - a feature that has no effect (and, thus, is useful for simplifying driver scripts); + +null-feature = [] + + +# ########################################################## +# Dependencies + +[dependencies] + + +[dev-dependencies] + + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c80eb76 --- /dev/null +++ b/LICENSE @@ -0,0 +1,30 @@ +woad.Rust - BSD 3-Clause License + +Copyright (c) 2026, Matthew Wilson and Synesis Information Systems +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 60593fe..62f6a84 100644 --- a/README.md +++ b/README.md @@ -1 +1,92 @@ -# woad.Rust \ No newline at end of file +# woad.Rust + +Minimal ANSI terminal colour codes, for Rust + +![Language](https://img.shields.io/badge/Rust-000000?style=flat&logo=rust&logoColor=white) +[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) +[![Crates.io](https://img.shields.io/crates/v/woad.svg)](https://crates.io/crates/woad) +[![GitHub release](https://img.shields.io/github/v/release/synesissoftware/woad.Rust.svg)](https://github.com/synesissoftware/woad.Rust/releases/latest) +[![Last Commit](https://img.shields.io/github/last-commit/synesissoftware/woad.Rust)](https://github.com/synesissoftware/woad.Rust/commits/master) +[![CI](https://github.com/synesissoftware/woad.Rust/actions/workflows/ci.yml/badge.svg)](https://github.com/synesissoftware/woad.Rust/actions/workflows/ci.yml) + + +## Table of Contents + +- [Introduction](#introduction) +- [Installation](#installation) +- [Components](#components) +- [Project Information](#project-information) + - [Where to get help](#where-to-get-help) + - [Contribution guidelines](#contribution-guidelines) + - [Dependencies](#dependencies) + - [Efferent (fan-out)](#efferent-fan-out) + - [Development Dependencies](#development-dependencies) + - [Afferent (fan-in)](#afferent-fan-in) + - [Related projects](#related-projects) + - [License](#license) + + +## Introduction + +**woad** provides the smallest useful set of fixed ANSI SGR colour sequences for library authors. It is not a console or TUI framework. + +**woad.Rust** is the **Rust** implementation. + + +## Installation + +Reference in **Cargo.toml** in the usual way: + +```toml +woad = { version = "0" } +``` + + +## Components + +**woad.Rust** currently ships version metadata (`woad::VERSION`). Colour codes, TTY/stream gating, and Windows virtual-terminal opt-in are not implemented in this 0.0.0 skeleton. + + +## Project Information + + +### Where to get help + +[GitHub Page](https://github.com/synesissoftware/woad.Rust "GitHub Page") + + +### Contribution guidelines + +Defect reports, feature requests, and pull requests are welcome on https://github.com/synesissoftware/woad.Rust. + + +### Dependencies + + +#### Efferent (fan-out) + +None. + + +#### Development Dependencies + +None. + + +#### Afferent (fan-in) + +None (currently). + + +### Related projects + +* [**woad.Python**](https://github.com/synesissoftware/woad.Python/) +* [**woad.Ruby**](https://github.com/synesissoftware/woad.Ruby/) + + +### License + +**woad.Rust** is released under the 3-clause BSD license. See [LICENSE](./LICENSE) for details. + + + diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..0918e7a --- /dev/null +++ b/TODO.md @@ -0,0 +1,21 @@ +# woad.Rust - TODO + + +## Functional improvements + +* [ ] SGR colour and reset codes; +* [ ] TTY-conditional colour codes (process and per-stream); +* [ ] Windows virtual-terminal gating (OS build + `GetConsoleMode`); + + +## Performance improvements + +* \ + + +## Packaging improvements + +* \ + + + diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..0fcdf25 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,18 @@ +//! Placeholder crate for **woad**.Rust. +//! +//! Colour facilities are not implemented in this 0.0.0 skeleton. + +/// Crate version. +pub const VERSION : &str = "0.0.0"; + + +#[cfg(test)] +mod tests { + #![allow(non_snake_case)] + + + #[test] + fn TEST_VERSION() { + assert_eq!(crate::VERSION, "0.0.0"); + } +}