#lisp #dxf #cad #graphics #autolisp

bin+lib acadlisp

AutoLISP interpreter and mini CAD engine - CSV/TPL/LSP workflow emulator for AutoCAD 9/10 (DOS era)

1 unstable release

new 0.1.0 Dec 26, 2025

#2 in #dxf

MIT license

485KB
12K SLoC

Common Lisp 6.5K SLoC // 0.2% comments Rust 5K SLoC // 0.0% comments JavaScript 399 SLoC // 0.2% comments

acadlisp

AutoLISP interpreter and mini CAD engine in Rust, targeting WebAssembly.

Emulates CSV/TPL/LSP workflows from AutoCAD 9/10 (DOS era) for educational and archival purposes.

Features

  • AutoLISP interpreter with core functions
  • CAD primitives: LINE, CIRCLE, ARC, TEXT, INSERT (blocks)
  • CSV data reading for parametric drawings
  • DXF export
  • Runs natively and in browser (WASM)

Try it

Live demo: acadlisp.de

Usage

As a library

use acadlisp::Engine;

let mut engine = Engine::new();
engine.eval("(setq x 10)");
engine.eval("(command \"LINE\" '(0 0) '(100 100) \"\")");

let entities = engine.get_entities();
let dxf = engine.export_dxf();

CLI

cargo run --bin acadlisp-cli -- samples/TEST.LSP

WASM

trunk serve
# Open http://localhost:8080

Supported AutoLISP Functions

Core

setq defun if cond while repeat progn lambda apply mapcar foreach

Math

+ - * / 1+ 1- abs sin cos atan sqrt expt min max rem gcd

Comparison

= /= < > <= >= eq equal

Logic

and or not null

List

car cdr cons list append reverse length nth member assoc subst

String

strcat strlen substr strcase atoi atof itoa rtos read

I/O

print princ prin1 terpri prompt

CAD

command getvar setvar entget entmake entmod ssget sslength ssname

Building

# Native
cargo build --release

# WASM
trunk build --release

License

MIT

Dependencies

~7–9.5MB
~174K SLoC