starlark-rust
rust-langdev
starlark-rust | rust-langdev | |
---|---|---|
9 | 12 | |
623 | 837 | |
2.7% | - | |
9.8 | 2.2 | |
15 days ago | 4 days ago | |
Rust | ||
Apache License 2.0 | The Unlicense |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
starlark-rust
-
What config format do you prefer?
I haven't seen anyone mention starlark yet. It's something I want to play with as a config language.
-
loxcraft: a compiler, language server, and online playground for the Lox programming language
Aside from these, if you want some inspiration for a production-grade language built in Rust, you might want to go through the source code of Starlark and Gluon.
-
Launch HN: Moonrepo (YC W23) – Open-source build system
There is also a Rust implementation of Starlark as a starting point https://github.com/facebookexperimental/starlark-rust
To add to everyone else, please don't use YAML. Starlark is great _precisely_ because it is a readable, well known (nearly Python) language that is limited at the same time (no unbounded for loops, no way to do non-deterministic things like get the current time or `random()`).
-
Benchmarking Starlark against other embedded scripting languages
This is a follow-up to Benchmarking mlua/rlua/rhai - Rust embedded scripting languages from 4mo ago; I just added the new Starlark implementation from Meta to the benchmark posted by @aleksru.
-
The Perfect Configuration Format? Try TypeScript
The Rust implementation has it as an experimental extension (https://github.com/facebookexperimental/starlark-rust/blob/m...)
-
Making an interpreter for variable length byte-code, any way to use enums for this and not just a big u8?
u/ndmitchell has been working on a Starlark interpreter. He wrote up a blog post with some thoughts about different interpreter styles. He found that in his case using fixed sized instructions was about the same as byte-encoded ones, but compiling the AST to closures was also about the same performance as well, and doesn't need an AST->bytecode compiler.
-
Can i use rust to write my compiler??
As mentioned in other comments, type system features like algebraic data types (that Rust has) are really helpful. If you want a small-but-real example of a compiler in Rust (with an optimizer etc) then the starlark-rust compiler is good.
-
Zellij – A Terminal Workspace and Multiplexer Written in Rust
If your Rust program needs a more complicated configuration (conditionals, access to APIs and so on), also look at Facebook's Starlark parser and tooling[1]. Starlark is a subset of Python used by Bazel, Buck and a few other projects.
[1]: https://github.com/facebookexperimental/starlark-rust
-
New version of Rust Starlark, an implementation of a deterministic Python-like language
The Facebook post gives a nice overview. It also links out to the home page for the project at https://github.com/facebookexperimental/starlark-rust/, which has an introduction and links to what Starlark is, the crates.io link, the docs.rs link etc.
rust-langdev
-
Is this a good way to free up some memory?
If you're doing lang dev, maybe check out https://github.com/Kixiron/rust-langdev. I haven't done much since college, not in rust, but I've heard good things
-
loxcraft: a compiler, language server, and online playground for the Lox programming language
rust-langdev has a lot of libraries for building compilers in Rust. Perhaps you could use these to make your implementation easier, and revisit it later if you want to build things from scratch. I'd suggest logos for lexing, LALRPOP / chumsky for parsing, and rust-gc for garbage collection.
-
Should I revisit my choice to use nom?
https://github.com/Kixiron/rust-langdev is a pretty nice list of libraries for Rust lang dev including parsers.
-
Tools for creating a programming language in rust
Someone showed me this repo with a bunch of lang dev libraries a while ago. I haven't done anything with it personally, but it may be of interest to you https://github.com/Kixiron/rust-langdev
- Rust libraries to build a compiler for my language?
- Good textbook with implementations of OO type system?
- Language Development Libraries for Rust
- How to write a compiler or interpreter in rust
-
Make A Langage
https://github.com/Kixiron/rust-langdev for additional resources and libraries
-
Can i use rust to write my compiler??
Absolutely. For a non-exhaustive list of other languages written in Rust, there is https://github.com/alilleybrinker/langs-in-rust. If you are looking for libraries to help you along the way, check out https://github.com/Kixiron/rust-langdev.
What are some alternatives?
cue - CUE has moved to https://github.com/cue-lang/cue
inkwell - It's a New Kind of Wrapper for Exposing LLVM (Safely)
cue - The home of the CUE language! Validate and define text-based and dynamic configuration
codespan - Beautiful diagnostic reporting for text-based programming languages.
.tmux - 🇫🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤️
scala3-example-project - An example sbt project that compiles using Dotty
wasmtime - A fast and secure runtime for WebAssembly
langs-in-rust - A list of programming languages implemented in Rust, for inspiration.
zellij - A terminal workspace with batteries included
pratt - Pratt parser written in Rust
Tmuxinator - Manage complex tmux sessions easily
plzoo - Programming Languages Zoo