comp.lang.ada
 help / color / mirror / Atom feed
From: Stephane Carrez <stephane.carrez@gmail.com>
Subject: Re: ANN: Ada Resource Embedder for C, Ada and Go
Date: Fri, 11 Jun 2021 10:32:56 -0700 (PDT)	[thread overview]
Message-ID: <ecc22bac-2f66-44ac-9496-3a2f46adbf32n@googlegroups.com> (raw)
In-Reply-To: <sa02e1$133o$1@gioia.aioe.org>

Hi Dimitry,

Le vendredi 11 juin 2021 à 18:19:18 UTC+2, Dmitry A. Kazakov a écrit :
> On 2021-06-11 15:51, Stéphane Rivière wrote: 
> > Hi Stephane, 
> > 
> >> I created a new tool to allow embedding any file in an Ada, C or Go binary. 
> > 
> > This is typically what I needed to improve my current AIDE v2 project 
> > (Ada Instant Development Environment - source GNAT CE 2019 2020 2021 - 
> > target Debian / Ubuntu with subtarget station (with GNATStudio, HAC, 
> > libs, debug aware RTS, and goodies) or server (bare minimal).
> I considered embedding into relocatable libraries similar to Windows' 
> resource, e.g. for versioning plugins etc, but then decided to use an 
> easier and more universal method. 
> 
> I simply put an Ada constructing function into the library. The function 
> is exported. The address returned by GetProcAddress or dlsym goes to 
> Unchecked_Conversion to an access to subprogram, and here you are. 
> 
> The obvious advantage of this method over embedding is that the object 
> can be tagged of any derived type, which no embedding can do. And you 
> can add whatever further initialization or checks you might need. 
> 

Can you elaborate a little?
I don't see what you put in your Ada constructing function.
I do see how you use it but not how and where you put the original content or file.

Let's suppose you have some documentation file 'config/example.conf'.
How would you integrate it in a binary with your solution?

Best regards,

Stephane

  reply	other threads:[~2021-06-11 17:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11 13:30 ANN: Ada Resource Embedder for C, Ada and Go Stephane Carrez
2021-06-11 13:51 ` Stéphane Rivière
2021-06-11 15:41   ` Doctor Who
2021-06-12 11:41     ` Doctor Who
2021-06-12 12:03     ` Stéphane Rivière
2021-06-12 12:51       ` Doctor Who
2021-06-11 16:19   ` Dmitry A. Kazakov
2021-06-11 17:32     ` Stephane Carrez [this message]
2021-06-11 18:25       ` Dmitry A. Kazakov
2021-06-11 18:44         ` Stephane Carrez
2021-06-11 19:53           ` Dmitry A. Kazakov
2021-06-12  6:15             ` Stephane Carrez
2021-06-12 11:31           ` Stéphane Rivière
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox