Add Home
commit
9676ff6680
9
Home.md
Normal file
9
Home.md
Normal file
@ -0,0 +1,9 @@
|
||||
### Husht
|
||||
|
||||
This project aims to fill a niche for Rust broadly along the lines of CoffeeScript for JavaScript or Civet for TypeScript: provide all the resources and power of the Rust language via a clean, non-redundant, significant-whitespace syntax. Husht will be just Rust, but quieter. As such, the project is not looking to gratuitously alter syntax, but instead, to do things in a Rust-y way, while allowing less typing and less "line noise" in a source file.
|
||||
|
||||
#### Implementation plan
|
||||
Here are some key ideas of how the plan will be accomplished.
|
||||
* The Husht syntax engine will be two-way: it should be able both to convert Husht syntax to fully correct Rust, but also take a Rust file and produce a Husht file with the same semantics. The Rust -> Husht -> Rust roundtrip should be basically equivalent to running `rustfmt` on the original file.
|
||||
* Implementation will start with Husht == Rust, and use the tree-sitter grammar for Rust to produce tree-sitter parse trees for "Husht" (=Rust) code, which will be transformed into essentially the same trees as rustc_parse would produce (in Rust's own ast structure), and then use the rustfmt code generator to produce Rust code. In the other direction, we will use rustc_parse itself, and likely use algorithms from the prettyplease pretty printer to convert that to a tree-sitter concrete syntax tree, from which it is of course easy to generate "Husht" code.
|
||||
* Once that roundtrip is working, we will fork and diverge the Husht tree-sitter parse from its starting point identical to the Rust tree-sitter parser, to implement the syntax that will make Husht a pleasure to use.
|
Loading…
Reference in New Issue
Block a user