Skip to content

Commit caf57d6

Browse files
committed
feat: initialize plug workspace at v1.0.10a
0 parents  commit caf57d6

104 files changed

Lines changed: 10081 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
* text=auto
2+
3+
4+
*.cpp text eol=lf
5+
*.h text eol=lf
6+
*.c text eol=lf
7+
*.rs text eol=lf
8+
*.toml text eol=lf
9+
*.json text eol=lf
10+
*.md text eol=lf
11+
12+
*.bat text eol=crlf
13+
*.sh text eol=lf
14+
15+
*.png binary
16+
*.ico binary
17+
*.sig binary
18+
*.wasm binary
19+
*.plug binary
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve plug
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Run plug binary
16+
2. Execute command '...'
17+
3. Click on '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Environment (please complete the following information):**
27+
- OS: [e.g. Windows 11, Ubuntu 22.04]
28+
- Host Compiler/Toolchain: [e.g. MSVC 2022, GCC 11.2, Clang 14]
29+
- Rust Toolchain Version: [e.g. 1.75.0]
30+
- Plug Version: [e.g. 1.0.0]
31+
32+
**Additional context**
33+
Add any other context about the problem here (e.g., specific WASM plugins loaded, terminal commands executed, logs).
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea or enhancement for plug
4+
title: '[ENHANCEMENT] '
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. "I'm frustrated when..."
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or mockups about the feature request here (e.g., changes to FFI interface, new permissions in plugin.toml, new host imports).

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!-- Please prefix the PR title with the type of change (e.g. feat:, fix:, docs:, refactor:) -->
2+
3+
## Description
4+
5+
Provide a brief summary of the changes introduced by this PR and the problem being solved.
6+
7+
## Related Issue
8+
9+
Fixes # (link the issue here)
10+
11+
## Type of Change
12+
13+
Please delete options that are not relevant:
14+
15+
- [ ] Bug fix (non-breaking change which fixes an issue)
16+
- [ ] New feature (non-breaking change which adds functionality)
17+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
18+
- [ ] Documentation update
19+
- [ ] CI/CD or build script modification
20+
21+
## Verification & Testing
22+
23+
### Manual Verification Steps
24+
Describe the steps you took to manually test the changes:
25+
1.
26+
2.
27+
28+
### Automated Tests
29+
- [ ] Rust Cargo unit/integration tests pass (`cargo test`)
30+
- [ ] C++ build compiles successfully on target platform
31+
- [ ] Python test runner script runs and passes (`python tests/run_tests.py`)
32+
33+
## Checklist
34+
35+
- [ ] My code follows the code style guidelines of this project
36+
- [ ] I have performed a self-review of my own code
37+
- [ ] I have commented my code, particularly in hard-to-understand areas
38+
- [ ] I have made corresponding changes to the documentation
39+
- [ ] My changes generate no new warnings or compiler errors
40+
- [ ] I have added tests that prove my fix is effective or that my feature works
41+
- [ ] New and existing unit tests pass locally with my changes
42+
- [ ] Any dependent changes have been merged and published in downstream modules

.github/markdownlint.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"default": true,
3+
"MD013": false,
4+
"MD033": false,
5+
"MD041": false
6+
}

.github/workflows/ci.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: CI Build and Test
2+
3+
on:
4+
push:
5+
branches: [ trunk, main ]
6+
pull_request:
7+
branches: [ trunk, main ]
8+
9+
jobs:
10+
test-rust:
11+
name: Rust Unit Tests
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest]
16+
steps:
17+
- name: Checkout Code
18+
uses: actions/checkout@v4
19+
20+
- name: Install Rust
21+
uses: dtolnay/rust-toolchain@stable
22+
23+
- name: Cache Rust Dependencies
24+
uses: Swatinem/rust-cache@v2
25+
with:
26+
workspaces: plug.app/rt
27+
28+
- name: Run Cargo Tests
29+
working-directory: plug.app/rt
30+
run: cargo test
31+
32+
build-windows:
33+
name: Build plug (Windows)
34+
runs-on: windows-latest
35+
needs: test-rust
36+
steps:
37+
- name: Checkout Code
38+
uses: actions/checkout@v4
39+
40+
- name: Install Rust
41+
uses: dtolnay/rust-toolchain@stable
42+
with:
43+
targets: wasm32-unknown-unknown
44+
45+
- name: Set up MSVC & Developer Command Prompt
46+
uses: ilammy/msvc-dev-cmd@v1
47+
48+
- name: Set up CMake & Ninja
49+
uses: lukka/get-cmake@latest
50+
51+
- name: Build Rust Static Library
52+
working-directory: plug.app/rt
53+
run: cargo build --release --lib
54+
55+
- name: Build WASM Plugins
56+
run: |
57+
mkdir plugins
58+
rustc --target wasm32-unknown-unknown --crate-type cdylib plug.app/rt/src_plugins/pTerm/pTerm.rs -o plugins/pTerm.wasm -C opt-level=z -C lto=true
59+
cp plug.app/rt/src_plugins/plugin.toml plugins/plugin.toml
60+
61+
- name: Run CMake Configuration
62+
run: |
63+
cmake -G Ninja -S plug.cross/windows -B plug.cross/windows/build -DRUST_LIB_PATH=../../plug.app/rt/target/release/tm_main.lib -DCMAKE_BUILD_TYPE=Release
64+
65+
- name: Compile plug executable
66+
run: |
67+
cmake --build plug.cross/windows/build
68+
69+
build-linux:
70+
name: Build plug (Linux)
71+
runs-on: ubuntu-latest
72+
needs: test-rust
73+
steps:
74+
- name: Checkout Code
75+
uses: actions/checkout@v4
76+
77+
- name: Install Rust
78+
uses: dtolnay/rust-toolchain@stable
79+
with:
80+
targets: wasm32-unknown-unknown
81+
82+
- name: Install GTK4 Dependencies
83+
run: |
84+
sudo apt-get update
85+
sudo apt-get install -y libgtk-4-dev pkg-config ninja-build libx11-dev
86+
87+
- name: Build Rust Static Library
88+
working-directory: plug.app/rt
89+
run: cargo build --release --lib
90+
91+
- name: Build WASM Plugins
92+
run: |
93+
mkdir plugins
94+
rustc --target wasm32-unknown-unknown --crate-type cdylib plug.app/rt/src_plugins/pTerm/pTerm.rs -o plugins/pTerm.wasm -C opt-level=z -C lto=true
95+
cp plug.app/rt/src_plugins/plugin.toml plugins/plugin.toml
96+
97+
- name: Run CMake Configuration
98+
run: |
99+
cmake -G Ninja -S plug.cross/linux -B plug.cross/linux/build -DRUST_LIB_PATH=../../plug.app/rt/target/release/libtm_main.a -DCMAKE_BUILD_TYPE=Release
100+
101+
- name: Compile plug executable
102+
run: |
103+
cmake --build plug.cross/linux/build
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Documentation Validator
2+
3+
on:
4+
push:
5+
branches: [ trunk, main ]
6+
paths:
7+
- '**.md'
8+
- 'docs/**'
9+
pull_request:
10+
branches: [ trunk, main ]
11+
paths:
12+
- '**.md'
13+
- 'docs/**'
14+
15+
jobs:
16+
validate-markdown:
17+
name: Lint Markdown Files
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout Code
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '20'
27+
28+
- name: Install markdownlint-cli
29+
run: npm install -g markdownlint-cli
30+
31+
- name: Lint Markdown Files
32+
run: |
33+
markdownlint --config .github/markdownlint.json "**/*.md" --ignore "plug.app/rt/target/**" --ignore "node_modules/**"

.github/workflows/release.yml

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
name: Release Build
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
create-release:
10+
name: Create Draft Release
11+
runs-on: ubuntu-latest
12+
outputs:
13+
upload_url: ${{ steps.create_release.outputs.upload_url }}
14+
steps:
15+
- name: Create Release
16+
id: create_release
17+
uses: actions/create-release@v1
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
with:
21+
tag_name: ${{ github.ref_name }}
22+
release_name: Release ${{ github.ref_name }}
23+
draft: true
24+
prerelease: false
25+
26+
build-windows:
27+
name: Build & Upload Windows Release
28+
runs-on: windows-latest
29+
needs: create-release
30+
steps:
31+
- name: Checkout Code
32+
uses: actions/checkout@v4
33+
34+
- name: Install Rust
35+
uses: dtolnay/rust-toolchain@stable
36+
with:
37+
targets: wasm32-unknown-unknown
38+
39+
- name: Set up MSVC & Developer Command Prompt
40+
uses: ilammy/msvc-dev-cmd@v1
41+
42+
- name: Set up CMake & Ninja
43+
uses: lukka/get-cmake@latest
44+
45+
- name: Build Rust Static Library
46+
working-directory: plug.app/rt
47+
run: cargo build --release --lib
48+
49+
- name: Build WASM Plugins
50+
run: |
51+
mkdir release_pkg
52+
mkdir release_pkg/plugins
53+
rustc --target wasm32-unknown-unknown --crate-type cdylib plug.app/rt/src_plugins/pTerm/pTerm.rs -o release_pkg/plugins/pTerm.wasm -C opt-level=z -C lto=true
54+
cp plug.app/rt/src_plugins/plugin.toml release_pkg/plugins/plugin.toml
55+
56+
- name: Run CMake Configuration
57+
run: |
58+
cmake -G Ninja -S plug.cross/windows -B plug.cross/windows/build -DRUST_LIB_PATH=../../plug.app/rt/target/release/tm_main.lib -DCMAKE_BUILD_TYPE=Release
59+
60+
- name: Compile plug executable
61+
run: |
62+
cmake --build plug.cross/windows/build
63+
64+
- name: Prepare Package
65+
run: |
66+
cp plug.cross/windows/build/plug.exe release_pkg/plug.exe
67+
cp LICENSE release_pkg/LICENSE
68+
cp README.md release_pkg/README.md
69+
compress-archive -Path release_pkg/* -DestinationPath plug-windows-x64.zip
70+
71+
- name: Upload Windows Asset
72+
uses: actions/upload-release-asset@v1
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
with:
76+
upload_url: ${{ needs.create-release.outputs.upload_url }}
77+
asset_path: ./plug-windows-x64.zip
78+
asset_name: plug-windows-x64.zip
79+
asset_content_type: application/zip
80+
81+
build-linux:
82+
name: Build & Upload Linux Release
83+
runs-on: ubuntu-latest
84+
needs: create-release
85+
steps:
86+
- name: Checkout Code
87+
uses: actions/checkout@v4
88+
89+
- name: Install Rust
90+
uses: dtolnay/rust-toolchain@stable
91+
with:
92+
targets: wasm32-unknown-unknown
93+
94+
- name: Install GTK4 Dependencies
95+
run: |
96+
sudo apt-get update
97+
sudo apt-get install -y libgtk-4-dev pkg-config ninja-build libx11-dev
98+
99+
- name: Build Rust Static Library
100+
working-directory: plug.app/rt
101+
run: cargo build --release --lib
102+
103+
- name: Build WASM Plugins
104+
run: |
105+
mkdir -p release_pkg/plugins
106+
rustc --target wasm32-unknown-unknown --crate-type cdylib plug.app/rt/src_plugins/pTerm/pTerm.rs -o release_pkg/plugins/pTerm.wasm -C opt-level=z -C lto=true
107+
cp plug.app/rt/src_plugins/plugin.toml release_pkg/plugins/plugin.toml
108+
109+
- name: Run CMake Configuration
110+
run: |
111+
cmake -G Ninja -S plug.cross/linux -B plug.cross/linux/build -DRUST_LIB_PATH=../../plug.app/rt/target/release/libtm_main.a -DCMAKE_BUILD_TYPE=Release
112+
113+
- name: Compile plug executable
114+
run: |
115+
cmake --build plug.cross/linux/build
116+
117+
- name: Prepare Package
118+
run: |
119+
cp plug.cross/linux/build/plug release_pkg/plug
120+
cp LICENSE release_pkg/LICENSE
121+
cp README.md release_pkg/README.md
122+
zip -r plug-linux-x64.zip release_pkg/*
123+
124+
- name: Upload Linux Asset
125+
uses: actions/upload-release-asset@v1
126+
env:
127+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
128+
with:
129+
upload_url: ${{ needs.create-release.outputs.upload_url }}
130+
asset_path: ./plug-linux-x64.zip
131+
asset_name: plug-linux-x64.zip
132+
asset_content_type: application/zip

0 commit comments

Comments
 (0)