https://github.com/stargate01/full-stack-fortran
Fortran to WebAssembly
https://github.com/stargate01/full-stack-fortran
dragonegg fortran fortran-compiler gcc llvm webassembly
Last synced: about 1 month ago
JSON representation
Fortran to WebAssembly
- Host: GitHub
- URL: https://github.com/stargate01/full-stack-fortran
- Owner: StarGate01
- License: mpl-2.0
- Created: 2020-04-14T00:19:02.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-03T09:14:18.000Z (about 1 year ago)
- Last Synced: 2024-05-03T13:58:30.955Z (about 1 year ago)
- Topics: dragonegg, fortran, fortran-compiler, gcc, llvm, webassembly
- Language: Fortran
- Homepage:
- Size: 656 KB
- Stars: 145
- Watchers: 7
- Forks: 10
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://drone-github.chrz.de/StarGate01/Full-Stack-Fortran)
[](https://hub.docker.com/r/stargate01/f90wasm)# Full-Stack-Fortran
A toolchain to compile Fortran to Webassembly, and a few projects using it.
Blog post: https://chrz.de/2020/04/21/fortran-in-the-browser/
Docker image: https://hub.docker.com/r/stargate01/f90wasm
### 2024 Update Note
This project was originally published in 2020. Today, in 2024, the FORTRAN compiler landscape has changed quite a bit – while FORTRAN still does not enjoy first-class WebAssembly support in the LLVM toolchain, it is now possible to set up a much more sane toolchain by applying a few patches to LLVM.
[Dr George W Stagg has published an excellent writeup](https://gws.phd/posts/fortran_wasm/) of his LLVM modifications, and the application of the resulting toolchain to several real-world projects. Specifically, the [WebR](https://github.com/r-wasm/webr) project and a cool BLAS-based in-browser digit classifier.
## Usage
Run `./f90wasm/build.sh` to build the docker image locally. A pre-compiled image is available on the [Docker Hub](https://hub.docker.com/r/stargate01/f90wasm).
Run `./test/test.sh` to compile the test application, and host it on http://localhost:8080 . Use `./test/clean.sh` to remove compiled test binaries.
## Thanks to
- http://www.netlib.org/lapack/
- https://gcc.gnu.org/
- https://llvm.org/
- https://emscripten.org/
- https://github.com/smikes/femscripten
- [Aman Gupta Karmani (tmm1)](https://github.com/tmm1) for helping to update the Emscripten version used (#10, #12, #13)## TLDR
