-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6ef78c
commit 00dfe4e
Showing
5 changed files
with
97 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
url: https://r-wasm.github.io/rwasm/ | ||
template: | ||
bootstrap: 5 | ||
|
||
deploy: | ||
install_metadata: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
pandoc: '3.2' | ||
pkgdown: 2.0.9.9000 | ||
pkgdown_sha: 34ee692e4ce10c8abfb863cc782da771838558f7 | ||
articles: | ||
github-actions: github-actions.html | ||
mount-fs-image: mount-fs-image.html | ||
mount-host-dir: mount-host-dir.html | ||
rwasm: rwasm.html | ||
tar-metadata: tar-metadata.html | ||
last_built: 2024-09-04T08:58Z | ||
urls: | ||
reference: https://r-wasm.github.io/rwasm/reference | ||
article: https://r-wasm.github.io/rwasm/articles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: "Technical details for .tar archive metadata" | ||
output: rmarkdown::html_document | ||
vignette: > | ||
%\VignetteIndexEntry{Technical details for .tar archive metadata} | ||
%\VignetteEngine{knitr::rmarkdown} | ||
%\VignetteEncoding{UTF-8} | ||
--- | ||
|
||
The `rwasm::add_tar_index()` function appends Emscripten filesystem metadata to an (optionally gzip compressed) `.tar` archive. | ||
The resulting output can be directly mounted by webR to the virtual filesystem, making the content of the archive available to the WebAssembly R process. | ||
|
||
See the [Mounting filesystem images](mount-fs-image.html) article for more information about mounting filesystem images. | ||
|
||
## Archive data layout | ||
|
||
A `.tar` archive that includes Emscripten filesystem metadata has the data layout given below. The resulting `.tar` file may be gzip compressed, with file extension `.tar.gz` or `.tgz`. | ||
|
||
| Field | Size | Description | | ||
|-|---|-------------| | ||
| 0 | Variable | Standard `.tar` data, including end-of-archive marker. | | ||
| 1 | Variable | JSON metadata, UTF8 encoded, padded with `0x00` to 4 byte boundary. | | ||
| 2 | 4 bytes | Magic bytes: The string `"webR"`, UTF8 encoded (`0x77656252`). | | ||
| 3 | 4 bytes | Reserved, currently `0x00000000`. | | ||
| 4 | 4 bytes | Offset of JSON metadata (field 1), in units of 512-byte blocks. Signed integer, big endian. | | ||
| 5 | 4 bytes | Length of JSON metadata, in bytes. Signed integer, big endian. | | ||
Table: Data layout for a `.tar` archive with filesystem metadata. |