Skip to content

Commit b13d99e

Browse files
committed
Rename project from polymorphic_fn to rustmorphism; update Cargo.toml, Cargo.lock, README.md, and example files accordingly to reflect the new name and dependencies.
1 parent c519cee commit b13d99e

File tree

7 files changed

+34
-39
lines changed

7 files changed

+34
-39
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
- uses: Swatinem/rust-cache@v2
2020
- name: Run tests
2121
run: cargo test --verbose
22-
working-directory: polymorphic_fn
2322

2423
clippy:
2524
name: Clippy
@@ -32,7 +31,6 @@ jobs:
3231
- uses: Swatinem/rust-cache@v2
3332
- name: Clippy check
3433
run: cargo clippy -- -D warnings
35-
working-directory: polymorphic_fn
3634

3735
formatting:
3836
name: Formatting
@@ -44,7 +42,6 @@ jobs:
4442
components: rustfmt
4543
- name: Check formatting
4644
run: cargo fmt --all -- --check
47-
working-directory: polymorphic_fn
4845

4946
publish:
5047
name: Publish
@@ -58,6 +55,4 @@ jobs:
5855
- name: Login to crates.io
5956
run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
6057
- name: Publish
61-
run: |
62-
cd polymorphic_fn
63-
cargo publish
58+
run: cargo publish

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
2-
name = "polymorphic_fn"
2+
name = "rustmorphism"
33
version = "0.1.0"
44
edition = "2021"
55
description = "A Rust macro for creating functions with multiple implementations that are deterministically selected at compile-time"
66
authors = ["Your Name <your.email@example.com>"]
77
license = "MIT"
8-
repository = "https://github.com/yourusername/polymorphic_fn"
9-
documentation = "https://docs.rs/polymorphic_fn"
8+
repository = "https://github.com/yourusername/rustmorphism"
9+
documentation = "https://docs.rs/rustmorphism"
1010
readme = "README.md"
1111
keywords = ["macro", "polymorphism", "proc-macro", "compile-time"]
1212
categories = ["development-tools", "rust-patterns"]

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# polymorphic_fn
1+
# rustmorphism
22

3-
[![Crates.io](https://img.shields.io/crates/v/polymorphic_fn.svg)](https://crates.io/crates/polymorphic_fn)
4-
[![Documentation](https://docs.rs/polymorphic_fn/badge.svg)](https://docs.rs/polymorphic_fn)
3+
[![Crates.io](https://img.shields.io/crates/v/rustmorphism.svg)](https://crates.io/crates/rustmorphism)
4+
[![Documentation](https://docs.rs/rustmorphism/badge.svg)](https://docs.rs/rustmorphism)
55
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
66

77
A Rust procedural macro that enables functions with multiple implementations, where one is deterministically selected at compile-time.
@@ -20,17 +20,17 @@ Add this to your `Cargo.toml`:
2020

2121
```toml
2222
[dependencies]
23-
polymorphic_fn = "0.1.0"
23+
rustmorphism = "0.1.0"
2424
```
2525

2626
## Usage
2727

2828
### Basic Example
2929

3030
```rust
31-
use polymorphic_fn::polymorphic_fn;
31+
use rustmorphism::polymorphic_fn;
3232

33-
polymorphic_fn! {
33+
rustmorphism! {
3434
pub fn calculate(x: i32) -> i32 {
3535
{ x + 1 }, // Implementation 1
3636
{ x * 2 }, // Implementation 2
@@ -49,7 +49,7 @@ fn main() {
4949
#### Binary Size Optimization
5050

5151
```rust
52-
use polymorphic_fn::polymorphic_fn;
52+
use rustmorphism::polymorphic_fn;
5353

5454
// Define alternative implementations with different size characteristics
5555
fn small_implementation(data: &[u8]) -> u64 {
@@ -66,7 +66,7 @@ fn large_implementation(data: &[u8]) -> u64 {
6666
.sum()
6767
}
6868

69-
polymorphic_fn! {
69+
rustmorphism! {
7070
pub fn process_data(data: &[u8]) -> u64 {
7171
{ small_implementation(data) },
7272
{ large_implementation(data) }
@@ -77,9 +77,9 @@ polymorphic_fn! {
7777
#### Implementation A/B Testing
7878

7979
```rust
80-
use polymorphic_fn::polymorphic_fn;
80+
use rustmorphism::polymorphic_fn;
8181

82-
polymorphic_fn! {
82+
rustmorphism! {
8383
pub fn sort_algorithm<T: Ord + Copy>(data: &mut [T]) {
8484
{
8585
// Implementation 1: Quick sort
@@ -101,7 +101,7 @@ polymorphic_fn! {
101101

102102
## How It Works
103103

104-
The `polymorphic_fn` macro uses compile-time hashing to deterministically select one implementation from the provided alternatives. The selection is based on:
104+
The `rustmorphism` macro uses compile-time hashing to deterministically select one implementation from the provided alternatives. The selection is based on:
105105

106106
1. The function name
107107
2. Build timestamp

example/Cargo.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ edition = "2021"
55
build = "build.rs"
66

77
[dependencies]
8-
polymorphic_fn = { path = "../polymorphic_fn" }
8+
rustmorphism = { path = ".." }

example/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use polymorphic_fn::polymorphic_fn;
1+
use rustmorphism::polymorphic_fn;
22

33
// Small implementation helper
44
#[inline(never)]

0 commit comments

Comments
 (0)