Skip to content

Commit 47f6b51

Browse files
committed
feat: initial virtualization studio scaffolding (Swift core, CLI, GUI); add governance docs, issue templates, CI workflow, YAML automation (vmstudio.py + configs), LOC badge tooling, kernel fetch helper, guest agent Rust stub, architecture & feature docs, vsock/clipboard, snapshot metadata, tests
1 parent 0a56d45 commit 47f6b51

Some content is hidden

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

43 files changed

+3549
-342
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help improve VMStudio
4+
labels: bug
5+
---
6+
7+
## Describe the bug
8+
A clear and concise description.
9+
10+
## To Reproduce
11+
Steps:
12+
1.
13+
2.
14+
3.
15+
16+
## Expected behavior
17+
18+
## Actual behavior / logs
19+
```
20+
(paste logs)
21+
```
22+
23+
## Environment
24+
- OS version:
25+
- Xcode / Swift version:
26+
- vmstudio.py commit hash:
27+
- YAML config snippets:
28+
29+
## Additional context

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security Report
4+
url: https://example.com/security
5+
about: Please follow SECURITY.md for responsible disclosure.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for VMStudio
4+
labels: enhancement
5+
---
6+
7+
## Problem / Use Case
8+
Describe the scenario.
9+
10+
## Proposed Solution
11+
12+
## Alternatives Considered
13+
14+
## YAML / CLI Impact
15+
List new fields or commands if any.
16+
17+
## Additional context

.github/workflows/ci.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-test:
11+
runs-on: macos-14
12+
timeout-minutes: 30
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.x'
20+
- name: Show environment
21+
run: |
22+
swift --version || echo 'swift not installed'
23+
python --version
24+
- name: Build
25+
if: hashFiles('Package.swift') != ''
26+
run: swift build -v
27+
- name: Test
28+
if: hashFiles('Package.swift') != ''
29+
run: swift test -v
30+
- name: Validate YAML configs
31+
run: |
32+
pip install pyyaml
33+
python scripts/vmstudio.py || true
34+
- name: LOC badge (dry run)
35+
run: |
36+
brew install cloc || true
37+
cloc . --json > loc.json || true
38+
cat loc.json || true
39+
- name: Update LOC badge
40+
if: github.ref == 'refs/heads/main'
41+
run: |
42+
pip install pyyaml jq || true
43+
brew install cloc || true
44+
cloc . --json > loc.json
45+
LOC=$(jq '.SUM.code' loc.json || echo 0)
46+
mkdir -p badges
47+
echo "<svg xmlns='http://www.w3.org/2000/svg' width='150' height='20'><rect rx='3' width='150' height='20' fill='#555'/><rect rx='3' x='60' width='90' height='20' fill='#007ec6'/><text x='30' y='14' fill='#fff' font-family='Verdana' font-size='11'>loc</text><text x='105' y='14' fill='#fff' font-family='Verdana' font-size='11'>${LOC}</text></svg>" > badges/loc.svg
48+
if grep -q "loc-dynamic" README.md; then
49+
sed -i '' "s|loc-dynamic-lightblue|loc-${LOC}-blue|" README.md || true
50+
fi
51+
git config user.name 'github-actions'
52+
git config user.email '[email protected]'
53+
git add badges/loc.svg README.md || true
54+
git commit -m "chore(ci): update LOC badge" || echo 'No changes to commit'
55+
git push || true
56+
lint-markdown:
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/checkout@v4
60+
- name: Markdown link check
61+
uses: gaurav-nelson/github-action-markdown-link-check@v1
62+
with:
63+
use-verbose-mode: 'yes'
64+
folder-path: '.'
65+
swift-lint:
66+
runs-on: macos-14
67+
if: hashFiles('Package.swift') != ''
68+
steps:
69+
- uses: actions/checkout@v4
70+
- name: Install SwiftFormat (placeholder)
71+
run: brew install swiftformat || true
72+
- name: Dry run format check
73+
run: swiftformat . --lint || true

CODE_OF_CONDUCT.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Code of Conduct
2+
3+
We are committed to providing a friendly, safe and welcoming environment for all. We follow the spirit of the Contributor Covenant.
4+
5+
## Our Standards
6+
Examples of behavior that contributes to a positive environment:
7+
- Inclusive and respectful language
8+
- Welcoming constructive feedback
9+
- Focus on what is best for the community
10+
- Empathy towards other participants
11+
12+
Unacceptable behaviors include:
13+
- Harassment, intimidation, or discrimination
14+
- Trolling, insulting/derogatory comments, personal attacks
15+
- Public or private harassment
16+
- Publishing others' private information
17+
18+
## Reporting
19+
Report issues to the maintainers via [email protected] (replace with real address). Include:
20+
- Description
21+
- Links/logs
22+
- Reproduction steps
23+
24+
## Enforcement
25+
Maintainers may take any action deemed appropriate, including temporary or permanent bans from the project spaces.
26+
27+
## Attribution
28+
Adapted from the [Contributor Covenant](https://www.contributor-covenant.org/) v2.1.

CONTRIBUTING.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Contributing Guide
2+
3+
Thanks for your interest in improving VMStudio!
4+
5+
## Workflow
6+
1. Fork and create a feature branch: `feat/<short-topic>`
7+
2. Keep changes atomic & focused.
8+
3. Run `swift build` & `swift test` (when Swift sources present) and `python3 scripts/vmstudio.py`.
9+
4. Update docs (README / architecture / YAML schema) when behavior changes.
10+
5. Open Pull Request with:
11+
- Summary
12+
- Rationale & alternatives considered
13+
- Testing evidence (logs / screenshots)
14+
15+
## Commit Style
16+
Use conventional prefixes where possible:
17+
- `feat:` new user‑facing feature
18+
- `fix:` bug fix
19+
- `docs:` documentation only
20+
- `test:` add or refactor tests
21+
- `chore:` tooling/build changes
22+
- `refactor:` internal restructuring (no behavior change)
23+
24+
## Code Quality
25+
- Prefer clear names over comments that restate code
26+
- Add at least one happy‑path and one edge test per feature
27+
- Keep public API surface minimal & purposeful
28+
29+
## Adding Commands / Actions
30+
- CLI: implement in `vmcli` target (future) and update README
31+
- Automation: add a new action function to `scripts/vmstudio.py` and register in `tasks`
32+
33+
## Security
34+
- Never commit secrets
35+
- Prefer reproducible sources for downloaded kernels
36+
37+
## Communication
38+
Create issues for design discussions before large refactors.
39+
40+
## License
41+
Contributions are under the MIT License unless otherwise stated.

Package.swift

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// swift-tools-version: 5.9
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "VMStudio",
6+
platforms: [
7+
.macOS(.v13)
8+
],
9+
products: [
10+
.library(name: "VMCore", targets: ["VMCore"]),
11+
.executable(name: "vmcli", targets: ["VMCLI"]),
12+
.executable(name: "VMStudioApp", targets: ["VMStudioApp"])
13+
],
14+
dependencies: [
15+
// Add external dependencies here when needed.
16+
],
17+
targets: [
18+
.target(
19+
name: "VMCore",
20+
dependencies: [],
21+
path: "Sources/VMCore",
22+
sources: ["."],
23+
publicHeadersPath: nil
24+
),
25+
.executableTarget(
26+
name: "VMCLI",
27+
dependencies: ["VMCore"],
28+
path: "Sources/VMCLI",
29+
sources: ["."]
30+
),
31+
.executableTarget(
32+
name: "VMStudioApp",
33+
dependencies: ["VMCore"],
34+
path: "Sources/VMStudioApp",
35+
sources: ["."]
36+
),
37+
.testTarget(
38+
name: "VMCoreTests",
39+
dependencies: ["VMCore"],
40+
path: "Tests/VMCoreTests"
41+
)
42+
]
43+
)

0 commit comments

Comments
 (0)