Version française
Home     About     Download     Resources     Contact us    
Browse thread
Native executable symtable
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Brown <caml-list@d...>
Subject: Re: [Caml-list] Native executable symtable
On Thu, Nov 11, 2004 at 11:18:06AM +0100, Alex Baretta wrote:

> We are writing a library implementing binary client-server protocol 
> based on the Marshal module. In order to guarantee some degree of 
> type-safety, during the handshaking phase of the communication we need 
> the client to send the server the MD5 checksums of all relevant modules. 
> The server process must verify that it has all the mentioned modules and 
> that the checksums are consistent with its own.

As long as all of the relevant data structures are exported from some
module, the extract_crc utility (which gets install in the library
directory), can generate all of the CRC.  It needs to be run at compile
time, but can reasonably easily be put into makefile rules.  It just
becomes one additional module.

Getting the order right is a bit tricky, since it becomes something that
depends on many interfaces, some of which have implementations that depend
on the crc module itself.  So, many of the auto-dependency and order
generators won't work.

This method should be any different between native and byte-code, since the
CRC is generated based on the .cmi file which will always be the same.  The
only dependence is that you export the relevant data structures.

Dave