diff lua/luadyncall/doc/guide.tex @ 0:0cfcc391201f

initial from svn dyncall-1745
author Daniel Adler
date Thu, 19 Mar 2015 22:26:28 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/luadyncall/doc/guide.tex	Thu Mar 19 22:26:28 2015 +0100
@@ -0,0 +1,45 @@
+\documentclass{article}
+\begin{document}
+\section{Introduction}
+
+The luadyncall package is a framework for writing system-level software
+using lua.
+
+It uses the libraries from the DynCall Project for the low-level implementation
+such as code loading, symbol resolving and invocation of function calls.
+
+It implements the portable dynamic linkage system 'dynport' for lua which
+allows to bind whole shared C libraries with a single command.
+
+\section{Overview}
+
+This package provides the following extensions:
+
+\begin{description}
+\item [dynload]   dynamic loading of code and resolving of C functions
+\item [dyncall]   dynamic calling of loaded C functions
+\item [dynport]   dynamic binding of whole shared C libraries
+\item [array]     allocate and access C-typed arrays
+\item [smartptr]  smart pointer utility
+\item [int64]     64-bit (unsigned) integer datatype for lua
+\item [ldynguess] guess the operating system
+\end{description}
+
+\section{C Pointers}
+
+One major issue was to decide how to handle pointer values and in
+particular NULL pointers using dynports.
+
+Lua can compare pointer-values. The current dyncall implementation comes with 
+a function \verb@topointer(value)@ which makes a pointer value from an integer 
+value. There is also a \verb@NULL@ variable which holds a pointer value of 0.
+
+\section{Dynport}
+
+\subsection {The LDP\_PATH environment variable}
+
+The variable contains the patterns to search for dynport files when
+\verb@dynport("someport")@ is called.
+
+\end{document}
+