From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Andr=C3=A9s_Saraos_Luna?= Subject: [0] ob-rust, support for rust code blocks Date: Mon, 18 Dec 2017 14:44:20 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_46137765.258012345116" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQviZ-0001HJ-8w for emacs-orgmode@gnu.org; Mon, 18 Dec 2017 08:44:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQviV-0002d8-2F for emacs-orgmode@gnu.org; Mon, 18 Dec 2017 08:44:31 -0500 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:46344) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eQviU-0002Zm-Kg for emacs-orgmode@gnu.org; Mon, 18 Dec 2017 08:44:26 -0500 Received: by mail-wm0-x22d.google.com with SMTP id r78so29383033wme.5 for ; Mon, 18 Dec 2017 05:44:26 -0800 (PST) Received: from [192.168.1.45] (91.63.131.77.rev.sfr.net. [77.131.63.91]) by smtp.gmail.com with ESMTPSA id g54sm3085240wrg.43.2017.12.18.05.44.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Dec 2017 05:44:23 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org ------=_NextPart_46137765.258012345116 Content-Type: multipart/alternative; boundary="----=_NextPart_42781910.258012345116" ------=_NextPart_42781910.258012345116 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi all, As a toy project I've written a simple ob-rust, mainly in order to prepare = some simple demos using rust. It works well for all the simple examples provided in the ob-rust-test.org = file. Its shortcomings are documented in the ob-rust.el file itself. Since I'm not completely sure of the submission protocol for new features, = the new file lives in contrib for now, although it doesn't depend on anything outside of `ob' rea= lly so maybe it could be added to core? As far as testing is concerned, since I don't know how to use the database = used by `org-test-at-id' I hardcoded the name of the testing file, I'd be happy to change that if nece= ssary. Here's hoping this is useful for others, and since this is my first time wr= iting anything functional in elisp I'm gladly open for any hints to improve the code. --- Andr=C3=A9s Saraos Luna ------=_NextPart_42781910.258012345116 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
Hi all,

As a toy projec= t I've written a simple ob-rust, mainly in order to prepare some simple dem= os using rust.

It works well for all the simple ex= amples provided in the ob-rust-test.org file. Its shortcomings are
documented in the ob-rust.el file itself.

Since = I'm not completely sure of the submission protocol for new features, the ne= w file lives in
contrib for now, although it doesn't depend on an= ything outside of `ob' really so maybe it could be
added to core?=

As far as testing is concerned, since I don't kno= w how to use the database used by `org-test-at-id' I
hardcoded th= e name of the testing file, I'd be happy to change that if necessary.
=

Here's hoping this is useful for others, and since this= is my first time writing anything functional
in elisp I'm gladly= open for any hints to improve the code.

---
=
Andr=C3=A9s Saraos Luna
------=_NextPart_42781910.258012345116-- ------=_NextPart_46137765.258012345116 Content-Type: text/plain; name="ob-rust.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ob-rust.patch" >From 0a91c2b0d43e6e8f19d023208e78b07722a5dc33 Mon Sep 17 00:00:00 2001=0AFr= om: =3D?UTF-8?q?Andr=3DC3=3DA9s=3D20Saraos=3D20Luna?=3D =0ADate: Mon, 18 Dec 2017 10:28:07 +0100=0ASubject: [PATCH] ob-rus= t.el, adds working version of rust evaluation in org=0A source blocks=0AMIM= E-Version: 1.0=0AContent-Type: text/plain; charset=3DUTF-8=0AContent-Transf= er-Encoding: 8bit=0A=0ASigned-off-by: Andr=C3=A9s Saraos Luna =0A=0A* contrib/lisp/ob-rust.el: Support for limited rust so= urce code in org=0A babel.=0A=0A* testing/examples/ob-rust-test.org: Test = all implemented features of=0A ob-rust in the form of named Org source blo= cks.=0A=0A* testing/lisp/test-ob-rust.el: Defines the tests.=0A=0ATINYCHANG= E=0A---=0A contrib/lisp/ob-rust.el | 207 ++++++++++++++++++++++++= ++++++++++++++=0A testing/examples/ob-rust-test.org | 82 +++++++++++++++= =0A testing/lisp/test-ob-rust.el | 110 ++++++++++++++++++++=0A 3 files= changed, 399 insertions(+)=0A create mode 100644 contrib/lisp/ob-rust.el= =0A create mode 100644 testing/examples/ob-rust-test.org=0A create mode 100= 644 testing/lisp/test-ob-rust.el=0A=0Adiff --git a/contrib/lisp/ob-rust.el = b/contrib/lisp/ob-rust.el=0Anew file mode 100644=0Aindex 000000000..daa2062= 28=0A--- /dev/null=0A+++ b/contrib/lisp/ob-rust.el=0A@@ -0,0 +1,207 @@=0A+;= ;; ob-rust.el --- Babel Functions for rust -*- lexical-binding: t; -*-=0A+= =0A+;; Copyright (C) 2017 Free Software Foundation, Inc.=0A+=0A+;; Author: = Andr=C3=A9s Saraos Luna=0A+;; Keywords: literate programming, reproducible = research=0A+;; Homepage: http://orgmode.org=0A+=0A+;; This file is part of = GNU Emacs.=0A+=0A+;; GNU Emacs is free software: you can redistribute it an= d/or modify=0A+;; it under the terms of the GNU General Public License as p= ublished by=0A+;; the Free Software Foundation, either version 3 of the Lic= ense, or=0A+;; (at your option) any later version.=0A+=0A+;; GNU Emacs is d= istributed in the hope that it will be useful,=0A+;; but WITHOUT ANY WARRAN= TY; without even the implied warranty of=0A+;; MERCHANTABILITY or FITNESS F= OR A PARTICULAR PURPOSE. See the=0A+;; GNU General Public License for more= details.=0A+=0A+;; You should have received a copy of the GNU General Publ= ic License=0A+;; along with GNU Emacs. If not, see .=0A+=0A+;;; Commentary:=0A+=0A+;; Org-Babel support for evaluating= rust code.=0A+;;=0A+;; A currently very limited implementation:=0A+;; - a= rrays, vecs, lists or tables are not yet supported as header=0A+;; argumen= ts=0A+;; - no error handling=0A+;; - only :results output is supported=0A= +;; - cargo is completely ignored=0A+=0A+(require 'ob)=0A+=0A+(defvar org-= babel-tangle-lang-exts)=0A+(add-to-list 'org-babel-tangle-lang-exts '("rust= " . "rs"))=0A+=0A+(defcustom org-babel-rust-command "rustc"=0A+ "Name of t= he rust command."=0A+ :group 'org-babel=0A+ :type 'string)=0A+=0A+(defun = org-babel-execute:rust (body params)=0A+ (let* ((full-body (org-babel-expa= nd-body:rust body params))=0A+ (cmpflag (or (cdr (assq :cmpflag par= ams)) ""))=0A+ (cmdline (or (cdr (assq :cmdline params)) ""))=0A+ = (default-directory org-babel-temporary-directory)=0A+ (src-f= ile (org-babel-temp-file "rust-src-" ".rs"))=0A+ (exe-file (org-bab= el-rust-exe-file src-file cmpflag))=0A+ (results))=0A+ (with-tem= p-file src-file=0A+ (insert full-body)=0A+ (when (require 'rust-m= ode nil t)=0A+ (rust-format-buffer)))=0A+ (org-babel-eval=0A+ = (format "%s %s %s" org-babel-rust-command cmpflag src-file) "")=0A+ (se= tq results (org-babel-eval (format "%s %s" exe-file cmdline) ""))=0A+ (o= rg-babel-reassemble-table=0A+ (org-babel-result-cond (cdr (assq :result= -params params))=0A+ (org-babel-read results)=0A+ (let ((tmp-fi= le (org-babel-temp-file "rs-")))=0A+ (with-temp-file tmp-file (inse= rt results))=0A+ (org-babel-import-elisp-from-file tmp-file)))=0A+ = (org-babel-pick-name=0A+ (cdr (assq :colname-names params)) (cdr (= assq :colnames params)))=0A+ (org-babel-pick-name=0A+ (cdr (assq := rowname-names params)) (cdr (assq :rownames params))))))=0A+=0A+(defun org-= babel-expand-body:rust (body params)=0A+ "Expand a block of rust code with= org-babel according to its=0A+header arguments."=0A+ (let* ((main-p (not = (string=3D (cdr (assq :main params)) "no")))=0A+ (uses (org-babel-r= ead (cdr (assq :use params)) nil))=0A+ (vars (org-babel--get-vars p= arams)))=0A+ (when (stringp uses)=0A+ (setq uses (split-string uses= )))=0A+ (mapconcat=0A+ 'identity=0A+ (list=0A+ ;; uses=0A+ = (mapconcat=0A+ (lambda (use) (format "use %s;" use))=0A+ u= ses=0A+ "\n")=0A+ ;; main vith vars if present=0A+ (org-bab= el-rust-ensure-main-wrap body vars))=0A+ "\n\t")))=0A+=0A+(defun org-ba= bel-prep-session:rust (_session _params)=0A+ "This function does nothing a= s C is a compiled language with no=0A+support for sessions"=0A+ (error "no= support for sessions"))=0A+=0A+(defun org-babel-load-session:rust (_sessio= n _body _params)=0A+ "This function does nothing as C is a compiled langua= ge with no=0A+support for sessions"=0A+ (error "no support for sessions"))= =0A+=0A+;;; Helper functions.=0A+=0A+(defun org-babel-rust-exe-file (src-fi= le cmpflag)=0A+ "Compute the executable name according to the parameters g= iven=0A+to the command line. It assumes that the source file has been=0A+cr= eated at (org-babel-temporary-directory). For spaces to be=0A+correctly rec= ognized they need to be escaped."=0A+ (if (string=3D cmpflag "")=0A+ = (file-name-sans-extension src-file)=0A+ (let* ((flag-list (split-string = cmpflag " "))=0A+ (out-file (nth 1 (member "-o" flag-list)))=0A+ = (out-dir (nth 1 (member "--out-dir" flag-list))))=0A+ (cond= =0A+ (out-file=0A+ (if (string-match-p "^/" out-file) ;naive a= bsolute file path detection=0A+ (expand-file-name out-file "/")= =0A+ (expand-file-name out-file org-babel-temporary-directory)))= =0A+ (out-dir=0A+ (expand-file-name (file-name-base src-file) = (file-name-as-directory out-dir)))=0A+ (t=0A+ (file-name-sans-= extension src-file))))))=0A+=0A+(defun org-babel-rust-ensure-main-wrap (bod= y vars)=0A+ "Wrap BODY in a \"main\" function call if none exist. Inserts= =0A+the variables right after the main declaration, regardless of the=0A+\"= main\" existence."=0A+ (let ((rust-main-regexp "^[ \t]*fn[ \t\n\r]*main[ \= t]*()[ \t\n]*{[ \t]*")=0A+ (rust-main-wrapper "fn main() {\n\t%s\n\t= %s\n}")=0A+ (pos nil))=0A+ (if (string-match rust-main-regexp bod= y)=0A+ (progn=0A+ (setq pos (match-end 0))=0A+ (co= ncat=0A+ (substring body 0 pos)=0A+ "\n"=0A+ = (mapconcat 'org-babel-rust-var-to-rust vars "\n")=0A+ (substring = body pos nil)))=0A+ (format=0A+ rust-main-wrapper=0A+ (map= concat 'org-babel-rust-var-to-rust vars "\n")=0A+ body))))=0A+=0A+(de= fun org-babel-rust-val-to-rust-type (val)=0A+ "Infers the correct rust dat= a type from the value of the given=0A+argument."=0A+ (cond=0A+ ((symbolp= val)=0A+ (cond=0A+ ((=3D (length (symbol-name val)) 1) 'char)=0A+ = ((or (string=3D val "true") (string=3D val "false")) 'bool)=0A+ (t '= &str)))=0A+ ((stringp val)=0A+ (cond=0A+ ((or (string=3D val "true= ") (string=3D val "false")) 'bool)=0A+ (t '&str)))=0A+ ((integerp val= )=0A+ 'isize)=0A+ ((floatp val)=0A+ 'f64)=0A+ (t=0A+ nil)))=0A= +=0A+(defun org-babel-rust-var-to-rust (var-pairs)=0A+ "Formats a given va= riable name, variable value pair according=0A+to its type in correct rust.= =0A+=0A+The variable name follows the following rules :=0A+=0A+- if the nam= e starts with \"mut_\", the variable will be declared=0A+as mutable in rust= code, and be referenced by its name minus the=0A+\"mut\",=0A+=0A+- if the = name is followed by a \":\", the text preceding the=0A+\"=3D\" sign will be= treated as its type. If no type is given one=0A+will be infered."=0A+ (le= t* ((var (car var-pairs))=0A+ (val (cdr var-pairs))=0A+ (va= lue-type (org-babel-rust-val-to-rust-type val))=0A+ (var-s (symbol-= name var))=0A+ (var-regexp "\\(^mut_\\)?\\([[:alnum:]_]+\\)\\(: ?[[= :alnum:]]+\\)?[ \t]*$")=0A+ (mut=0A+ (progn=0A+ = (string-match var-regexp var-s)=0A+ (match-string 1 var-s)))=0A= + (var-name=0A+ (progn=0A+ (string-match var-re= gexp var-s)=0A+ (match-string 2 var-s)))=0A+ (var-type= =0A+ (or=0A+ (progn=0A+ (string-match var-re= gexp var-s)=0A+ (match-string 3 var-s))=0A+ (format "= :%s" (symbol-name (org-babel-rust-val-to-rust-type val)))))=0A+ (pr= e (format "let %s"=0A+ (if (string-match "^mut_" var-s= )=0A+ (concat "mut " (substring var-s (match-end 0= ) nil))=0A+ var)))=0A+ (value (cond=0A+ = ((string-match-p ": ?[iuf]" var-type) (format "%s" val))=0A+ = ((string-match-p ": ?bool" var-type) (format "%s" val))=0A+ = ((string-match-p ": ?char" var-type) (format "'%s'" val))=0A= + (t (format "\"%s\"" val)))))=0A+ (setq mut (when mut "= mut "))=0A+ (concat "let " mut var-name var-type " =3D " value ";")))=0A= +=0A+(provide 'ob-rust)=0Adiff --git a/testing/examples/ob-rust-test.org b/= testing/examples/ob-rust-test.org=0Anew file mode 100644=0Aindex 000000000.= .b2c862bb7=0A--- /dev/null=0A+++ b/testing/examples/ob-rust-test.org=0A@@ -= 0,0 +1,82 @@=0A+#+Title: a collection of examples for ob-rust tests=0A+#+OP= TIONS: ^:nil=0A+=0A+#+name: test-simple=0A+#+BEGIN_SRC rust :results silent= =0A+ fn main() {=0A+ let answer =3D 42;=0A+ println!("{}", answe= r);=0A+ }=0A+#+END_SRC=0A+=0A+#+name: test-main-wrapper=0A+#+BEGIN_SRC rus= t :results silent=0A+ let answer =3D 42;=0A+ println!("{}", answer);=0A+#= +END_SRC=0A+=0A+#+name: test-var-integer=0A+#+BEGIN_SRC rust :var answer=3D= 42 :results silent=0A+ println!("{}", answer);=0A+#+END_SRC=0A+=0A+#+name:= test-var-float=0A+#+BEGIN_SRC rust :var pi=3D3.14 :results silent=0A+ pri= ntln!("{}", pi);=0A+#+END_SRC=0A+=0A+#+name: test-var-char=0A+#+BEGIN_SRC r= ust :var answer=3D'x' :results silent=0A+ println!("{}", answer);=0A+#+END= _SRC=0A+=0A+#+name: test-var-string=0A+#+BEGIN_SRC rust :var answer=3D"GOAT= " :results silent=0A+ println!("{}", answer);=0A+#+END_SRC=0A+=0A+#+name: = test-var-bool-true=0A+#+BEGIN_SRC rust :var test=3D'true :results silent=0A= + if test {=0A+ println!("42");=0A+ }=0A+#+END_SRC=0A+=0A+#+name: test= -var-bool-false=0A+#+BEGIN_SRC rust :var test=3D"false" :results silent=0A+= if !test {=0A+ println!("42");=0A+ }=0A+#+END_SRC=0A+=0A+#+name: test= -var-mutable=0A+#+BEGIN_SRC rust :var mut_answer=3D41 :results silent=0A+ = answer =3D 42;=0A+ println!("{}", answer);=0A+#+END_SRC=0A+=0A+#+name: tes= t-var-given-type=0A+#+BEGIN_SRC rust :var answer:i32=3D40 :results silent= =0A+ let additional_answer: i32 =3D 2;=0A+ println!("{}", answer + additi= onal_answer);=0A+#+END_SRC=0A+=0A+#+name: test-var-mutable-and-given-type= =0A+#+BEGIN_SRC rust :var mut_answer:i32=3D40 :results silent=0A+ let addi= tional_answer: i32 =3D 2;=0A+ answer =3D answer + additional_answer;=0A+ = println!("{}", answer);=0A+#+END_SRC=0A+=0A+#+name: test-var-no-main-wrappe= r=0A+#+BEGIN_SRC rust :var answer=3D42 :results silent=0A+ fn main() {=0A+= println!("{}", answer);=0A+ }=0A+#+END_SRC=0A+=0A+#+name: test-uses-= and-command-line-arguments=0A+#+BEGIN_SRC rust :use std::env :cmdline 1 2 b= onjour :results silent=0A+ let args: Vec =3D env::args().collect()= ;=0A+ println!("{}, {}, {}", args[1], args[2], args[3]);=0A+#+END_SRC=0Adi= ff --git a/testing/lisp/test-ob-rust.el b/testing/lisp/test-ob-rust.el=0Ane= w file mode 100644=0Aindex 000000000..a48ec8a35=0A--- /dev/null=0A+++ b/tes= ting/lisp/test-ob-rust.el=0A@@ -0,0 +1,110 @@=0A+;;; test-ob-rust.el --- te= sts for ob-rust.el=0A+=0A+;; Copyright (c) 2017 Andr=C3=A9s Saraos Luna=0A+= ;; Authors: Andr=C3=A9s Saraos Luna=0A+=0A+;; This file is not part of GNU = Emacs.=0A+=0A+;; This program is free software; you can redistribute it and= /or modify=0A+;; it under the terms of the GNU General Public License as pu= blished by=0A+;; the Free Software Foundation, either version 3 of the Lice= nse, or=0A+;; (at your option) any later version.=0A+=0A+;; This program is= distributed in the hope that it will be useful,=0A+;; but WITHOUT ANY WARR= ANTY; without even the implied warranty of=0A+;; MERCHANTABILITY or FITNESS= FOR A PARTICULAR PURPOSE. See the=0A+;; GNU General Public License for mo= re details.=0A+=0A+;; You should have received a copy of the GNU General Pu= blic License=0A+;; along with this program. If not, see .=0A+=0A+(ert-deftest ob-rust/simple ()=0A+ (when (executable-= find org-babel-rust-command)=0A+ (with-temp-buffer=0A+ (insert-file= -contents "ob-rust-test.org")=0A+ (org-babel-goto-named-src-block "tes= t-simple")=0A+ (should (=3D 42 (org-babel-execute-src-block))))))=0A+= =0A+(ert-deftest ob-rust/main-wrapper ()=0A+ (when (executable-find org-ba= bel-rust-command)=0A+ (with-temp-buffer=0A+ (insert-file-contents "= ob-rust-test.org")=0A+ (org-babel-goto-named-src-block "test-main-wrap= per")=0A+ (should (=3D 42 (org-babel-execute-src-block))))))=0A+=0A+(e= rt-deftest ob-rust/var-integer ()=0A+ (when (executable-find org-babel-rus= t-command)=0A+ (with-temp-buffer=0A+ (insert-file-contents "ob-rust= -test.org")=0A+ (org-babel-goto-named-src-block "test-var-integer")=0A= + (should (=3D 42 (org-babel-execute-src-block))))))=0A+=0A+(ert-defte= st ob-rust/var-float ()=0A+ (when (executable-find org-babel-rust-command)= =0A+ (with-temp-buffer=0A+ (insert-file-contents "ob-rust-test.org"= )=0A+ (org-babel-goto-named-src-block "test-var-float")=0A+ (shou= ld (=3D 3.14 (org-babel-execute-src-block))))))=0A+=0A+(ert-deftest ob-rust= /var-char ()=0A+ (when (executable-find org-babel-rust-command)=0A+ (wi= th-temp-buffer=0A+ (insert-file-contents "ob-rust-test.org")=0A+ = (org-babel-goto-named-src-block "test-var-char")=0A+ (should (string= =3D "x" (org-babel-execute-src-block))))))=0A+=0A+(ert-deftest ob-rust/var-= string ()=0A+ (when (executable-find org-babel-rust-command)=0A+ (with-= temp-buffer=0A+ (insert-file-contents "ob-rust-test.org")=0A+ (or= g-babel-goto-named-src-block "test-var-string")=0A+ (should (string=3D= "GOAT" (org-babel-execute-src-block))))))=0A+=0A+(ert-deftest ob-rust/var-= bool-true ()=0A+ (when (executable-find org-babel-rust-command)=0A+ (wi= th-temp-buffer=0A+ (insert-file-contents "ob-rust-test.org")=0A+ = (org-babel-goto-named-src-block "test-var-bool-true")=0A+ (should (=3D= 42 (org-babel-execute-src-block))))))=0A+=0A+(ert-deftest ob-rust/var-bool= -false ()=0A+ (when (executable-find org-babel-rust-command)=0A+ (with-= temp-buffer=0A+ (insert-file-contents "ob-rust-test.org")=0A+ (or= g-babel-goto-named-src-block "test-var-bool-false")=0A+ (should (=3D 4= 2 (org-babel-execute-src-block))))))=0A+=0A+(ert-deftest ob-rust/var-mutabl= e ()=0A+ (when (executable-find org-babel-rust-command)=0A+ (with-temp-= buffer=0A+ (insert-file-contents "ob-rust-test.org")=0A+ (org-bab= el-goto-named-src-block "test-var-mutable")=0A+ (should (=3D 42 (org-b= abel-execute-src-block))))))=0A+=0A+(ert-deftest ob-rust/var-given-type ()= =0A+ (when (executable-find org-babel-rust-command)=0A+ (with-temp-buff= er=0A+ (insert-file-contents "ob-rust-test.org")=0A+ (org-babel-g= oto-named-src-block "test-var-given-type")=0A+ (should (=3D 42 (org-ba= bel-execute-src-block))))))=0A+=0A+(ert-deftest ob-rust/var-mutable-and-giv= en-type ()=0A+ (when (executable-find org-babel-rust-command)=0A+ (with= -temp-buffer=0A+ (insert-file-contents "ob-rust-test.org")=0A+ (o= rg-babel-goto-named-src-block "test-var-mutable-and-given-type")=0A+ (= should (=3D 42 (org-babel-execute-src-block))))))=0A+=0A+(ert-deftest ob-ru= st/var-no-main-wrapper ()=0A+ (when (executable-find org-babel-rust-comman= d)=0A+ (with-temp-buffer=0A+ (insert-file-contents "ob-rust-test.or= g")=0A+ (org-babel-goto-named-src-block "test-var-no-main-wrapper")=0A= + (should (=3D 42 (org-babel-execute-src-block))))))=0A+=0A+(ert-defte= st ob-rust/uses-and-command-line-arguments ()=0A+ (when (executable-find o= rg-babel-rust-command)=0A+ (with-temp-buffer=0A+ (insert-file-conte= nts "ob-rust-test.org")=0A+ (org-babel-goto-named-src-block "test-uses= -and-command-line-arguments")=0A+ (should (equal '((1 . (2 . ("bonjour= ")))) (org-babel-execute-src-block))))))=0A-- =0A2.11.0=0A=0A ------=_NextPart_46137765.258012345116--