From 785b85756a80f5ed3446f70ecdb3e5f5cca860e6 Mon Sep 17 00:00:00 2001 From: Kalev Gonvick Date: Sat, 17 May 2025 11:15:40 -0700 Subject: [PATCH 1/3] Updated cargo configs --- Cargo.lock | 8 -------- Cargo.toml | 12 +++++------- src/java_script_encoder.rs | 2 +- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3241daf..f5cb08d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -172,12 +172,6 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - [[package]] name = "half" version = "2.6.0" @@ -433,8 +427,6 @@ name = "tiny-clean" version = "0.1.0" dependencies = [ "criterion", - "fnv", - "log", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f5827bf..cabd3d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,22 +1,20 @@ [package] name = "tiny-clean" version = "0.1.0" +authors = [" Kalev Gonvick kalev.gonvick@idemio.dev"] edition = "2024" -description = "A lightweight, high-performance string sanitizer with configurable rules." +license = "Apache-2.0" +repository = "https://github.com/idemio/tiny-clean" +readme = "README.md" +description = "A lightweight, high-performance string sanitizer with configurable rules." categories = ["algorithms", "development-tools", "text-processing"] - keywords = ["text", "sanitizer", "encoder", "string-manipulation", "utility"] -readme = "README.md" [profile.release] strip = "symbols" opt-level = 3 -[dependencies] -log = "0.4.27" -fnv = "1.0.7" - [dev-dependencies] criterion = "0.5.1" diff --git a/src/java_script_encoder.rs b/src/java_script_encoder.rs index 3fa7e4f..ee406b4 100644 --- a/src/java_script_encoder.rs +++ b/src/java_script_encoder.rs @@ -1,4 +1,4 @@ -use crate::common::{HEX, HEX_MASK, HEX_SHIFT, char_bucket, char_mask, encode_as_hex_byte, encode_as_unicode, dump_masks_to_ascii}; +use crate::common::{char_bucket, char_mask, encode_as_hex_byte, encode_as_unicode, dump_masks_to_ascii}; #[derive(Debug, Clone, Copy, PartialEq)] pub enum JavaScriptEncoderMode { From fa44232cc3f60469c581d1cc129cc40b71ff5a08 Mon Sep 17 00:00:00 2001 From: Kalev Gonvick Date: Sat, 17 May 2025 11:24:20 -0700 Subject: [PATCH 2/3] Update rust.yml --- .github/workflows/rust.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b9db4b0..813178c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,17 +10,6 @@ env: CARGO_TERM_COLOR: always jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: katyo/publish-crates@v2 - with: - dry-run: true build: runs-on: ubuntu-latest steps: From c80107d9b8666a9d44c49baac6b8379a485a65c7 Mon Sep 17 00:00:00 2001 From: Kalev Gonvick Date: Sat, 17 May 2025 11:30:12 -0700 Subject: [PATCH 3/3] Create publish.yml --- .github/workflows/publish.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..4e87a07 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,18 @@ +name: Publish on tag creation + +on: + push: + tags: + - '*' +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: katyo/publish-crates@v2 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}