https://github.com/banyc/kaleidoscope
A language with LLVM. Status: WIP.
https://github.com/banyc/kaleidoscope
kaleidoscope llvm
Last synced: 3 months ago
JSON representation
A language with LLVM. Status: WIP.
- Host: GitHub
- URL: https://github.com/banyc/kaleidoscope
- Owner: Banyc
- Created: 2022-11-05T04:43:11.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-12T18:12:12.000Z (over 3 years ago)
- Last Synced: 2025-01-20T05:49:10.891Z (about 1 year ago)
- Topics: kaleidoscope, llvm
- Language: Rust
- Homepage:
- Size: 70.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kaleidoscope
- e.g.
```py
# Compute the x'th fibonacci number.
def fib(x)
if x < 3 then
1
else
fib(x-1)+fib(x-2)
# This expression will compute the 40th number.
fib(40)
```
- e.g. import external functions
```py
extern sin(arg);
extern cos(arg);
extern atan2(arg1 arg2);
atan2(sin(.4), cos(42))
```
- constraints:
- only datatype: double
- no type declarations
## Dev environment
- llvm@14
- Set environment variable `LLVM_SYS_140_PREFIX` to the path of llvm@14
- Also set it at `rust-analyzer.server.extraEnv` and `rust-analyzer.runnableEnv` in `settings.json` if you use vscode
## References
-