diff options
| -rw-r--r-- | README.md | 7 | ||||
| -rw-r--r-- | public/index.html | 10 |
2 files changed, 13 insertions, 4 deletions
@@ -6,6 +6,8 @@ Follows the book [Writing a C Compiler by Nora Sandler](https://nostarch.com/wri Post about my experience implementing the book [writing-a-c-compiler-in-clojure](https://shagunagrawal.me/posts/writing-a-c-compiler-in-clojure/). +Post on how to compile to WASM [compiling-clojure-to-webassembly](https://shagunagrawal.me/posts/compiling-clojure-to-wasm-image/). + ## Prerequisites * [Clojure](https://clojure.org) @@ -20,15 +22,18 @@ To see all available tasks in the project, run `bb tasks`: ``` sh bb tasks - The following tasks are available: clean Removes target folder. nrepl Starts a nrepl session. storm Starts a nrepl session with storm debugger. +lib:run:main Run's main only for cljcc library. +lib:build:jar Builds uberjar only for cljcc lib. +lib:build:wasm Builds native WASM image. cli:run:main Run's main CLI function. cli:build:jar Builds uberjar for CLI. cli:run:jar Runs CLI jar. +cli:build:wasm Builds native image for WASM. cli:build:native Builds native image for CLI. ``` diff --git a/public/index.html b/public/index.html index c0820b2..46de12d 100644 --- a/public/index.html +++ b/public/index.html @@ -25,11 +25,15 @@ <div class="mb-4"> <p class="text-gray-700"> - I have only implemented the first 12 chapters of the book. Refer the supported syntax section below. + Post on how I approached implementing the book in Clojure. <a class = "underline text-blue-600 hover:text-blue-800 visited:text-purple-600" href="https://shagunagrawal.me/posts/writing-a-c-compiler-in-clojure/">Writing a C Compiler in Clojure</a> </p> <p class="text-gray-700"> - Wrote about how I approached implementing this in Clojure. <a class = "underline text-blue-600 hover:text-blue-800 visited:text-purple-600" href="agrawal.me/posts/writing-a-c-compiler-in-clojure/">Writing a C Compiler in Clojure</a> + Post on how to compile the clojure codebase to WASM. <a class = "underline text-blue-600 hover:text-blue-800 visited:text-purple-600" href="https://shagunagrawal.me/posts/compiling-clojure-to-wasm-image/">Compiling Clojure to Web Assembly</a> + </p> + + <p class="text-gray-700"> + I have only implemented the first 12 chapters of the book. Refer the supported syntax section below. </p> </div> @@ -158,6 +162,7 @@ int main(void) { }); + // https://gist.github.com/designbyadrian/2eb329c853516cef618a // Store original console methods var originalConsoleLog = console.log; var originalConsoleError = console.error; @@ -204,7 +209,6 @@ int main(void) { async function runCompiler(source, stage) { - // https://gist.github.com/designbyadrian/2eb329c853516cef618a try { const args = [source, "linux", stage]; const config = new GraalVM.Config(); |
