Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time

This is, a foreign function interface for bash. is a bash plugin that provides a foreign function interface directly in your shell. In other words, it allows you to call routines in shared libraries from within bash.

A (very) simple example will help illustrate:

$ dlcall puts "hello, world"
hello, world

# A more complex example, use libm to calculate sin(PI/2)
$ dlopen
$ dlcall -r double sin double:1.57079632679489661923
double:1.000000 can extend bash scripts to accomplish tasks that were previously impossible, or would require external helpers to be written. makes it possible to use GTK+ natively in your shell scripts, or write a high-performance http daemon.

See more examples here

prerequisites is dependent on the following libraries and programs:

  • libffi
  • bash
  • libelf (optional)
  • elfutils (optional)
  • libdwarf / libdw (optional)


For recent Fedora, this should be enough:

sudo yum install elfutils-devel dnf-utils

Now you can use the debuginfo-install command to install debugging symbols for automatic structure support.


For recent Ubuntu, this should be enough:

sudo apt install autoconf libltdl-dev libffi-dev libelf-dev elfutils libdw-dev

If you want to use automatic struct support (recommended), you should also make you have ddebs available.

install can be installed from source like this:

$ git clone
$ cd
$ ./
$ ./configure
$ make
$ [sudo] make install

By default is installed into /usr/local/bin and /usr/local/lib. You can overload the prefix path by defining the PREFIX environment variable before installing.

$ PREFIX=$HOME make install


puts () {
  dlcall puts "$@"
  return $?

puts "hello, world"

Here is what people have been saying about

  • "that's disgusting"
  • "this has got to stop"
  • "you've gone too far with this"
  • "is this a joke?"
  • "I never knew the c could stand for Cthulhu."

You can read more about and see it in action on the Wiki