Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
35e96b9
fix: Fix some issues in latest release
HttpRafa Jan 26, 2025
29914ef
fix: Fix broken devcontainers on github codespaces
HttpRafa Jan 29, 2025
5ee5250
fix: Remove unused programs from devcontainers
HttpRafa Jan 29, 2025
207febe
Merge
HttpRafa Jan 29, 2025
4313bc1
fix: Add vi to installed programs
HttpRafa Jan 29, 2025
afdc514
fix: Fix some small errors in docs
HttpRafa Jan 29, 2025
598217b
wip: Start to rewrite the tick loop using tokio
HttpRafa Jan 29, 2025
4c156cc
Revert "wip: Start to rewrite the tick loop using tokio"
HttpRafa Jan 31, 2025
0a6a6ed
Merge branch 'main' into feat/new-tickloop
HttpRafa Jan 31, 2025
9d32a9b
Remove old controller
HttpRafa Jan 31, 2025
2008b4a
More work
HttpRafa Jan 31, 2025
3d34801
Plugin things
HttpRafa Jan 31, 2025
29848d9
More plugins
HttpRafa Feb 1, 2025
c810954
More plugin work
HttpRafa Feb 1, 2025
1323665
Add empty structs
HttpRafa Feb 1, 2025
c84579d
Nodes
HttpRafa Feb 1, 2025
a945413
Groups
HttpRafa Feb 1, 2025
35a1cb3
Group ticking
HttpRafa Feb 2, 2025
baa0537
More plugin stuff
HttpRafa Feb 2, 2025
8ed5f0d
Move token into server struct to prevent reverse HashMap lookups
HttpRafa Feb 2, 2025
84d1e4d
Server start/restart/stop
HttpRafa Feb 2, 2025
b19c51b
Clippy
HttpRafa Feb 2, 2025
9f27755
Merge remote-tracking branch 'origin/main' into feat/new-tickloop
HttpRafa Feb 3, 2025
7a4bfc7
Merge remote-tracking branch 'origin/main' into feat/new-tickloop
HttpRafa Feb 3, 2025
1fe867a
Users
HttpRafa Feb 3, 2025
98bb2e8
Rewrite gRPCs
HttpRafa Feb 3, 2025
427451b
gRPCs
HttpRafa Feb 3, 2025
3526bed
Merge remote-tracking branch 'origin/main' into feat/new-tickloop
HttpRafa Feb 4, 2025
58a5c96
Networking. Yay
HttpRafa Feb 4, 2025
bebedf8
More fancy stuff
HttpRafa Feb 4, 2025
eeec1a0
Naming
HttpRafa Feb 4, 2025
c672046
Implement some tasks
HttpRafa Feb 5, 2025
7cd40aa
More tasks
HttpRafa Feb 5, 2025
b6c3a86
CLI
HttpRafa Feb 5, 2025
fada6a6
CLI
HttpRafa Feb 5, 2025
e563e2b
Renaming
HttpRafa Feb 5, 2025
59fb009
Renaming
HttpRafa Feb 5, 2025
1f9e933
More renaming
HttpRafa Feb 5, 2025
588266a
More renaming
HttpRafa Feb 5, 2025
471226e
Rename DRIVER to PLUGIn
HttpRafa Feb 5, 2025
590b249
Improve error handling
HttpRafa Feb 6, 2025
eb9d05a
Work on the network tasks
HttpRafa Feb 6, 2025
c1aab22
Update deps and run clippy
HttpRafa Feb 6, 2025
518e24b
Fixed errors
HttpRafa Feb 6, 2025
ee1aa11
----
HttpRafa Feb 6, 2025
8cce366
Transfers
HttpRafa Feb 7, 2025
809441b
More cleanup and more transfer system things
HttpRafa Feb 7, 2025
f820607
Work on subscriptions
HttpRafa Feb 8, 2025
ef204d8
Client gRPCs
HttpRafa Feb 8, 2025
b9b497c
More manage gRPCs
HttpRafa Feb 8, 2025
e5afdcd
Manage gRPCs
HttpRafa Feb 8, 2025
ad3a235
Delete and SetActive gRPCs
HttpRafa Feb 9, 2025
3bb683f
Fix loop
HttpRafa Feb 9, 2025
33ec302
Node gRPCs
HttpRafa Feb 9, 2025
28ee2d9
Cleanup and more code
HttpRafa Feb 9, 2025
0d73cf7
Get Server
HttpRafa Feb 9, 2025
c8fd96d
Screen system start
HttpRafa Feb 10, 2025
d554338
Work on the screen system
HttpRafa Feb 12, 2025
603290f
Update manager.rs
HttpRafa Feb 12, 2025
d397ea2
Screen system
HttpRafa Feb 12, 2025
3bcb286
Processes
HttpRafa Feb 13, 2025
1618860
Local driver
HttpRafa Feb 14, 2025
2c57df4
More work
HttpRafa Feb 14, 2025
28b90ae
More work
HttpRafa Feb 15, 2025
f032214
More work
HttpRafa Feb 15, 2025
4b4125d
Wasmtime stuff
HttpRafa Feb 15, 2025
a27529b
Enable epoch interruption
HttpRafa Feb 15, 2025
6a77d75
Fix template loading
HttpRafa Feb 15, 2025
47eb4d0
Batch epoch invoker into one thread
HttpRafa Feb 15, 2025
d51e309
More work on the local driver
HttpRafa Feb 15, 2025
eddf02b
Worked on the config of the local driver
HttpRafa Feb 18, 2025
678947d
Worked on the local driver
HttpRafa Feb 18, 2025
6e66a88
fix: Add --all-features
HttpRafa Feb 18, 2025
9bb2bbe
Remove unused extensions
HttpRafa Feb 19, 2025
017a74d
Cleanup server manager and fix startup problems
HttpRafa Feb 19, 2025
1b02c07
fix: Added missing config entry in local plugin config
HttpRafa Feb 20, 2025
30e3861
fix: Some fixes
HttpRafa Feb 22, 2025
c7e9f67
fix: Fix paper plugin
HttpRafa Feb 22, 2025
24f03f7
fix: Cleanup and fix some issues
HttpRafa Feb 22, 2025
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
18 changes: 9 additions & 9 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Use the official ArchLinux image with a AUR helper installed
FROM ghcr.io/greyltc-org/archlinux-aur:paru
FROM debian:unstable

ARG REMOTE_USER
ARG REMOTE_UID
ARG REMOTE_GID

RUN pacman-key --init
RUN pacman -Syu --noconfirm
# Update and upgrade the system
RUN apt update && apt upgrade -y

# Install required packages
RUN pacman -S base-devel git less nano openssh nano protobuf rustup jdk21-openjdk gradle mkdocs-material --noconfirm

# Install gRPC UI
RUN aur-install grpcui-bin
# Install necessary packages
RUN apt install -y \
build-essential git gh \
protobuf-compiler \
rustup \
openjdk-21-jdk gradle

RUN <<EOF
groupadd -g ${REMOTE_GID} ${REMOTE_USER}
Expand Down
19 changes: 7 additions & 12 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,18 @@
"terminal.integrated.shell.linux": "/bin/bash"
},
"extensions": [
// Extensions for Rust development
"rust-lang.rust-analyzer",
"vadimcn.vscode-lldb",
"usernamehw.errorlens",
"tamasfe.even-better-toml",

// Extensions for WebAssembly development and gRPC development
"peterj.proto",
"bytecodealliance.wit-idl",

// Extensions for general development
"fill-labs.dependi",
"ms-vscode.makefile-tools",
"ms-azuretools.vscode-docker",
"github.vscode-github-actions"
"usernamehw.errorlens",
"Gruntfuggly.todo-tree",

"GitHub.copilot"
]
}
},
"remoteUser": "${localEnv:USER:code}"
}
"remoteUser": "${localEnv:USER:code}",
"postStartCommand": "cargo clean"
}
6 changes: 3 additions & 3 deletions .github/docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

# Define the destination folder
DEST_FOLDER="drivers/"
DEST_FOLDER="plugins/"

# Create the destination folder if it does not exist
if [ ! -d "$DEST_FOLDER" ]; then
Expand Down Expand Up @@ -30,14 +30,14 @@ download_wasm() {

# Check if the environment variable PTERODACTYL is set to true
if [ "$PTERODACTYL" = "true" ]; then
WASM_URL="https://github.com/HttpRafa/atomic-cloud/releases/latest/download/pterodactyl-driver.wasm"
WASM_URL="https://github.com/HttpRafa/atomic-cloud/releases/latest/download/pterodactyl-plugin.wasm"
WASM_FILE="$DEST_FOLDER/pterodactyl.wasm"
download_wasm $WASM_URL $WASM_FILE
fi

# Check if the environment variable LOCAL is set to true
if [ "$LOCAL" = "true" ]; then
WASM_URL="https://github.com/HttpRafa/atomic-cloud/releases/latest/download/local-driver.wasm"
WASM_URL="https://github.com/HttpRafa/atomic-cloud/releases/latest/download/local-plugin.wasm"
WASM_FILE="$DEST_FOLDER/local.wasm"
download_wasm $WASM_URL $WASM_FILE
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
run: sudo apt update && sudo apt install protobuf-compiler -y

- name: Run Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
run: cargo clippy --all-features -- -D warnings

- name: Build Projects
run: cargo build --all --all-features --verbose
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ jobs:
git checkout -b $BRANCH
git push -u origin $BRANCH
sed -i "s/client_version=0\\.0\\.0-nightly/client_version=${VERSION}/g" clients/jvm/gradle.properties
sed -i "s/version = \"0\\.0\\.0-nightly\"/version = \"${VERSION}\"/g" drivers/pterodactyl/Cargo.toml
sed -i "s/version = \"0\\.0\\.0-nightly\"/version = \"${VERSION}\"/g" drivers/local/Cargo.toml
sed -i "s/version = \"0\\.0\\.0-nightly\"/version = \"${VERSION}\"/g" plugins/pterodactyl/Cargo.toml
sed -i "s/version = \"0\\.0\\.0-nightly\"/version = \"${VERSION}\"/g" plugins/local/Cargo.toml
sed -i "s/version = \"0\\.0\\.0-nightly\"/version = \"${VERSION}\"/g" clients/wrapper/Cargo.toml
sed -i "s/version = \"0\\.0\\.0-nightly\"/version = \"${VERSION}\"/g" controller/Cargo.toml
sed -i "s/version = \"0\\.0\\.0-nightly\"/version = \"${VERSION}\"/g" common/Cargo.toml
sed -i "s/version = \"0\\.0\\.0-nightly\"/version = \"${VERSION}\"/g" cli/Cargo.toml
git add clients/jvm/gradle.properties drivers/pterodactyl/Cargo.toml drivers/local/Cargo.toml clients/wrapper/Cargo.toml controller/Cargo.toml common/Cargo.toml cli/Cargo.toml
git add clients/jvm/gradle.properties plugins/pterodactyl/Cargo.toml plugins/local/Cargo.toml clients/wrapper/Cargo.toml controller/Cargo.toml common/Cargo.toml cli/Cargo.toml
git commit -m "ci(release): bump version"
git push

Expand Down Expand Up @@ -114,8 +114,8 @@ jobs:
cp ./target/x86_64-unknown-linux-gnu/release/wrapper wrapper-linux-x86_64
cp ./target/x86_64-pc-windows-gnu/release/wrapper.exe wrapper-windows-x86_64.exe

cp ./target/wasm32-wasip2/release/pterodactyl.wasm pterodactyl-driver.wasm
cp ./target/wasm32-wasip2/release/local.wasm local-driver.wasm
cp ./target/wasm32-wasip2/release/pterodactyl.wasm pterodactyl-plugin.wasm
cp ./target/wasm32-wasip2/release/local.wasm local-plugin.wasm

cp $(find ./clients/jvm/paper/build -name "*-all.jar") paper-client.jar

Expand All @@ -134,6 +134,6 @@ jobs:
cli-windows-x86_64.exe
wrapper-linux-x86_64
wrapper-windows-x86_64.exe
pterodactyl-driver.wasm
local-driver.wasm
pterodactyl-plugin.wasm
local-plugin.wasm
paper-client.jar
103 changes: 103 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'common'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=common",
"--all-features"
],
"filter": {
"name": "common",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}/run/"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'controller'",
"cargo": {
"args": [
"build",
"--bin=controller",
"--package=controller",
"--all-features"
],
"filter": {
"name": "controller",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}/run/"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'controller'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=controller",
"--package=controller",
"--all-features"
],
"filter": {
"name": "controller",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}/run/"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'cli'",
"cargo": {
"args": [
"build",
"--bin=cli",
"--package=cli",
"--all-features"
],
"filter": {
"name": "cli",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}/run/"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'cli'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=cli",
"--package=cli",
"--all-features"
],
"filter": {
"name": "cli",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}/run/"
}
]
}
11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@ members = [
"controller",

# Drivers
"drivers/pterodactyl",
"drivers/local",
#"plugins/pterodactyl",
"plugins/local",

# Clients
"cli",
"clients/wrapper",
#"clients/wrapper",
]

[workspace.metadata]
protocol-version = 5
protocol-version = 6

[profile.release]
lto = true
strip = true
lto = true
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ COPY . .
# Install necessary build dependencies, including protobuf compiler
RUN apk add --no-cache musl-dev openssl-dev protobuf-dev

# Compile the controller with the wasm-drivers feature
RUN cargo build -p controller --features wasm-drivers --release
# Compile the controller with the wasm-plugins feature
RUN cargo build -p controller --features wasm-plugins --release

# Runtime stage: Use a minimal Alpine image
FROM alpine:latest
Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: run run-controller build build-controller build-wrapper build-drivers clean fix
.PHONY: run run-controller build build-controller build-wrapper build-plugins clean fix

# Configuration
WASM_RUSTFLAGS = -Z wasi-exec-model=reactor
Expand All @@ -7,7 +7,7 @@ WASM_TARGET = wasm32-wasip2
# Directories
RUN_DIR = run
OLD_RUN_DIR = run.old
DRIVER_DIR = $(RUN_DIR)/drivers/wasm
PLUGIN_DIR = $(RUN_DIR)/plugins/wasm

# Arguments
CONTROLLER_ARGS = "--debug"
Expand Down Expand Up @@ -39,10 +39,10 @@ clean:
## Fix target
fix:
cargo fmt
cargo clippy --fix --allow-dirty --allow-staged --all-targets --all-features
cargo clippy --fix --allow-dirty --allow-staged --all-features

## Build target
build: build-controller build-cli build-wrapper build-drivers
build: build-controller build-cli build-wrapper build-plugins

## Run target
run: run-controller
Expand All @@ -67,12 +67,12 @@ build-cli:
build-wrapper:
cargo build -p wrapper --all-features --release

## Build drivers target
build-drivers:
## Build plugins target
build-plugins:
$(SETENV) RUSTFLAGS="$(WASM_RUSTFLAGS)"
cargo build -p pterodactyl --target $(WASM_TARGET) --release
cargo build -p local --target $(WASM_TARGET) --release

# Create driver directory if it doesn't exist
$(DRIVER_DIR):
$(MKDIR) $(DRIVER_DIR)
# Create plugin directory if it doesn't exist
$(PLUGIN_DIR):
$(MKDIR) $(PLUGIN_DIR)
4 changes: 2 additions & 2 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ inquire = "0.7.5"
anyhow = "1.0.95"

# Command line arguments
clap = { version = "4.5.26", features = ["derive"] }
clap = { version = "4.5.27", features = ["derive"] }

# Configuration
serde = { version = "1.0.217", features = ["derive"] }
toml = "0.8.19"

# Async runtime
tokio = { version = "1.43.0", features = ["rt", "rt-multi-thread", "macros"] }
tokio = { version = "1.43.0", features = ["rt", "rt-multi-thread", "fs", "macros"] }

# API
url = { version = "2.5.4", features = ["serde"] }
Expand Down
Loading