code wiki / _hdl_build / nx_deploy_stage_candidate_t188.nx

nx_deploy_stage_candidate_t188.nx

buildroot/runtime/_hdl_build/nx_deploy_stage_candidate_t188.nx

14827 B321 linesdepth 6pulls 7 transitivereach 3 importersview sourcekind librarytopic deploy
docsdependenciesstructsconstsfunctions

about

ELF-magic admission and exact-byte staging into a .new slot. This preserves ordinary source permissions and verifies copied bytes; it does not establish that an ELF is valid for execution. Legacy1024-byte admission remains explicit pending format-aware admission; no64MiB content ceiling. Caller owns trusted stage directories. File and directory sync outcomes are recorded separately from visibility. Promotion and runtime health are separate. license_tier: ORIGINAL

dependencies 2 imports · 3 importers

nx_fio.nx nx_descriptor_candidate_t188.nx nx_deploy_stage_candidate_t188 nx_deploy_stage_cli_t188.nx nx_deploy_stage_emitter_gate_t188. nx_deploy_stage_gate_t188.nx

imports: nx_fio.nxnx_descriptor_candidate_t188.nx

imported by: nx_deploy_stage_cli_t188.nxnx_deploy_stage_emitter_gate_t188.nxnx_deploy_stage_gate_t188.nx

structs

38struct NxDeployStageResult

consts

10const DS_MAGIC_1024: i64 = 1024
11const DS_MAGIC_4096: i64 = 4096
12const DS_MAGIC_2000: i64 = 2000
14const DS_MINSZ: i64 = 1024 // smallest plausible ELF; a smaller "binary" is a failed/torn build

functions

16func ds_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main
17func ds_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
18func ds_cat(d: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; var o: i64=off; while s[i]!=(0 as u8){d[o]=s[i]; o=o+1; i=i+1} return o }
called by 1: ds_stage_core
19func ds_catn(d: *u8, off: i64, v: i64) -> i64
26func ds_dst_is_new(dst: *u8) -> i64
called by 1: ds_stage_core calls 1: ds_len
41func ds_stat_word(stat:*u8,offset:i64)->i64
44func ds_stage_result_init(r:*NxDeployStageResult)->i64
47func ds_source_prepare(src:*u8,region:*NxFileReadRegion,stat:*u8,digest:*u8,r:*NxDeployStageResult)->i64
82func ds_src_size(src:*u8)->i64
96func ds_stage_core(src:*u8,dst:*u8,r:*NxDeployStageResult)->i64
222func ds_stage(src:*u8,dst:*u8)->i64
called by 1: ds_selftest calls 1: ds_stage_core
230func ds_out_fd(fd:i64,s:*u8,n:i64)->i64
234func ds_text_fd(fd:i64,s:*u8)->i64{return ds_out_fd(fd,s,ds_len(s))}
235func ds_json_fd(fd:i64,s:*u8)->i64
called by 1: ds_emit_result calls 2: ds_text_fdds_out_fd
253func ds_digits_fd(fd:i64,v:i64)->i64
258func ds_num_fd(fd:i64,v:i64)->i64
261func ds_emit_result(fd:i64,src:*u8,dst:*u8,r:*NxDeployStageResult)->i64
278func ds_emit(src:*u8,dst:*u8,rc:i64,sz:i64)->i64
287func ds_selftest() -> i64
called by 1: main calls 1: ds_stage