1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-15 10:03:22 +03:00
juvix/app/Commands
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
..
Internal Implement an html documentation generator similar to haddock (#1413) (#1416) 2022-07-28 17:19:07 +02:00
Compile.hs Export all functions with alpha numeric names from entrypoint module (#1425) 2022-08-01 12:53:19 +02:00
Extra.hs Add typecheck and internal command (#270) 2022-07-12 19:08:03 +02:00
Html.hs Implement an html documentation generator similar to haddock (#1413) (#1416) 2022-07-28 17:19:07 +02:00
Internal.hs Implement an html documentation generator similar to haddock (#1413) (#1416) 2022-07-28 17:19:07 +02:00