Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,13 @@ jobs:
run: |
# It's important to change into the plugin directory and building each package
cd ../../../binary/crates/plugin
cargo deb -p reactive-graph-plugin-binary --target=${{ matrix.target }} --deb-version ${{steps.tag.outputs.tag}}
cargo deb -p reactive-graph-sys-binary --target=${{ matrix.target }} --deb-version ${{steps.tag.outputs.tag}}
cd ../../../config/crates/plugin
cargo deb -p reactive-graph-sys-config --target=${{ matrix.target }} --deb-version ${{steps.tag.outputs.tag}}
cd ../../../file/crates/plugin
cargo deb -p reactive-graph-plugin-file --target=${{ matrix.target }} --deb-version ${{steps.tag.outputs.tag}}
cargo deb -p reactive-graph-sys-file --target=${{ matrix.target }} --deb-version ${{steps.tag.outputs.tag}}
cd ../../../system-environment/crates/plugin
cargo deb -p reactive-graph-plugin-system-environment --target=${{ matrix.target }} --deb-version ${{steps.tag.outputs.tag}}
cargo deb -p reactive-graph-sys-system-environment --target=${{ matrix.target }} --deb-version ${{steps.tag.outputs.tag}}
env:
VERGEN_IDEMPOTENT: true
- name: Upload debian package to release
Expand Down
4 changes: 2 additions & 2 deletions .run/Bundle Deb aarch64.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Bundle Deb aarch64" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="deb -p reactive-graph-plugin-arithmetic --target aarch64-unknown-linux-gnu" />
<option name="workingDirectory" value="file://$PROJECT_DIR$/plugins/arithmetic/crates/plugin" />
<option name="command" value="deb -p reactive-graph-sys-file --target aarch64-unknown-linux-gnu" />
<option name="workingDirectory" value="file://$PROJECT_DIR$/plugins/file/crates/plugin" />
<envs>
<env name="RUSTC_WRAPPER" value="sccache" />
</envs>
Expand Down
4 changes: 2 additions & 2 deletions .run/Bundle Deb armv7.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Bundle Deb armv7" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="deb -p reactive-graph-plugin-arithmetic --target armv7-unknown-linux-gnueabihf" />
<option name="workingDirectory" value="file://$PROJECT_DIR$/plugins/arithmetic/crates/plugin" />
<option name="command" value="deb -p reactive-graph-sys-file --target armv7-unknown-linux-gnueabihf" />
<option name="workingDirectory" value="file://$PROJECT_DIR$/plugins/file/crates/plugin" />
<envs>
<env name="RUSTC_WRAPPER" value="sccache" />
</envs>
Expand Down
4 changes: 2 additions & 2 deletions .run/Bundle Deb x86_64.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Bundle Deb x86_64" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="deb -p reactive-graph-plugin-arithmetic --target x86_64-unknown-linux-gnu" />
<option name="workingDirectory" value="file://$PROJECT_DIR$/plugins/arithmetic/crates/plugin" />
<option name="command" value="deb -p reactive-graph-sys-file --target x86_64-unknown-linux-gnu" />
<option name="workingDirectory" value="file://$PROJECT_DIR$/plugins/file/crates/plugin" />
<envs>
<env name="RUSTC_WRAPPER" value="sccache" />
</envs>
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Refactored into new mono repo `reactive-graph/sys`
- Moved plugins binary, config, file and system-environment from `reactive-graph/std` -> `reactive-graph/sys`
- Prefix plugins with `sys` (e.g. `libreactive_graph_sys_binary`)

### Fixed
Expand Down
62 changes: 58 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
members = [
"plugins/binary/crates/model",
"plugins/binary/crates/plugin",
"plugins/config/crates/model",
"plugins/config/crates/plugin",
"plugins/file/crates/model",
"plugins/file/crates/plugin",
"plugins/system-environment/crates/model",
Expand Down Expand Up @@ -66,6 +68,10 @@ reactive-graph-type-system-api = { version = "0.10.0", git = "https://github.com
reactive-graph-lifecycle = { version = "0.10.0", git = "https://github.com/reactive-graph/reactive-graph.git" }
reactive-graph-test-utils = { version = "0.10.0", git = "https://github.com/reactive-graph/reactive-graph.git" }

reactive-graph-model-base = { version = "0.10.0", git = "https://github.com/reactive-graph/std.git" }
reactive-graph-model-result = { version = "0.10.0", git = "https://github.com/reactive-graph/std.git" }
reactive-graph-model-value = { version = "0.10.0", git = "https://github.com/reactive-graph/std.git" }

[profile.dev]
opt-level = 0

Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</h2>

<p align="center">
This repository contains the standard library for the <a href="https://github.com/reactive-graph/reactive-graph">Reactive Graph</a>.
This repository contains the system library for the <a href="https://github.com/reactive-graph/reactive-graph">Reactive Graph</a>.
</p>

<p align="center">
Expand All @@ -33,13 +33,14 @@ This repository contains the standard library for the <a href="https://github.co

<h2 align="center" style="text-align: center;">List of Plugins</h2>

In this repository you'll find the essential plugins which are necessary or useful for all use cases.
In this repository you'll find plugins which interacts with the system it runs on.

| Name | Description |
|--------------------------------------------------------------|--------------------------------|
| [System Environment](./plugins/system-environment/README.md) | Provides environment variables |
| [File](./plugins/file/README.md) | File representation |
| [Binary](./plugins/binary/README.md) | Handles binary data |
| [Config](./plugins/config/README.md) | Load configuration files |
| [File](./plugins/file/README.md) | File representation |
| [System Environment](./plugins/system-environment/README.md) | Provides environment variables |

<h2 align="center" style="text-align: center;">Local Build + Local Deployment</h2>

Expand All @@ -55,7 +56,7 @@ target_dirs = [

```shell
cargo build
cargo post build --package=reactive-graph-plugin-date-time
cargo post build --package=reactive-graph-sys-binary
```

#### Install all plugins of this repository at once
Expand Down
2 changes: 1 addition & 1 deletion deployment/post_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() {
match deployment {
Ok(deployment) => {
let mut crate_out_dir = env::var("CRATE_OUT_DIR").unwrap();
crate_out_dir.push_str("/libreactive_graph_plugin_*.*");
crate_out_dir.push_str("/libreactive_graph_sys_*.*");
for target_dir in deployment.target_dirs {
for entry in glob::glob(crate_out_dir.as_str()).unwrap() {
if let Ok(source_path) = entry {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Install Plugin Binary" type="CargoCommandRunConfiguration" factoryName="Cargo Command" folderName="Install">
<option name="command" value="post build --package=reactive-graph-plugin-binary" />
<option name="command" value="post build --package=reactive-graph-sys-binary" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<envs>
<env name="RUSTC_WRAPPER" value="sccache" />
Expand Down
2 changes: 1 addition & 1 deletion plugins/binary/crates/plugin/post_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() {
match deployment {
Ok(deployment) => {
let mut crate_out_dir = env::var("CRATE_OUT_DIR").unwrap();
crate_out_dir.push_str("/libreactive_graph_plugin_binary.*");
crate_out_dir.push_str("/libreactive_graph_sys_binary.*");
for target_dir in deployment.target_dirs {
for entry in glob::glob(crate_out_dir.as_str()).unwrap() {
if let Ok(source_path) = entry {
Expand Down
4 changes: 2 additions & 2 deletions plugins/binary/crates/plugin/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ use reactive_graph_sys_binary_model::COMPONENT_BEHAVIOUR_SAVE_BINARY_DATA;
export_plugin!({
"dependencies": [
{ "name": "reactive-graph-plugin-base", "version": ">=0.10.0, <0.11.0" },
{ "name": "reactive-graph-plugin-file", "version": ">=0.10.0, <0.11.0" },
{ "name": "reactive-graph-plugin-trigger", "version": ">=0.10.0, <0.11.0" }
{ "name": "reactive-graph-plugin-trigger", "version": ">=0.10.0, <0.11.0" },
{ "name": "reactive-graph-sys-file", "version": ">=0.10.0, <0.11.0" }
]
});

Expand Down
19 changes: 19 additions & 0 deletions plugins/config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Plugin Config

This plugin provides a (TOML) configuration file reader.

## Entity Types

| Name | Component | Property | Data Type | Socket Type |
|-------------|-----------|-----------|-----------|-------------|
| config_file | file | filename | string | none |
| | action | trigger | boolean | input |
| | action | result | object | output |

## Platform Compatibility

| Platform | Compatibility |
|----------|---------------|
| Linux | ✓ |
| MacOS | ✓ |
| Windows | ✓ |
27 changes: 27 additions & 0 deletions plugins/config/crates/model/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[package]
name = "reactive-graph-sys-config-model"
description = "Reactive Graph - SYS- Config - Model"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
readme = "../../../../README.md"

[dependencies]
lazy_static = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }

reactive-graph-behaviour-model-api = { workspace = true }
reactive-graph-graph = { workspace = true }
reactive-graph-reactive-model-api = { workspace = true }
reactive-graph-reactive-model-impl = { workspace = true }
reactive-graph-runtime-model = { workspace = true }
reactive-graph-model-result = { workspace = true }

reactive-graph-sys-file-model = { version = "0.10.0", path = "../../../file/crates/model" }

[lib]
crate-type = ["lib"]
10 changes: 10 additions & 0 deletions plugins/config/crates/model/src/component/config_file.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use crate::NAMESPACE_CONFIG;
use reactive_graph_behaviour_model_api::behaviour_ty;
use reactive_graph_behaviour_model_api::component_behaviour_ty;
use reactive_graph_graph::component_ty;

// All properties are defined in the component(s)

component_ty!(COMPONENT_CONFIG_FILE, NAMESPACE_CONFIG, COMPONENT_NAME_CONFIG_FILE, "config_file");
behaviour_ty!(BEHAVIOUR_CONFIG_FILE, NAMESPACE_CONFIG, BEHAVIOUR_NAME_CONFIG_FILE, "config_file");
component_behaviour_ty!(COMPONENT_BEHAVIOUR_CONFIG_FILE, COMPONENT_CONFIG_FILE, BEHAVIOUR_CONFIG_FILE);
3 changes: 3 additions & 0 deletions plugins/config/crates/model/src/component/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub use config_file::*;

pub mod config_file;
15 changes: 15 additions & 0 deletions plugins/config/crates/model/src/entity/config_file.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use crate::NAMESPACE_CONFIG;
use reactive_graph_graph::entity_ty;
use reactive_graph_model_result::ResultObject;
use reactive_graph_reactive_model_api::entity_model;
use reactive_graph_runtime_model::Action;
use reactive_graph_sys_file_model::File;

// All properties are defined in the component(s)

entity_ty!(ENTITY_TYPE_CONFIG_FILE, NAMESPACE_CONFIG, ENTITY_TYPE_NAME_CONFIG_FILE, "config_file");

entity_model!(ConfigFile);
impl Action for ConfigFile {}
impl File for ConfigFile {}
impl ResultObject for ConfigFile {}
3 changes: 3 additions & 0 deletions plugins/config/crates/model/src/entity/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub use config_file::*;

pub mod config_file;
7 changes: 7 additions & 0 deletions plugins/config/crates/model/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pub use component::config_file::*;
pub use entity::config_file::*;

pub mod component;
pub mod entity;

pub const NAMESPACE_CONFIG: &str = "config";
21 changes: 21 additions & 0 deletions plugins/config/crates/plugin/.run/Install Plugin Config.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Install Plugin Config" type="CargoCommandRunConfiguration" factoryName="Cargo Command" folderName="Install">
<option name="command" value="post build --package=reactive-graph-sys-config" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<envs>
<env name="RUSTC_WRAPPER" value="sccache" />
</envs>
<option name="emulateTerminal" value="false" />
<option name="channel" value="STABLE" />
<option name="requiredFeatures" value="true" />
<option name="allFeatures" value="false" />
<option name="withSudo" value="false" />
<option name="buildTarget" value="REMOTE" />
<option name="backtrace" value="SHORT" />
<option name="isRedirectInput" value="false" />
<option name="redirectInputPath" value="" />
<method v="2">
<option name="CARGO.BUILD_TASK_PROVIDER" enabled="true" />
</method>
</configuration>
</component>
Loading
Loading