I also added a wrapper for libunistring function and moved all char related
functions as a library in lib/char.rkt. In this way, we don't need to link
libunistring statically anymore. It also provides an example for the C API:
unistring.c
The only problem now is the unit test. Because ccall is not a racket
function, we need to let raco test ignore some of the files, but I'm not sure
how to fix this problem.
I'm pretty sure the ccall function work as intended. As an experiement, I
added a super simplified wrapper for SDL on sdl branch:
This PR implements the second part of #43, which adds a
ccall
function to villian. The detail ofccall
is described here: https://github.com/plum-umd/the-838e-compiler/issues/43#issuecomment-793462290.I also added a wrapper for
libunistring
function and moved all char related functions as a library inlib/char.rkt
. In this way, we don't need to linklibunistring
statically anymore. It also provides an example for the C API: unistring.cThe only problem now is the unit test. Because
ccall
is not a racket function, we need to letraco test
ignore some of the files, but I'm not sure how to fix this problem.I'm pretty sure the
ccall
function work as intended. As an experiement, I added a super simplified wrapper for SDL onsdl
branch: