Add corex library with resource-aware execution primitives
CI / Rustfmt (push) Canceled after 0s
CI / Clippy (push) Canceled after 0s
CI / Test (default features) (push) Canceled after 0s
CI / Test (all features) (push) Canceled after 0s
CI / Test (bg only) (push) Canceled after 0s
CI / Test (compute only) (push) Canceled after 0s
CI / Test (io only) (push) Canceled after 0s
CI / Run example (push) Canceled after 0s
CI / Docs check (push) Canceled after 0s
CI / Cargo package dry-run (push) Canceled after 0s
CI / Rustfmt (push) Canceled after 0s
CI / Clippy (push) Canceled after 0s
CI / Test (default features) (push) Canceled after 0s
CI / Test (all features) (push) Canceled after 0s
CI / Test (bg only) (push) Canceled after 0s
CI / Test (compute only) (push) Canceled after 0s
CI / Test (io only) (push) Canceled after 0s
CI / Run example (push) Canceled after 0s
CI / Docs check (push) Canceled after 0s
CI / Cargo package dry-run (push) Canceled after 0s
- Implement CI workflow for formatting, linting, testing, and documentation checks. - Create publish workflow for automated publishing to crates.io. - Add .gitignore to exclude build artifacts and editor files. - Define Cargo.toml for corex and corex-core with dependencies and metadata. - Add README.md files for corex and corex-core with usage instructions and licensing. - Implement core execution primitives: spawn_io, compute, and spawn_bg with panic isolation. - Establish global engine context for resource management based on logical CPU cores. - Introduce error handling for compute panics.
This commit is contained in:
+62
@@ -0,0 +1,62 @@
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
members = ["crates/corex-core"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.75"
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/username/corex"
|
||||
homepage = "https://github.com/username/corex"
|
||||
documentation = "https://docs.rs/corex"
|
||||
authors = ["The corex Authors"]
|
||||
|
||||
[workspace.dependencies]
|
||||
tokio = { version = "1.53", features = ["full"] }
|
||||
rayon = "1.12"
|
||||
num_cpus = "1.17"
|
||||
tracing = "0.1"
|
||||
corex-core = { path = "crates/corex-core", version = "0.1.0", default-features = false }
|
||||
|
||||
[package]
|
||||
name = "corex"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
homepage.workspace = true
|
||||
documentation.workspace = true
|
||||
authors.workspace = true
|
||||
description = "Resource-aware abstractions for async I/O, heavy compute, and background queue management."
|
||||
readme = "README.md"
|
||||
keywords = ["async", "concurrency", "rayon", "tokio", "resource-management"]
|
||||
categories = ["asynchronous", "concurrency", "rust-patterns"]
|
||||
|
||||
[lib]
|
||||
name = "corex"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
io = ["corex-core/io"]
|
||||
compute = ["corex-core/compute"]
|
||||
bg = ["corex-core/bg"]
|
||||
full = ["io", "compute", "bg"]
|
||||
|
||||
[dependencies]
|
||||
corex-core = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { workspace = true }
|
||||
tracing-subscriber = "0.3"
|
||||
|
||||
[[example]]
|
||||
name = "main"
|
||||
path = "examples/main.rs"
|
||||
required-features = ["full"]
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
Reference in New Issue
Block a user