https://github.com/roginvs/rocco
University thesis, a compiler from C99 into Webassembly
https://github.com/roginvs/rocco
Last synced: 5 months ago
JSON representation
University thesis, a compiler from C99 into Webassembly
- Host: GitHub
- URL: https://github.com/roginvs/rocco
- Owner: roginvs
- Created: 2020-07-19T14:14:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-05T12:10:15.000Z (over 3 years ago)
- Last Synced: 2025-06-11T23:44:15.069Z (about 1 year ago)
- Language: TypeScript
- Homepage: https://roginvs.github.io/rocco/
- Size: 4.29 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rocco
Rogin C Compiler
## What is this
A compiler from subset of C99 language into webassembly
Demo is here
## What is supported
TODO to add
(maybe some subset of misra rules)
## What is not supported yet
- proper type checking
- "long long", float, double, short types
- switch and goto statements
- unions and structs
- variable-length arrays
- array initializers
- ints are unsigned by default (simple to fix)
- linkage (also not possible to declare function and define it later)
- "" strings
## Why no goto/switch
https://en.wikipedia.org/wiki/Structured_program_theorem
https://github.com/kripken/emscripten/raw/master/docs/paper.pdf
https://medium.com/leaningtech/solving-the-structured-control-flow-problem-once-and-for-all-5123117b1ee2
## Links
https://www.w3.org/TR/wasm-core-1/
https://webassembly.github.io/spec/core/appendix/index-instructions.html
C99 specification
https://developer.mozilla.org/ru/docs/WebAssembly/Understanding_the_text_format