Commit d25d32db4d4b3b70c7bd82028fd680b9ae92a4cc
1 parent
18d805d8
Fixed README
Showing
1 changed file
with
7 additions
and
8 deletions
README.md
1 | -# NimSqueak - Squeak and Nim interop via FFI | 1 | +# SqueakNim - Squeak and Nim interop via FFI |
2 | 2 | ||
3 | Nim can produce dynamically loaded libraries that follow the C conventions. | 3 | Nim can produce dynamically loaded libraries that follow the C conventions. |
4 | Squeak/Pharo has over the years developed several FFI mechanisms, and we can | 4 | Squeak/Pharo has over the years developed several FFI mechanisms, and we can |
5 | also make VM plugins, but for now this code uses the old "true and tested" | 5 | also make VM plugins, but for now this code uses the old "true and tested" |
6 | -Squeak FFI that Terf uses today for all its OpenGL calls. | 6 | +Squeak FFI. |
7 | 7 | ||
8 | -I also wrote an article when I experimented: | ||
9 | -http://goran.krampe.se/2014/11/03/squeak-to-nim/ | 8 | +## How to use it |
10 | 9 | ||
11 | -In the testlib directory we have the files from that article. See README.md | ||
12 | -there for a concrete rundown on how to generate the .st file. | 10 | +You write a Nim module and use some macros to generate a .st file on the side |
11 | +containing the Smalltalk glue code. When you compile the Nim code the .st file | ||
12 | +is automatically generated. You then file that into the image. | ||
13 | 13 | ||
14 | ## Squeak FFI | 14 | ## Squeak FFI |
15 | 15 | ||
16 | What follows is a text written by Sean DeNigris describing the FFI. You can | 16 | What follows is a text written by Sean DeNigris describing the FFI. You can |
17 | also see the code in the client image of course, with tests and class comments | 17 | also see the code in the client image of course, with tests and class comments |
18 | -etc. And then we have the actual SqueakFFIPrims plugin (VM level code) that | ||
19 | -you can find in the terf-client-vm repo. | 18 | +etc. |
20 | 19 | ||
21 | ## How does FFI work? | 20 | ## How does FFI work? |
22 | 21 |