1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-27 17:43:55 +03:00
juvix/app/Commands/Dev
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
..
Anoma Remove GetAnomaProcess from the Anoma effect (#3179) 2024-11-19 17:34:13 +00:00
Asm Compile-time configuration (#3102) 2024-10-16 11:47:23 +02:00
Casm Remove Geb backend (#2886) 2024-07-11 15:45:52 +01:00
Core Run Nockma in an Anoma node (#3128) 2024-10-29 17:32:59 +01:00
DevCompile Remove VampIR compile command and tests (#3104) 2024-10-16 15:03:14 +02:00
DisplayRoot Migrate all Juvix projects from juvix.yaml to Package.juvix in the repository (#2503) 2023-11-07 18:11:02 +00:00
Highlight Make compile targets a subcommand instead of a flag (#2700) 2024-04-09 13:29:07 +02:00
ImportTree Improve compilation progress log (#2969) 2024-08-30 00:10:13 +02:00
Internal Logger (#2908) 2024-07-22 17:14:37 +02:00
Latex Nockma mode (#3163) 2024-11-13 15:41:06 +00:00
MigrateJuvixYaml Migrate all Juvix projects from juvix.yaml to Package.juvix in the repository (#2503) 2023-11-07 18:11:02 +00:00
Nockma Support running nockma code with a running Anoma client (#3180) 2024-11-20 08:53:21 +01:00
Parse Make compile targets a subcommand instead of a flag (#2700) 2024-04-09 13:29:07 +02:00
Reg Compile-time configuration (#3102) 2024-10-16 11:47:23 +02:00
Repl Options for juvix dev tree read (#2599) 2024-01-31 15:17:14 +01:00
Runtime Compile-time configuration (#3102) 2024-10-16 11:47:23 +02:00
Scope Make compile targets a subcommand instead of a flag (#2700) 2024-04-09 13:29:07 +02:00
Termination Export Juvix source code to latex (#2917) 2024-08-05 11:28:19 +02:00
Tree Nockma mode (#3163) 2024-11-13 15:41:06 +00:00
Anoma.hs Fix compiler error on import cycles (#3171) 2024-11-15 09:41:02 +01:00
Asm.hs Use EmbedIO instead of Embed IO (#2645) 2024-02-13 18:00:01 +00:00
Casm.hs Cairo disassembler (#2710) 2024-04-11 15:03:27 +02:00
Core.hs Logger (#2908) 2024-07-22 17:14:37 +02:00
DevCompile.hs Remove VampIR compile command and tests (#3104) 2024-10-16 15:03:14 +02:00
DisplayRoot.hs Logger (#2908) 2024-07-22 17:14:37 +02:00
Highlight.hs Fix bug where highlighting is not kept when the file has a type error and imports some other file (#2959) 2024-08-21 13:42:33 +02:00
ImportTree.hs Logger (#2908) 2024-07-22 17:14:37 +02:00
Internal.hs Logger (#2908) 2024-07-22 17:14:37 +02:00
Latex.hs Export Juvix source code to latex (#2917) 2024-08-05 11:28:19 +02:00
MigrateJuvixYaml.hs Use EmbedIO instead of Embed IO (#2645) 2024-02-13 18:00:01 +00:00
Nockma.hs Nockma mode (#3163) 2024-11-13 15:41:06 +00:00
Options.hs Run Nockma in an Anoma node (#3128) 2024-10-29 17:32:59 +01:00
Parse.hs Logger (#2908) 2024-07-22 17:14:37 +02:00
Reg.hs JuvixReg to CASM translation (#2671) 2024-03-20 12:14:12 +01:00
Runtime.hs Use EmbedIO instead of Embed IO (#2645) 2024-02-13 18:00:01 +00:00
Scope.hs Export Juvix source code to latex (#2917) 2024-08-05 11:28:19 +02:00
Termination.hs Logger (#2908) 2024-07-22 17:14:37 +02:00
Tree.hs refactor --target into subcommands for dev tree compile and other improvements (#2713) 2024-04-16 17:32:44 +02:00