---
name: "jsrun"
section: "1"
platform: "linux"
package: "pnet-assemblies"
version: "0.6.12-2"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/jsrun"
---

# jsrun(1)

the Portable.NET runtime engine

## NAME

ilrun - the Portable.NET runtime engine

## SYNOPSIS

**ilrun** \[ options \] *program* \[ *program-options* \]

## DESCRIPTION

**Ilrun** loads and executes the Intermediate Language (IL) *program*, passing it the supplied *program-options*.  For example:

```
ilrun hello.exe
```

The "`.exe`" extension is not required: you can rename the program to "`hello`" if you wish.

If the IL program has command-line options, they can be supplied after the name of the IL executable:

```
ilrun getenv.exe PATH
```

Most IL programs will rely upon the "`mscorlib.dll`" file to provide library facilities.  A pre-compiled version of this file can be found in the "`samples`" directory on the "`pnet`" distribution.

The "`mscorlib.dll`" file should either be placed in the same directory as the program you are running, or in the system-wide location "`PREFIX/lib/cscc/lib`", where "`PREFIX`" is the directory where you installed Portable.NET (e.g. "`/usr/local`").

## OPTIONS

- **--heap-size *num*, -H *num***

  Set the size of the heap to *num* kilobytes.  By default, the heap is unlimited in size.

- **--stack-size *num*, -S *num***

  Set the size of the operation stack to *num* kilobytes.  By default, the stack is 8k in size.

- **--library-dir *dir*, -L *dir***

  Add *dir* to the list of directories to be searched for libraries that are referenced by the application.

- **--register \[*path*\]**

  Linux kernel only: register **ilrun** with the kernel so that it will be run automatically when IL binaries are executed.  See the section "USING ILRUN WITH THE LINUX KERNEL" below for more information.

- **--unregister**

  Linux kernel only: unregister **ilrun** from the kernel.

- **--help**

  Print a usage message for the **ilrun** program.

- **-v, --version**

  Print the version of the **ilrun** program.

- **--**

  Marks the end of the command-line options, and the beginning of the input filenames.  You may need to use this if your program filename begins with '-'.  e.g. "ilrun -- -input.exe".

## USING ILRUN WITH THE LINUX KERNEL

If your operating system uses the Linux kernel, and you have root access, then you can avoid typing **ilrun** to execute programs from the command-line.

You must first register **ilrun** with the Linux kernel, by executing the following command as root:

```
 ilrun --register
```

Then you can run programs as follows:

```
 chmod +x hello.exe
 ./hello.exe
```

This will also work if you rename "`hello.exe`" to "`hello`", and then place it somewhere on your PATH.

To unregister **ilrun**, execute the following command as root:

```
 ilrun --unregister
```

Note: registration will only work with the Linux kernel (versions 2.2 and later), and when you are logged in as root.

When you register **ilrun**, it attempts to construct the full path of the engine to pass to the kernel.  Normally it does this by searching the PATH.  You can specify an explicit pathname as follows:

```
 ilrun --register /usr/local/bin/ilrun
```

## USING ILRUN WITH WINE

Because IL programs have a similar format to regular PE/COFF Windows executables, it is not always clear whether a program should be executed with **ilrun** or with **wine**.

If you pass a regular Windows executable to **ilrun**, it will hand off control to **wine** to run the program.  It uses the first executable called **wine** on the PATH.

If your Wine installation is not on the PATH, you can set the WINE environment variable to specify its location.

Wine also has facilities for registering itself with the Linux kernel to run PE/COFF executables.  Only one PE/COFF handler can be registered at a time.  It is important that **ilrun** be registered as the primary PE/COFF handler, because Wine does not currently know how to hand off IL programs to **ilrun**.

## AUTHOR

Written by Southern Storm Software, Pty Ltd.

http://www.southern-storm.com.au/

## SEE ALSO

[ilasm(1)](/ilasm/1.md), [ildasm(1)](/ildasm/1.md), [cscc(1)](/cscc/1.md)

## DIAGNOSTICS

Exit status is 1 if an error occurred while processing the input. Otherwise the exit status is 0.

- wine: No such file or directory

  The **ilrun** program was passed a regular Windows PE/COFF executable that did not contain IL data.  The engine attempted to hand the program off to **wine** for execution, but **wine** was not found.
