X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by lists.alpinelinux.org (Postfix) with ESMTP id 95032360F71F for ; Tue, 2 Mar 2010 16:32:36 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 25so100861eya.19 for ; Tue, 02 Mar 2010 08:32:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=mS8sUb3DoIImzYkdn3BDeiDaXxu99y0uaOkCIJm/5Dw=; b=AOfOci7B2IFBgpRM0VWgaH5dUS9vf2pCzuGczs8kmEQEjV3pfullDpNE+sr6d8ys/v Lyuc6BzwRiTVJ1H889VJfLA0Ot4qezVWsA91c9n3FIXO84EqjiukTCU5fG3AuZtZLuat sJeONFiDONS/wJg9AHZZfX0uJLRrFWG4dm4GI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=EzFcpm2EiPzz7NRMqVN9eqJmB9OVEoq0mJkr5MuTs65OiQfSvSeKYZRFky6sgNYrcU HD4NlgsG2UA+SnY7EFhwxZMHGzza/jgWN3cY36JfaXzImK5vyDp+LA0AB8pcSIbsCBtU RrHe3lv2SS5fSVLkNONrImacJ2ar2DYEGYKhc= X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Received: by 10.213.100.165 with SMTP id y37mr1057448ebn.71.1267547555659; Tue, 02 Mar 2010 08:32:35 -0800 (PST) In-Reply-To: <4B8D1D3F.4010102@gmail.com> References: <95408c821003012321j22b36b8fk1130a838f32fa9b6@mail.gmail.com> <4B8CDDFE.2090202@iki.fi> <4B8D1D3F.4010102@gmail.com> Date: Tue, 2 Mar 2010 17:32:35 +0100 Message-ID: <95408c821003020832h48f57fb7m69eccdeb06410190@mail.gmail.com> Subject: Re: [alpine-devel] apk-tools idea: binding to other applications and languages From: Natanael Copa To: Cameron Banta Cc: =?ISO-8859-1?Q?Timo_Ter=E4s?= , Alpine Developers Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2010/3/2 Cameron Banta : > On 03/02/2010 03:44 AM, Timo Ter=E4s wrote: >> Natanael Copa wrote: >>> Som things I have been thinking of for some time. >>> >>> It would be nice to make apk-tools functions available from other >>> applications and higher level languages. The immedeate need I have is >>> a binding to the version compare functions from lua. ... >> However 1&2 do require that we start to maintain some sort of >> stable API. At least for the high level stuff the lua code wants >> to do. > A couple thoughts on this. > > I like how easy lua is to embed into the app itself with no external > dependencies. Because apk is very small to start with that will add > considerable size to the executable (100K-300K I think). > This would allow us to write even some core functionality of apk in lua. > I believe you can also compile lua scripts directly into the executable > - size is bigger, but makes for easier development and changes. > This also allows writing plugins directly in lua, and just dropping them > in some directory to extend the functionality of apk. I'm not sure we want pull in lua in the apk core code. I'm more interested in having a c library with lua bindings than embedding lua in the apk executable. (lua is good at the latter though) > That's all a bit different than having an app use apk. I've used swig > (http://www.swig.org/) before, and I like how it can create bindings for > several languages (lua, python, perl, php, ruby, etc) from one swig > config file that basically defines the API. These bindings could all be > in their own apk packages and be depended upon by any apps that want to > use them. These bindings can be compiled into their .so files from the > same source files that apk is compiled from, so there wouldn't really be > much duplication of code. > > There are other tools like swig out there, swig is just the only one > I've personally used before. lua bindings to c libs is pretty easy, even without swig and i think swig gives you even more overhead. The big thing here though is a timo say, a more or less stable api for the library. What do we want high level langs should be able to do? --=20 Natanael Copa --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---