MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / to_assembly_options

Method to_assembly_options

atomic-repository/src/record/options.rs:525–546  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

523 /// Convert to assembly options.
524 #[must_use]
525 pub fn to_assembly_options(&self) -> AssemblyOptions {
526 // CB-9C: the assembled change must carry the full tracked content —
527 // the 500 MB opaque-binary corpus exceeds the default 100 MB
528 // assembly content cap, and an import refusal for a tracked blob is
529 // exactly the silent-loss class the corpus forbids. The record-side
530 // file-size policy still governs ordinary local records; assembly
531 // follows this option's file-size budget when it is set, otherwise
532 // the default applies.
533 let assembly = {
534 let bytes_budget = self.max_file_size.saturating_mul(4).max(1024 * 1024);
535 AssemblyOptions::new().max_content_size(bytes_budget as usize)
536 };
537 assembly
538 .include_empty_files(self.record_empty_files)
539 .globalize_options(
540 GlobalizeOptions::new()
541 .with_include_empty_files(self.record_empty_files)
542 .with_default_encoding(self.default_encoding),
543 )
544 .provenance(self.provenance.clone())
545 .metadata_bytes(self.metadata_bytes.clone())
546 }
547}
548
549impl Default for RecordOptions {

Calls 8

max_content_sizeMethod · 0.80
globalize_optionsMethod · 0.80
metadata_bytesMethod · 0.45
provenanceMethod · 0.45
include_empty_filesMethod · 0.45
with_default_encodingMethod · 0.45
cloneMethod · 0.45