Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Support publishing vimwiki crate for web assembly #104

Closed
chipsenkbeil opened this issue May 17, 2021 · 3 comments
Closed

Support publishing vimwiki crate for web assembly #104

chipsenkbeil opened this issue May 17, 2021 · 3 comments
Milestone

Comments

@chipsenkbeil
Copy link
Owner

This way, browsers could parse vimwiki within a page to provide syntax highlighting and other details.

Assuming macros feature would not be supported. HTML feature may also not be supported.

@chipsenkbeil chipsenkbeil added this to the backlog milestone May 17, 2021
@chipsenkbeil
Copy link
Owner Author

Did a quick proof of concept and this works, although not without problems. I can parse and export a JavaScript object, but not my actual object because of the lifetime being required in the function. See rustwasm/wasm-bindgen#1187.

Screen Shot 2021-05-18 at 12 02 57 AM

@chipsenkbeil
Copy link
Owner Author

Am able to apply syntax highlighting by providing a wasm function to return regions of headers (as js objects):

Screen Shot 2021-05-18 at 1 08 55 AM

Screen Shot 2021-05-18 at 1 09 28 AM

@chipsenkbeil
Copy link
Owner Author

Closing this out as it's now part of my active branch to introduce HTML support. The wasm API needs to be fleshed out, but that can be a separate issue.

@chipsenkbeil chipsenkbeil modified the milestones: backlog, 0.1 May 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant