Re: Creating and using a .DLL/.SO?

new topic     » goto parent     » topic index » view thread      » older message » newer message
ghaberek said...

Since we're doing all this work on the version 4.0, couldn't we make the translator automatically output a wrapper file for the library? Say, all global constants and routines, then build the simple wrapper routines? That's always been a pipe dream of mine... getlost

Yeah, that's a good idea. I think we need to revisit the translator output for dll/so's (and I think there was some traffic on the devs list previously, but I don't think we ever did anything). It's probably a good stopgap for an idea I had for post-4.0. I put something up on the wiki, though I'm not sure anyone has really looked at it:

  1. Compile a euphoria include as a dll.
  • Translator adds a function that returns data about the public / exported routines, which the interpreter adds to the symbol table as special euphoria routines
  • User can call compiled routines like normal euphoria routines, and the interpreter handles the call transparently
  • Possibly use ifdefs to determine whether regular interpreted or compiled library to be used (if available)
  • Add a lib/ dir in the euphoria directory structure as a place for the compiled libs to live, or possibly specify other locations through config file

Basically, I'm looking at ways to blur the line between translated and interpreted code, and to get them to run together. This will be helpful for other things, such as having dynamic code execution, or for being able to shroud a library, and include it similarly to how we did so pre-2.5.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu