Public release source-69fccd306838
Source commit: 69fccd306838141ba9b1730f4ac4afb1a617bb4e Public tree identity: sha256:8c03637496d3f7ee1b625aa1c823cd69bfcf0247a061d8cb571e05d537329691
This commit is contained in:
parent
f4590ca576
commit
ba749b9e47
88 changed files with 204 additions and 18991 deletions
56
README.md
56
README.md
|
|
@ -1,9 +1,57 @@
|
|||
# Clusterflux
|
||||
|
||||
Clusterflux runs a Rust-defined workflow as one distributed virtual process. A
|
||||
coordinator hosts the async main, while attached nodes execute Wasm tasks,
|
||||
rootless containers, and native commands. Tasks exchange canonical values and
|
||||
portable typed handles instead of sharing host memory.
|
||||
Clusterflux runs a Rust-defined workflow as one distributed virtual process. The
|
||||
async main runs serverless, provisioning nodes to run tasks through rootless
|
||||
containers. Tasks on nodes exchange data simply and efficiently.
|
||||
|
||||
The user experience is built to be as much as possible like building a regular
|
||||
program. The processes are debuggable as normal through a debugger adapter.
|
||||
|
||||
The primary use case is to consolidate build processes into a single streamlined
|
||||
developer experience. An example program can be seen below:
|
||||
|
||||
~~~rust
|
||||
use clusterflux::prelude::*;
|
||||
|
||||
#[clusterflux::task(capabilities = "command")]
|
||||
pub async fn compile(source: SourceSnapshot) -> Result<Artifact> {
|
||||
let executable = fs::output("hello-clusterflux")?;
|
||||
Command::new("cc")
|
||||
.args([
|
||||
"-Os",
|
||||
"-static",
|
||||
"-s",
|
||||
"fixture/hello-clusterflux.c",
|
||||
"-o",
|
||||
executable.as_str(),
|
||||
])
|
||||
.cwd(source.mount()?)
|
||||
.env("SOURCE_DATE_EPOCH", "0")
|
||||
.network_disabled()
|
||||
.run()
|
||||
.await?;
|
||||
fs::publish(&executable).await
|
||||
}
|
||||
|
||||
#[clusterflux::main]
|
||||
pub async fn build() -> Result<Artifact> {
|
||||
let source = source::current_project().snapshot().await?;
|
||||
let compile = clusterflux::spawn!(compile(source))
|
||||
.on(clusterflux::env!("linux"))
|
||||
.await?;
|
||||
compile.join().await
|
||||
}
|
||||
~~~
|
||||
|
||||
After setup, this build pipeline could be deployed as easily as launching it
|
||||
through your IDE. This repository includes a VS Code extension to make
|
||||
development as straightforward as possible. A full collection of CLI tools is
|
||||
included for advanced usage.
|
||||
|
||||
Clusterflux is explicitly local-first. It is trivial to provision existing
|
||||
hardware as resources. Bulk data will typically not leave the local network,
|
||||
allowing maximum throughput. The same capability, however, also makes it
|
||||
possible to leverage cloud resources easily.
|
||||
|
||||
Start with [Getting started](docs/getting-started.md). It takes you through
|
||||
authentication, project setup, node enrollment, a run, debugging, task restart,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue