-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from FL03/v0.0.2
V0.0.2
- Loading branch information
Showing
64 changed files
with
2,281 additions
and
1,138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
[package] | ||
authors.workspace = true | ||
build = "build.rs" | ||
categories.workspace = true | ||
description.workspace = true | ||
edition.workspace = true | ||
homepage.workspace = true | ||
keywords.workspace = true | ||
license.workspace = true | ||
name = "rstm-core" | ||
readme.workspace = true | ||
repository.workspace = true | ||
version.workspace = true | ||
|
||
[features] | ||
default = [] | ||
|
||
full = [ | ||
"default", | ||
"serde", | ||
"tracing", | ||
] | ||
|
||
# ********* [FF] Dependencies ********* | ||
alloc = [ | ||
"serde?/alloc", | ||
] | ||
|
||
serde = [ | ||
"dep:serde", | ||
] | ||
|
||
tracing = [ | ||
"dep:tracing", | ||
] | ||
|
||
# ********* [FF] Environments ********* | ||
# std = [ | ||
# "alloc", | ||
# "serde?/std", | ||
# "strum/std", | ||
# ] | ||
|
||
[lib] | ||
bench = true | ||
crate-type = ["cdylib", "rlib"] | ||
doctest = false | ||
test = true | ||
|
||
[dependencies] | ||
thiserror.workspace = true | ||
paste.workspace = true | ||
|
||
[dependencies.serde] | ||
# default-features = false | ||
features = ["derive"] | ||
optional = true | ||
version = "1" | ||
|
||
[dependencies.strum] | ||
# default-features = false | ||
features = ["derive"] | ||
version = "0.26" | ||
|
||
[dependencies.tracing] | ||
features = [] | ||
optional = true | ||
version = "0.1" | ||
|
||
[dev-dependencies] | ||
lazy_static.workspace = true | ||
tracing-subscriber = { features = [], version = "0.3" } | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustc-args = ["--cfg", "docsrs"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
Appellation: build <build> | ||
Contrib: FL03 <jo3mccain@icloud.com> | ||
*/ | ||
|
||
fn main() { | ||
println!("cargo::rustc-check-cfg=cfg(no_std)"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
Appellation: rstm-core <library> | ||
Contrib: FL03 <jo3mccain@icloud.com> | ||
*/ | ||
//! # rstm-core | ||
//! | ||
// #![cfg_attr(not(feature = "std"), no_std)] | ||
#[cfg(feature = "alloc")] | ||
extern crate alloc; | ||
|
||
#[doc(inline)] | ||
pub use self::{ | ||
error::Error, ops::prelude::*, rules::prelude::*, state::State, tape::StdTape, | ||
traits::prelude::*, types::prelude::*, | ||
}; | ||
|
||
#[macro_use] | ||
pub(crate) mod macros; | ||
#[macro_use] | ||
pub(crate) mod seal; | ||
|
||
pub mod error; | ||
pub mod ops; | ||
pub mod rules; | ||
pub mod state; | ||
pub mod tape; | ||
pub mod traits; | ||
pub mod types; | ||
|
||
pub mod prelude { | ||
pub use crate::error::Error; | ||
pub use crate::ops::prelude::*; | ||
pub use crate::rules::prelude::*; | ||
pub use crate::state::prelude::*; | ||
pub use crate::tape::prelude::*; | ||
pub use crate::traits::prelude::*; | ||
pub use crate::types::prelude::*; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
Appellation: macros <module> | ||
Contrib: FL03 <jo3mccain@icloud.com> | ||
*/ | ||
|
||
#[macro_use] | ||
pub mod states; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* | ||
Appellation: states <macros> | ||
Contrib: FL03 <jo3mccain@icloud.com> | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
Appellation: ops <module> | ||
Contrib: FL03 <jo3mccain@icloud.com> | ||
*/ | ||
//! # Operations | ||
//! | ||
//! Overloadable operations used throughout the `rstm` crate. | ||
#[doc(inline)] | ||
pub use self::transform::*; | ||
|
||
#[doc(hidden)] | ||
pub mod shift; | ||
pub mod transform; | ||
|
||
pub(crate) mod prelude { | ||
pub use super::transform::*; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
Appellation: shift <module> | ||
Contrib: FL03 <jo3mccain@icloud.com> | ||
*/ | ||
|
||
pub trait Shift<T> { | ||
type Output; | ||
|
||
fn shift(&self, tape: &T) -> Self::Output; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
Appellation: transform <module> | ||
Contrib: FL03 <jo3mccain@icloud.com> | ||
*/ | ||
|
||
/// The [`Transform`] trait generically describes objects capable of applying some transformation. | ||
/// From a "rustic" point of view, the trait simply provides an additional reference point for | ||
/// the `map` method, which is a method that applies a function to a value and returns a new value. | ||
/// | ||
/// [`Transform::transform`] is a method that takes a reference to `self` and a value of type `T` | ||
/// and returns a value of type [`Transform::Output`]. | ||
pub trait Transform<T> { | ||
type Output; | ||
|
||
fn transform(&self, delta: T) -> Self::Output; | ||
} |
Oops, something went wrong.