Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Dear monks,

at $work, we use SWIG to generate a Perl wrapper for a large C++ library. SWIG creates glue code in XS and pure Perl based on the C++ class definitions, and the XS code is then compiled against the header files of a particular version of Perl. This works great and you can use the same SWIG interface file to generate a Python, Java and C# wrapper as well.

The problem is, when the XS code is compiled against a particular version of Perl, say 5.18, the resulting compiled library is only compatible with the same (major) version of Perl. Our customers use a range of Perl versions, from 5.10 through to the latest one, so we have to compile and provide support for an ever increasing number of versions, even though the actual C++ library is exactly the same in each case. It was manageable for 5.6 and 5.8, which were long-lived versions, but it's become exasperating since the move to annual Perl releases.

Can you point me to any resources that describe or discuss the rationale for why XS code could not be made binary compatible between Perl versions? Or why there couldn't be some kind of reduced XS API that would stay binary compatible even if some parts change? Which authority should I petition to make it so?


In reply to Rationale for why successive Perl releases are not XS-compatible? by vrk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found