-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor the C and Go wrapper build system
- moved "nimbus/api" to "wrappers" - renamed files - replaced the build scripts with Makefile targets - set the rpath relative to the test binary's location so it can look for libnimbus.so there at runtime - libnimbus.so.0 required on Linux, apparently - compiled all the Nimbus code with `--app:lib`, not just one file (this required skipping a proc in "nimbus/config.nim" because it uses an API that's unavailable in libraries) - removed static linking from the Go wrapper. It doesn't make sense at a global level, when using a shared Nimbus library. To selectively link static libraries, we should probably be specifying them as *.a. I did build a static libnimbus.a, as a test, but it insisted on dlopen-ing a shared version of itself which looked too ugly to continue.
- Loading branch information
1 parent
ea06407
commit 1d7e14d
Showing
14 changed files
with
97 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
nimcache | ||
/nimcache | ||
|
||
# Executables shall be put in an ignored build/ directory | ||
/build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
This folder contains an experimental C wrapper for using parts of the Nimbus | ||
code from C/Go in the Status console client: | ||
|
||
https://github.com/status-im/status-console-client/ | ||
|
||
It serves mainly as a proof-of-concept for now - there are several unresolved | ||
issues surrounding threading, inter-language communication, callbacks etc. | ||
|
||
To build the wrappers and the test programs, run from the top level directory: | ||
|
||
```bash | ||
make wrappers | ||
``` | ||
|
||
Now you can run the test programs: | ||
|
||
```bash | ||
build/C_wrapper_test | ||
build/go_wrapper_test | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
#include <unistd.h> | ||
#include <time.h> | ||
|
||
#include "status_api.h" | ||
#include "wrapper.h" | ||
|
||
void NimMain(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters