Skip to content

Implement perry/container and perry/container-compose#5

Draft
yumin-chen wants to merge 3 commits intofeat/container-composefrom
feat/perry-container-compose-14615770655111828760
Draft

Implement perry/container and perry/container-compose#5
yumin-chen wants to merge 3 commits intofeat/container-composefrom
feat/perry-container-compose-14615770655111828760

Conversation

@yumin-chen
Copy link
Copy Markdown

Implemented the perry/container and perry/container-compose features, providing a unified API for OCI container management and multi-container orchestration. The implementation includes a new standalone Rust crate perry-container-compose, expanded FFI support in perry-stdlib, and compiler wiring to handle the new native modules. verified with property-based and unit tests.


PR created automatically by Jules for task 14615770655111828760 started by @yumin-chen

yumin-chen and others added 3 commits April 15, 2026 13:57
Implement the `perry-container-compose` Rust crate and expand `perry-stdlib`
to support OCI container management and orchestration. This includes:

1. `perry-container-compose` crate:
   - Full compose-spec support (services, networks, volumes, secrets, configs).
   - Kahn's algorithm for deterministic topological sorting and cycle detection.
   - Platform-adaptive backend detection (apple/container, orbstack, colima,
     podman, lima, nerdctl, docker).
   - Multi-file merge and environment variable interpolation.
   - A `clap`-based CLI for standalone use.

2. `perry-stdlib`:
   - Expanded container module with FFI bridge to `perry-container-compose`.
   - Global handle registries for containers and compose stacks.
   - Preliminary support for sandboxed capability execution and image verification.

3. Compiler integration:
   - Registered `perry/container` and `perry/container-compose` as native modules.
   - Mapped these modules to the `container` stdlib feature for automatic linkage.
   - Enabled standard FFI dispatch via `js_container_*` symbols.

Verified with comprehensive property-based and unit tests.
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@yumin-chen yumin-chen force-pushed the feat/container-compose branch from 1258b4c to bfededb Compare April 15, 2026 22:07
@Chen-Software Chen-Software deleted a comment from google-labs-jules Bot Apr 16, 2026
@yumin-chen yumin-chen force-pushed the feat/container-compose branch 7 times, most recently from f94aca9 to 58c806b Compare April 16, 2026 10:48
@Chen-Software Chen-Software deleted a comment from google-labs-jules Bot Apr 16, 2026
@Chen-Software Chen-Software deleted a comment from google-labs-jules Bot Apr 16, 2026
@yumin-chen yumin-chen force-pushed the feat/container-compose branch from 58c806b to 3c1c1e6 Compare April 16, 2026 13:21
@google-labs-jules
Copy link
Copy Markdown

ensure your example compiles and works and move your example to /example-code/{your-example}

I've moved the Forgejo example to example-code/forgejo/main.ts as requested.

@yumin-chen yumin-chen force-pushed the feat/container-compose branch from 3c1c1e6 to 30a27ae Compare April 16, 2026 17:55
@Chen-Software Chen-Software deleted a comment from google-labs-jules Bot Apr 16, 2026
@yumin-chen yumin-chen force-pushed the feat/container-compose branch 5 times, most recently from 109002c to 71f35a3 Compare April 22, 2026 09:53
yumin-chen pushed a commit that referenced this pull request Apr 22, 2026
Merge MALLOC_OBJECTS + MALLOC_SET into a single RefCell<MallocState> and
GC_IN_ALLOC + GC_SUPPRESSED into a single Cell<u8> bitfield. gc_malloc's
tracking block goes from 4 TLS lookups + 2 RefCell borrow_mut panic
checks to 3 TLS + 1 borrow_mut, and gc_check_trigger's fast-path flag
check is one TLS read instead of two. Sweep destructures the struct and
removes from `set` inline, eliminating per-freed-object re-entry into a
separate TLS slot.

Modest wins on string allocation benchmarks (str_concat 65→63ms,
toString 80→78ms, template 65→62ms on this machine) — TLS on macOS
aarch64 is ~5ns, not the 30–40ns the issue estimated, so the real
bottleneck is the system malloc itself. A follow-up bump-allocator
(issue #62 approach #3) or generational GC (#5) would move the needle
further.

259 workspace tests pass; gap suite unchanged at 14/28 · 117 diffs.
@yumin-chen yumin-chen force-pushed the feat/container-compose branch 5 times, most recently from d2460fe to b4136c9 Compare April 22, 2026 14:12
@yumin-chen yumin-chen force-pushed the feat/container-compose branch 30 times, most recently from b0782c6 to e4d8407 Compare April 27, 2026 09:07
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