feat(natives): added embedded addon tarball extraction in natives

- Added embedded addon tarball output in `embed-native.ts` using `embedded-addons.<platform>.tar.gz` artifacts.
- Added metadata-rich addon types with `size`, `filePath`, and optional `archive` fields.
- Updated extraction to prioritize archive unpacking and skip cached `.node` files when sizes match.
- Added `extractEmbeddedAddonArchive()` with archive parsing and safe validation of archive entry names and kinds.
- Adjusted release profile to disable line-table generation and strip symbols in `Cargo.toml`.
- Added CI-only ELF validation for forbidden sections and regression coverage for issue-823 archive extraction.
This commit is contained in:
can1357
2026-05-28 11:48:32 +02:00
parent 6cc91fcb37
commit cc258b1757
8 changed files with 411 additions and 45 deletions
+15
View File
@@ -1,6 +1,13 @@
export interface EmbeddedAddonFile {
variant: "modern" | "baseline" | "default";
filename: string;
size?: number;
filePath?: string;
}
export interface EmbeddedAddonArchive {
format: "tar.gz";
filename: string;
filePath: string;
}
@@ -8,6 +15,7 @@ export interface EmbeddedAddon {
platformTag: string;
version: string;
files: EmbeddedAddonFile[];
archive?: EmbeddedAddonArchive;
}
export interface DetectCompiledBinaryInput {
@@ -46,4 +54,11 @@ export interface ResolveLoaderCandidatesInput {
export function resolveLoaderCandidates(input: ResolveLoaderCandidatesInput): string[];
export interface ExtractEmbeddedAddonArchiveInput {
archivePath: string;
files: EmbeddedAddonFile[];
targetDir: string;
}
export function extractEmbeddedAddonArchive(input: ExtractEmbeddedAddonArchiveInput): string[];
export function loadNative(): Record<string, unknown>;