{"id":16662734,"url":"https://github.com/shsms/tulisp","last_synced_at":"2025-03-15T12:30:33.413Z","repository":{"id":60606261,"uuid":"544224750","full_name":"shsms/tulisp","owner":"shsms","description":"An embeddable lisp interpreter written in Rust.","archived":false,"fork":false,"pushed_at":"2024-08-23T23:02:40.000Z","size":918,"stargazers_count":19,"open_issues_count":14,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T01:47:32.357Z","etag":null,"topics":["lisp","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shsms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-02T00:44:53.000Z","updated_at":"2025-01-08T14:53:00.000Z","dependencies_parsed_at":"2023-11-18T15:04:30.847Z","dependency_job_id":"12335ea1-ba52-41b4-ad9b-1e7ddc8849bc","html_url":"https://github.com/shsms/tulisp","commit_stats":{"total_commits":257,"total_committers":1,"mean_commits":257.0,"dds":0.0,"last_synced_commit":"90e4573bfc192136afb26925c82ac8972f04c92a"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shsms%2Ftulisp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shsms%2Ftulisp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shsms%2Ftulisp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shsms%2Ftulisp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shsms","download_url":"https://codeload.github.com/shsms/tulisp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243730869,"owners_count":20338730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lisp","rust"],"created_at":"2024-10-12T10:38:45.316Z","updated_at":"2025-03-15T12:30:32.929Z","avatar_url":"https://github.com/shsms.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# _Tulisp_\n\n[\u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/docsrs/tulisp\"\u003e](https://docs.rs/tulisp/latest/tulisp/)\n[\u003cimg alt=\"Crates.io\" src=\"https://img.shields.io/crates/v/tulisp\"\u003e](https://crates.io/crates/tulisp)\n\nTulisp is a Lisp interpreter that can be embedded into Rust programs.  The\nsyntax tries to closely match that of Emacs Lisp.  It was primarily designed to\nbe a configuration language, but it also works well as a general purpose\nembedded scripting language.\n\nOne of the many benefits of using the Emacs Lisp syntax is that we can reuse its\ndocumentation for the builtin functions and macros.  And for people who are\nalready familiar with Emacs Lisp, there's no need to learn an extra language.\n\n## Getting started\n\nTulisp requires `rustc` version 1.70 or higher.\n\nIt is very easy to get started.  Here's an example:\n\n  ```rust\n  use tulisp::{TulispContext, tulisp_fn, Error};\n\n  fn main() -\u003e Result\u003c(), Error\u003e {\n      // Create a new Tulisp execution context.\n      let mut ctx = TulispContext::new();\n\n      // Add a function called `add_nums` to `ctx`.\n      #[tulisp_fn(add_func = \"ctx\")]\n      fn add_nums(num1: i64, num2: i64) -\u003e i64 {\n          num1 + num2\n      }\n\n      // Write a lisp program that calls `add_nums`\n      let program = \"(add_nums 10 20)\";\n\n      // Evaluate the program, and save the result.\n      let sum: i64 = ctx.eval_string(program)?.try_into()?;\n\n      assert_eq!(sum, 30);\n      Ok(())\n  }\n  ```\n\n## Features\n\n- `defun`s, `defmacro`s and `lambda`s\n- `intern` to find/create symbols dynamically\n- Backquote/Unquote forms (for example `` `(answer . ,(+ 2 3)) ``)\n- Threading macros (`thread-first` and `thread-last`)\n- Methods for reading from alists and plists\n- Lexical scopes and lexical binding\n- Tailcall Optimization\n- Proc macros for exposing rust functions to tulisp\n- Decl macros for\n  [creating lists](https://docs.rs/tulisp/latest/tulisp/macro.list.html)\n  and\n  [destructuring lists](https://docs.rs/tulisp/latest/tulisp/macro.destruct_bind.html)\n  quickly.\n- Easy to use [interpreter](https://docs.rs/tulisp/latest/tulisp/struct.TulispContext.html) and [object](https://docs.rs/tulisp/latest/tulisp/struct.TulispObject.html)s\n- Backtraces for errors\n\n## Performance\n\nTulisp has a light-weight tree-walking interpreter with very low startup times and sufficient speed for many config/simulation needs.\n\n## Builtin functions\n\nA list of currently available builtin functions can be found [here](https://docs.rs/tulisp/latest/tulisp/builtin).\n\n## Projects using Tulisp\n\n- [slippy](https://github.com/shsms/slippy) - a configuration tool for the Sway window manager.\n- [microsim](https://github.com/shsms/microsim) - a microgrid simulator.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshsms%2Ftulisp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshsms%2Ftulisp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshsms%2Ftulisp/lists"}