gonuts executable docs V 1.0

11/1/2017

  1. Executable flavours
  2. Invocation, command line parameters

1.Executable flavours

There are several flavours of the executable binary, combining one or more properties described here, most depending on licensing.
For an overview of the effects of licensing see https://forum.goingnuts.net/license-comparison.html

VM RAM

The virtual machine(s) need ram to operate the stack and all objects. RAM availability to user application varies depending on the license. However, most licenses have "unlimited RAM", which is then merely limited by the operating system or hardware.
Usually any limit will be per RealThread. When any limit of any thread is exceeded, the executable will immediately print a message to stderr and terminate with exit code 2.

Thread count

Maximum Number of "real" threads supported. Note that the "main thread" is counted in. "Real" threads are operating system threads (aka e.g. pthreads) and not to mistaken as Squirrel threads (aka generators). The limit is about actually running threads, not RealThread objects in memory. Note,however, that a RealThread immediately starts running on creation. When the limit of running threads is reached, any attempt to create a RealThread object (and hence to start a new thread) will create an exception (see Squirrel try/catch directives)

Debugger support

The amount of available breakpoints or watches can be limited depending on the license. Excess breakpoints or watches will be simply ignored.

Socket count

The amount of network sockets (or, to be exact, "potential socket objects" can be limited. Any attempt to exceed the limit will result in an exception you'd need to catch.

Phoning home

Some versions may be bound to regularly or irregularly "phone home" to get automatic license renewals. They may also be configured to automatically check for updates. So ff you find yor device trying to unsolicitly contact phobyx.com or goingnuts.net that's nothing to worry about. Note that no personal data is transmitted nor any "spying" takes place, phoning home does only transmits anonymous license or hardware related data.
Note user may run applications doing more than just that, also on our domains.

pnut archives

An executable may be able to only use archives, or it may be able to alter or create your own archives, while feature support also may differ (encryption and compression). All versions can load encrypted or compressed source or precompiled squirrel files (cnuts).

Amalgamations

Some versions may be capable of creating a copy of themselves and embedding a pnut archive to create an amalgamation. An amalgamation then will execute from itself and can't be easily distinguished from dedicated applications. Amalgations do NOT obey to any command line parameters, which are simply passed to the embedded application.
Hence, some versions also may be amalgamations themselves.

Hardware lock

Some gonuts binaries (same as dens, see below) can be locked to a certain device - they won't run on another device properly. Most licensed versions are bound to a device. Users may request a renewal (in case the device is lost, for example), but cannot avoid their license restrictions by copying the binary to multiple host devices. The same way customers having purchased a proper license are able to create (foreign) hardware locked amalgamations or dens for their own customers.

Dens (Modules)

gonuts supports loading dynamically linked libraries called dens, which usually enhance functionality (for example database access, special hardware access or GUI).
Both the gonuts binary and the dens may be limited about loading and initializing. Dens can have certificates (to be exact: certificate chains), some gonuts binaries can load only certified modules.
On the other hand, dens may also be bound to a gonuts license key or a dedicated hardware, so they can be loaded only on that hardware and/or by that licensed gonuts executable.
The hardware lock, for example, usually is used by CAs (usually industry customers with a commercial or enterprise license) to have control over distribution of their own (usually fee-based) modules. It's also used to make users of the basic (free) license able to develop (and use) self-signed modules while inhibiting binary distribution to other "free" users. Hence, free users either have to publish their modules (for "nuts"...) via our website and apply for a certificate - or disclose their source code and have everybody compile and self-sign the module their own.

Cloud capabilites

Gonuts cloud capabilities usually utilize an online login, however some users may find it useful to have that login secured by a gonuts license and hence locked to their executable or amalgamation.
At the time of this writing, cloud services are non-existing and in planning stage only. Check the goingnuts website for more information.

2.Invocation, command line parameters

gonuts (or gonuts.exe) generally is a command line application.
All versions except amalgamations support the command line parameters described below. All command line parameters usually are also passed to the Squirrel app (unless specified otherwise using the -a option, see below).

gonuts [inputfilename] [options and/or excess parameters]

where inputfilename is a name of the .nut or .cnut file to load and execute. Note that you can leave the file extension, gonuts will try them both automatically in all cases (passing the extension only changes the order it will try to load). inputfilename can optionally have a path (relative or absolute). Unless a namespace name is provided using the -n option, the namespace the file will be loaded to is the raw filename body, without any extension or prepending path.
When no input filename is provided "main" will be used in the current working directory (--> ./main.cnut or ./main.nut)

command line options:

Option Description
-SQDBG Optional. Run in remote debugging mode. Wait for a debugger to connect before starting the app.
-n yourname Optional. Set yourname as the namespace table to load the code file to
-p pnutfile Optional. Add a pnut archive to the gonuts include paths. you may repeat this option to add more than one pnut archive. The order of multiple archives is obeyed when searching them for nuts lateron. pnutfile must be the full filename including extension (.pnut) and include any relative or absolute path required to access it.
-a Optional. Argument separator. When not present, all arguments will be passed to the Squirrel app. When present, only arguments from this point on will be passed (including the -a, which accordingly will replace the executable filename usually being the very first argument).
--namespace yourname synonym for -n
--pnut pnutfile synonym for -p