1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-29 10:33:15 +03:00
juvix/app/Commands/Dev/Core
Jan Mas Rovira 021f183d33
Run Nockma in an Anoma node (#3128)
# Changes
1. Adds a new command `juvix dev anoma node`. This command runs the
anoma node.
2. Adds a flag `--anoma-dir` to `juvix dev nockma run`. When given, it
must point to the anoma clone. Then, it will run the nockma code in the
anoma node and report the result (with no traces).

# Prerequisites
1. An anoma clone at some specific commit. 
   ```
   git clone git@github.com:anoma/anoma.git
   cd anoma
   git checkout 98e3660b91cd55f1d9424dcff9420425ae98f5f8
   
   # build anoma
   mix deps.get
   mix escript.install hex protobuf
   mix compile

   # build the client
   mix do --app anoma_client escript.build
   ```
2. The `mix` command (elixir).
3. The [`grpcurl`](https://github.com/fullstorydev/grpcurl) command. To
install a single binary in `~/.local/bin` you can run:
   ```
curl -sSL
"https://github.com/fullstorydev/grpcurl/releases/download/v1.9.1/grpcurl_1.9.1_linux_x86_64.tar.gz"
| tar -xz -C ~/.local/bin --no-wildcards grpcurl
   ```

# Testing
I've not included any test. It can be tested locally like this:
```
cd juvix/tests/Anoma/Compilation/positive
juvix compile anoma test001.juvix
echo 20 > args.debug.nockma
juvix dev nockma run --anoma-dir ~/projects/anoma test001.nockma --args args.debug.nockma
2024-10-29 17:32:59 +01:00
..
Asm Add FileExt type (#2467) 2023-10-25 12:02:12 +02:00
Compile Compile-time configuration (#3102) 2024-10-16 11:47:23 +02:00
Eval Add FileExt type (#2467) 2023-10-25 12:02:12 +02:00
FromConcrete Make compile targets a subcommand instead of a flag (#2700) 2024-04-09 13:29:07 +02:00
Normalize Add FileExt type (#2467) 2023-10-25 12:02:12 +02:00
Read Options for juvix dev tree read (#2599) 2024-01-31 15:17:14 +01:00
Repl Option --show-args-num (#1946) 2023-03-30 12:23:40 +01:00
Strip Add FileExt type (#2467) 2023-10-25 12:02:12 +02:00
Asm.hs refactor --target into subcommands for dev tree compile and other improvements (#2713) 2024-04-16 17:32:44 +02:00
Compile.hs Remove Geb backend (#2886) 2024-07-11 15:45:52 +01:00
Eval.hs Add field element type (#2659) 2024-02-27 14:54:43 +01:00
FromConcrete.hs Logger (#2908) 2024-07-22 17:14:37 +02:00
Normalize.hs Make compile targets a subcommand instead of a flag (#2700) 2024-04-09 13:29:07 +02:00
Options.hs Remove Geb backend (#2886) 2024-07-11 15:45:52 +01:00
Read.hs refactor --target into subcommands for dev tree compile and other improvements (#2713) 2024-04-16 17:32:44 +02:00
Repl.hs Run Nockma in an Anoma node (#3128) 2024-10-29 17:32:59 +01:00
Strip.hs Improve performance of formatting a project (#2863) 2024-07-01 18:05:24 +02:00