* Closes#2781
* This PR only implements the Rust runtime. The Rust backend / code
generation need to be implemented in a separate PR.
* The tests are unit tests for different modules and tests with
"manually" compiled Juvix programs.
* Adds building & testing of the Rust runtime to the CI.
This PR adds an initial support for Literate Juvix Markdown files, files
with the extension `.juvix.md`.
Here is a small example of such a file: `Test.juvix.md`.
<pre>
# This is a heading
Lorem ...
```juvix
module Test;
type A := a;
fun : A -> A
| _ := a;
```
Other text
</pre>
This initial support enables users to execute common commands such as
typechecking, compilation, and HTML generation. Additionally, a new
command called `markdown` has been introduced. This command replaces
code blocks marked with the juvix attribute with their respective HTML
output, much like the output we obtain when running `juvix html`. In
this version, comments are ignored in the output, including judoc
blocks.
- We intend to use this new feature in combination with this Python
plugin (https://github.com/anoma/juvix-mkdocs) to enhance our
documentation site.
https://github.com/anoma/juvix/assets/1428088/a0c17f36-3d76-42cc-a571-91f885866874
## Future work
Open as issues once this PR is merged, we can work on the following:
- Support imports of Juvix Markdown modules (update the path resolver to
support imports of Literate Markdown files)
- Support (Judoc) comments in md Juvix blocks
- Support Markdown in Judoc blocks
- Update Text editor support, vscode extension and emacs mode (the
highlighting info is a few characters off in the current state)
- Closes#1839
- Closes#1719
This PR fixes the broken links that refer to Juvix Examples in the
documentation. Ideally, this wouldn't occur since we utilize a link
checker, but this tool only works well for relative links, which was not
the case for the links of the examples. Additionally, I slightly
modified the CI workflow by generating the HTML for the examples first,
followed by the entire book.
- Closes #2001
- Check the output using this: https://jonaprieto.github.io/juvix/
This PR adds initial syntax highlighting for juvix code blocks and REPL
sessions in Markdown files rendered by mdbook. After this PR, only two
themes would be supported to ease maintenance: Light and Dark (Ayu).
The implementation is a specifically tailored version of
- https://github.com/anoma/highlightjs-juvix (plugin for
HighlightJS,v11.7).
to be compatible with the infamous HighlightJS 10.1.1, to be used just
for MdBook.
The output can be seen here (make sure the CI finished to check the last
version, otherwise run the website locally):
- https://jonaprieto.github.io/juvix/tutorials/learn.html
In this PR, I have updated the README file to reflect the new goals of
the project and highlight related products to Juvix. The ORG files have
been replaced with Markdown for better readability and maintainability.
Additionally, I have added a couple of files to fine-tune the mdbook
settings. These changes, I believe, will make it easier for users to
understand and contribute to the project.🤞
- Closes#1878
- New pre-commit hook to format md, yaml, js, CSS files.
To check the website generation, I have deployed the result here:
Work in progress.
- https://jonaprieto.github.io/juvix
- https://github.com/jonaprieto/juvix
---------
Co-authored-by: Paul Cadman <pcadman@gmail.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
* Documment a few language features
* Add an example for foreign example
* Fix pre-commit warnings
* remove what-is-org
* Ignore README.org in docs folder
* Add fixes for revisions
* Renaming MiniJuvix to Juvix
* Make Ormolu happy
* Make Hlint happy
* Remove redundant imports
* Fix shell tests and add target ci to our Makefile
* Make pre-commit happy
* Update VP example to new syntax
* Ignore html folders and include assets for html rendering
Co-authored-by: Jonathan Cubides <jonathan.cubides@uib.no>
* [app] Add compile command
The compile command drives the (external) clang compiler to build a WASM
binary from a minijuvix file.
The intermediate C files are stored in .minijuvix-build directory
relative to the directory where the command is executed.
The user can specify which runtime (standalone and libc) to build
against.
The file-embed library is used to embed the runtime files into the
minijuvix binary.
* TemplateHaskell is a default extension
* [app] Add the .minijuvix-build dir in the root of the project
* [app] Derive the default output filename from the inputfile
* [chore] Add .minijuvix-build to .gitignore