This repository has been archived by the owner. It is now read-only.
hello-world-crystal-nostd-sharedlib
'Hello world' crystal shared library experiment
This is a baby experiment on LLVM compilation, to build a shared library from crystal source code
Simple Crystal code, with an empty prelude
Description
The generated library will exit the current process with error code 42
.
Run the test
$ cd ./simple_no_prelude
-
Build the tester
run_shared
(written in C)$ make run_shared
-
Build the shared library
hello_llvm.so
(written in Crystal, without stdlib)$ make hello_llvm.so
-
Finally, run the binary
run_shared
, this will open thehello_llvm.so
shared library, locate a function namedcrystal_do_something
, then run it.$ ./run_shared $ echo $? 42
Repository
hello-world-crystal-nostd-sharedlib
Owner
Statistic
- 2
- 0
- 0
- 0
- 0
- almost 4 years ago
- May 28, 2017
License
Links
Synced at
Sun, 22 Dec 2024 09:28:10 GMT
Languages