Closed bitwalker closed 5 years ago
Yeah, this is all good ideas. A lot of these inconsistencies stem from the way the project has evolved fairly organically.
I'll go through this properly once Iand the HIR refactor changeset,
Makes sense to me!
(mostly) Done in https://github.com/eirproject/eir/pull/15
Per my note in #12, I think we should reorganize the crates in this project a bit and fix up the naming.
The broad strokes:
pattern-compiler
should bepattern_compiler
, as-
is a pain and has to be used as_
anyway)My specific thoughts/recommendations (in alphabetical order by crate). NOTE: I haven't fully grokked the role of each crate in the repo, so these thoughts are based mostly on my impressions of how they fit together, if adjustments are needed, that's no problem.
compiler
aslibeir_syntax_core
eirc
which holds the executable parts ofcompiler
compiler
aslibeir_ir
, make it a library cratelibeir_passes
to hold various IR passescps_transform
intolibeir_passes
diagnostics
tolibeir_diagnostics
frontend
tolibeir_syntax_erl
gen_nif
intoeirc
gen_nif
intolibeir_nif
internal_lib
if not usedinterpreter
tolibeir_eval
,libeir_interpreter
, orlibeir_vm
pattern-compiler
tolibeir_patternc
, or possibly merge intolibeir_passes
if that makes more sensetools
intoeirc
util
tolibeir_utils
I'm happy to do any/all of these, and I think the end result will be a much more cohesive crate workspace, and provide better hints to contributors on what things are, how they relate to one another.
My naming scheme/recommendations are largely based on community guidelines as well as the
rust
repository itself, as I've found their organization to be very helpful when navigating that code base, and it is massive. Lumen is organized this way as well, and has so far been pleasant to work with. Seems to be a good approach for compilers anyway!Thoughts?