Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jianxun-p/racketx
write Racket code in Rust
https://github.com/jianxun-p/racketx
racket rust rust-macros rust-proc-macro student-project
Last synced: 3 days ago
JSON representation
write Racket code in Rust
- Host: GitHub
- URL: https://github.com/jianxun-p/racketx
- Owner: jianxun-p
- License: mit
- Created: 2024-03-07T04:14:21.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-03-08T01:40:20.000Z (11 months ago)
- Last Synced: 2024-03-08T06:25:34.373Z (11 months ago)
- Topics: racket, rust, rust-macros, rust-proc-macro, student-project
- Language: Rust
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# racketx
Allows you to write Racket code in Rust.## Example
Here is an example of using the `racket` macro.
```rust
use racketx::racket;
pub fn main() {
racket!{
(define add_2_num (lambda (x y) (+ x y)))
(define result (add_2_num 239 (- 9)))
};
assert_eq!(result, 230);
}
```More examples can be found under the `examples` directory.
## Features
- [x] definition of constants
- [x] lambda
- [x] integer operations (+, -, *, /)
- [ ] negative integer (alternate solution: express with subtraction, e.g. `-8` would be `(- 8)`)
- [ ] non-integer
- [ ] conditional statements
- [ ] lists
- [ ] function definitions (alternate solution: use constants definition with lambda)
- [ ] modulo arithmetic