anderslanglands / babble Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
We need a mechanism for binding constants, both constexpr/static const globals and constexpr static const class members which will want to be converted to #defines on the C API.
Currently the rust plugin will fail to run if BABBLE_PLUGIN_PATH is not set. Since we distribute this with babble itself, we should automatically add the relative path to it in bbl_translate_binding
We'll need to use the same sort of infrastructure as for stdfunction wrapping, but:
I'm trying to build babble on mac (#10 branch). I'm compiling with the homebrew-installed llvm
and zig cc
as a compiler as it uses its own toolchain and avoids some of the problems I've been having with native/homebrew clang. The full build script is
CC=zig-cc CXX=zig-c++ cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=install -DLLVM_DIR=/usr/local/Cellar/llvm/17.0.6_1/lib/cmake/llvm/ && cmake --build build
(zig-cc
and zig-c++
are just files installed in ~/.local/bin
containing zig c++ $@
etc.).
I'm getting this issue with the tests where bbl-translate
is run:
[13/31] Linking CXX static library test/stdfunction/libstdfunction-bind-dummy.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: test/stdfunction/libstdfunction-bind-dummy.a(bind.cpp.o) has no symbols
[16/31] Generating smartptr-c.cpp
FAILED: test/smartptr/smartptr-c.cpp /Users/ashley/babble/build/test/smartptr/smartptr-c.cpp
cd /Users/ashley/babble/build/test/smartptr && /Users/ashley/babble/build/bbl/bbl-translate /Users/ashley/babble/test/smartptr/bind.cpp -- -std=c++17 -fsyntax-only -fno-spell-checking -I/usr/local/opt/llvm/lib/clang/17/include -I/Users/ashley/babble/bbl/include -I/Users/ashley/babble/test/smartptr -- smartptr -o /Users/ashley/babble/build/test/smartptr
/Users/ashley/babble/test/smartptr/bind.cpp:1:10: fatal error: cannot open file '/Users/ashley/babble/test/smartptr/babble': No such file or directory
1 | #include "babble"
| ^
[2024-01-30 16:13:10.335] [info] [cpp_context.cpp:2872] ASTs built in 1.0951439109999999s
[2024-01-30 16:13:10.340] [error] [api_cpp_context.cpp:45] /Users/ashley/babble/bbl/src/cpp_context.cpp:2885 compilation generated 3045 errors. Cannot continue
[2024-01-30 16:13:10.341] [error] [bbl-translate.cpp:491] extraction failed after 1.1113919739999998s
I don't really know what to make of it.
Currently the translation layer has no access to the location of the original decls. Need to add a
struct Location {
std::string filename;
int line;
int col;
};
or similar to each that would be filled during extraction in order to be able to point users to where a decl came from in case of error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.