Intermediate compilation of third party libraries

This forum is for developers of Rack Extensions to discuss the RE SDK, share code, and offer tips to other developers.
Post Reply
User avatar
Murf
RE Developer
Posts: 656
Joined: 21 Jun 2019
Location: Brisbane, Australia
Contact:

17 May 2023

Hi All, I am sure you have all come across this before but it is one thing I have not been able to work out yet.
There is a wonderful audio library that i wish to use but it is not available as source code (for obvious reasons) and I need a way to either convert their libraries to a form that will link correctly with the Reasons SDK or point the library's author to a tool as to be able to compile it to a form I could use to then link into my project.
Any thoughts or experiences most welcome!
Thanks,
Murf.

User avatar
rcbuse
RE Developer
Posts: 1175
Joined: 16 Jan 2015
Location: SR388
Contact:

17 May 2023

You would have to get the library author the Rack Extension SDK and compiler, and have them build those Reason specific intermediate object/bytecode files. Once you had those, you would need to modify your builder to link them in without actually compiling them. Might be possible, but you are going to be digging into their python build scripts to make those things happen.

User avatar
Murf
RE Developer
Posts: 656
Joined: 21 Jun 2019
Location: Brisbane, Australia
Contact:

17 May 2023

rcbuse wrote:
17 May 2023
You would have to get the library author the Rack Extension SDK and compiler, and have them build those Reason specific intermediate object/bytecode files. Once you had those, you would need to modify your builder to link them in without actually compiling them. Might be possible, but you are going to be digging into their python build scripts to make those things happen.
Thanks, I guessed as much.
Murf.

User avatar
pongasoft
RE Developer
Posts: 478
Joined: 21 Apr 2016
Location: Las Vegas
Contact:

18 May 2023

You also have to consider the fact that the RE SDK c++ compiler is very very limited in what it supports (restrictions that are not "standard", for example, global statics are 100% forbidden + subset of the standard library). If you have the source code of the library, it is already a challenge for you to make it work with the compiler. So asking a third party to "simply" compile their code for the SDK would be an enormous ask IMO.

When I worked on Macro and ported the open source C code to work with the SDK it was quite a challenging and very time consuming task...

And TBH, using any external library with the RE SDK is always challenging, because of all these restrictions

User avatar
Murf
RE Developer
Posts: 656
Joined: 21 Jun 2019
Location: Brisbane, Australia
Contact:

28 May 2023

pongasoft wrote:
18 May 2023
You also have to consider the fact that the RE SDK c++ compiler is very very limited in what it supports (restrictions that are not "standard", for example, global statics are 100% forbidden + subset of the standard library). If you have the source code of the library, it is already a challenge for you to make it work with the compiler. So asking a third party to "simply" compile their code for the SDK would be an enormous ask IMO.

When I worked on Macro and ported the open source C code to work with the SDK it was quite a challenging and very time consuming task...

And TBH, using any external library with the RE SDK is always challenging, because of all these restrictions
Thanks, very disheartening :)

User avatar
jam-s
Posts: 3035
Joined: 17 Apr 2015
Location: Aachen, Germany
Contact:

28 May 2023

Well, that's the price for forward compatibility and sandbox stability.

avasopht
Competition Winner
Posts: 3932
Joined: 16 Jan 2015

28 May 2023

Well, ... code wise, it is theoretically possible, at least, to use the clang library to modify the code and inject dependencies to enable some of the functionality that is disabled.

I wrote a library for myself to freely create and destroy objects along with a bunch of replacements for whatever Boost library stuff I wanted to use that used those methods instead (Emcee: a locally scoped C++ memory management library).

Here's a list:
  1. Memory management system
    1. MaskedCellVector: A "cell vector" maps a small array to a larger vector space ...
    2. MemoryDependent: Indicates at compile time that a class accepts a Memory pointer in construction.
    3. New: Implements non-trivial object and array allocation and construction (also has minor support for memory arenas)
    4. Object: Convenient base class to make it easier to propagate access to the library's allocators
  2. Containers: Array, Map, Vector, Set
  3. Literal: Converts string literals into objects but fails with non-literal strings.
  4. Smart pointers (works with arrays too):
    • SharedPtr, WeakPtr, UniquePtr
Oh, just realised I never actually used this for my RE (unreleased), ... it was for a modular library I was working on for future REs.

Anyway, the same methods I used is what your library code could theoretically be processed to utilize.

But this is only when you have the source.

What sort of libraries are you trying to use?

User avatar
Murf
RE Developer
Posts: 656
Joined: 21 Jun 2019
Location: Brisbane, Australia
Contact:

03 Jun 2023

avasopht wrote:
28 May 2023

What sort of libraries are you trying to use?
It is an audio library that the owner is not even returning my emails over so I think it doesn't matter :(

User avatar
Billy+
Posts: 4157
Joined: 09 Dec 2016

03 Jun 2023

avasopht wrote:
28 May 2023
Oh, just realised I never actually used this for my RE (unreleased)
That's got my interest

any chance you could explain how to publish a RE that I can use in Reason without public availability,

User avatar
jam-s
Posts: 3035
Joined: 17 Apr 2015
Location: Aachen, Germany
Contact:

03 Jun 2023

Billy+ wrote:
03 Jun 2023
avasopht wrote:
28 May 2023
Oh, just realised I never actually used this for my RE (unreleased)
That's got my interest

any chance you could explain how to publish a RE that I can use in Reason without public availability,
That's simple:
1. Register as a developer.
2. Build your RE
3. Upload a test build of the RE
4. Profit ;) (= you can assign this test build to beta testers (which could also be just yourself).

User avatar
Billy+
Posts: 4157
Joined: 09 Dec 2016

03 Jun 2023

jam-s wrote:
03 Jun 2023
Billy+ wrote:
03 Jun 2023


That's got my interest

any chance you could explain how to publish a RE that I can use in Reason without public availability,
That's simple:
1. Register as a developer.
2. Build your RE
3. Upload a test build of the RE
4. Profit ;) (= you can assign this test build to beta testers (which could also be just yourself).
that sound's so easy but i'm guessing its not....

User avatar
jam-s
Posts: 3035
Joined: 17 Apr 2015
Location: Aachen, Germany
Contact:

04 Jun 2023

Depending on your mad coding skills step 2 could possibly break your neck or at least take quite some effort or time to learn the details of the SDK.

avasopht
Competition Winner
Posts: 3932
Joined: 16 Jan 2015

12 Jun 2023

Billy+ wrote:
03 Jun 2023
that sound's so easy but i'm guessing its not....
Easy and hard is just a matter of perspective

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests