Skip to content

Commit

Permalink
Merge pull request #8 from geofmureithi/chore/update-docs
Browse files Browse the repository at this point in the history
update: n-ary for functions and docs
  • Loading branch information
geofmureithi authored Aug 9, 2023
2 parents 0f8cc0e + 879ce9b commit b469de4
Show file tree
Hide file tree
Showing 12 changed files with 63 additions and 44 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

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

11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
[package]
name = "plugy"
description = "plugy empowers you to construct agnostic dynamic plugin systems using Rust and WASM"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
categories = ["wasm", "plugin", "wasi", "inventory"]
categories = ["wasm"]
keywords = ["plugin", "wasi", "inventory", "wasm", "plugy"]
license = "GPL-3.0-only"
repository = "https://github.com/geofmureithi/plugy"


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
plugy-core = { path = "./crates/plugy-core", version = "0.1.0" }
plugy-macros = { path = "./crates/plugy-macros", version = "0.1.0" }
plugy-runtime = { path = "./crates/plugy-runtime", version = "0.1.0" }
plugy-core = { path = "./crates/plugy-core", version = "0.1.1" }
plugy-macros = { path = "./crates/plugy-macros", version = "0.1.1" }
plugy-runtime = { path = "./crates/plugy-runtime", version = "0.1.1" }


[workspace]
Expand Down
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,26 @@ Check out the [examples](./examples/) directory for sample usage of plugy.

## Milestones

| Status | Goal | Labels |
| :---: | :--- | --- |
|| [accept multiple arity in plugin functions](https://github.com/geofmureithi/plugy/issues/2) |`pending`|
|| [pass down context between host and guest](https://github.com/geofmureithi/plugy/issues/3) |`pending`|
| Status | Goal | Labels |
| :----: | :-------------------------------------------------------------------------------------------------- | ---------- |
|| [accept multiple arity (n-ary) in plugin functions](https://github.com/geofmureithi/plugy/issues/2) | `complete` |
|| [pass down context between host and guest](https://github.com/geofmureithi/plugy/issues/3) | `pending` |

## Functionality

Plugy comprises three fundamental crates, each serving a distinct role in crafting dynamic plugin systems with Rust and WebAssembly:
- core: This crate houses essential components such as bitwise utilities and the guest module, forming the foundation of Plugy's functionality.

- runtime: The runtime crate orchestrates the execution of your plugin system, allowing seamless integration of plugins into your applications.

- macros: The macros crate offers a collection of macros that simplify the generation of bindings and interfaces, streamlining the process of working with dynamic plugins.

## Contributing

Contributions to plugy are welcome! If you find a bug or want to propose a new feature, feel free to create an issue or submit a pull request.

### Thanks to

- [Wasmtime](https://wasmtime.dev/)
- Bincode
- Serde
Expand All @@ -90,7 +100,6 @@ This project is licensed under the GNU General Public License.

<!-- Badges -->

[github-actions-badge]: https://github.com/geofmureithi/plugy/workflows/build/badge.svg

[github-actions-badge]: https://github.com/geofmureithi/plugy/actions/workflows/build.yml/badge.svg
[github-release]: https://github.com/geofmureithi/plugy/releases
[github-release-svg]: https://img.shields.io/github/release/geofmureithi/plugy.svg
5 changes: 3 additions & 2 deletions crates/plugy-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[package]
name = "plugy-core"
description = "plugy empowers you to construct agnostic dynamic plugin systems using Rust and WASM"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
readme = "../../README.md"
categories = ["wasm", "plugin", "wasi", "inventory"]
categories = ["wasm"]
keywords = ["plugin", "wasi", "inventory", "wasm", "plugy"]
license = "GPL-3.0-only"
repository = "https://github.com/geofmureithi/plugy"

Expand Down
29 changes: 12 additions & 17 deletions crates/plugy-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
//! # plugy-core
//!
//! This crate contains fundamental components and utilities that serve as the building blocks for
//! plugy's dynamic plugin system. It provides essential functionalities that enable seamless integration
//! of plugins into your Rust applications using WebAssembly (Wasm).
//!
//! ## Modules
//!
//! - [`bitwise`](bitwise/index.html): A module providing utilities for working with bitwise operations and conversions.
//! - [`guest`](guest/index.html): A module that facilitates communication between the host application and Wasm plugins.
//!
pub mod bitwise;
pub mod guest;

use std::{path::PathBuf};

use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize, Clone)]
pub enum ModuleFile {
File(PathBuf),
}

#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct PluginConfig<D> {
pub title: String,
pub module: ModuleFile,
pub metadata: D
}
pub mod guest;
5 changes: 3 additions & 2 deletions crates/plugy-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[package]
name = "plugy-macros"
description = "plugy empowers you to construct agnostic dynamic plugin systems using Rust and WASM"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
readme = "../../README.md"
categories = ["wasm", "plugin", "wasi", "inventory"]
categories = ["wasm"]
keywords = ["plugin", "wasi", "inventory", "wasm", "plugy"]
license = "GPL-3.0-only"
repository = "https://github.com/geofmureithi/plugy"

Expand Down
6 changes: 6 additions & 0 deletions crates/plugy-macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
//! # plugy-macro
//!
//! The `plugy-macro` crate provides a collection of macros that streamline the process of generating
//! bindings and interfaces for plugy's dynamic plugin system. These macros enhance the ergonomics of
//! working with plugins written in WebAssembly (Wasm) within your Rust applications.
//!
use proc_macro::TokenStream;
use proc_macro2::Span;
use quote::{quote, ToTokens};
Expand Down
5 changes: 3 additions & 2 deletions crates/plugy-runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[package]
name = "plugy-runtime"
description = "plugy empowers you to construct agnostic dynamic plugin systems using Rust and WASM"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
readme = "../../README.md"
categories = ["wasm", "plugin", "wasi", "inventory"]
categories = ["wasm"]
keywords = ["plugin", "wasi", "inventory", "wasm", "plugy"]
license = "GPL-3.0-only"
repository = "https://github.com/geofmureithi/plugy"

Expand Down
5 changes: 5 additions & 0 deletions crates/plugy-runtime/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
//! # plugy-runtime
//!
//! The `plugy-runtime` crate serves as the heart of Plugy's dynamic plugin system, enabling the runtime management
//! and execution of plugins written in WebAssembly (Wasm). It provides functionalities for loading, running,
//! and interacting with plugins seamlessly within your Rust applications.
use dashmap::DashMap;
use plugy_core::bitwise::{from_bitwise, into_bitwise};
use serde::{de::DeserializeOwned, Serialize};
Expand Down
2 changes: 1 addition & 1 deletion examples/foo-plugin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "foo-plugin"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion examples/runner/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "runner"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion examples/shared/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shared"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down

0 comments on commit b469de4

Please sign in to comment.