Skip to content

ManagedBaseVersion

The three guarded values a build takes, as separate parameters rather than fields.

Why they are not in [BuildImageOptions]

Measured, not preferred. A #[napi(object)] field holding a class instance must be a ClassInstance<'a, T>, which carries raw napi_value/napi_env pointers and is therefore not Send — and napi’s async path requires Future: Send. So an options object with a size: SizeClass field cannot be a parameter of an async fn, which Sandbox.buildImage has to be. The compiler said so in as many words: future created by async block is not Send ... has type BuildImageOptions<'_> which is not Send.

A reference parameter — Option<&SizeClass> — has no such problem, because napi dereferences it before the future is built. So the guarded types move out of the bag and into the signature, which loses the keyword-argument look and keeps every closure:

  • size still refuses an off-table baseline, because the only way to have a SizeClass is SizeClass.fromBaselineMib or SizeClass.defaultClass (TRAP-10).
  • runHookTimeout and buildHookTimeout are still two distinct classes, so they still cannot be transposed — which was the whole reason they are types (BIND-2).

A caller writes sandbox.buildImage(opts, size, runTimeout, buildTimeout) with the last three optional. One version of a managed base image, from ListManagedMicrovmImageVersions.

createdAt: number;

Unix seconds.


imageArn: string;

imageVersion: string;

A bare integer for a managed base ("0", "1"), where a custom image’s versions read "1.0": the value buildImage’s pin takes, not one to compare with a build’s readback.


optional updatedAt?: number;

Unix seconds, when the service reported it.

This page is generated from bindings/microvms-js/index.d.ts by TypeDoc 0.28.20 and typedoc-plugin-markdown 4.13.1, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run dts. mise run dts:check fails when the committed file no longer matches the source.