Skip to content

[ABANDONED] Embed fc-agent binary + --base-image flag#12

Closed
ejc3 wants to merge 3 commits intomainfrom
embed-fc-agent
Closed

[ABANDONED] Embed fc-agent binary + --base-image flag#12
ejc3 wants to merge 3 commits intomainfrom
embed-fc-agent

Conversation

@ejc3
Copy link
Copy Markdown
Owner

@ejc3 ejc3 commented Dec 24, 2025

Status: ABANDONED

This branch is 79 commits behind main and cannot be cleanly rebased. Pushing for historical reference only.

Features (to be reimplemented on fresh main)

  • Embed fc-agent binary as asset via include_bytes!
  • --base-image flag for custom base images
  • --cache-dir flag (uncommitted)

Why abandoned

Main has been heavily refactored (rootfs.rs now uses declarative rootfs-plan.toml). These commits would need complete reimplementation.

ejc3 added 3 commits December 20, 2025 20:56
- Add build.rs to copy fc-agent to OUT_DIR for include_bytes!
- Add src/setup/embedded.rs with FC_AGENT_BINARY and extract_fc_agent()
- Update Makefile to build fc-agent as static musl binary first
- Remove find_fc_agent_binary() from rootfs.rs, use embedded binary

The fc-agent is now built with musl for static linking (works on
any Linux 2.6.39+), then embedded into fcvm at compile time via
include_bytes!. This enables single-binary distribution.

Build order: fc-agent (musl) → copy to target/release → fcvm (embeds it)
Allows overriding the default Ubuntu 24.04 cloud image:
- --base-image /path/to/image.qcow2 - use local file
- --base-image https://... - download and cache custom URL

Default behavior unchanged (Ubuntu 24.04 LTS).

Usage:
  fcvm --base-image /path/to/custom.qcow2 podman run ...
  fcvm --base-image https://cloud-images.ubuntu.com/.../22.04/... podman run ...
@ejc3
Copy link
Copy Markdown
Owner Author

ejc3 commented Dec 24, 2025

Abandoned - too stale to rebase. Features to be reimplemented on fresh main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant