1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-14 17:32:00 +03:00
juvix/app
Paul Cadman 433e882189
Export all functions with alpha numeric names from entrypoint module (#1425)
* Export all functions with alphanum names in entrypoint

Set the export_name attribute on every function signature that has a
fully alpha numeric name.

* Adds a non-WASI target to compile command

WASM libraries we want to run in the browser and in Anoma VM do not have
access to the WASI runtime. For this usecase we need a target runtime
that does not use the WASI runtime.

A `wasi-` prefix is added to existing compile targets and introduce a new
standalone target. This target does not have IO functions like
`putStrLn` and `exit` calls `__builtin_trap` which corresponds to the
`unreachable` WASM instruction.

In the non-exhaustive case error a debug message is emitted to tell the
user which function had the error. This is now abstracted to a `debug`
function in the runtime which calls `putStrLn` in the case of WASI and
is no-op in the case of non-WASI.

Tests are added which check that exported names can be called with the
correct name and result.

* Moves walloc to a common directory
2022-08-01 12:53:19 +02:00
..
Commands Export all functions with alpha numeric names from entrypoint module (#1425) 2022-08-01 12:53:19 +02:00
App.hs Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00
CLI.hs Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00
Command.hs Add typecheck and internal command (#270) 2022-07-12 19:08:03 +02:00
GlobalOptions.hs Add positivity check for inductive types (#1393) 2022-07-23 09:27:12 +02:00
Main.hs add name and version to juvix.yaml (#1422) 2022-07-29 13:35:48 +02:00