oxur

Crates.iooxur
lib.rsoxur
version0.2.0
created_at2026-01-09 08:08:43.281176+00
updated_at2026-01-17 00:38:20.830459+00
descriptionOxur: A Lisp dialect that treats Rust as its compilation target and runtime
homepage
repositoryhttps://github.com/oxur/oxur
max_upload_size
id2031785
size71,905
Duncan McGreggor (oubiwann)

documentation

README

Oxur

Crates.io Documentation License: MIT OR Apache-2.0

Oxur: A Lisp dialect that treats Rust as its compilation target and runtime

This is the umbrella crate for the Oxur project, providing convenient access to all major components of the Oxur ecosystem.

Overview

Oxur is a Lisp dialect designed to leverage Rust's type system, ownership model, and ecosystem while providing Lisp's expressiveness and metaprogramming capabilities.

Key Philosophy: Write Rust code using Lisp syntax with 100% bidirectional interoperability.

Architecture

The Oxur compilation pipeline consists of five stages:

┌─────────────────────────────────────────────────────────────────┐
│                    OXUR COMPILATION PIPELINE                    │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Oxur Source (Lisp)                                             │
│         ↓                                                       │
│  ┌──────────────────┐                                           │
│  │  oxur-lang       │  Stage 1: Parse → Surface Forms           │
│  │  (Lisp Compiler) │  Stage 2: Expand → Core Forms (IR)        │
│  └──────────────────┘                                           │
│         ↓                                                       │
│  Core Forms (Canonical S-expressions)                           │
│         ↓                                                       │
│  ┌──────────────────┐                                           │
│  │  oxur-comp       │  Stage 3: Lower → Rust AST                │
│  │  (Backend)       │  Stage 4: Codegen → Rust Source           │
│  └──────────────────┘  Stage 5: Compile → Binary (via rustc)    │
│         ↓                                                       │
│  Rust Binary                                                    │
│                                                                 │
│  ┌──────────────────┐                                           │
│  │  oxur-ast        │  Supporting: Bidirectional Rust AST ↔     │
│  │  (AST Library)   │  S-expression conversion                  │
│  └──────────────────┘                                           │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Components

This umbrella crate re-exports the following components:

  • oxur-lang: The Oxur Lisp compiler (stages 1-2)
  • oxur-comp: The backend compiler (stages 3-5)
  • oxur-ast: Bidirectional Rust AST ↔ S-expression conversion
  • oxur-repl: Interactive REPL server/client
  • oxur-cli: Common CLI utilities and infrastructure
  • oxur-pretty: Pretty printing for code and data structures

Installation

Add this to your Cargo.toml:

[dependencies]
oxur = "0.1"

Usage

use oxur::*;

// API examples will be added as the project matures

Design Principles

  1. 100% Rust Interoperability - Can call any Rust code, Rust can call any Oxur code
  2. Rust Semantics, Lisp Syntax - Not Lisp semantics adapted to Rust
  3. Canonical S-expressions - Single authoritative format for AST representation
  4. Round-trip Preservation - X → transform → X must preserve meaning
  5. Type-First Design - Leverage Rust's type system fully

Project Status

Oxur is in active development. Different components are at various stages:

  • oxur-ast: ~80% complete, functional conversion
  • oxur-lang: Planning stage
  • oxur-comp: Planning stage
  • oxur-repl: Planning stage
  • oxur-cli: Early stage, utilities available

Resources

Contributing

Contributions are welcome! Please read our Contributing Guide for details.

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 489

cargo fmt