Summary
Add FreeBSD to Aether's CI matrix to ensure code compiles and runs on FreeBSD, with foundational support for Capsicum capability-based sandboxing.
Background
Aether already builds on FreeBSD:
- Runtime uses kqueue I/O poller (implemented for macOS/FreeBSD)
- Source has `#ifdef FreeBSD` conditionals
- Mostly POSIX-compatible code
- Gap: No CI testing, so breakage could hide
Capsicum is FreeBSD's mature capability-based sandboxing framework (similar to Aether's language-level model but OS-enforced). Adding FreeBSD CI + Capsicum bindings would position Aether as the only language with both language-level AND OS-level sandboxing capabilities.
Work Items
Phase 1: FreeBSD CI + Base Capsicum (MVP, ~3-4 days)
Phase 2: Transparent Runtime Integration (optional, future)
Phase 3: Ecosystem Integration (optional, future)
Success Criteria
Phase 1 completion:
- ✓ FreeBSD is in CI matrix (prevents regressions)
- ✓ All existing tests pass on FreeBSD
- ✓ Users can call
std.capsicum.capsicum_enter() and capsicum_limit_rights()
- ✓ Documentation explains the feature + limitations
- ✓ Aether story extends to: "Works on Linux, macOS, Windows, and FreeBSD"
Effort Estimate
| Task |
Time |
Notes |
| FreeBSD CI setup |
2-4 hours |
Cirrus CI is straightforward |
| std.capsicum module |
1-2 days |
Mostly wrappers around cap_*(2) syscalls |
| Build system |
1 day |
Similar to AETHER_HAS_OPENSSL pattern |
| Documentation |
1 day |
Examples + limitations |
| Total (MVP) |
3-4 days |
Can be done in a sprint |
Technical Notes
- CI choice: Cirrus CI recommended (native FreeBSD VMs, free for open source, real Capsicum support)
- Alternative: GitHub Actions + freebsd/action (Linux emulation, no Capsicum)
- Capsicum limitation on Linux containers: FreeBSD OCI images run FreeBSD userspace on Linux kernel; Capsicum syscalls won't work (requires FreeBSD kernel). This is OK for MVP—Phase 1 focuses on compilation & manual bindings.
- Kernel requirement: Capsicum requires FreeBSD 10.0+; can check at runtime with
capsicum_available()
Related Issues
References
Summary
Add FreeBSD to Aether's CI matrix to ensure code compiles and runs on FreeBSD, with foundational support for Capsicum capability-based sandboxing.
Background
Aether already builds on FreeBSD:
Capsicum is FreeBSD's mature capability-based sandboxing framework (similar to Aether's language-level model but OS-enforced). Adding FreeBSD CI + Capsicum bindings would position Aether as the only language with both language-level AND OS-level sandboxing capabilities.
Work Items
Phase 1: FreeBSD CI + Base Capsicum (MVP, ~3-4 days)
Add FreeBSD CI job (~2-4 hours)
make ci(same as Linux/macOS matrix)Create std.capsicum module (~1-2 days)
std/capsicum/module.aewith Aether bindingsstd/capsicum/aether_capsicum.cwith C wrapperscapsicum_available(),capsicum_enter(),capsicum_limit_rights(),capsicum_pdwait4()Build system support (~1 day)
#ifdef __FreeBSD__-DAETHER_HAS_CAPSICUMpkg-config --libs libcasperDocumentation (~1 day)
Phase 2: Transparent Runtime Integration (optional, future)
runtime/scheduler/actor_pool.cto automatically use CapsicumPhase 3: Ecosystem Integration (optional, future)
Success Criteria
Phase 1 completion:
std.capsicum.capsicum_enter()andcapsicum_limit_rights()Effort Estimate
Technical Notes
capsicum_available()Related Issues
References