From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Basile Starynkevitch Newsgroups: gmane.comp.gcc.jit,gmane.lisp.guile.user Subject: Re: Running Compiled Guile Objects Date: Sat, 14 Dec 2024 18:11:02 +0100 Message-ID: <769073d434c2ed5fb7937c85da240aa5df4d854a.camel@starynkevitch.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12696"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.52.3-0ubuntu1 Cc: "guile-user-mXXj517/zsQ@public.gmane.org" , jit-/MQLu3FmUzdAfugRpC6u6w@public.gmane.org To: Nala Ginrut , Hakan Candar Original-X-From: jit-bounces~gcgj-jit=m.gmane-mx.org-/MQLu3FmUzdAfugRpC6u6w@public.gmane.org Sat Dec 14 18:11:13 2024 Return-path: Envelope-to: gcgj-jit@m.gmane-mx.org Original-Received: from server2.sourceware.org ([8.43.85.97]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tMVfc-00038f-LN for gcgj-jit@m.gmane-mx.org; Sat, 14 Dec 2024 18:11:12 +0100 Original-Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6BC183858C5F for ; Sat, 14 Dec 2024 17:11:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BC183858C5F Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=starynkevitch.net header.i=@starynkevitch.net header.a=rsa-sha256 header.s=gm1 header.b=P+w/RIC2 Original-Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by sourceware.org (Postfix) with ESMTPS id B91943858D21 for ; Sat, 14 Dec 2024 17:11:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B91943858D21 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=starynkevitch.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=starynkevitch.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B91943858D21 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4b98:dc4:8::227 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734196265; cv=none; b=PqhsLOHrB8axuEiecgwBMMJR/S8MgBkNFhG7fwR8NLpLI4B9mjGBLMkVDGGQKlfXCq/ik7+qioML6u0JQu1IUOExB59d6cahQJP8Yt+LEYXULyAJlKKqle1AYbLS3pQo0f6toe0XaIUfhuzM+ZMY7mWdvjTmOWFmgkvO2GWNa3Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734196265; c=relaxed/simple; bh=Sll6iT6q4JeiABtm1vqbPwsGYiNkYG6ilWNjn/rvhPs=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=iZvb3E3nC2mMAYKDMnjlQRlc1L+VIsATqFN1R4q3IvjmUHaZnVvi3nHj5Ksk57wgTiAouqD4kUJ7GgIMFs0890MjyE1T8E+EVytp5tFg/BIx5VG0sX+9coEaWjDxOBc7/suJLRT/OrCKbZDBGYpqlWY0Q5jRFQY778mANMkllb8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B91943858D21 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id E8F4020003; Sat, 14 Dec 2024 17:11:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=starynkevitch.net; s=gm1; t=1734196263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QGLsXF+/awLwsOfDGJ+GNVS5EMybzUGPd+Ka12XeF2I=; b=P+w/RIC28o1gb06wPaBhRSgne2mAj6rCtySJlnCyVNsiPPUY8Rk4jPg7E/UTUWwam5O9j2 FjmkyaYOTs1OuSQxLFd7ezo3kMdTXEjunPp9J6TPPlvzNYWKc0Y7mwS8fcnCGIp516kaXs aZ83Qexjj6sXLeTgluYddQZZ5vG3Bu6ifcE03RvC/yf7uo9dp9m+REnQjpvic1ihMnezcY /89y1B6pRZ1OkAJLOhJkO7ly0H3nR1l2MIbYdhDOk8anyF8GvQtf4Oikip8xyzbDoLdC99 v0HnLrXcGRGtA4uzAGgdBhqHf1eG0/ak71IFA9E4hKfrNuXimG/E3N8Len3QUA== In-Reply-To: X-GND-Sasl: basile-VdE74OAlGqnvXjIo7pOF+l6hYfS7NtTn@public.gmane.org X-BeenThere: jit-/MQLu3FmUzdAfugRpC6u6w@public.gmane.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Jit mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: jit-bounces~gcgj-jit=m.gmane-mx.org-/MQLu3FmUzdAfugRpC6u6w@public.gmane.org Xref: news.gmane.io gmane.comp.gcc.jit:1943 gmane.lisp.guile.user:19992 Archived-At: On Sat, 2024-12-14 at 09:15 +0900, Nala Ginrut wrote: > Hi Hakan! > The current Guile is not AOT yet. Although the object file is ELF, > it's > just bytecode wrapped ELF header. So you can't run it as a regular > executable file. >=20 Those willing to contribute a proper ahead-of-time compiler to GNU guile could use the GNU CC libgccjit library which is part of the GCC compiler. https://gcc.gnu.org/onlinedocs/jit/ This libgccjit layer of the GCC compiler is stable and maintained C API and has some obsolete C++ API (which seems unmaintained in december 2024). Most of the libgccjit code is internally coded (under GPL license) in C++, but the stable API is for C. I am using the C API of libgccjit in the RefPerSys open source inference engine project (GPLv3+ licensed) on https://github.com/RefPerSys/RefPerSys/ Both libgccjit and GNU lightning (see https://www.gnu.org/software/lightning/ ...) could be a basis for adding a genuine compilation layer to GNU guile. And RefPerSys uses both. I guess a significant issue would be to use libgccjit (or GNU lightning) with GUILE's garbage collector (which seems to be Boehm conservative GC). The RefPerSys project has a precise garbage collector and some persistence (to textual files). Since it is GPLv3+ licensed, its code could be reused in a future GUILE major version. RefPerSys is mostly coded in C++. I did contribute to GCC long time ago and hope that RefPerSys could become a GNU project (but don't know how to make that happen) Regards from near Paris in France. --=20 Basile STARYNKEVITCH 8 rue de la Fa=C3=AFencerie 92340 Bourg-la-Reine, France http://starynkevitch.net/Basile & https://github.com/bstarynk=20