Skip to content

sybilant/sybilant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sybilant

I’m developing on NixOS, so this all starts with a nix-shell:

nix-shell -p binutils clojure

Running sybilant tests

Run the ./bin/test-sybilant script:

[nix-shell:~/src/sybilant]$ ./bin/test-sybilant
== Sybilant tests
syscall.syb.asm...passed (0:00.00)
== Testing complete

Running clojure tests

Run the ./bin/test-clojure script:

[nix-shell:~/src/sybilant]$ ./bin/test-clojure

Running tests in #{"clojure/test"}

Testing sybilant.compile-test

Ran 1 tests containing 1 assertions.
0 failures, 0 errors.

Running the compiler

Run the sybilant.compile/-main function using clojure passing in one or more files and the resulting assembly will print to stdout:

clojure -M -m sybilant.compile [FILE]...

For example, to compile sybilant/test/syscall.syb:

[nix-shell:~/src/sybilant]$ clojure -M -m sybilant.compile sybilant/test/syscall.syb
.text
.global _start
_start:
movl $1, %eax
movl $0, %ebx
int $0x80