Almost ready to release 2.0.1

master
Diego Nehab 2006-04-20 04:16:23 +00:00
parent 316e205cd4
commit 75f51d5bc7
5 changed files with 58 additions and 35 deletions

20
config
View File

@ -15,8 +15,8 @@ UNIX_SO=unix.$(EXT)
#------
# Lua includes and libraries
#
LUAINC=-Ilua-5.0.2/include
LUALIB=-Llua-5.0.2/lib
LUAINC=-I/usr/local/include/lua50
#LUAINC=-I/usr/local/include/lua5.1
#------
# Compat-5.1 directory
@ -27,8 +27,10 @@ COMPAT=compat-5.1r5
# Top of your Lua installation
# Relative paths will be inside the src tree
#
INSTALL_TOP_SHARE=share
INSTALL_TOP_LIB=lib
INSTALL_TOP_SHARE=/usr/local/share/lua/5.0
INSTALL_TOP_LIB=/usr/local/lib/lua/5.0
#INSTALL_TOP_SHARE=/usr/local/share/lua/5.1
#INSTALL_TOP_LIB=/usr/local/lib/lua/5.1
INSTALL_DATA=cp
INSTALL_EXEC=cp
@ -46,11 +48,11 @@ INSTALL_EXEC=cp
#------
# Compiler and linker settings
# for Linux
CC=gcc
DEF=-DLUASOCKET_DEBUG
CFLAGS= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -O2 -fpic
LDFLAGS=-O -shared -fpic
LD=gcc
#CC=gcc
#DEF=-DLUASOCKET_DEBUG
#CFLAGS= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -O2 -fpic
#LDFLAGS=-O -shared -fpic
#LD=gcc
#------
# End of makefile configuration

View File

@ -88,8 +88,9 @@ Author: <A href="http://www.cs.princeton.edu/~diego">Diego Nehab</a>
<p>
LuaSocket version 2.0.1 is now available for download! It is
compatible with Lua&nbsp;5.0 and has been tested on
Windows&nbsp;XP, Linux, and Mac OS X.
compatible with Lua&nbsp;5.0 and Lua&nbsp;5.1, and has
been tested on Windows&nbsp;XP, Linux, and Mac OS X. Chances
are it works well on most UNIX systems.
</p>
<p>
@ -103,13 +104,13 @@ contains several examples, this user's manual and basic test procedures.
<p>
Danilo Tuler is maintaining Win32 binaries for LuaSocket, which are also
available from LuaForge. These are compatible with the
<a href=http://luaforge.net/projects/luabinaries>LuaBinaries</a>
available from LuaForge.
<a href=http://luaforge.net/projects/luabinaries>LuaBinaries</a>,
also available from LuaForge.
</p>
<p>
For those that want to give LuaSocket a quick try, download the
stand-alone archive and unpack everything into
If you are using Lua 5.0, and want to give LuaSocket a quick
try, download the stand-alone archive and unpack everything into
a directory, say <tt>c:\luasocket</tt>. Then set <tt>LUA_INIT</tt> to load
the <tt>compat-5.1.lua</tt> and set <tt>LUA_PATH</tt> and
<tt>LUA_CPATH</tt> to look for files in the current directory:
@ -135,6 +136,23 @@ Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio
--&gt; the source to this web page gets dumped to terminal
</pre>
<p>
If you are using Lua 5.1, you shouldn't use
<tt>compat-5.1.lua</tt>. Just unpack the standalone
directory, set <tt>LUA_CPATH</tt> and <tt>LUA_PATH</tt>, and
you should be ready to run:
<p>
<pre class=example>
c:\luasocket\&gt; set LUA_CPATH=?.dll
c:\luasocket\&gt; set LUA_PATH=?.lua
c:\luasocket\&gt; lua5.1
Lua 5.1 Copyright (C) 1994-2006 Lua.org, PUC-Rio
&gt; http = require"socket.http"
&gt; print(http.request"http://www.cs.princeton.edu/~diego/professional/luasocket/"
--&gt; the source to this web page gets dumped to terminal
</pre>
<p> When you are done playing, take a look at the
<a href=installation.html>installation</a> section of the manual to find out
how to properly install the library. </p>

View File

@ -39,27 +39,24 @@ Installation">
<h2>Installation</h2>
<p> LuaSocket 2.0.1 uses the new package proposal for Lua 5.1.
<p> LuaSocket 2.0.1 uses the new package system for Lua 5.1.
All Lua library developers are encouraged to update their libraries so that
all libraries can coexist peacefully and users can benefit from the
standardization and flexibility of the standard.
</p>
<p>
The proposal was considered important enough by some of us to justify
early adoption, even before release of Lua 5.1.
Thus, a compatibility module
Those stuck with Lua 5.0 will need the
<a href=http://www.keplerproject.org/compat/>compat-5.1</a>
has been released in conjunction with Roberto Ierusalimschy and <a
href=http://www.keplerproject.org/>The Kepler Project</a> team.
It implements the Lua 5.1 package proposal on top of Lua 5.0. </p>
module. It is maintained by
<a href=http://www.keplerproject.org/>The Kepler
Project</a>'s team, and implements the Lua 5.1 package proposal
on top of Lua 5.0. </p>
<p> As far as LuaSocket is concerned, this means that whoever is
deploying a non-standard distribution of LuaSocket will probably
have no problems customizing it. Here we will only describe the standard distribution. If the standard doesn't meet your
needs, we refer you to the Lua discussion list, where any question about
the package scheme will likely already have been answered.
</p>
<p> Here we will only describe the standard distribution.
If the standard doesn't meet your needs, we refer you to the
Lua discussion list, where any question about the package
scheme will likely already have been answered. </p>
<h3>Directory structure</h3>
@ -88,7 +85,7 @@ distribution directory structure:</p>
</pre>
<p> Naturally, on Unix systems, <tt>core.dll</tt>
would be replaced by <tt>core.so</tt>.
would be replaced by <tt>core.so</tt>.
</p>
<p> In order for the interpreter to find all LuaSocket components, three
@ -99,6 +96,11 @@ the interpreter to load the <tt>compat-5.1.lua</tt> module at startup: </p>
LUA_INIT=@&lt;LDIR&gt;/compat-5.1.lua
</pre>
<p>
This is only need for Lua&nbsp;5.0! Lua&nbsp;5.1 comes with
the package system bult in, of course.
</p>
<p>
The other two environment variables instruct the compatibility module to
look for dynamic libraries and extension modules in the appropriate

View File

@ -64,9 +64,9 @@ work. Just run
lua check-links.lua [-n] {<url>} > output
and open the result to see a list of broken links. You can
also use the '-n' switch to run the same program in
non-blocking mode to see how much faster things can get.
and open the result to see a list of broken links. Make sure
you check the '-n' switch. It runs in non-blocking mode,
using coroutines, and is MUCH faster!
forward.lua -- coroutine based forward server

View File

@ -10,6 +10,7 @@ include ../config
#------
# Modules belonging to socket-core
#
SOCKET_OBJS:= \
$(COMPAT)/compat-5.1.o \
luasocket.o \
@ -48,13 +49,13 @@ UNIX_OBJS:=\
all: $(SOCKET_SO) $(MIME_SO)
$(SOCKET_SO): $(SOCKET_OBJS)
$(LD) $(LDFLAGS) -o $@ $^
$(LD) $(LDFLAGS) -o $@ $(SOCKET_OBJS)
$(MIME_SO): $(MIME_OBJS)
$(LD) $(LDFLAGS) -o $@ $^
$(LD) $(LDFLAGS) -o $@ $(MIME_OBJS)
$(UNIX_SO): $(UNIX_OBJS)
$(LD) $(LDFLAGS) -o $@ $^
$(LD) $(LDFLAGS) -o $@ $(UNIX_OBJS)
#------
# List of dependencies