Skip to content

Commit

Permalink
Use Cargo workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
alecdotninja committed Jan 15, 2024
1 parent 0f3dc00 commit 44392da
Show file tree
Hide file tree
Showing 16 changed files with 55 additions and 46 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
/target
/impl/target
**/*.rs.bk
Cargo.lock
*~
27 changes: 9 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
[package]
name = "tailcall"
[workspace]

members = [
"tailcall",
"tailcall-impl",
]

[workspace.package]
description = "Safe, zero-cost tail recursion"
documentation = "https://docs.rs/tailcall"
repository = "https://github.com/alecdotninja/tailcall"
readme = "README.md"
keywords = ["recursion", "tail", "tailcall", "become"]
categories = ["algorithms", "no-std"]
exclude = ["/.github", ".gitignore"]
license = "MIT OR Apache-2.0"
authors = ["Alec Larsen <[email protected]>"]
version = "1.0.0"
edition = "2018"

[badges]
travis-ci = { repository = "alecdotninja/tailcall" }

[dependencies]
tailcall-impl = { path = "impl", version = "1.0.0" }

[dev-dependencies]
backtrace = "0.3.40"
bencher = "0.1.5"

[[bench]]
name = "bench"
harness = false
edition = "2018"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
tailcall = "1.0.0"
tailcall = "~1"
```

## Usage
Expand Down
22 changes: 0 additions & 22 deletions impl/Cargo.toml

This file was deleted.

20 changes: 20 additions & 0 deletions tailcall-impl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "tailcall-impl"
description = "The procedural macro implementation for the tailcall crate"
documentation.workspace = true
repository.workspace = true
readme.workspace = true
keywords.workspace = true
categories.workspace = true
license.workspace = true
authors.workspace = true
version.workspace = true
edition.workspace = true

[dependencies]
proc-macro2 = "~1"
quote = "~1"
syn = { version = "~1", features = ["full", "fold"] }

[lib]
proc-macro = true
File renamed without changes.
4 changes: 2 additions & 2 deletions impl/src/lib.rs → tailcall-impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use syn::{parse_macro_input, ItemFn};
/// # Example
///
/// ```
/// use tailcall::tailcall;
/// use tailcall_impl::tailcall;
///
/// fn factorial(input: u64) -> u64 {
/// #[tailcall]
Expand All @@ -52,7 +52,7 @@ use syn::{parse_macro_input, ItemFn};
/// - All recursive calls must be in [tail form]:
///
/// ```compile_fail
/// use tailcall::tailcall;
/// use tailcall_impl::tailcall;
///
/// #[tailcall]
/// fn factorial(input: u64) -> u64 {
Expand Down
File renamed without changes.
23 changes: 23 additions & 0 deletions tailcall/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[package]
name = "tailcall"
description.workspace = true
documentation.workspace = true
repository.workspace = true
readme.workspace = true
keywords.workspace = true
categories.workspace = true
license.workspace = true
authors.workspace = true
version.workspace = true
edition.workspace = true

[dependencies]
tailcall-impl = { path = "../tailcall-impl" }

[dev-dependencies]
backtrace = "~0.3"
bencher = "~0.1"

[[bench]]
name = "bench"
harness = false
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 44392da

Please sign in to comment.