froggey / iota Goto Github PK
View Code? Open in Web Editor NEWLLVM to Common Lisp transpiler.
LLVM to Common Lisp transpiler.
Iota is an LLVM to CL transpiler, similar to emscripten. It converts LLVM bitcode to safe, portable Common Lisp code. Quick Start ----- # You'll probably want to make this available as a quicklisp local project. # Optional, for parallel builds export MAKEFLAGS=-j2 # Clone the LLVM/Clang repos. ./fetch-llvm.sh # Build LLVM, Clang, and the translator. # This will take a long time unless you have a beefy machine. ./build-llvm.sh # Build & translate libraries and programs. ./build.sh # Load into Lisp. lisp --load load.lisp # prboom & sdlquake can now be run using (CL-USER::RUN-PRBOOM) and (CL-USER::RUN-SDLQUAKE). Usage ----- The build-llvm.sh and build.sh scripts build the translator and compiler, installing them in the toolchain/ subdirectory. C source code can be compiled to object files as normal using clang -c. There is no ld-style linker, so object code and libraries must be linked with llvm-link. The linked bitcode file can then be translated with iota. Example ----- cat > example.c <<EOF #include <stdio.h> int main(int argc, char **argv) { printf("Hello, World!\n"); return 0; } EOF toolchain/bin/clang -c example.c toolchain/bin/llvm-link -o=example.bc example.o toolchain/le32-iota/lib/libc.a toolchain/bin/iota -package=":example" example.bc > example.lisp
make[2]: *** [lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/build.make:180: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CodeGenPrepare.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:727: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
This is SBCL 2.3.1, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (load "load.lisp")
While evaluating the form starting at line 3, column 0
of #P"/Users/MacOSuser/Downloads/Iota-master/load.lisp":
debugger invoked on a QUICKLISP-CLIENT:SYSTEM-NOT-FOUND in thread
#<THREAD "main thread" RUNNING {1001098003}>:
System "iota" not found
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE ] Try again
1: [ABORT ] Give up on "iota"
2: [REGISTER-LOCAL-PROJECTS] Register local projects and try again.
3: [RETRY ] Retry EVAL of current toplevel form.
4: Ignore error and continue loading file "/Users/MacOSuser/Downloads/Iota-master/load.lisp".
5: Abort loading file "/Users/MacOSuser/Downloads/Iota-master/load.lisp".
6: Exit debugger, returning to top level.
((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "iota")
source: (CERROR "Try again" 'SYSTEM-NOT-FOUND :NAME NAME)
0]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.