-
-
Notifications
You must be signed in to change notification settings - Fork 166
Translating Oils to Rust
andychu edited this page Jun 16, 2025
·
11 revisions
Why create liboils
?
- Tools like
resholve
are built on top of the Oils AST (lossless syntax tree) - I want somebody to write an auto-formatter for YSH, and
- mycpp Modules
- and refactoring to modules: the C++ build should have a pure "liboils" + the Unix I/O
- Zephyr ASDL subtyping - multiple inheritance, graph-shaped type relationships
- mycpp: classes with single inheritance should be easy
- Garbage Collection
-
Rc<T>
is possible, but probably not fast, and would leak cycles - I would start out with Arena
- maybe do OHeap-like "data-oriented design" - Compact AST Representation
- later: copying collector
-
- fast edit-run cycle - just start the Python interpreter (~50 ms)
- precise location info and error messages
- has YSH too
- simple word evaluation
- better handling
- less binary code than shells in Rust
- though we dynamically link GNU readline, so that is not a totally fair comparison