1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-27 01:23:32 +03:00
juvix/app/Commands
Paul Cadman 865842046d
Support running nockma code with a running Anoma client (#3180)
This PR:

1. Adds a new interpretation for the Anoma effect, which makes gRPC
calls to an existing Anoma client instead of spawning a new one.
2. Adds a new `nockma run` mode, `with-client`, which can be used to run
an Anoma program against a running Anoma client, using its URL and gRPC
port.
3. separates the `nockma run` command into subcommands.

CLI docs:

## `nockma run`

```
Usage: juvix dev nockma run COMMAND

  Subcommands used to run an Anoma program. Use with artefacts obtained from
  compilation with the anoma target

Available options:
  -h,--help                Show this help text

Available commands:
  builtin-evaluator        Run with the builtin Nockma evaluator
  ephemeral-client         Run with an ephemeral Anoma client
  with-client              Run with a running Anoma client
```

### `with-client`

```
Usage: juvix dev nockma run with-client
         NOCKMA_FILE [--args ARGS_FILE] (-p|--grpc-port PORT) [--url URL]

  Run with a running Anoma client

Available options:
  NOCKMA_FILE              Path to a .nockma file
  --args ARGS_FILE         Path to file containing args. The args file should
                           contain a list (i.e. to pass 2 and [1 4] as args, the
                           contents should be [2 [1 4] 0]).
  -p,--grpc-port PORT      The GRPC port of a running Anoma client
  --url URL                The URL of a running Anoma client. default: localhost
  -h,--help                Show this help text
```

### `ephemeral-client`

```
Usage: juvix dev nockma run ephemeral-client
         NOCKMA_FILE [--args ARGS_FILE] --anoma-dir ANOMA_DIR

  Run with an ephemeral Anoma client

Available options:
  NOCKMA_FILE              Path to a .nockma file
  --args ARGS_FILE         Path to file containing args. The args file should
                           contain a list (i.e. to pass 2 and [1 4] as args, the
                           contents should be [2 [1 4] 0]).
  --anoma-dir ANOMA_DIR    Path to anoma repository
  -h,--help                Show this help text
```

### `builtin-evaluator`

```
Usage: juvix dev nockma run builtin-evaluator
         NOCKMA_FILE [--args ARGS_FILE] [--profile]

  Run with the builtin Nockma evaluator

Available options:
  NOCKMA_FILE              Path to a .nockma file
  --args ARGS_FILE         Path to file containing args. The args file should
                           contain a list (i.e. to pass 2 and [1 4] as args, the
                           contents should be [2 [1 4] 0]).
  --profile                Report evaluator profiling statistics
  -h,--help                Show this help text
```
2024-11-20 08:53:21 +01:00
..
Clean Use Package.juvix in the global project (#2499) 2023-11-06 11:49:43 +00:00
Compile Run Nockma in an Anoma node (#3128) 2024-10-29 17:32:59 +01:00
Dependencies Logger (#2908) 2024-07-22 17:14:37 +02:00
Dev Support running nockma code with a running Anoma client (#3180) 2024-11-20 08:53:21 +01:00
Doctor Global offline flag (#2335) 2023-09-05 17:11:17 +02:00
Eval Make compile targets a subcommand instead of a flag (#2700) 2024-04-09 13:29:07 +02:00
Extra Compile-time configuration (#3102) 2024-10-16 11:47:23 +02:00
Format Improve performance of formatting a project (#2863) 2024-07-01 18:05:24 +02:00
Html HTML generation: make the light theme lighter (#3168) 2024-11-19 19:34:52 +00:00
Init Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
Isabelle Translate function bodies to Isabelle/HOL (#2868) 2024-07-19 08:40:07 +01:00
Markdown Make compile targets a subcommand instead of a flag (#2700) 2024-04-09 13:29:07 +02:00
Repl Per-module compilation (#2468) 2023-12-30 20:15:35 +01:00
Typecheck Make compile targets a subcommand instead of a flag (#2700) 2024-04-09 13:29:07 +02:00
Base.hs juvix typecheck with no file argument typechecks the whole project (#2889) 2024-07-12 17:48:29 +02:00
Clean.hs Use Package.juvix in the global project (#2499) 2023-11-06 11:49:43 +00:00
Compile.hs Remove VampIR compile command and tests (#3104) 2024-10-16 15:03:14 +02:00
Dependencies.hs Logger (#2908) 2024-07-22 17:14:37 +02:00
Dev.hs Run Nockma in an Anoma node (#3128) 2024-10-29 17:32:59 +01:00
Doctor.hs Compile-time configuration (#3102) 2024-10-16 11:47:23 +02:00
Eval.hs Logger (#2908) 2024-07-22 17:14:37 +02:00
Format.hs Fix package-base interaction (#3139) 2024-11-01 14:42:18 +00:00
Html.hs Do not show progress log for juvix html (#2920) 2024-07-30 18:57:58 +02:00
Init.hs Logger (#2908) 2024-07-22 17:14:37 +02:00
Isabelle.hs Isabelle/HOL translation: comments (#2974) 2024-09-02 15:56:58 +02:00
Markdown.hs Logger (#2908) 2024-07-22 17:14:37 +02:00
Repl.hs Nockma mode (#3163) 2024-11-13 15:41:06 +00:00
Typecheck.hs Improve compilation progress log (#2969) 2024-08-30 00:10:13 +02:00