---
name: "m3bundle"
section: "1"
platform: "linux"
package: "pm3"
version: "1.1.15-1"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/m3bundle"
---

# m3bundle(1)

package source files into M3 object

## NAME

m3bundle - package source files into M3 object

## SYNTAX

**m3bundle** -name n -element e1 path1 \[-element ei pathi\]...

**m3bundle** -FcmdFile

## DESCRIPTION

**m3bundle packages up arbitrary files so that their contents can be** retrieved by a Modula-3 program at runtime without accessing the file system.   **m3bundle** works by generating an interface (.i3) and implementation (.m3) file.  The implementation contains the bits from the files that are being bundled; the interface provides a way to access this information.

In the first form of the command above,

   n        is the name of the source module to be produced by m3bundle\
    path\_i   is the path name of a file to be bundled\
    e\_i      is the name of the resulting text reader

That is, the command produces a Modula-3 interface n.i3 and module n.m3 implementing "n".  The interface n.i3 has the form:

   INTERFACE n;\
    IMPORT Bundle;\
    PROCEDURE Get(): Bundle.T;\
    END n;

A programmer can then use the Bundle interface to retrieve  elements from the Bundle.T returned by Get.

The second form of the m3bundle command allows you to specify the parameters in the file named cmdFile. This is needed when bundling lots (i.e., hundreds) of files, since Unix imposes a limit on the size of arguments to a shell command.

## AUTHOR OF OBJECT

Greg Nelson

Marc H. Brown added support for large files and revamped the internals.

Eric Muller added -F flag

## AUTHOR OF DOCUMENTATION

Greg Nelson and Paul Mcjones
