| Crates.io | eshanized-polaris-macros |
| lib.rs | eshanized-polaris-macros |
| version | 0.1.1 |
| created_at | 2025-10-14 19:13:54.451931+00 |
| updated_at | 2025-10-14 19:25:24.418593+00 |
| description | Procedural macros for the Polaris distributed compute framework |
| homepage | https://gitlab.com/TIVisionOSS/crates/polaris |
| repository | https://gitlab.com/TIVisionOSS/crates/polaris |
| max_upload_size | |
| id | 1882952 |
| size | 8,721 |
Procedural macros for the Polaris distributed compute framework.
This crate provides convenient macros for defining Polaris tasks and jobs:
#[task] - Define a distributed task#[job] - Define a job (collection of tasks)use eshanized_polaris::prelude::*;
#[eshanized_polaris::task]
async fn my_task(input: String) -> PolarisResult<String> {
Ok(input.to_uppercase())
}
#[eshanized_polaris::task(name = "custom_name", timeout = 60, retries = 5)]
async fn advanced_task(data: Vec<u8>) -> PolarisResult<Vec<u8>> {
// Process data
Ok(data)
}
#[eshanized_polaris::job]
async fn batch_process(inputs: Vec<String>) -> PolarisResult<Vec<String>> {
// Process multiple inputs
Ok(inputs)
}
#[task]name - Custom task name (default: function name)timeout - Task timeout in secondsretries - Maximum retry attemptsMIT - See LICENSE for details.