kuchiki-rs / kuchiki

(朽木) HTML/XML tree manipulation library for Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Can this be used in wasm?

m-haisham opened this issue · comments

Im currently working on a project that requires compilation to wasm, so i would like to know if it is supported.

I’ve never tried it but I don’t see why it wouldn’t work.

However, if you mean wasm in a browser, Kuchiki’s tree and parser will be completely unrelated to the browser’s DOM tree and its parsers. Depending on what you need you might be better off using https://docs.rs/web-sys/latest/web_sys/struct.DomParser.html or similar.

I want this to work across multiple systems (pc, web and mobile) so I believe using the internal tree and parser is just fine, rust will just handle the request (using reqwest) and parsing (using kuchiki).