From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Aur=C3=A9lien_Aptel?= Newsgroups: gmane.emacs.devel Subject: Re: Dynamic loading progress Date: Sat, 28 Feb 2015 19:20:41 +0100 Message-ID: References: <83wq3k3kl4.fsf@gnu.org> <85bnkwil1c.fsf@stephe-leake.org> <83pp9cwky8.fsf@gnu.org> <85a90ggf2d.fsf@stephe-leake.org> <54E0A40F.5080603@dancol.org> <83sie7un20.fsf@gnu.org> <54E0D181.2080802@dancol.org> <83r3trulse.fsf@gnu.org> <54E0D7E0.305@87.69.4.28> <83h9unukbg.fsf@gnu.org> <54E0DEF8.7020901@dancol> <83egpruiyp.fsf@gnu.org> <54E0FF93.2000104@dancol.org> <833865vp4d.fsf@gnu.org> <54E2355A.90@87.69.4.28> <83vbj1u020.fsf@gnu.org> <54E24CA4.9020601@dancol.org> <83h9uk7ddb.fsf@gnu.org> <54E382A5.5030408@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1425147655 25247 80.91.229.3 (28 Feb 2015 18:20:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Feb 2015 18:20:55 +0000 (UTC) Cc: Eli Zaretskii , Daniel Colascione , Stephen Leake , Emacs development discussions To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 28 19:20:53 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YRm0S-0007nS-5O for ged-emacs-devel@m.gmane.org; Sat, 28 Feb 2015 19:20:52 +0100 Original-Received: from localhost ([::1]:42059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRm0R-0003fc-D5 for ged-emacs-devel@m.gmane.org; Sat, 28 Feb 2015 13:20:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRm0M-0003cT-MC for emacs-devel@gnu.org; Sat, 28 Feb 2015 13:20:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YRm0L-0002tT-BN for emacs-devel@gnu.org; Sat, 28 Feb 2015 13:20:46 -0500 Original-Received: from mail-ig0-x231.google.com ([2607:f8b0:4001:c05::231]:32866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRm0J-0002sG-1d; Sat, 28 Feb 2015 13:20:43 -0500 Original-Received: by igbhl2 with SMTP id hl2so7534931igb.0; Sat, 28 Feb 2015 10:20:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ar5b4Y3jalvsHrG763KP302yL+X8Ht27+l+2rTsZ0bs=; b=isAoOi03TrsnhEy2sa6lA4yXhAqdVQNAYCL6+bm99naEfQKRktz1NVr5maqTzFdFf8 PbGxfyDohZfRS0a9KyO9OA/gOoILG4TXi3Yu1XveaZtrVJzWLqLWtpmM/YquYF5BI0lg Cbd4A/QOyF4PTuSBOIuTAAGmKoP4GRhgqbGKHwAIWcA71h1FVXzDzNn98FPQ6OERB/5r VdC/Hsk5JEt3xKkTJvhG/ei2lJ+t59apU3xDRU7i5i18W+iJ6dzKs1YNyoG94TMXfASK 67GV8bY07ZjBBEYtS2JikHirihqeNznulUz4thzc1dzetl3Qo/t68Rz9lVz2yYPbZY96 rnbA== X-Received: by 10.107.170.220 with SMTP id g89mr26315118ioj.31.1425147642060; Sat, 28 Feb 2015 10:20:42 -0800 (PST) Original-Received: by 10.36.48.215 with HTTP; Sat, 28 Feb 2015 10:20:41 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: ObZ1kgLZT9I3blADZDCpPeQ8hrQ X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c05::231 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183540 Archived-At: I've tried to implement modules using Daniel's plan. It turned out to be pretty easy, mostly because I'm more familiar with the Emacs codebase now and because it's a lot less intrusive than my previous attempt. It's not finished but I have a basic module working on linux. It's a proof of concept, basically. * fixnum <-> int64_t is the only type conversion supported * No memory management * No error handling * No optional compilation/configure option * No docstrings No special build instructions since nothing is ifdef'd. Once you have it running, you can build the sample module by running make in modules/basic/. $ ./src/emacs -Q (module-load "./modules/basic/basic.so") => t (basic-sum 2 2) => 4 The code is available on my github repo on the dynamic-modules-2 branch. The interesting parts are the API header, the runtime and the sample module. git repo: https://github.com/aaptel/emacs-dynamic-module.git browse online: https://github.com/aaptel/emacs-dynamic-module/commit/278f26a5e993f8cbf6784f35c5ea8aeb9ef04019