Nucleide

A crate to manipulate [custom sections] of a WebAssembly module to view/edit application metadata.

Specification

Nucleide specifies WASM metadata that is read by the Nucleic Desktop Environment. It includes the WebAssembly 2.0 and the Daku 1.0.0-beta.0 specifications.

Daku programs are a WebAssembly module that must have the daku custom section, are compressed with ZStd, and should use the .daku file extension; thus the Nucleide specification, as an extension of Daku, shall follow.

App data that can be displayed by a software manager, and where it comes from: - Non-Localized App Name: name section => Module Name Subsection - Programming Language: producers section => Language Field - Processed With: producers section => Processed-By Field - Generated With: producers section => SDK Field - Required Permissions: daku section => Portals Header - Localized App Names: daku section => Translations Subsection - App Description: daku section => Description Translations Subsection - App Icon Themes: daku section => App Icon Themes Subsection - App Screenshots: daku section => Description Assets Subsection - Searchable Tags: daku section => Tags Subsection - Categories: daku section => Categories Subsection - Organization: daku section => Organization Name Subsection

Types

Nucleide custom sections reuse WebAssembly types:

Byte

Simply an 8-bit integer.

Integer

A [Unsigned LEB128] variable-length encoded litte-endian integer, with a maximum value of 2³²-1 (can be anywhere from 1-5 bytes).

Vector[T]

A sequence of the following:

Name

Containing valid UTF-8 (no null termination); wrapper around:

NameMap

A Vector, with each element containing a sequence of the following:

IndirectNameMap

A Vector, with each element containing a sequence of the following:

Custom Sections

Name (name)

From [the wasm spec], debug info. It is expected that apps are built with this module generated for easier debugging, but stripped away and put into a separate .name file for distribution.

0 => Module Name

1 => Function Names

2 => Local Names

3 => Ext: Label Names

4 => Ext: Type Names

5 => Ext: Table Names

6 => Ext: Memory Names

7 => Ext: Global Names

8 => Ext: Element Names

9 => Ext: Data Names

Producers (producers)

From WebAssembly's [tool conventions], information on how the .daku WebAssembly file was generated.

A Vector, with each element containing a sequence of the following:

Daku (daku)

Following the Daku portals list, is the nucleide extension:

1 => App Name Translations

Integer representation of a 4-letter (2-letter lowercase language, 2-letter uppercase region) locale ASCII description:

2 => App Description Translations

Integer representation of a 4-letter (2-letter lowercase language, 2-letter uppercase region) locale ASCII description:

3 => App Icon Themes

A Vector, with each element containing a sequence of the following:

4 => App Description Assets

A Vector, with each element containing a sequence of the following:

5 => Searchable Tags

A Vector (limit 8), with each element containing:

6 => Searchable Categories

A Vector (limit 2), with each element containing:

7 => Organization Name