diff --git a/www/404.html b/www/404.html index e6d8ec5..384e94d 100644 --- a/www/404.html +++ b/www/404.html @@ -13,7 +13,7 @@ - + diff --git a/www/api-reference.html b/www/api-reference.html index ab705cd..f52febf 100644 --- a/www/api-reference.html +++ b/www/api-reference.html @@ -13,7 +13,7 @@ - + diff --git a/www/atomvm_packbeam.epub b/www/atomvm_packbeam.epub index c729949..f190d21 100644 Binary files a/www/atomvm_packbeam.epub and b/www/atomvm_packbeam.epub differ diff --git a/www/changelog.html b/www/changelog.html index 2500be6..79e8c83 100644 --- a/www/changelog.html +++ b/www/changelog.html @@ -13,7 +13,7 @@ - + @@ -121,7 +121,13 @@

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, -and this project adheres to Semantic Versioning.

+and this project adheres to Semantic Versioning.

+ + + + [0.7.1] (unreleased) +

+

diff --git a/www/code_of_conduct.html b/www/code_of_conduct.html index 61b180f..054a0ed 100644 --- a/www/code_of_conduct.html +++ b/www/code_of_conduct.html @@ -13,7 +13,7 @@ - + diff --git a/www/contributing.html b/www/contributing.html index c8ba2e8..5cc0df2 100644 --- a/www/contributing.html +++ b/www/contributing.html @@ -13,7 +13,7 @@ - + @@ -142,19 +142,19 @@

C Code

-

Identation

Good:

void f(int reverse)
-{
-    if (reverse) {
-        puts("!dlroW olleH");
-    } else {
-        puts("Hello world");
-    }
-}

Bad:

void f(int reverse) {
-    if (reverse)
-        puts ("!dlroW olleH");
+

Identation

Good:

void f(int reverse)
+{
+    if (reverse) {
+        puts("!dlroW olleH");
+    } else {
+        puts("Hello world");
+    }
+}

Bad:

void f(int reverse) {
+    if (reverse)
+        puts ("!dlroW olleH");
     else
-        puts ("Hello world");
-}

Names

  • Struct names are PascalCase (e.g. Context)
  • Scalar types are lower case (e.g. term)
  • All other names (e.g. functions and variables) are snake_case (e.g. term_is_integer)
  • Always prefix function names (e.g. term_is_nil, term_is_integer, context_new, context_destroy)

Other Coding Conventions

  • Pointer should be with the variable name rather than with the type (e.g. `char name, notchar* name`)
  • Avoid long lines, use intermediate variables with meaningful names.

+ puts ("Hello world"); +}

Names

Other Coding Conventions

diff --git a/www/dist/search_data-01CBC306.js b/www/dist/search_data-01CBC306.js deleted file mode 100644 index a4fc294..0000000 --- a/www/dist/search_data-01CBC306.js +++ /dev/null @@ -1 +0,0 @@ -searchData={"content_type":"text/plain","items":[{"doc":"An escript and OTP library used to generate an AtomVM AVM file from a set of files (beam files, previously built AVM files, or even arbitrary data files).","ref":"packbeam.html","title":"packbeam","type":"module"},{"doc":"Deprecated. Use the packbeam_api module, instead.","ref":"packbeam.html#create/2","title":"packbeam.create/2","type":"function"},{"doc":"Deprecated. Use the packbeam_api module, instead.","ref":"packbeam.html#create/4","title":"packbeam.create/4","type":"function"},{"doc":"Deprecated. Use the packbeam_api module, instead.","ref":"packbeam.html#delete/3","title":"packbeam.delete/3","type":"function"},{"doc":"Deprecated. Use the packbeam_api module, instead.","ref":"packbeam.html#list/1","title":"packbeam.list/1","type":"function"},{"doc":null,"ref":"packbeam.html#main/1","title":"packbeam.main/1","type":"function"},{"doc":"A library used to generate an AtomVM AVM file from a set of files (beam files, previously built AVM files, or even arbitrary data files).","ref":"packbeam_api.html","title":"packbeam_api","type":"module"},{"doc":"Create an AVM file. Equivalent to create(OutputPath, InputPaths, DefaultOptions) where DefaultOptions is #{ prune => false, start_module => undefined, application_module => undefined, include_lines => false }","ref":"packbeam_api.html#create/2","title":"packbeam_api.create/2","type":"function"},{"doc":"Create an AVM file. This function will create an AVM file at the location specified in OutputPath, using the input files specified in InputPaths.","ref":"packbeam_api.html#create/3","title":"packbeam_api.create/3","type":"function"},{"doc":null,"ref":"packbeam_api.html#create/4","title":"packbeam_api.create/4","type":"function"},{"doc":null,"ref":"packbeam_api.html#create/5","title":"packbeam_api.create/5","type":"function"},{"doc":"Delete selected elements of an AVM file. This function will delete elements of an AVM file at the location specified in InputPath, specified by the supplied list of names. The output AVM file is written to OutputPath, which may be the same as InputPath.","ref":"packbeam_api.html#delete/3","title":"packbeam_api.delete/3","type":"function"},{"doc":"Extract all or selected elements from an AVM file. This function will extract elements of an AVM file at the location specified in InputPath, specified by the supplied list of names. The elements from the input AVM file will be written into the specified output directory, creating any subdirectories if the AVM file elements contain path information.","ref":"packbeam_api.html#extract/3","title":"packbeam_api.extract/3","type":"function"},{"doc":"Return AVM element data.","ref":"packbeam_api.html#get_element_data/1","title":"packbeam_api.get_element_data/1","type":"function"},{"doc":"Return AVM element module, if the element is a BEAM file.","ref":"packbeam_api.html#get_element_module/1","title":"packbeam_api.get_element_module/1","type":"function"},{"doc":"Return the name of the element.","ref":"packbeam_api.html#get_element_name/1","title":"packbeam_api.get_element_name/1","type":"function"},{"doc":"Indicates whether the AVM file element is a BEAM file.","ref":"packbeam_api.html#is_beam/1","title":"packbeam_api.is_beam/1","type":"function"},{"doc":"Indicates whether the AVM file element is an entrypoint.","ref":"packbeam_api.html#is_entrypoint/1","title":"packbeam_api.is_entrypoint/1","type":"function"},{"doc":"List the contents of an AVM file. This function will list the contents of an AVM file at the location specified in InputPath.","ref":"packbeam_api.html#list/1","title":"packbeam_api.list/1","type":"function"},{"doc":null,"ref":"packbeam_api.html#t:avm_element/0","title":"packbeam_api.avm_element/0","type":"opaque"},{"doc":null,"ref":"packbeam_api.html#t:avm_element_name/0","title":"packbeam_api.avm_element_name/0","type":"type"},{"doc":null,"ref":"packbeam_api.html#t:options/0","title":"packbeam_api.options/0","type":"type"},{"doc":null,"ref":"packbeam_api.html#t:path/0","title":"packbeam_api.path/0","type":"type"},{"doc":"# `atomvvm_packbeam`\n\nAn Erlang Escript and library used to generate an [AtomVM](http://github.com/atomvm/AtomVM) AVM file from a set of files (beam files, previously built AVM files, or even arbitrary data files).\n\nThis tool roughly approximates the functionality of the AtomVM `PackBEAM` utility, except:\n\n* Support for multiple data types, include beam files, text files, etc\n* \"Pruned\" extraction of beams from AVM files, so that only the beams that are needed are packed\n* Support for embedded OTP applications in your PackBEAM files.\n\nThe `packbeam` tool may be used on its own as a stand-alone command-line utility. More typically, it is used internally as part of the [`atomvm_rebar3_plugin`](https://github.com/atomvm/atomvm_rebar3_plugin) [`rebar3`](https://rebar3.org) plugin.","ref":"readme.html","title":"atomvvm_packbeam","type":"extras"},{"doc":"Building `packbeam` requires Erlang/OTP 22 or later, for compatibility with AtomVM, as well as a local installation of [`rebar3`](https://rebar3.org). Optionally, any recent version of `make` may be used to simplify builds.","ref":"readme.html#prerequisites","title":"Prerequisites - atomvvm_packbeam","type":"extras"},{"doc":"To build a release, run the following commands:\n\n shell$ rebar3 release\n shell$ rebar3 tar\n\nThese commands will create an Erlang tar archive containing a versioned release of the `atomvm_packbeam` tool, e.g.,\n\n ...\n ===> Tarball successfully created: _build/prod/rel/atomvm_packbeam/atomvm_packbeam-0.6.2.tar.gz\n\nin your local working directory.\n\n> IMPORTANT! The files in this tar archive do not contain the `atomvm_packbeam` prefix, so extracting these files without care will create a `bin` and `lib` directory in the location into which files from the archive is extracted. See the example below before proceeding!\n\nYou can use the `install.sh` script to install the `atomvm_packbeam` utility into a location on your local machine. You will need to specify the prefix location into which you want to install the utility, together with it's current version.\n\n shell$ ./install.sh /opt/atomvm_packbeam 0.6.2\n atomvm_packbeam version 0.6.2 installed in /opt/atomvm_packbeam.\n\n> Note. Some prefix locations may require `root` permissions to write files to.\n\nSet your `PATH` environment variable to include the `bin` directory of the installation prefix (if not already set), and you should then be able to run the `packbeam` command included therein.\n\nFor example:\n\n shell$ export PATH=/opt/atomvm_packbeam/bin:$PATH\n shell$ packbeam help\n Syntax:\n packbeam \n ...\n\n## `packbeam` command\n\nThe `packbeam` command is used to create an AVM file from a list of beam and other file types, to list the contents of an AVM file, or to delete elements from an AVM file.\n\nThe general syntax of the `packbeam` command takes the form:\n\n packbeam \n\nOn-line help is available via the `help` sub-command:\n\n shell$ packbeam help\n\n packbeam version 0.7.0\n\n Syntax:\n packbeam \n\n The following sub-commands are supported:\n\n create [ ]+\n where:\n is the output AVM file,\n [ ]+ is a list of one or more input files,\n and are among the following:\n [--prune|-p] Prune dependencies\n [--start|-s ] Start module\n [--remove_lines|-r] Remove line number information from AVM files\n\n list \n where:\n is an AVM file,\n and are among the following:\n [--format|-f csv|bare|default] Format output\n\n extract [ ]*\n where:\n is an AVM file,\n [ ]+ is a list of one or more elements to extract\n (if empty, then extract all elements)\n and are among the following:\n [--out|-o ] Output directory into which to write elements\n (if unspecified, use the current working directory)\n\n delete [ ]+\n where:\n is an AVM file,\n [ ]+ is a list of one or more elements to delete,\n and are among the following:\n [--out|-o ] Output AVM file\n\n version\n Print version and exit\n\n help\n Print this help\n\nThe `packbeam` command will return an exit status of 0 on successful completion of a command. An unspecified non-zero value is returned in the event of an error.\n\nThe `packbeam` sub-commands are described in more detail below.\n\n### `create` sub-command\n\nTo create an AVM file from a list of beam files, use the `create` sub-command to create an AVM file. The first argument is take to be the output AVM file, following by the files you would like to add, e.g.,\n\n shell$ packbeam create mylib.avm mylib/ebin/mylib.beam mylib/ebin/foo.beam mylib/ebin/bar.beam\n\nThis command will create an AtomVM AVM file suitable for use with AtomVM.\n\nThe input files specified in the create subcommand may be among the following types:\n\n* compiled BEAM files (typically ending in `.beam`)\n* Previously created AVM files\n* \"Normal\" files, e.g., text files, binary files, etc.\n\nNote that beam files specified are stripped of their path information, inside of the generated AVM file. Any files that have the same name will be added in the order they are listed on the command line. However, AtomVM will only resolve the first such file when loading modules at run-time.\n\n##","ref":"readme.html#build","title":"Build - atomvvm_packbeam","type":"extras"},{"doc":"If you are building an application that provides a start entrypoint (as opposed to a library, suitable for inclusion in another AVM file), then at least one beam module in an AVM file must contain a `start/0` entry-point, i.e., a function called `start` with arity 0. AtomVM will use this entry-point as the first function to execute, when starting.\n\n> Note. It is conventional, but not required, that the first beam file in an AVM file contains the `start/0` entry-point. AtomVM will use the first BEAM file that contains an exported `start/0` function as the entry-point for the application.\n\nIf your application has multiple modules with exported `start/0` functions, you may use the `--start ` (alternatively, `-s `) option to specify the module you would like placed first in your AVM file. The ` ` parameter should be the module name (without the `.beam` suffix, e.g., `main`).\n\nA previously created AVM file file may be supplied as input (including the same file specified as output, for example). The contents of any input AVM files will be included in the output AVM file. For example, if you are building a library of BEAM files (for example, none of which contain a `start/0` entry-point), you may want to archive these into an AVM file, which can be used for downstream applications.\n\nIn addition, you may specify a \"normal\" (i.e., non-beam or non-AVM) file. Normal files are labeled with the path specified on the command line.\n\n shell$ packbeam create mylib.avm mylib.avm mylib/priv/sample.txt\n\n> Note. It is conventional in AtomVM for normal files to have the path ` /priv/ `.\n\n##","ref":"readme.html#start-entrypoint","title":"Start Entrypoint - atomvvm_packbeam","type":"extras"},{"doc":"If you specify the `--prune` (alternatively, `-p`) flag, then `packbeam` will only include beam files that are transitively dependent on the entry-point beam. Transitive dependencies are determined by imports, as well as use of an atom in a module (e.g, as the result of a dynamic function call, based on a module name).\n\nIf there is no beam file with a `start/0` entry-point defined in the list of input modules and the `--prune` flag is used, the command will fail. You should _not_ use the `--prune` flag if you are trying to build libraries suitable for inclusion on other AtomVM applications.\n\n##","ref":"readme.html#pruning","title":"Pruning - atomvvm_packbeam","type":"extras"},{"doc":"By default, the `packbeam` tool will generate line number information for embedded BEAM files. Line number information is included in Erlang stacktraces, giving developers more clues into bugs in their programs. However, line number information does increase the size of AVM files, and in some cases can have an impact on memory in running applications.\n\nFor production applications that have no need for line number information, we recommend using the `-r` (or `--remove_lines`) flags, which will strip line number information from embedded BEAM files.\n\n### `list` sub-command\n\nThe `list` sub-command will print the contents of an AVM file to the standard output stream.\n\nTo list the elements of an AVM file, specify the location of the AVM file to input as the first argument:\n\n shell$ packbeam list mylib.avm\n mylib.beam * [284]\n foo.beam [276]\n bar.beam [252]\n mylib/priv/sample.txt [29]\n\nThe elements in the AVM file are printed to the standard output stream and are listed on each line. If a beam file contain an exported `start/0` function, it will be marked with an asterisk (`*`). The size in bytes of each module is also printed in square brackets (`[]`).\n\nYou may use the `--format` (alternatively, `-f`) option to specify an output format. The supported formats are:\n\n* `csv` Output elements in comma-separated value format. Fields include the module name, whether the element is a BEAM file, whether the element provides a `start/0` entrypoint, and the size (in bytes) of the element.\n* `bare` Output just the module name, with no annotations.\n* `default` Output the module name, size (in brackets), and whether the file provides a `start/0` entrypoint, indicated by an asterisk (`*`). The `default` output is used if the `--format` option is not specified.\n\n### `extract` sub-command\n\nThe `extract` sub-command can be used to extract elements from an AVM file.\n\nTo extract one or more elements from an AVM file, specify the location of the AVM file from which to extract elements, followed by the list of elements (as displayed via the `list` sub-command) to extract. If no elements are listed, then all elements from the AVM file will be extracted.\n\nNon-BEAM (\"normal\") files that contain paths in their names will be extracted into a directory tree that reflects the path used in the element name. For example, if the element name is `mylib/priv/sample.txt`, then the `sample.txt` file will be extracted into the `mylib/priv` directory (relative to the output directory, detailed below).\n\nYou may optionally specify an output directory using the `--out` option, which will contain the extracted contents of the input AVM file. This directory must exist beforehand, or a runtime error will occur. If no output directory is specified, elements will be extracted into the current working directory.\n\n\nFor example:\n\n shell$ mkdir mydir\n shell$ packbeam extract -out mydir mylib.avm foo.beam mylib/priv/sample.txt\n Writing to mydir ...\n x foo.beam\n x mylib/priv/sample.txt\n\n\n### `delete` sub-command\n\nThe `delete` sub-command can be used to remove elements from an AVM file.\n\nTo delete one or more elements from an AVM file, specify the location of the AVM file from which to remove elements, followed by the list of elements (as displayed via the `list` sub-command) to remove. You may optionally specify an output AVM file using the `--out` option, which will contain the contents of the input AVM file, minus the specified elements. If no output AVM is specified, the input AVM file will be overwritten.\n\nFor example:\n\n shell$ packbeam delete -out mylib2.avm mylib.avm foo.beam bar.beam\n shell$ packbeam list mylib2.avm\n mylib.beam * [284]\n mylib/priv/sample.txt [29]\n\n## `packbeam_api` API\n\nIn addition to being an `escript` command-line utility, this project provides an Erlang API and library for manipulating AVM files. Simply include `atomvm_packbeam` as a dependency in your `rebar.config`, and you will have access to this API.\n\n> For more detailed information about this API, see the [`packbeam_api` Reference](packbeam_api.html).\n\n#","ref":"readme.html#line-number-information","title":"Line number information - atomvvm_packbeam","type":"extras"},{"doc":"To create a PackBEAM file, use the `packbeam_api:create/2` function. Specify the output path of the AVM you would like to create, followed by a list of paths to the files that will go into the AVM file. Typically, these paths are a list of BEAM files, though you can also include plain data files, in addition to previously created AVM files. Previously-created AVM files will be copied into the output AVM file.\n\n> Note. Specify the file system paths to all files. BEAM file path information will be stripped from the AVM element path data. Any plain data files (non-BEAM files) will retain their path information. See the [AtomVM Documentation](https://www.atomvm.net/doc/master/) about how to create plain data files in AVM files that users can retrieved via the `atomvm:read_priv/2` function.\n\n %% erlang\n ok = packbeam_api:create(\n \"/path/to/output.avm\", [\n \"/path/to/foo.beam\",\n \"/path/to/bar.beam\",\n \"/path/to/myapp/priv/sample.txt\",\n \"/path/to/some_lib.avm\"\n ]\n ).\n\nAlternatively, you may specify a set of options with the `packbeam_api:create/3` function, which takes a map as the third parameter.\n\n| Key | Type | Deafult | Description |\n|-----|------|---------|-------------|\n| `prune` | `boolean()` | `false` | Specify whether to prune the output AVM file. Pruned AVM files can take considerably less space and hence may lead to faster development times. |\n| `start` | `module()` | n/a | Specify the start module, if it can't be determined automatically from the application. |\n| `application` | `module()` | n/a | Specify the application module. The ` .app` file will be encoded and included as an element in the AVM file with the path ` /priv/application.bin` |\n| `include_lines` | `boolean()` | `true` | Specify whether to include line number information in generated AVM files. |\n\n#","ref":"readme.html#creating-packbeam-files","title":"Creating PackBEAM files - atomvvm_packbeam","type":"extras"},{"doc":"You can list the contents of PackBEAM files using the `packbeam_api:list/1` function. Specify the file system path to the PackBEAM file you would like to list:\n\n %% erlang\n AVMElements = packbeam_api:list(\"/path/to/input.avm\").\n\nThe returned `AVMElements` is list of an opaque data structures and should not be interpreted by user applications. However, several functions are exposed to retrieve information about elements in this list.\n\nTo get the element name, use the `packbeam_api:get_element_name/1` function, passing in an AVM element. The return type is a `string()` and represents the path in the AVM file for the AVM element.\n\n %% erlang\n AVMElementName = packbeam_api:get_element_name(AVMElement).\n\nTo get the element data (as a binary) use the `packbeam_api:get_element_data/1` function, passing in an AVM element. The return type is a `binary()` containing the actual data in the AVM element.\n\n %% erlang\n AVMElementData = packbeam_api:get_element_data(AVMElement).\n\nTo get the element module (as an atom) use the `packbeam_api:get_element_module/1` function, passing in an AVM element. The return type is a `module()` and the module name of the AVM element.\n\nNote that if the AVM element is not a BEAM file, this function returns `undefined`.\n\n %% erlang\n AVMElementModule = packbeam_api:get_element_module(AVMElement).\n\nTo determine if the element is a BEAM file, use the `packbeam_api:is_beam/1` function, passing in an AVM element. The return value is a `boolean()`.\n\n %% erlang\n IsBEAM = packbeam_api:is_beam(AVMElement).\n\nTo determine if the element is an entrypoint BEAM (i.e., it exports a `start/0` function), use the `packbeam_api:is_entrypoint/1` function, passing in an AVM element. The return value is a `boolean()`.\n\n %% erlang\n IsEntrypoint = packbeam_api:is_entrypoint(AVMElement).\n\n#","ref":"readme.html#listing-the-contents-of-packbeam-files","title":"Listing the contents of PackBEAM files - atomvvm_packbeam","type":"extras"},{"doc":"You can delete entries from an AVM file using the `packbeam_api:delete/3` function. Specify the file system path to the PackBEAM file you would like to delete from, the output path you would like to write the new AVM file to, and a list of AVM elements you would like to delete:\n\n %% erlang\n ok = packbeam_api:delete(\n \"/path/to/input.avm\",\n \"/path/to/ouput.avm\",\n [\"foo.beam\", \"myapp/priv/sample.txt\"]\n ).\n\n> Note. You may specify the same values for the input and output paths. In this case, the input AVM file will be _over-written_ by the new AVM file.\n\n#","ref":"readme.html#deleting-entries-from-packbeam-files","title":"Deleting entries from PackBEAM files - atomvvm_packbeam","type":"extras"},{"doc":"You can extract elements from an AVM file using the `packbeam_api:extract/3` function. Specify the file system path to the PackBEAM file you would like to extract from, a list of AVM elements you would like to extract, and the output directory into which would like to extract the files:\n\n %% erlang\n ok = packbeam_api:extract(\n \"/path/to/input.avm\",\n [\"foo.beam\", \"myapp/priv/sample.txt\"],\n \"/tmp\"\n ).","ref":"readme.html#extracting-entries-from-packbeam-files","title":"Extracting entries from PackBEAM files - atomvvm_packbeam","type":"extras"},{"doc":"# Changelog\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [0.7.0]\n\n- Added `version` sub-command to print version to the console\n- Added `-r`, `--remove` option and removed the `-i`, `--include` option, which was ineffective due to a bug. See the [Updating](UPDATING.md) notes on the impact of these changes.\n\n## [0.6.2]\n\n- Added `relx` stanzas to create a standalone release of the `packbeam` utility\n- Added install scripts to simplify installation for users\n\n## [0.6.1]\n\n- Added `extract` sub-command\n\n## [0.6.0]\n\n#","ref":"changelog.html","title":"Changelog","type":"extras"},{"doc":"- Added ability to include ` >` chunks in BEAM files in generated AVM files\n- Added CI build\n\n#","ref":"changelog.html#added","title":"Added - Changelog","type":"extras"},{"doc":"- Changed the `packbeam_api:create` function to take a single map for optional\nparameters, instead of coding paramters into function arguments. Previous\nversions of the `packbeam_api:create` function that take optional parameters\nhave been deprecated.\n\n## [0.5.0]\n\n#","ref":"changelog.html#changed","title":"Changed - Changelog","type":"extras"},{"doc":"- Added ability to specify a module name for ordinary (non-BEAM) files (API-only).\n- Added support for tracking dependencies using application spec files as binaries\n(API-only)\n- Added PropEr test\n- Added new `format` option to the `list` subcommand, supporting `csv`, `bare`,\nand `default` options.\n\n#","ref":"changelog.html#added","title":"Added - Changelog","type":"extras"},{"doc":"- Fixed a bug in parsing non-BEAM files in included AVM files, which would cause\n non-BEAM file contents to be loaded incorrectly.\n\n#","ref":"changelog.html#fixed","title":"Fixed - Changelog","type":"extras"},{"doc":"- Changed the command line syntax to support long and short option names using\nGNU-style conventions; deprecated single-hyphen short options.\n- Moved `packbeam` API functionality into `packbeam_api` module.\nPrevious `packbeam` API functions now call corresponding `packbeam_api`\nfunctions and are deprecated.\n\n## [0.4.1]\n\n#","ref":"changelog.html#changed","title":"Changed - Changelog","type":"extras"},{"doc":"- Added unit tests\n\n#","ref":"changelog.html#added","title":"Added - Changelog","type":"extras"},{"doc":"- Fixed a bug that failed to track atoms that occur in BEAM LitT tables\n\n#","ref":"changelog.html#fixed","title":"Fixed - Changelog","type":"extras"},{"doc":"- Weakened the test for finding a start BEAM file such that it only requires that the `?BEAM_START_FLAG` be set, for compatibility with [ExAtomVM](https://github.com/atomvm/ExAtomVM).\n\n## [0.4.0]\n\n#","ref":"changelog.html#changed","title":"Changed - Changelog","type":"extras"},{"doc":"- Added `erlfmt` plugin and formatted code.\n\n#","ref":"changelog.html#added","title":"Added - Changelog","type":"extras"},{"doc":"- Fixed a bug that prevented packbeam files that include priv files from being properly loaded.\n\n## [0.3.0]\n\n#","ref":"changelog.html#fixed","title":"Fixed - Changelog","type":"extras"},{"doc":"- Fixed a bug in pulling in dependent BEAM files based on the atoms table\n\n## [0.2.0]\n\n#","ref":"changelog.html#fixed","title":"Fixed - Changelog","type":"extras"},{"doc":"- Added support for deployment to hex\n\n#","ref":"changelog.html#added","title":"Added - Changelog","type":"extras"},{"doc":"- Uncompressed literals table\n\n## [0.1.0]\n- Initial Release","ref":"changelog.html#fixed","title":"Fixed - Changelog","type":"extras"},{"doc":"SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later\n-->\n\n# AtomVM Update Instructions","ref":"updating.html","title":"AtomVM Update Instructions","type":"extras"},{"doc":"- The default behavior of not generating line number information in BEAM files has changed. By default, line number information will be generated in BEAM files. You can remove line number information using from BEAM files by using the `-r` (or `--remove_lines`) flags to the `create` subcommand. Note that in versions 0.6 of this tool, the `--include_lines` flag was ignored due to a bug in the code.","ref":"updating.html#0-6-0-7","title":"0.6.* -> 0.7.* - AtomVM Update Instructions","type":"extras"},{"doc":"Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n Copyright 2020, Fred Dushin .\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.","ref":"license.html","title":"LICENSE","type":"extras"},{"doc":"SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later\n-->\n\n# Contributing\n\nBefore contributing, please read carefully our [Code of Conduct](CODE_OF_CONDUCT.md) and\nthe following contribution guidelines.\n\nPlease, also make sure to understand the [Apache 2.0 license](LICENSE.md) and the\n[Developer Certificate of Origin](https://developercertificate.org/).\n\nLast but not least, **do not use GitHub issues for vulnerability reports**, read instead the\n[security policy](SECURITY.md) for instructions.","ref":"contributing.html","title":"Contributing","type":"extras"},{"doc":"* Commit messages should have a\n* [summary and a description](https://github.com/erlang/otp/wiki/writing-good-commit-messages)\n* Avoid trailing white spaces\n* Always `git pull --rebase`\n* [Clean up your branch history](https://git-scm.com/book/id/v2/Git-Tools-Rewriting-History) with\n`git rebase -i`\n* All your intermediate commits should build","ref":"contributing.html#git-recommended-practises","title":"Git Recommended Practises - Contributing","type":"extras"},{"doc":"#","ref":"contributing.html#coding-style","title":"Coding Style - Contributing","type":"extras"},{"doc":"##","ref":"contributing.html#c-code","title":"C Code - Contributing","type":"extras"},{"doc":"* [K&R identation and braces style](https://en.wikipedia.org/wiki/Indentation_style#K&R_style)\n* [Mandatory braces](https://en.wikipedia.org/wiki/Indentation_style#Variant:_mandatory_braces)\n* 4 spaces identation\n\nGood:\n```\nvoid f(int reverse)\n{\n if (reverse) {\n puts(\"!dlroW olleH\");\n } else {\n puts(\"Hello world\");\n }\n}\n```\n\nBad:\n```\nvoid f(int reverse) {\n if (reverse)\n puts (\"!dlroW olleH\");\n else\n puts (\"Hello world\");\n}\n```\n\n##","ref":"contributing.html#identation","title":"Identation - Contributing","type":"extras"},{"doc":"* Struct names are PascalCase (e.g. Context)\n* Scalar types are lower case (e.g. term)\n* All other names (e.g. functions and variables) are snake_case (e.g. term_is_integer)\n* Always prefix function names (e.g. term_is_nil, term_is_integer, context_new, context_destroy)\n\n##","ref":"contributing.html#names","title":"Names - Contributing","type":"extras"},{"doc":"* Pointer * should be with the variable name rather than with the type (e.g. `char *name`, not\n`char* name`)\n* Avoid long lines, use intermediate variables with meaningful names.\n\n#","ref":"contributing.html#other-coding-conventions","title":"Other Coding Conventions - Contributing","type":"extras"},{"doc":"Just use Elixir formatter enforced style.","ref":"contributing.html#elixir-code","title":"Elixir Code - Contributing","type":"extras"},{"doc":"# Contributor Covenant Code of Conduct","ref":"code_of_conduct.html","title":"Contributor Covenant Code of Conduct","type":"extras"},{"doc":"We as members, contributors, and leaders pledge to make participation in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, religion, or sexual identity\nand orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.","ref":"code_of_conduct.html#our-pledge","title":"Our Pledge - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"Examples of behavior that contributes to a positive environment for our\ncommunity include:\n\n* Demonstrating empathy and kindness toward other people\n* Being respectful of differing opinions, viewpoints, and experiences\n* Giving and gracefully accepting constructive feedback\n* Accepting responsibility and apologizing to those affected by our mistakes,\n and learning from the experience\n* Focusing on what is best not just for us as individuals, but for the\n overall community\n\nExamples of unacceptable behavior include:\n\n* The use of sexualized language or imagery, and sexual attention or\n advances of any kind\n* Trolling, insulting or derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or email\n address, without their explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n professional setting","ref":"code_of_conduct.html#our-standards","title":"Our Standards - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"Community leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.","ref":"code_of_conduct.html#enforcement-responsibilities","title":"Enforcement Responsibilities - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"This Code of Conduct applies within all community spaces, and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official e-mail address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.","ref":"code_of_conduct.html#scope","title":"Scope - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"Instances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at\ndavide AT uninstall.it.\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.","ref":"code_of_conduct.html#enforcement","title":"Enforcement - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"Community leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n#","ref":"code_of_conduct.html#enforcement-guidelines","title":"Enforcement Guidelines - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n#","ref":"code_of_conduct.html#1-correction","title":"1. Correction - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"**Community Impact**: A violation through a single incident or series\nof actions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or\npermanent ban.\n\n#","ref":"code_of_conduct.html#2-warning","title":"2. Warning - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n#","ref":"code_of_conduct.html#3-temporary-ban","title":"3. Temporary Ban - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior, harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within\nthe community.","ref":"code_of_conduct.html#4-permanent-ban","title":"4. Permanent Ban - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"This Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.0, available at\nhttps://www.contributor-covenant.org/version/2/0/code_of_conduct.html.\n\nCommunity Impact Guidelines were inspired by [Mozilla's code of conduct\nenforcement ladder](https://github.com/mozilla/diversity).\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see the FAQ at\nhttps://www.contributor-covenant.org/faq. Translations are available at\nhttps://www.contributor-covenant.org/translations.","ref":"code_of_conduct.html#attribution","title":"Attribution - Contributor Covenant Code of Conduct","type":"extras"}]} \ No newline at end of file diff --git a/www/dist/search_data-BA62C2F8.js b/www/dist/search_data-BA62C2F8.js new file mode 100644 index 0000000..090f3cc --- /dev/null +++ b/www/dist/search_data-BA62C2F8.js @@ -0,0 +1 @@ +searchData={"content_type":"text/plain","items":[{"doc":"An escript and OTP library used to generate an AtomVM AVM file from a set of files (beam files, previously built AVM files, or even arbitrary data files).","ref":"packbeam.html","title":"packbeam","type":"module"},{"doc":"Deprecated. Use the packbeam_api module, instead.","ref":"packbeam.html#create/2","title":"packbeam.create/2","type":"function"},{"doc":"Deprecated. Use the packbeam_api module, instead.","ref":"packbeam.html#create/4","title":"packbeam.create/4","type":"function"},{"doc":"Deprecated. Use the packbeam_api module, instead.","ref":"packbeam.html#delete/3","title":"packbeam.delete/3","type":"function"},{"doc":"Deprecated. Use the packbeam_api module, instead.","ref":"packbeam.html#list/1","title":"packbeam.list/1","type":"function"},{"doc":null,"ref":"packbeam.html#main/1","title":"packbeam.main/1","type":"function"},{"doc":"A library used to generate an AtomVM AVM file from a set of files (beam files, previously built AVM files, or even arbitrary data files).","ref":"packbeam_api.html","title":"packbeam_api","type":"module"},{"doc":"Create an AVM file. Equivalent to create(OutputPath, InputPaths, DefaultOptions) where DefaultOptions is #{ prune => false, start_module => undefined, application_module => undefined, include_lines => false }","ref":"packbeam_api.html#create/2","title":"packbeam_api.create/2","type":"function"},{"doc":"Create an AVM file. This function will create an AVM file at the location specified in OutputPath, using the input files specified in InputPaths.","ref":"packbeam_api.html#create/3","title":"packbeam_api.create/3","type":"function"},{"doc":null,"ref":"packbeam_api.html#create/4","title":"packbeam_api.create/4","type":"function"},{"doc":null,"ref":"packbeam_api.html#create/5","title":"packbeam_api.create/5","type":"function"},{"doc":"Delete selected elements of an AVM file. This function will delete elements of an AVM file at the location specified in InputPath, specified by the supplied list of names. The output AVM file is written to OutputPath, which may be the same as InputPath.","ref":"packbeam_api.html#delete/3","title":"packbeam_api.delete/3","type":"function"},{"doc":"Extract all or selected elements from an AVM file. This function will extract elements of an AVM file at the location specified in InputPath, specified by the supplied list of names. The elements from the input AVM file will be written into the specified output directory, creating any subdirectories if the AVM file elements contain path information.","ref":"packbeam_api.html#extract/3","title":"packbeam_api.extract/3","type":"function"},{"doc":"Return AVM element data.","ref":"packbeam_api.html#get_element_data/1","title":"packbeam_api.get_element_data/1","type":"function"},{"doc":"Return AVM element module, if the element is a BEAM file.","ref":"packbeam_api.html#get_element_module/1","title":"packbeam_api.get_element_module/1","type":"function"},{"doc":"Return the name of the element.","ref":"packbeam_api.html#get_element_name/1","title":"packbeam_api.get_element_name/1","type":"function"},{"doc":"Indicates whether the AVM file element is a BEAM file.","ref":"packbeam_api.html#is_beam/1","title":"packbeam_api.is_beam/1","type":"function"},{"doc":"Indicates whether the AVM file element is an entrypoint.","ref":"packbeam_api.html#is_entrypoint/1","title":"packbeam_api.is_entrypoint/1","type":"function"},{"doc":"List the contents of an AVM file. This function will list the contents of an AVM file at the location specified in InputPath.","ref":"packbeam_api.html#list/1","title":"packbeam_api.list/1","type":"function"},{"doc":null,"ref":"packbeam_api.html#t:avm_element/0","title":"packbeam_api.avm_element/0","type":"opaque"},{"doc":null,"ref":"packbeam_api.html#t:avm_element_name/0","title":"packbeam_api.avm_element_name/0","type":"type"},{"doc":null,"ref":"packbeam_api.html#t:options/0","title":"packbeam_api.options/0","type":"type"},{"doc":null,"ref":"packbeam_api.html#t:path/0","title":"packbeam_api.path/0","type":"type"},{"doc":"# `atomvvm_packbeam`\n\nAn Erlang Escript and library used to generate an [AtomVM](http://github.com/atomvm/AtomVM) AVM file from a set of files (beam files, previously built AVM files, or even arbitrary data files).\n\nThis tool roughly approximates the functionality of the AtomVM `PackBEAM` utility, except:\n\n* Support for multiple data types, include beam files, text files, etc\n* \"Pruned\" extraction of beams from AVM files, so that only the beams that are needed are packed\n* Support for embedded OTP applications in your PackBEAM files.\n\nThe `packbeam` tool may be used on its own as a stand-alone command-line utility. More typically, it is used internally as part of the [`atomvm_rebar3_plugin`](https://github.com/atomvm/atomvm_rebar3_plugin) [`rebar3`](https://rebar3.org) plugin.","ref":"readme.html","title":"atomvvm_packbeam","type":"extras"},{"doc":"Building `packbeam` requires a version of Erlang/OTP compatible with [AtomVM](https://github.com/atomvm/AtomVM), as well as a local installation of [`rebar3`](https://rebar3.org). Optionally, any recent version of `make` may be used to simplify builds. Consult the [AtomVM Documentation](https://www.atomvm.net/doc/master/) for information about supported OTP versions.","ref":"readme.html#prerequisites","title":"Prerequisites - atomvvm_packbeam","type":"extras"},{"doc":"To build a release, run the following commands:\n\n shell$ rebar3 release\n shell$ rebar3 tar\n\nThese commands will create an Erlang tar archive containing a versioned release of the `atomvm_packbeam` tool, e.g.,\n\n ...\n ===> Tarball successfully created: _build/prod/rel/atomvm_packbeam/atomvm_packbeam-0.6.2.tar.gz\n\nin your local working directory.\n\n> IMPORTANT! The files in this tar archive do not contain the `atomvm_packbeam` prefix, so extracting these files without care will create a `bin` and `lib` directory in the location into which files from the archive is extracted. See the example below before proceeding!\n\nYou can use the `install.sh` script to install the `atomvm_packbeam` utility into a location on your local machine. You will need to specify the prefix location into which you want to install the utility, together with it's current version.\n\n shell$ ./install.sh /opt/atomvm_packbeam 0.6.2\n atomvm_packbeam version 0.6.2 installed in /opt/atomvm_packbeam.\n\n> Note. Some prefix locations may require `root` permissions to write files to.\n\nSet your `PATH` environment variable to include the `bin` directory of the installation prefix (if not already set), and you should then be able to run the `packbeam` command included therein.\n\nFor example:\n\n shell$ export PATH=/opt/atomvm_packbeam/bin:$PATH\n shell$ packbeam help\n Syntax:\n packbeam \n ...\n\n## `packbeam` command\n\nThe `packbeam` command is used to create an AVM file from a list of beam and other file types, to list the contents of an AVM file, or to delete elements from an AVM file.\n\nThe general syntax of the `packbeam` command takes the form:\n\n packbeam \n\nOn-line help is available via the `help` sub-command:\n\n shell$ packbeam help\n\n packbeam version 0.7.0\n\n Syntax:\n packbeam \n\n The following sub-commands are supported:\n\n create [ ]+\n where:\n is the output AVM file,\n [ ]+ is a list of one or more input files,\n and are among the following:\n [--prune|-p] Prune dependencies\n [--start|-s ] Start module\n [--remove_lines|-r] Remove line number information from AVM files\n\n list \n where:\n is an AVM file,\n and are among the following:\n [--format|-f csv|bare|default] Format output\n\n extract [ ]*\n where:\n is an AVM file,\n [ ]+ is a list of one or more elements to extract\n (if empty, then extract all elements)\n and are among the following:\n [--out|-o ] Output directory into which to write elements\n (if unspecified, use the current working directory)\n\n delete [ ]+\n where:\n is an AVM file,\n [ ]+ is a list of one or more elements to delete,\n and are among the following:\n [--out|-o ] Output AVM file\n\n version\n Print version and exit\n\n help\n Print this help\n\nThe `packbeam` command will return an exit status of 0 on successful completion of a command. An unspecified non-zero value is returned in the event of an error.\n\nThe `packbeam` sub-commands are described in more detail below.\n\n### `create` sub-command\n\nTo create an AVM file from a list of beam files, use the `create` sub-command to create an AVM file. The first argument is take to be the output AVM file, following by the files you would like to add, e.g.,\n\n shell$ packbeam create mylib.avm mylib/ebin/mylib.beam mylib/ebin/foo.beam mylib/ebin/bar.beam\n\nThis command will create an AtomVM AVM file suitable for use with AtomVM.\n\nThe input files specified in the create subcommand may be among the following types:\n\n* compiled BEAM files (typically ending in `.beam`)\n* Previously created AVM files\n* \"Normal\" files, e.g., text files, binary files, etc.\n\nNote that beam files specified are stripped of their path information, inside of the generated AVM file. Any files that have the same name will be added in the order they are listed on the command line. However, AtomVM will only resolve the first such file when loading modules at run-time.\n\n##","ref":"readme.html#build","title":"Build - atomvvm_packbeam","type":"extras"},{"doc":"If you are building an application that provides a start entrypoint (as opposed to a library, suitable for inclusion in another AVM file), then at least one beam module in an AVM file must contain a `start/0` entry-point, i.e., a function called `start` with arity 0. AtomVM will use this entry-point as the first function to execute, when starting.\n\n> Note. It is conventional, but not required, that the first beam file in an AVM file contains the `start/0` entry-point. AtomVM will use the first BEAM file that contains an exported `start/0` function as the entry-point for the application.\n\nIf your application has multiple modules with exported `start/0` functions, you may use the `--start ` (alternatively, `-s `) option to specify the module you would like placed first in your AVM file. The ` ` parameter should be the module name (without the `.beam` suffix, e.g., `main`).\n\nA previously created AVM file file may be supplied as input (including the same file specified as output, for example). The contents of any input AVM files will be included in the output AVM file. For example, if you are building a library of BEAM files (for example, none of which contain a `start/0` entry-point), you may want to archive these into an AVM file, which can be used for downstream applications.\n\nIn addition, you may specify a \"normal\" (i.e., non-beam or non-AVM) file. Normal files are labeled with the path specified on the command line.\n\n shell$ packbeam create mylib.avm mylib.avm mylib/priv/sample.txt\n\n> Note. It is conventional in AtomVM for normal files to have the path ` /priv/ `.\n\n##","ref":"readme.html#start-entrypoint","title":"Start Entrypoint - atomvvm_packbeam","type":"extras"},{"doc":"If you specify the `--prune` (alternatively, `-p`) flag, then `packbeam` will only include beam files that are transitively dependent on the entry-point beam. Transitive dependencies are determined by imports, as well as use of an atom in a module (e.g, as the result of a dynamic function call, based on a module name).\n\nIf there is no beam file with a `start/0` entry-point defined in the list of input modules and the `--prune` flag is used, the command will fail. You should _not_ use the `--prune` flag if you are trying to build libraries suitable for inclusion on other AtomVM applications.\n\n##","ref":"readme.html#pruning","title":"Pruning - atomvvm_packbeam","type":"extras"},{"doc":"By default, the `packbeam` tool will generate line number information for embedded BEAM files. Line number information is included in Erlang stacktraces, giving developers more clues into bugs in their programs. However, line number information does increase the size of AVM files, and in some cases can have an impact on memory in running applications.\n\nFor production applications that have no need for line number information, we recommend using the `-r` (or `--remove_lines`) flags, which will strip line number information from embedded BEAM files.\n\n### `list` sub-command\n\nThe `list` sub-command will print the contents of an AVM file to the standard output stream.\n\nTo list the elements of an AVM file, specify the location of the AVM file to input as the first argument:\n\n shell$ packbeam list mylib.avm\n mylib.beam * [284]\n foo.beam [276]\n bar.beam [252]\n mylib/priv/sample.txt [29]\n\nThe elements in the AVM file are printed to the standard output stream and are listed on each line. If a beam file contain an exported `start/0` function, it will be marked with an asterisk (`*`). The size in bytes of each module is also printed in square brackets (`[]`).\n\nYou may use the `--format` (alternatively, `-f`) option to specify an output format. The supported formats are:\n\n* `csv` Output elements in comma-separated value format. Fields include the module name, whether the element is a BEAM file, whether the element provides a `start/0` entrypoint, and the size (in bytes) of the element.\n* `bare` Output just the module name, with no annotations.\n* `default` Output the module name, size (in brackets), and whether the file provides a `start/0` entrypoint, indicated by an asterisk (`*`). The `default` output is used if the `--format` option is not specified.\n\n### `extract` sub-command\n\nThe `extract` sub-command can be used to extract elements from an AVM file.\n\nTo extract one or more elements from an AVM file, specify the location of the AVM file from which to extract elements, followed by the list of elements (as displayed via the `list` sub-command) to extract. If no elements are listed, then all elements from the AVM file will be extracted.\n\nNon-BEAM (\"normal\") files that contain paths in their names will be extracted into a directory tree that reflects the path used in the element name. For example, if the element name is `mylib/priv/sample.txt`, then the `sample.txt` file will be extracted into the `mylib/priv` directory (relative to the output directory, detailed below).\n\nYou may optionally specify an output directory using the `--out` option, which will contain the extracted contents of the input AVM file. This directory must exist beforehand, or a runtime error will occur. If no output directory is specified, elements will be extracted into the current working directory.\n\n\nFor example:\n\n shell$ mkdir mydir\n shell$ packbeam extract -out mydir mylib.avm foo.beam mylib/priv/sample.txt\n Writing to mydir ...\n x foo.beam\n x mylib/priv/sample.txt\n\n\n### `delete` sub-command\n\nThe `delete` sub-command can be used to remove elements from an AVM file.\n\nTo delete one or more elements from an AVM file, specify the location of the AVM file from which to remove elements, followed by the list of elements (as displayed via the `list` sub-command) to remove. You may optionally specify an output AVM file using the `--out` option, which will contain the contents of the input AVM file, minus the specified elements. If no output AVM is specified, the input AVM file will be overwritten.\n\nFor example:\n\n shell$ packbeam delete -out mylib2.avm mylib.avm foo.beam bar.beam\n shell$ packbeam list mylib2.avm\n mylib.beam * [284]\n mylib/priv/sample.txt [29]\n\n## `packbeam_api` API\n\nIn addition to being an `escript` command-line utility, this project provides an Erlang API and library for manipulating AVM files. Simply include `atomvm_packbeam` as a dependency in your `rebar.config`, and you will have access to this API.\n\n> For more detailed information about this API, see the [`packbeam_api` Reference](packbeam_api.html).\n\n#","ref":"readme.html#line-number-information","title":"Line number information - atomvvm_packbeam","type":"extras"},{"doc":"To create a PackBEAM file, use the `packbeam_api:create/2` function. Specify the output path of the AVM you would like to create, followed by a list of paths to the files that will go into the AVM file. Typically, these paths are a list of BEAM files, though you can also include plain data files, in addition to previously created AVM files. Previously-created AVM files will be copied into the output AVM file.\n\n> Note. Specify the file system paths to all files. BEAM file path information will be stripped from the AVM element path data. Any plain data files (non-BEAM files) will retain their path information. See the [AtomVM Documentation](https://www.atomvm.net/doc/master/) about how to create plain data files in AVM files that users can retrieved via the `atomvm:read_priv/2` function.\n\n %% erlang\n ok = packbeam_api:create(\n \"/path/to/output.avm\", [\n \"/path/to/foo.beam\",\n \"/path/to/bar.beam\",\n \"/path/to/myapp/priv/sample.txt\",\n \"/path/to/some_lib.avm\"\n ]\n ).\n\nAlternatively, you may specify a set of options with the `packbeam_api:create/3` function, which takes a map as the third parameter.\n\n| Key | Type | Deafult | Description |\n|-----|------|---------|-------------|\n| `prune` | `boolean()` | `false` | Specify whether to prune the output AVM file. Pruned AVM files can take considerably less space and hence may lead to faster development times. |\n| `start` | `module()` | n/a | Specify the start module, if it can't be determined automatically from the application. |\n| `application` | `module()` | n/a | Specify the application module. The ` .app` file will be encoded and included as an element in the AVM file with the path ` /priv/application.bin` |\n| `include_lines` | `boolean()` | `true` | Specify whether to include line number information in generated AVM files. |\n\n#","ref":"readme.html#creating-packbeam-files","title":"Creating PackBEAM files - atomvvm_packbeam","type":"extras"},{"doc":"You can list the contents of PackBEAM files using the `packbeam_api:list/1` function. Specify the file system path to the PackBEAM file you would like to list:\n\n %% erlang\n AVMElements = packbeam_api:list(\"/path/to/input.avm\").\n\nThe returned `AVMElements` is list of an opaque data structures and should not be interpreted by user applications. However, several functions are exposed to retrieve information about elements in this list.\n\nTo get the element name, use the `packbeam_api:get_element_name/1` function, passing in an AVM element. The return type is a `string()` and represents the path in the AVM file for the AVM element.\n\n %% erlang\n AVMElementName = packbeam_api:get_element_name(AVMElement).\n\nTo get the element data (as a binary) use the `packbeam_api:get_element_data/1` function, passing in an AVM element. The return type is a `binary()` containing the actual data in the AVM element.\n\n %% erlang\n AVMElementData = packbeam_api:get_element_data(AVMElement).\n\nTo get the element module (as an atom) use the `packbeam_api:get_element_module/1` function, passing in an AVM element. The return type is a `module()` and the module name of the AVM element.\n\nNote that if the AVM element is not a BEAM file, this function returns `undefined`.\n\n %% erlang\n AVMElementModule = packbeam_api:get_element_module(AVMElement).\n\nTo determine if the element is a BEAM file, use the `packbeam_api:is_beam/1` function, passing in an AVM element. The return value is a `boolean()`.\n\n %% erlang\n IsBEAM = packbeam_api:is_beam(AVMElement).\n\nTo determine if the element is an entrypoint BEAM (i.e., it exports a `start/0` function), use the `packbeam_api:is_entrypoint/1` function, passing in an AVM element. The return value is a `boolean()`.\n\n %% erlang\n IsEntrypoint = packbeam_api:is_entrypoint(AVMElement).\n\n#","ref":"readme.html#listing-the-contents-of-packbeam-files","title":"Listing the contents of PackBEAM files - atomvvm_packbeam","type":"extras"},{"doc":"You can delete entries from an AVM file using the `packbeam_api:delete/3` function. Specify the file system path to the PackBEAM file you would like to delete from, the output path you would like to write the new AVM file to, and a list of AVM elements you would like to delete:\n\n %% erlang\n ok = packbeam_api:delete(\n \"/path/to/input.avm\",\n \"/path/to/ouput.avm\",\n [\"foo.beam\", \"myapp/priv/sample.txt\"]\n ).\n\n> Note. You may specify the same values for the input and output paths. In this case, the input AVM file will be _over-written_ by the new AVM file.\n\n#","ref":"readme.html#deleting-entries-from-packbeam-files","title":"Deleting entries from PackBEAM files - atomvvm_packbeam","type":"extras"},{"doc":"You can extract elements from an AVM file using the `packbeam_api:extract/3` function. Specify the file system path to the PackBEAM file you would like to extract from, a list of AVM elements you would like to extract, and the output directory into which would like to extract the files:\n\n %% erlang\n ok = packbeam_api:extract(\n \"/path/to/input.avm\",\n [\"foo.beam\", \"myapp/priv/sample.txt\"],\n \"/tmp\"\n ).","ref":"readme.html#extracting-entries-from-packbeam-files","title":"Extracting entries from PackBEAM files - atomvvm_packbeam","type":"extras"},{"doc":"# Changelog\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [0.7.1] (unreleased)\n\n- Enhanced `packbeam_api` to make it more maintainable.\n- Changed documentation to use [`rebar3_ex_doc`](https://hexdocs.pm/rebar3_ex_doc/readme.html)\n\n## [0.7.0]\n\n- Added `version` sub-command to print version to the console\n- Added `-r`, `--remove` option and removed the `-i`, `--include` option, which was ineffective due to a bug. See the [Updating](UPDATING.md) notes on the impact of these changes.\n\n## [0.6.2]\n\n- Added `relx` stanzas to create a standalone release of the `packbeam` utility\n- Added install scripts to simplify installation for users\n\n## [0.6.1]\n\n- Added `extract` sub-command\n\n## [0.6.0]\n\n#","ref":"changelog.html","title":"Changelog","type":"extras"},{"doc":"- Added ability to include ` >` chunks in BEAM files in generated AVM files\n- Added CI build\n\n#","ref":"changelog.html#added","title":"Added - Changelog","type":"extras"},{"doc":"- Changed the `packbeam_api:create` function to take a single map for optional\nparameters, instead of coding paramters into function arguments. Previous\nversions of the `packbeam_api:create` function that take optional parameters\nhave been deprecated.\n\n## [0.5.0]\n\n#","ref":"changelog.html#changed","title":"Changed - Changelog","type":"extras"},{"doc":"- Added ability to specify a module name for ordinary (non-BEAM) files (API-only).\n- Added support for tracking dependencies using application spec files as binaries\n(API-only)\n- Added PropEr test\n- Added new `format` option to the `list` subcommand, supporting `csv`, `bare`,\nand `default` options.\n\n#","ref":"changelog.html#added","title":"Added - Changelog","type":"extras"},{"doc":"- Fixed a bug in parsing non-BEAM files in included AVM files, which would cause\n non-BEAM file contents to be loaded incorrectly.\n\n#","ref":"changelog.html#fixed","title":"Fixed - Changelog","type":"extras"},{"doc":"- Changed the command line syntax to support long and short option names using\nGNU-style conventions; deprecated single-hyphen short options.\n- Moved `packbeam` API functionality into `packbeam_api` module.\nPrevious `packbeam` API functions now call corresponding `packbeam_api`\nfunctions and are deprecated.\n\n## [0.4.1]\n\n#","ref":"changelog.html#changed","title":"Changed - Changelog","type":"extras"},{"doc":"- Added unit tests\n\n#","ref":"changelog.html#added","title":"Added - Changelog","type":"extras"},{"doc":"- Fixed a bug that failed to track atoms that occur in BEAM LitT tables\n\n#","ref":"changelog.html#fixed","title":"Fixed - Changelog","type":"extras"},{"doc":"- Weakened the test for finding a start BEAM file such that it only requires that the `?BEAM_START_FLAG` be set, for compatibility with [ExAtomVM](https://github.com/atomvm/ExAtomVM).\n\n## [0.4.0]\n\n#","ref":"changelog.html#changed","title":"Changed - Changelog","type":"extras"},{"doc":"- Added `erlfmt` plugin and formatted code.\n\n#","ref":"changelog.html#added","title":"Added - Changelog","type":"extras"},{"doc":"- Fixed a bug that prevented packbeam files that include priv files from being properly loaded.\n\n## [0.3.0]\n\n#","ref":"changelog.html#fixed","title":"Fixed - Changelog","type":"extras"},{"doc":"- Fixed a bug in pulling in dependent BEAM files based on the atoms table\n\n## [0.2.0]\n\n#","ref":"changelog.html#fixed","title":"Fixed - Changelog","type":"extras"},{"doc":"- Added support for deployment to hex\n\n#","ref":"changelog.html#added","title":"Added - Changelog","type":"extras"},{"doc":"- Uncompressed literals table\n\n## [0.1.0]\n- Initial Release","ref":"changelog.html#fixed","title":"Fixed - Changelog","type":"extras"},{"doc":"SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later\n-->\n\n# AtomVM Update Instructions","ref":"updating.html","title":"AtomVM Update Instructions","type":"extras"},{"doc":"- The default behavior of not generating line number information in BEAM files has changed. By default, line number information will be generated in BEAM files. You can remove line number information using from BEAM files by using the `-r` (or `--remove_lines`) flags to the `create` subcommand. Note that in versions 0.6 of this tool, the `--include_lines` flag was ignored due to a bug in the code.","ref":"updating.html#0-6-0-7","title":"0.6.* -> 0.7.* - AtomVM Update Instructions","type":"extras"},{"doc":"Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n Copyright 2020, Fred Dushin .\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.","ref":"license.html","title":"LICENSE","type":"extras"},{"doc":"SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later\n-->\n\n# Contributing\n\nBefore contributing, please read carefully our [Code of Conduct](CODE_OF_CONDUCT.md) and\nthe following contribution guidelines.\n\nPlease, also make sure to understand the [Apache 2.0 license](LICENSE.md) and the\n[Developer Certificate of Origin](https://developercertificate.org/).\n\nLast but not least, **do not use GitHub issues for vulnerability reports**, read instead the\n[security policy](SECURITY.md) for instructions.","ref":"contributing.html","title":"Contributing","type":"extras"},{"doc":"* Commit messages should have a\n* [summary and a description](https://github.com/erlang/otp/wiki/writing-good-commit-messages)\n* Avoid trailing white spaces\n* Always `git pull --rebase`\n* [Clean up your branch history](https://git-scm.com/book/id/v2/Git-Tools-Rewriting-History) with\n`git rebase -i`\n* All your intermediate commits should build","ref":"contributing.html#git-recommended-practises","title":"Git Recommended Practises - Contributing","type":"extras"},{"doc":"#","ref":"contributing.html#coding-style","title":"Coding Style - Contributing","type":"extras"},{"doc":"##","ref":"contributing.html#c-code","title":"C Code - Contributing","type":"extras"},{"doc":"* [K&R identation and braces style](https://en.wikipedia.org/wiki/Indentation_style#K&R_style)\n* [Mandatory braces](https://en.wikipedia.org/wiki/Indentation_style#Variant:_mandatory_braces)\n* 4 spaces identation\n\nGood:\n```\nvoid f(int reverse)\n{\n if (reverse) {\n puts(\"!dlroW olleH\");\n } else {\n puts(\"Hello world\");\n }\n}\n```\n\nBad:\n```\nvoid f(int reverse) {\n if (reverse)\n puts (\"!dlroW olleH\");\n else\n puts (\"Hello world\");\n}\n```\n\n##","ref":"contributing.html#identation","title":"Identation - Contributing","type":"extras"},{"doc":"* Struct names are PascalCase (e.g. Context)\n* Scalar types are lower case (e.g. term)\n* All other names (e.g. functions and variables) are snake_case (e.g. term_is_integer)\n* Always prefix function names (e.g. term_is_nil, term_is_integer, context_new, context_destroy)\n\n##","ref":"contributing.html#names","title":"Names - Contributing","type":"extras"},{"doc":"* Pointer * should be with the variable name rather than with the type (e.g. `char *name`, not\n`char* name`)\n* Avoid long lines, use intermediate variables with meaningful names.\n\n#","ref":"contributing.html#other-coding-conventions","title":"Other Coding Conventions - Contributing","type":"extras"},{"doc":"Just use Elixir formatter enforced style.","ref":"contributing.html#elixir-code","title":"Elixir Code - Contributing","type":"extras"},{"doc":"# Contributor Covenant Code of Conduct","ref":"code_of_conduct.html","title":"Contributor Covenant Code of Conduct","type":"extras"},{"doc":"We as members, contributors, and leaders pledge to make participation in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, religion, or sexual identity\nand orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.","ref":"code_of_conduct.html#our-pledge","title":"Our Pledge - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"Examples of behavior that contributes to a positive environment for our\ncommunity include:\n\n* Demonstrating empathy and kindness toward other people\n* Being respectful of differing opinions, viewpoints, and experiences\n* Giving and gracefully accepting constructive feedback\n* Accepting responsibility and apologizing to those affected by our mistakes,\n and learning from the experience\n* Focusing on what is best not just for us as individuals, but for the\n overall community\n\nExamples of unacceptable behavior include:\n\n* The use of sexualized language or imagery, and sexual attention or\n advances of any kind\n* Trolling, insulting or derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or email\n address, without their explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n professional setting","ref":"code_of_conduct.html#our-standards","title":"Our Standards - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"Community leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.","ref":"code_of_conduct.html#enforcement-responsibilities","title":"Enforcement Responsibilities - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"This Code of Conduct applies within all community spaces, and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official e-mail address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.","ref":"code_of_conduct.html#scope","title":"Scope - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"Instances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at\ndavide AT uninstall.it.\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.","ref":"code_of_conduct.html#enforcement","title":"Enforcement - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"Community leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n#","ref":"code_of_conduct.html#enforcement-guidelines","title":"Enforcement Guidelines - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n#","ref":"code_of_conduct.html#1-correction","title":"1. Correction - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"**Community Impact**: A violation through a single incident or series\nof actions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or\npermanent ban.\n\n#","ref":"code_of_conduct.html#2-warning","title":"2. Warning - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n#","ref":"code_of_conduct.html#3-temporary-ban","title":"3. Temporary Ban - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior, harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within\nthe community.","ref":"code_of_conduct.html#4-permanent-ban","title":"4. Permanent Ban - Contributor Covenant Code of Conduct","type":"extras"},{"doc":"This Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.0, available at\nhttps://www.contributor-covenant.org/version/2/0/code_of_conduct.html.\n\nCommunity Impact Guidelines were inspired by [Mozilla's code of conduct\nenforcement ladder](https://github.com/mozilla/diversity).\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see the FAQ at\nhttps://www.contributor-covenant.org/faq. Translations are available at\nhttps://www.contributor-covenant.org/translations.","ref":"code_of_conduct.html#attribution","title":"Attribution - Contributor Covenant Code of Conduct","type":"extras"}]} \ No newline at end of file diff --git a/www/dist/sidebar_items-1CC8F05C.js b/www/dist/sidebar_items-1CC8F05C.js new file mode 100644 index 0000000..5c6a017 --- /dev/null +++ b/www/dist/sidebar_items-1CC8F05C.js @@ -0,0 +1 @@ +sidebarNodes={"extras":[{"group":"","headers":[{"anchor":"modules","id":"Modules"}],"id":"api-reference","title":"API Reference"},{"group":"","headers":[{"anchor":"prerequisites","id":"Prerequisites"},{"anchor":"build","id":"Build"},{"anchor":"packbeam-command","id":"packbeam command"},{"anchor":"packbeam_api-api","id":"packbeam_api API"}],"id":"readme","title":"atomvvm_packbeam"},{"group":"","headers":[{"anchor":"0-7-1-unreleased","id":"[0.7.1] (unreleased)"},{"anchor":"0-7-0","id":"[0.7.0]"},{"anchor":"0-6-2","id":"[0.6.2]"},{"anchor":"0-6-1","id":"[0.6.1]"},{"anchor":"0-6-0","id":"[0.6.0]"},{"anchor":"0-5-0","id":"[0.5.0]"},{"anchor":"0-4-1","id":"[0.4.1]"},{"anchor":"0-4-0","id":"[0.4.0]"},{"anchor":"0-3-0","id":"[0.3.0]"},{"anchor":"0-2-0","id":"[0.2.0]"},{"anchor":"0-1-0","id":"[0.1.0]"}],"id":"changelog","title":"Changelog"},{"group":"","headers":[{"anchor":"0-6-0-7","id":"0.6. -> 0.7."}],"id":"updating","title":"AtomVM Update Instructions"},{"group":"","headers":[],"id":"license","title":"LICENSE"},{"group":"","headers":[{"anchor":"git-recommended-practises","id":"Git Recommended Practises"},{"anchor":"coding-style","id":"Coding Style"}],"id":"contributing","title":"Contributing"},{"group":"","headers":[{"anchor":"our-pledge","id":"Our Pledge"},{"anchor":"our-standards","id":"Our Standards"},{"anchor":"enforcement-responsibilities","id":"Enforcement Responsibilities"},{"anchor":"scope","id":"Scope"},{"anchor":"enforcement","id":"Enforcement"},{"anchor":"enforcement-guidelines","id":"Enforcement Guidelines"},{"anchor":"attribution","id":"Attribution"}],"id":"code_of_conduct","title":"Contributor Covenant Code of Conduct"}],"modules":[{"deprecated":false,"group":"","id":"packbeam","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"create/2","deprecated":false,"id":"create/2","title":"create(OutputPath, InputPaths)"},{"anchor":"create/4","deprecated":false,"id":"create/4","title":"create(OutputPath, InputPaths, Prune, StartModule)"},{"anchor":"delete/3","deprecated":false,"id":"delete/3","title":"delete(OutputPath, InputPath, Names)"},{"anchor":"list/1","deprecated":false,"id":"list/1","title":"list(InputPath)"},{"anchor":"main/1","deprecated":false,"id":"main/1","title":"main(Argv)"}]}],"sections":[],"title":"packbeam"},{"deprecated":false,"group":"","id":"packbeam_api","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:avm_element/0","deprecated":false,"id":"avm_element/0","title":"avm_element/0"},{"anchor":"t:avm_element_name/0","deprecated":false,"id":"avm_element_name/0","title":"avm_element_name/0"},{"anchor":"t:options/0","deprecated":false,"id":"options/0","title":"options/0"},{"anchor":"t:path/0","deprecated":false,"id":"path/0","title":"path/0"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"create/2","deprecated":false,"id":"create/2","title":"create(OutputPath, InputPaths)"},{"anchor":"create/3","deprecated":false,"id":"create/3","title":"create(OutputPath, InputPaths, Options)"},{"anchor":"create/4","deprecated":true,"id":"create/4","title":"create(OutputPath, InputPaths, Prune, StartModule)"},{"anchor":"create/5","deprecated":true,"id":"create/5","title":"create(OutputPath, InputPaths, ApplicationModule, Prune, StartModule)"},{"anchor":"delete/3","deprecated":false,"id":"delete/3","title":"delete(OutputPath, InputPath, AVMElementNames)"},{"anchor":"extract/3","deprecated":false,"id":"extract/3","title":"extract(InputPath, AVMElementNames, OutputDir)"},{"anchor":"get_element_data/1","deprecated":false,"id":"get_element_data/1","title":"get_element_data(AVMElement)"},{"anchor":"get_element_module/1","deprecated":false,"id":"get_element_module/1","title":"get_element_module(AVMElement)"},{"anchor":"get_element_name/1","deprecated":false,"id":"get_element_name/1","title":"get_element_name(AVMElement)"},{"anchor":"is_beam/1","deprecated":false,"id":"is_beam/1","title":"is_beam(AVMElement)"},{"anchor":"is_entrypoint/1","deprecated":false,"id":"is_entrypoint/1","title":"is_entrypoint(AVMElement)"},{"anchor":"list/1","deprecated":false,"id":"list/1","title":"list(InputPath)"}]}],"sections":[],"title":"packbeam_api"}],"tasks":[]} \ No newline at end of file diff --git a/www/dist/sidebar_items-77191197.js b/www/dist/sidebar_items-77191197.js deleted file mode 100644 index 3c9f102..0000000 --- a/www/dist/sidebar_items-77191197.js +++ /dev/null @@ -1 +0,0 @@ -sidebarNodes={"extras":[{"group":"","headers":[{"anchor":"modules","id":"Modules"}],"id":"api-reference","title":"API Reference"},{"group":"","headers":[{"anchor":"prerequisites","id":"Prerequisites"},{"anchor":"build","id":"Build"},{"anchor":"packbeam-command","id":"packbeam command"},{"anchor":"packbeam_api-api","id":"packbeam_api API"}],"id":"readme","title":"atomvvm_packbeam"},{"group":"","headers":[{"anchor":"0-7-0","id":"[0.7.0]"},{"anchor":"0-6-2","id":"[0.6.2]"},{"anchor":"0-6-1","id":"[0.6.1]"},{"anchor":"0-6-0","id":"[0.6.0]"},{"anchor":"0-5-0","id":"[0.5.0]"},{"anchor":"0-4-1","id":"[0.4.1]"},{"anchor":"0-4-0","id":"[0.4.0]"},{"anchor":"0-3-0","id":"[0.3.0]"},{"anchor":"0-2-0","id":"[0.2.0]"},{"anchor":"0-1-0","id":"[0.1.0]"}],"id":"changelog","title":"Changelog"},{"group":"","headers":[{"anchor":"0-6-0-7","id":"0.6. -> 0.7."}],"id":"updating","title":"AtomVM Update Instructions"},{"group":"","headers":[],"id":"license","title":"LICENSE"},{"group":"","headers":[{"anchor":"git-recommended-practises","id":"Git Recommended Practises"},{"anchor":"coding-style","id":"Coding Style"}],"id":"contributing","title":"Contributing"},{"group":"","headers":[{"anchor":"our-pledge","id":"Our Pledge"},{"anchor":"our-standards","id":"Our Standards"},{"anchor":"enforcement-responsibilities","id":"Enforcement Responsibilities"},{"anchor":"scope","id":"Scope"},{"anchor":"enforcement","id":"Enforcement"},{"anchor":"enforcement-guidelines","id":"Enforcement Guidelines"},{"anchor":"attribution","id":"Attribution"}],"id":"code_of_conduct","title":"Contributor Covenant Code of Conduct"}],"modules":[{"deprecated":false,"group":"","id":"packbeam","nodeGroups":[{"key":"functions","name":"Functions","nodes":[{"anchor":"create/2","deprecated":false,"id":"create/2","title":"create(OutputPath, InputPaths)"},{"anchor":"create/4","deprecated":false,"id":"create/4","title":"create(OutputPath, InputPaths, Prune, StartModule)"},{"anchor":"delete/3","deprecated":false,"id":"delete/3","title":"delete(OutputPath, InputPath, Names)"},{"anchor":"list/1","deprecated":false,"id":"list/1","title":"list(InputPath)"},{"anchor":"main/1","deprecated":false,"id":"main/1","title":"main(Argv)"}]}],"sections":[],"title":"packbeam"},{"deprecated":false,"group":"","id":"packbeam_api","nodeGroups":[{"key":"types","name":"Types","nodes":[{"anchor":"t:avm_element/0","deprecated":false,"id":"avm_element/0","title":"avm_element/0"},{"anchor":"t:avm_element_name/0","deprecated":false,"id":"avm_element_name/0","title":"avm_element_name/0"},{"anchor":"t:options/0","deprecated":false,"id":"options/0","title":"options/0"},{"anchor":"t:path/0","deprecated":false,"id":"path/0","title":"path/0"}]},{"key":"functions","name":"Functions","nodes":[{"anchor":"create/2","deprecated":false,"id":"create/2","title":"create(OutputPath, InputPaths)"},{"anchor":"create/3","deprecated":false,"id":"create/3","title":"create(OutputPath, InputPaths, Options)"},{"anchor":"create/4","deprecated":true,"id":"create/4","title":"create(OutputPath, InputPaths, Prune, StartModule)"},{"anchor":"create/5","deprecated":true,"id":"create/5","title":"create(OutputPath, InputPaths, ApplicationModule, Prune, StartModule)"},{"anchor":"delete/3","deprecated":false,"id":"delete/3","title":"delete(OutputPath, InputPath, AVMElementNames)"},{"anchor":"extract/3","deprecated":false,"id":"extract/3","title":"extract(InputPath, AVMElementNames, OutputDir)"},{"anchor":"get_element_data/1","deprecated":false,"id":"get_element_data/1","title":"get_element_data(AVMElement)"},{"anchor":"get_element_module/1","deprecated":false,"id":"get_element_module/1","title":"get_element_module(AVMElement)"},{"anchor":"get_element_name/1","deprecated":false,"id":"get_element_name/1","title":"get_element_name(AVMElement)"},{"anchor":"is_beam/1","deprecated":false,"id":"is_beam/1","title":"is_beam(AVMElement)"},{"anchor":"is_entrypoint/1","deprecated":false,"id":"is_entrypoint/1","title":"is_entrypoint(AVMElement)"},{"anchor":"list/1","deprecated":false,"id":"list/1","title":"list(InputPath)"}]}],"sections":[],"title":"packbeam_api"}],"tasks":[]} \ No newline at end of file diff --git a/www/license.html b/www/license.html index 898ea2a..53a102c 100644 --- a/www/license.html +++ b/www/license.html @@ -13,7 +13,7 @@ - + diff --git a/www/packbeam.html b/www/packbeam.html index e38e3d5..487ecfa 100644 --- a/www/packbeam.html +++ b/www/packbeam.html @@ -13,7 +13,7 @@ - + diff --git a/www/packbeam_api.html b/www/packbeam_api.html index bad158f..7c86e85 100644 --- a/www/packbeam_api.html +++ b/www/packbeam_api.html @@ -13,7 +13,7 @@ - + diff --git a/www/readme.html b/www/readme.html index d48ddd9..b0a055e 100644 --- a/www/readme.html +++ b/www/readme.html @@ -13,7 +13,7 @@ - + @@ -126,7 +126,7 @@

Prerequisites

-

Building packbeam requires Erlang/OTP 22 or later, for compatibility with AtomVM, as well as a local installation of rebar3. Optionally, any recent version of make may be used to simplify builds.

+

Building packbeam requires a version of Erlang/OTP compatible with AtomVM, as well as a local installation of rebar3. Optionally, any recent version of make may be used to simplify builds. Consult the AtomVM Documentation for information about supported OTP versions.

@@ -154,36 +154,36 @@

The following sub-commands are supported: - create <options> <output-avm-file> [<input-file>]+ + create <options> <output-avm-file> [<input-file>]+ where: <output-avm-file> is the output AVM file, - [<input-file>]+ is a list of one or more input files, + [<input-file>]+ is a list of one or more input files, and <options> are among the following: - [--prune|-p] Prune dependencies - [--start|-s <module>] Start module - [--remove_lines|-r] Remove line number information from AVM files + [--prune|-p] Prune dependencies + [--start|-s <module>] Start module + [--remove_lines|-r] Remove line number information from AVM files list <options> <avm-file> where: <avm-file> is an AVM file, and <options> are among the following: - [--format|-f csv|bare|default] Format output + [--format|-f csv|bare|default] Format output - extract <options> <avm-file> [<element>]* + extract <options> <avm-file> [<element>]* where: <avm-file> is an AVM file, - [<element>]+ is a list of one or more elements to extract - (if empty, then extract all elements) + [<element>]+ is a list of one or more elements to extract + (if empty, then extract all elements) and <options> are among the following: - [--out|-o <output-directory>] Output directory into which to write elements - (if unspecified, use the current working directory) + [--out|-o <output-directory>] Output directory into which to write elements + (if unspecified, use the current working directory) - delete <options> <avm-file> [<element>]+ + delete <options> <avm-file> [<element>]+ where: <avm-file> is an AVM file, - [<element>]+ is a list of one or more elements to delete, + [<element>]+ is a list of one or more elements to delete, and <options> are among the following: - [--out|-o <output-avm-file>] Output AVM file + [--out|-o <output-avm-file>] Output AVM file version Print version and exit @@ -202,10 +202,10 @@

list sub-command

The list sub-command will print the contents of an AVM file to the standard output stream.

To list the elements of an AVM file, specify the location of the AVM file to input as the first argument:

shell$ packbeam list mylib.avm
-mylib.beam * [284]
-foo.beam [276]
-bar.beam [252]
-mylib/priv/sample.txt [29]

The elements in the AVM file are printed to the standard output stream and are listed on each line. If a beam file contain an exported start/0 function, it will be marked with an asterisk (*). The size in bytes of each module is also printed in square brackets ([]).

You may use the --format (alternatively, -f) option to specify an output format. The supported formats are:

+mylib.beam * [284] +foo.beam [276] +bar.beam [252] +mylib/priv/sample.txt [29]

The elements in the AVM file are printed to the standard output stream and are listed on each line. If a beam file contain an exported start/0 function, it will be marked with an asterisk (*). The size in bytes of each module is also printed in square brackets ([]).

You may use the --format (alternatively, -f) option to specify an output format. The supported formats are:

  • csv Output elements in comma-separated value format. Fields include the module name, whether the element is a BEAM file, whether the element provides a start/0 entrypoint, and the size (in bytes) of the element.
  • bare Output just the module name, with no annotations.
  • default Output the module name, size (in brackets), and whether the file provides a start/0 entrypoint, indicated by an asterisk (*). The default output is used if the --format option is not specified.

@@ -223,8 +223,8 @@

The delete sub-command can be used to remove elements from an AVM file.

To delete one or more elements from an AVM file, specify the location of the AVM file from which to remove elements, followed by the list of elements (as displayed via the list sub-command) to remove. You may optionally specify an output AVM file using the --out option, which will contain the contents of the input AVM file, minus the specified elements. If no output AVM is specified, the input AVM file will be overwritten.

For example:

shell$ packbeam delete -out mylib2.avm mylib.avm foo.beam bar.beam
 shell$ packbeam list mylib2.avm
-mylib.beam * [284]
-mylib/priv/sample.txt [29]

+mylib.beam * [284] +mylib/priv/sample.txt [29]

@@ -237,48 +237,48 @@

Creating PackBEAM files

To create a PackBEAM file, use the packbeam_api:create/2 function. Specify the output path of the AVM you would like to create, followed by a list of paths to the files that will go into the AVM file. Typically, these paths are a list of BEAM files, though you can also include plain data files, in addition to previously created AVM files. Previously-created AVM files will be copied into the output AVM file.

Note. Specify the file system paths to all files. BEAM file path information will be stripped from the AVM element path data. Any plain data files (non-BEAM files) will retain their path information. See the AtomVM Documentation about how to create plain data files in AVM files that users can retrieved via the atomvm:read_priv/2 function.

%% erlang
-ok = packbeam_api:create(
-    "/path/to/output.avm", [
+ok = packbeam_api:create(
+    "/path/to/output.avm", [
         "/path/to/foo.beam",
         "/path/to/bar.beam",
         "/path/to/myapp/priv/sample.txt",
         "/path/to/some_lib.avm"
-    ]
-).

Alternatively, you may specify a set of options with the packbeam_api:create/3 function, which takes a map as the third parameter.

KeyTypeDeafultDescription
pruneboolean()falseSpecify whether to prune the output AVM file. Pruned AVM files can take considerably less space and hence may lead to faster development times.
startmodule()n/aSpecify the start module, if it can't be determined automatically from the application.
applicationmodule()n/aSpecify the application module. The <application>.app file will be encoded and included as an element in the AVM file with the path <module>/priv/application.bin
include_linesboolean()trueSpecify whether to include line number information in generated AVM files.

+ ] +).

Alternatively, you may specify a set of options with the packbeam_api:create/3 function, which takes a map as the third parameter.

KeyTypeDeafultDescription
pruneboolean()falseSpecify whether to prune the output AVM file. Pruned AVM files can take considerably less space and hence may lead to faster development times.
startmodule()n/aSpecify the start module, if it can't be determined automatically from the application.
applicationmodule()n/aSpecify the application module. The <application>.app file will be encoded and included as an element in the AVM file with the path <module>/priv/application.bin
include_linesboolean()trueSpecify whether to include line number information in generated AVM files.

Listing the contents of PackBEAM files

You can list the contents of PackBEAM files using the packbeam_api:list/1 function. Specify the file system path to the PackBEAM file you would like to list:

%% erlang
-AVMElements = packbeam_api:list("/path/to/input.avm").

The returned AVMElements is list of an opaque data structures and should not be interpreted by user applications. However, several functions are exposed to retrieve information about elements in this list.

To get the element name, use the packbeam_api:get_element_name/1 function, passing in an AVM element. The return type is a string() and represents the path in the AVM file for the AVM element.

%% erlang
-AVMElementName = packbeam_api:get_element_name(AVMElement).

To get the element data (as a binary) use the packbeam_api:get_element_data/1 function, passing in an AVM element. The return type is a binary() containing the actual data in the AVM element.

%% erlang
-AVMElementData = packbeam_api:get_element_data(AVMElement).

To get the element module (as an atom) use the packbeam_api:get_element_module/1 function, passing in an AVM element. The return type is a module() and the module name of the AVM element.

Note that if the AVM element is not a BEAM file, this function returns undefined.

%% erlang
-AVMElementModule = packbeam_api:get_element_module(AVMElement).

To determine if the element is a BEAM file, use the packbeam_api:is_beam/1 function, passing in an AVM element. The return value is a boolean().

%% erlang
-IsBEAM = packbeam_api:is_beam(AVMElement).

To determine if the element is an entrypoint BEAM (i.e., it exports a start/0 function), use the packbeam_api:is_entrypoint/1 function, passing in an AVM element. The return value is a boolean().

%% erlang
-IsEntrypoint = packbeam_api:is_entrypoint(AVMElement).

+AVMElements = packbeam_api:list("/path/to/input.avm").

The returned AVMElements is list of an opaque data structures and should not be interpreted by user applications. However, several functions are exposed to retrieve information about elements in this list.

To get the element name, use the packbeam_api:get_element_name/1 function, passing in an AVM element. The return type is a string() and represents the path in the AVM file for the AVM element.

%% erlang
+AVMElementName = packbeam_api:get_element_name(AVMElement).

To get the element data (as a binary) use the packbeam_api:get_element_data/1 function, passing in an AVM element. The return type is a binary() containing the actual data in the AVM element.

%% erlang
+AVMElementData = packbeam_api:get_element_data(AVMElement).

To get the element module (as an atom) use the packbeam_api:get_element_module/1 function, passing in an AVM element. The return type is a module() and the module name of the AVM element.

Note that if the AVM element is not a BEAM file, this function returns undefined.

%% erlang
+AVMElementModule = packbeam_api:get_element_module(AVMElement).

To determine if the element is a BEAM file, use the packbeam_api:is_beam/1 function, passing in an AVM element. The return value is a boolean().

%% erlang
+IsBEAM = packbeam_api:is_beam(AVMElement).

To determine if the element is an entrypoint BEAM (i.e., it exports a start/0 function), use the packbeam_api:is_entrypoint/1 function, passing in an AVM element. The return value is a boolean().

%% erlang
+IsEntrypoint = packbeam_api:is_entrypoint(AVMElement).

Deleting entries from PackBEAM files

You can delete entries from an AVM file using the packbeam_api:delete/3 function. Specify the file system path to the PackBEAM file you would like to delete from, the output path you would like to write the new AVM file to, and a list of AVM elements you would like to delete:

%% erlang
-ok = packbeam_api:delete(
+ok = packbeam_api:delete(
     "/path/to/input.avm",
     "/path/to/ouput.avm",
-    ["foo.beam", "myapp/priv/sample.txt"]
-).

Note. You may specify the same values for the input and output paths. In this case, the input AVM file will be over-written by the new AVM file.

+ ["foo.beam", "myapp/priv/sample.txt"] +).

Note. You may specify the same values for the input and output paths. In this case, the input AVM file will be over-written by the new AVM file.

Extracting entries from PackBEAM files

You can extract elements from an AVM file using the packbeam_api:extract/3 function. Specify the file system path to the PackBEAM file you would like to extract from, a list of AVM elements you would like to extract, and the output directory into which would like to extract the files:

%% erlang
-ok = packbeam_api:extract(
+ok = packbeam_api:extract(
     "/path/to/input.avm",
-    ["foo.beam", "myapp/priv/sample.txt"],
+    ["foo.beam", "myapp/priv/sample.txt"],
     "/tmp"
-).
+
).
diff --git a/www/search.html b/www/search.html index 8943a92..2d67a4b 100644 --- a/www/search.html +++ b/www/search.html @@ -13,7 +13,7 @@ - + @@ -116,7 +116,7 @@

- +