Full migration and transition to Rust; Remove python artifacts
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
logs
|
logs
|
||||||
data
|
data
|
||||||
tmp
|
tmp
|
||||||
myfsio-engine/target
|
target
|
||||||
myfsio-engine/tests
|
crates/*/tests
|
||||||
Dockerfile
|
Dockerfile
|
||||||
.dockerignore
|
.dockerignore
|
||||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -26,12 +26,8 @@ dist/
|
|||||||
*.egg-info/
|
*.egg-info/
|
||||||
.eggs/
|
.eggs/
|
||||||
|
|
||||||
# Rust / maturin build artifacts
|
|
||||||
python/myfsio_core/target/
|
|
||||||
python/myfsio_core/Cargo.lock
|
|
||||||
|
|
||||||
# Rust engine build artifacts
|
# Rust engine build artifacts
|
||||||
rust/myfsio-engine/target/
|
target/
|
||||||
|
|
||||||
# Local runtime artifacts
|
# Local runtime artifacts
|
||||||
logs/
|
logs/
|
||||||
|
|||||||
0
rust/myfsio-engine/Cargo.lock → Cargo.lock
generated
0
rust/myfsio-engine/Cargo.lock → Cargo.lock
generated
@@ -6,10 +6,10 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y --no-install-recommends build-essential pkg-config libssl-dev \
|
&& apt-get install -y --no-install-recommends build-essential pkg-config libssl-dev \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY myfsio-engine ./myfsio-engine
|
COPY Cargo.toml Cargo.lock ./
|
||||||
|
COPY crates ./crates
|
||||||
|
|
||||||
RUN cd myfsio-engine \
|
RUN cargo build --release --bin myfsio-server \
|
||||||
&& cargo build --release --bin myfsio-server \
|
|
||||||
&& strip target/release/myfsio-server
|
&& strip target/release/myfsio-server
|
||||||
|
|
||||||
|
|
||||||
@@ -24,9 +24,9 @@ RUN apt-get update \
|
|||||||
&& useradd -m -u 1000 myfsio \
|
&& useradd -m -u 1000 myfsio \
|
||||||
&& chown -R myfsio:myfsio /app
|
&& chown -R myfsio:myfsio /app
|
||||||
|
|
||||||
COPY --from=builder /build/myfsio-engine/target/release/myfsio-server /usr/local/bin/myfsio-server
|
COPY --from=builder /build/target/release/myfsio-server /usr/local/bin/myfsio-server
|
||||||
COPY --from=builder /build/myfsio-engine/crates/myfsio-server/templates /app/templates
|
COPY --from=builder /build/crates/myfsio-server/templates /app/templates
|
||||||
COPY --from=builder /build/myfsio-engine/crates/myfsio-server/static /app/static
|
COPY --from=builder /build/crates/myfsio-server/static /app/static
|
||||||
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
|
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
|
||||||
|
|
||||||
RUN chmod +x /app/docker-entrypoint.sh \
|
RUN chmod +x /app/docker-entrypoint.sh \
|
||||||
21
README.md
21
README.md
@@ -1,8 +1,6 @@
|
|||||||
# MyFSIO
|
# MyFSIO
|
||||||
|
|
||||||
MyFSIO is an S3-compatible object storage server with a Rust runtime and a filesystem-backed storage engine. The active server lives under `rust/myfsio-engine` and serves both the S3 API and the built-in web UI from a single process.
|
MyFSIO is an S3-compatible object storage server with a Rust runtime and a filesystem-backed storage engine. The repository root is the Cargo workspace; the server serves both the S3 API and the built-in web UI from a single process.
|
||||||
|
|
||||||
The `python/` implementation is deprecated as of 2026-04-21. It remains in the repository for migration reference and legacy tests, but new development and supported runtime usage should target the Rust server.
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
@@ -29,7 +27,6 @@ If you want API-only mode, set `UI_ENABLED=false`. There is no separate "UI-only
|
|||||||
From the repository root:
|
From the repository root:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd rust/myfsio-engine
|
|
||||||
cargo run -p myfsio-server --
|
cargo run -p myfsio-server --
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -60,14 +57,13 @@ UI_ENABLED=false cargo run -p myfsio-server --
|
|||||||
## Building a Binary
|
## Building a Binary
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd rust/myfsio-engine
|
|
||||||
cargo build --release -p myfsio-server
|
cargo build --release -p myfsio-server
|
||||||
```
|
```
|
||||||
|
|
||||||
Binary locations:
|
Binary locations:
|
||||||
|
|
||||||
- Linux/macOS: `rust/myfsio-engine/target/release/myfsio-server`
|
- Linux/macOS: `target/release/myfsio-server`
|
||||||
- Windows: `rust/myfsio-engine/target/release/myfsio-server.exe`
|
- Windows: `target/release/myfsio-server.exe`
|
||||||
|
|
||||||
Run the built binary directly:
|
Run the built binary directly:
|
||||||
|
|
||||||
@@ -166,10 +162,10 @@ data/
|
|||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
Build the Rust image from the `rust/` directory:
|
Build the Rust image from the repository root:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build -t myfsio ./rust
|
docker build -t myfsio .
|
||||||
docker run --rm -p 5000:5000 -p 5100:5100 -v "${PWD}/data:/app/data" myfsio
|
docker run --rm -p 5000:5000 -p 5100:5100 -v "${PWD}/data:/app/data" myfsio
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -180,11 +176,9 @@ If the instance sits behind a reverse proxy, set `API_BASE_URL` to the public S3
|
|||||||
The repository includes `scripts/install.sh` for systemd-style Linux installs. Build the Rust binary first, then pass it to the installer:
|
The repository includes `scripts/install.sh` for systemd-style Linux installs. Build the Rust binary first, then pass it to the installer:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd rust/myfsio-engine
|
|
||||||
cargo build --release -p myfsio-server
|
cargo build --release -p myfsio-server
|
||||||
|
|
||||||
cd ../..
|
sudo ./scripts/install.sh --binary ./target/release/myfsio-server
|
||||||
sudo ./scripts/install.sh --binary ./rust/myfsio-engine/target/release/myfsio-server
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The installer copies the binary into `/opt/myfsio/myfsio`, writes `/opt/myfsio/myfsio.env`, and can register a `myfsio.service` unit.
|
The installer copies the binary into `/opt/myfsio/myfsio`, writes `/opt/myfsio/myfsio.env`, and can register a `myfsio.service` unit.
|
||||||
@@ -194,7 +188,6 @@ The installer copies the binary into `/opt/myfsio/myfsio`, writes `/opt/myfsio/m
|
|||||||
Run the Rust test suite from the workspace:
|
Run the Rust test suite from the workspace:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd rust/myfsio-engine
|
|
||||||
cargo test
|
cargo test
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -209,4 +202,4 @@ cargo test
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The `version` field comes from the Rust crate version in `rust/myfsio-engine/crates/myfsio-server/Cargo.toml`.
|
The `version` field comes from the Rust crate version in `crates/myfsio-server/Cargo.toml`.
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 200 KiB |
|
Before Width: | Height: | Size: 872 KiB After Width: | Height: | Size: 872 KiB |
@@ -73,16 +73,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<p class="text-muted">Build or run the Rust server and launch the API plus web UI from a single process.</p>
|
<p class="text-muted">Build or run the Rust server and launch the API plus web UI from a single process.</p>
|
||||||
<div class="alert alert-light border small mb-3">
|
<div class="alert alert-light border small mb-3">
|
||||||
Runtime note: MyFSIO now runs from the Rust server in <code>rust/myfsio-engine</code>. For the verified runtime configuration list, use the repository <code>docs.md</code>.
|
Runtime note: the repository root is the Cargo workspace. For the verified runtime configuration list, use the repository <code>docs.md</code>.
|
||||||
</div>
|
</div>
|
||||||
<ol class="docs-steps">
|
<ol class="docs-steps">
|
||||||
<li>Install a current Rust toolchain.</li>
|
<li>Install a current Rust toolchain.</li>
|
||||||
<li>Change into <code>rust/myfsio-engine</code>.</li>
|
<li>From the repository root, start the server with <code>cargo run -p myfsio-server --</code>.</li>
|
||||||
<li>Start the server with <code>cargo run -p myfsio-server --</code>.</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
<pre class="mb-3"><code class="language-bash">cd rust/myfsio-engine
|
<pre class="mb-3"><code class="language-bash"># Run API + UI
|
||||||
|
|
||||||
# Run API + UI
|
|
||||||
cargo run -p myfsio-server --
|
cargo run -p myfsio-server --
|
||||||
|
|
||||||
# Show resolved configuration
|
# Show resolved configuration
|
||||||
34
docs.md
34
docs.md
@@ -1,26 +1,19 @@
|
|||||||
# MyFSIO Rust Operations Guide
|
# MyFSIO Rust Operations Guide
|
||||||
|
|
||||||
This document describes the current Rust server in `rust/myfsio-engine`. It replaces the older Python-oriented runbook.
|
This document describes the MyFSIO Rust server. The repository root is the Cargo workspace.
|
||||||
|
|
||||||
The `python/` implementation is deprecated as of 2026-04-21. It is retained for migration reference and legacy validation only; production usage and new development should use the Rust server.
|
## 1. Overview
|
||||||
|
|
||||||
## 1. What Changed
|
|
||||||
|
|
||||||
The active runtime is now Rust:
|
|
||||||
|
|
||||||
- One process serves both the S3 API and the web UI.
|
- One process serves both the S3 API and the web UI.
|
||||||
- The server entrypoint is `myfsio-server`.
|
- The server entrypoint is `myfsio-server`.
|
||||||
- The main development workflow is `cargo run -p myfsio-server --`.
|
- The main development workflow is `cargo run -p myfsio-server --`.
|
||||||
- API-only mode is controlled with `UI_ENABLED=false`.
|
- API-only mode is controlled with `UI_ENABLED=false`.
|
||||||
|
|
||||||
The deprecated `python/` directory may still contain older implementation code, templates, and tests, but it is not required to run the current server.
|
|
||||||
|
|
||||||
## 2. Quick Start
|
## 2. Quick Start
|
||||||
|
|
||||||
From the repository root:
|
From the repository root:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd rust/myfsio-engine
|
|
||||||
cargo run -p myfsio-server --
|
cargo run -p myfsio-server --
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -34,10 +27,9 @@ On first startup, MyFSIO bootstraps an admin user in `data/.myfsio.sys/config/ia
|
|||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
From PowerShell:
|
From PowerShell at the repository root:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
cd rust\myfsio-engine
|
|
||||||
cargo run -p myfsio-server --
|
cargo run -p myfsio-server --
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -52,7 +44,6 @@ There is no separate UI-only mode in the Rust server.
|
|||||||
## 3. Build and Run a Binary
|
## 3. Build and Run a Binary
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd rust/myfsio-engine
|
|
||||||
cargo build --release -p myfsio-server
|
cargo build --release -p myfsio-server
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -104,7 +95,7 @@ That makes local development and systemd installs behave consistently.
|
|||||||
|
|
||||||
## 6. Verified Configuration Reference
|
## 6. Verified Configuration Reference
|
||||||
|
|
||||||
These values are taken from `rust/myfsio-engine/crates/myfsio-server/src/config.rs`.
|
These values are taken from `crates/myfsio-server/src/config.rs`.
|
||||||
|
|
||||||
### Network and runtime
|
### Network and runtime
|
||||||
|
|
||||||
@@ -311,10 +302,10 @@ Notes:
|
|||||||
|
|
||||||
## 10. Docker
|
## 10. Docker
|
||||||
|
|
||||||
Build the Rust image from the `rust/` directory:
|
Build the Rust image from the repository root:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build -t myfsio ./rust
|
docker build -t myfsio .
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-p 5000:5000 \
|
-p 5000:5000 \
|
||||||
-p 5100:5100 \
|
-p 5100:5100 \
|
||||||
@@ -337,11 +328,9 @@ If you want generated links and presigned URLs to use an external hostname, set
|
|||||||
The repository includes `scripts/install.sh`. For the Rust server, build the binary first and pass the path explicitly:
|
The repository includes `scripts/install.sh`. For the Rust server, build the binary first and pass the path explicitly:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd rust/myfsio-engine
|
|
||||||
cargo build --release -p myfsio-server
|
cargo build --release -p myfsio-server
|
||||||
|
|
||||||
cd ../..
|
sudo ./scripts/install.sh --binary ./target/release/myfsio-server
|
||||||
sudo ./scripts/install.sh --binary ./rust/myfsio-engine/target/release/myfsio-server
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The installer copies that binary to `/opt/myfsio/myfsio`, creates `/opt/myfsio/myfsio.env`, and can register a `myfsio.service` systemd unit.
|
The installer copies that binary to `/opt/myfsio/myfsio`, creates `/opt/myfsio/myfsio.env`, and can register a `myfsio.service` systemd unit.
|
||||||
@@ -396,14 +385,13 @@ The command:
|
|||||||
Run the Rust test suite:
|
Run the Rust test suite:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd rust/myfsio-engine
|
|
||||||
cargo test
|
cargo test
|
||||||
```
|
```
|
||||||
|
|
||||||
If you are validating documentation changes for the UI, the most relevant coverage lives under:
|
If you are validating documentation changes for the UI, the most relevant coverage lives under:
|
||||||
|
|
||||||
- `rust/myfsio-engine/crates/myfsio-server/tests`
|
- `crates/myfsio-server/tests`
|
||||||
- `rust/myfsio-engine/crates/myfsio-storage/src`
|
- `crates/myfsio-storage/src`
|
||||||
|
|
||||||
## 15. API Notes
|
## 15. API Notes
|
||||||
|
|
||||||
@@ -417,5 +405,5 @@ The Rust server exposes:
|
|||||||
|
|
||||||
For a route-level view, inspect:
|
For a route-level view, inspect:
|
||||||
|
|
||||||
- `rust/myfsio-engine/crates/myfsio-server/src/lib.rs`
|
- `crates/myfsio-server/src/lib.rs`
|
||||||
- `rust/myfsio-engine/crates/myfsio-server/src/handlers/`
|
- `crates/myfsio-server/src/handlers/`
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user