-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
WebAssembly build #258
Comments
Emscripten does not seem to support ncurses. But, libvim is not responsible for rendering the user interface. So, I think we can skip this check. After some tweaks, I succeeded in compiling libvim to WebAssembly. I tested part of the API (motion, update buffer callback, get vim mode, input and key press,...) and it works. I have a question about the cursor position. |
@elebeaup - very exciting! Thanks for exploring this and sharing what you've done so far. Would be interested to see it in action
Good question - you're exactly right in terms of the strategy Onivim 2 uses: we get the cursor position with |
I played around with this a bit in December. I ended up ripping out some terminal-related stuff in order to get it to build. This is what I ended up with: titanous@ffdb7d9 I haven't had time to fully test/integrate and clean this up, but I wanted to checkpoint here in case someone else got to it first. |
You can find my work in progress here : elebeaup/libvim@9aff897. Compiling
Testing
|
Can you give some advice how to compile libvim to WebAssembly? its mentioned in the README.md but I could not find any instructions how this is done.
I do not know the
esy
tool very well, but I think I was able to build the library under linux using this script insrc/build
(running it fromsrc
):There were some failing checks though (not sure if this is the problem):
Anyway I got a
libvim.a
file and tried compiling this code:using this command:
But then I got this error:
This works fine using gcc:
# after running the same build script but with configure/make instead of emconfigure/emmake gcc -Iinclude -Iinclude/proto -DHAVE_CONFIG_H main.c lib/libvim.a -lSM -lICE -lXt -lX11 -lXdmcp -lm -ltinfo -lnsl -ldl
Any idea what could be wrong? Did you have success using this library with WebAssembly yet? If so it would be great if you could add some directions how.
The text was updated successfully, but these errors were encountered: