OrCo is a compiler toolchain focusing on performace and extensibility Developed on streams
OrCo has the following goals:
- Bring hot code reloading, intellisence, debugging, interpreters, cross-compilers and similar features to all supported languages
- Easy language interop
Some note I worte a long time ago. Doesn't really make sence to me, but should make sence for new developers:
Note for developers:
Intermediate Representation is nesesary, because we can't just invoke a backend(f.e. cranelift) and tell it to declare a trait. And we can't just parse a language into an IR, because of LSP support.
Some things might be concerning:
- Span. Spans are probably too heavy
- AST is made of Arc's, instead of centrual storadge and IDs
- Metadata. Proper way would be to have custom AST nodes inherit normal AST nodes, but Rust doesn't have inheritance
- Add
span: Span
filed into structs instead of usingSpanned<Struct>
. This will make code simpler.Spanned
was added mainly for enums
You can watch me do this live on Twitch and Youtube
Roadmap for now:
- Symbols
- Paths
- Floats
- Frontend-side diagnostics (and diagnostics refactor (and lints))
- Fix cyclic Arc by implementing inner pointers
- Reduce the use of
Spanned<Struct>
- Make IR first-class (a BIG refactor)
- Remove Ariadne completely (+ lexer abort compilation)
- Move spans to frontend?
- Comptime type hints
- Path as an operator [cancelled]
-
orco::Path
borrowing names? [cancelled] - Get metadata traits out of macros
- Reorganize IR Tree to hold references to modules. Maybe local resolve should only be in module?
- Parent modules (
super::
) - Fix lazy evaluation:
- Extract part of TypeInference struct into something like LocalContext
- Rename TypeInference to something like Context and rename all the functions
- Remove lifetime from TypeInference/Context struct and make it shareable/cloneable
- Isolate LocalContext for all ensure_evaluated
- [] Comptimes in blocks
- Structs
- Generics
- Operator Overloading & Traits
- Finish the interpreter
- Unwinding?
- Effect system?!
- Pointers
- Typecasts
- Arrays
- While loop
- C Frontend (and a blog post on it hopefully)
- Post-typechecking frontend-side checks
- Rust frontend
- Self-hosting