Skip to content

LLVM Kaleidoscope tutorial in Rust, toy project.

License

Notifications You must be signed in to change notification settings

vhiribarren/llvm-tuto-kaleidoscope-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLVM Kaleidoscope Tutorial in Rust

This is a toy project to test LLVM and manipulate other tools.

It follows the tutorial: https://llvm.org/docs/tutorial/index.html It is globally a direct port of the C++ code, with some adjustements.

Inkwel is used for LLVM bindings in Rust.

Here what is currently done, with some differences with the original tutorial:

How to run

Launch:

cargo run

Some options are available:

cargo run -- --help

You can notably load files containing kaleido code:

cargo run -- -f tests/scripts/mandelbrot.kaleido
cargo run -- -f tests/scripts/fib.kaleido

License

MIT License

Copyright (c) 2023 Vincent Hiribarren

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.