-
-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WASM module and NPM library (javascript bindings) #892
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #892 +/- ##
=======================================
Coverage 73.77% 73.77%
=======================================
Files 2 2
Lines 122 122
=======================================
Hits 90 90
Misses 32 32 ☔ View full report in Codecov by Sentry. |
"version": "0.0.0-dev.0", | ||
"description": "GNU LibreDWG is a free library to handle DWG/DXF files", | ||
"main": "index.js", | ||
"repository": "git://fr-an-k/libredwg.git", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's just a test through my fork and reservation of the library name, of course I will transfer ownership if desired. I just need auto updates in my production environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a valid Url mostly. The domain is missing
I don't like the libconvert-only flag, convert.c is wasm-only. Therefore it should be moved to bindings/js |
I'll try to make it a separate target instead of a flag, but I'm not sure if that can work. It's not wasm only, it's very useful for anyone who just needs file conversion. Later it could for instance be extended to add/remove/update individual JSON/DXF features quickly, as a string based version of LibreDWG. The normal LibreDWG API is not portable to higher languages by itself. The majority of programmers are currently not able to utilize LibreDWG at all. It doesn't need maintenance and I believe it shouldn't be put in a separate repository. WASM is also useful separate from javascript, for instance because it's sandboxed and therefore easy to accept in a strictly regulated enterprise. I'm just combining it all in one PR to make them work together. |
The size_t printf probe needs to be spezialized for emscripten also |
You just need to make the src/libredwg.lo, and the bindings/convert.lo and link them together. No need for a configure/cmake flag. It's an abstraction of our programs binaries, useful for modules. But we cannot violate the namespaces this way (read/write without dwg_ prefixes), only with bindings.
Sure.
Yes, please squash it. |
No need to close. Just force push please |
emconfigure: error: './configure --disable-bindings --disable-shared' failed (returned 1) |
configure: error: cannot find a suitable modifier |
./common.h:367:5: error: 'HAVE_FUNC_ATTRIBUTE_ALIGNED' is not defined, evaluates to 0 [-Werror,-Wundef] |
libtool: error: '../src/libredwg.la' is not a valid libtool archive |
I made a simple LibreDWG file conversion library for easier interoperability.
I was hoping a WASM build of this could be released by default.
WASM (with 3 exports) is easy to fit onto any machine or language without manual compilation.
I will also make an NPM library wrapper around it.
I'm not finished, but I'm stuck on why autotools is seeing my new flag (in help and log) after running autogen.sh, but not picking it up when I set it, I tried many things but it seems I'm missing something trivial.
I was hoping someone could help out.
My commands with emscripten:
In stdout it doesn't mention my flag, in .build-wasm/config.log it mentions it but says it's not detected, defaulting to "no".
My addition to configure.ac:
(The cmake route does not seem to work in any way, so I'll have to use autotools)
I was also wondering if it would be acceptable to put the NPM library under the usual ISC/MIT license within this repository. Bundled GPLv3 javascript does not require one to open up their source code, but it's scary for those who don't understand this, since Javascript only exists as source code. The actual LibreDWG library is in compiled form (WASM).