starmelon/Cargo.toml
YetAnotherMinion 5d770d0d0a
refactor: share checksum rebuild logic
Move some of the caching logic (source file checksum) out of Starmelon
into a shared infra crate.

I have 4 similar tooling use cases for working with elm projects in
Rust.
1. Starmelon needs to create a modified copy of an existing elm
   application with extra dependencies and source directories. The
   extension elm application points to the source directories of the
   parent
2. Elm reactor needs to compile an elm module into javascript with
   caching.
3. SQL reactor needs to generate an elm application for each database,
   generate elm source code and compile that elm code with caching. It
   uses Starmelon to run derive macros written in Elm.
4. AstridLabs needs to create a heavily modified copy of an existing elm
   application with tons of generated code. It uses Starmelon to run
   derive macros written in Elm.

For 3 and 4 I could speed up the code generation step by using
part of starmelon as library. A proc-macro could include the Elm derive
macro javascript at crate build time and reuse the same v8 isolate over
and over for every web request.

My plan for 1,2,3,4 has a lot of shared functionality. I am thinking
that I should consolidate all the components into one library crate.
2025-11-23 19:34:16 -08:00

34 lines
1.4 KiB
TOML

[package]
name = "starmelon"
version = "0.1.0"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
# I decided to use os_pipe becaues I want to pipe stdout of a subprocess into
# stderr in real time. I want the outupt of the process to stderr and stdout
# show up in the original order. I looked an os_pipe uses some unsafe code to
# duplicate file descriptors. I am unfamiliar with the correct way of sharing
# the fds. Therefore I am going to trust that their unsafe code is necessary.
# Then it makes sense to use a battle tested unsafe code rather than implement
# it myself.
[dependencies]
ahash = "0.7"
elmi = { path = "../../../infra/rust-elmi" }
naive-wadler-prettier= { path = "../../../infra/redwood-lang/compiler/naive-wadler-prettier" }
os_pipe = "0.9"
serde = { version = "1.0", features = [ "derive" ] }
serde_json = { version ="1.0", features = [] }
structopt = { version = "0.3" }
elm-project-utils = { path = "../../../infra/rust-elm-project-utils" }
# All of these are required for deno's javascript runtime. We need to keep the
# same versions as other projects in our cargo workspace. Multiple different
# versions of rust_v8 seem to break its build script.
deno_runtime = "0.21.0"
tokio = { version = "1.6", features = ["full"] }
deno_core = "0.95.0"
deno_web = "0.44"
rusty_v8 = "0.25.3"
futures = "0.3.15"
serde_v8 = "0.8"