# Hosting Web Apps in Julia

**URL:** <https://discourse.julialang.org/t/hosting-web-apps-in-julia/1063>\
**Category:** General Usage\
**Tags:** package, webapps\
**Created:** [December 20, 2016, 4:36pm UTC](https://discourse.julialang.org/t/hosting-web-apps-in-julia/1063 "2016-12-20T16:36:52Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![tshort](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tshort/32/43_2.png) [@tshort](https://discourse.julialang.org/u/tshort)\
**Post date:** [December 22, 2016, 6:10pm UTC](https://discourse.julialang.org/t/hosting-web-apps-in-julia/1063/17 "2016-12-22T18:10:25Z")

</div>

Getting the full Julia working (REPL, libraries, test suite, etc.) in Emscripten/WebAssembly would be a lot of work. Ultimately, it should be doable because Julia is well matched for this. A more realistic starting point is to statically compile smaller chunks of code. This should be easier given the work Jameson/Julia Computing has done in this area.

I’ve tried it in the past. I could get simple functions compiled and run in the browser. These functions would involve basic types like Int’s or Float64’s. I couldn’t get arrays or indexing to work at all, and there were some other Emscripten issues I didn’t know how to deal with. As a starting point, I thing you need to consider the following:

- Match up the versions of LLVM that Julia and Emscripten use
- Statically compile Julia code to 32 bit LLVM output (-m32)
- Compile the C code that makes up the Julia base library
- Link them together–may need to handle naming somehow

At one point, Rust compilation used special LLVM passes. I don’t know if that’s needed anymore.

---

_[View the full topic](https://discourse.julialang.org/t/hosting-web-apps-in-julia/1063)._
