Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Practical WebAssembly

You're reading from   Practical WebAssembly Explore the fundamentals of WebAssembly programming using Rust

Arrow left icon
Product type Paperback
Published in May 2022
Publisher Packt
ISBN-13 9781838828004
Length 232 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Sendil Kumar Nellaiyapen Sendil Kumar Nellaiyapen
Author Profile Icon Sendil Kumar Nellaiyapen
Sendil Kumar Nellaiyapen
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Section 1: Introduction to WebAssembly
2. Chapter 1: Understanding LLVM FREE CHAPTER 3. Chapter 2: Understanding Emscripten 4. Chapter 3: Exploring WebAssembly Modules 5. Section 2: WebAssembly Tools
6. Chapter 4: Understanding WebAssembly Binary Toolkit 7. Chapter 5: Understanding Sections in WebAssembly Modules 8. Chapter 6: Installing and Using Binaryen 9. Section 3: Rust and WebAssembly
10. Chapter 7: Integrating Rust with WebAssembly 11. Chapter 8: Bundling WebAssembly Using wasm-pack 12. Chapter 9: Crossing the Boundary between Rust and WebAssembly 13. Chapter 10: Optimizing Rust and WebAssembly 14. Other Books You May Enjoy

Exploring LLVM

LLVM is a part of the LLVM Project. The LLVM Project hosts compilers and toolchain technologies. The LLVM core is a part of the LLVM Project. The LLVM core is responsible for providing source- and target-independent optimization and for generating code for many CPU architectures. This enables language developers to just create a frontend that generates an LLVM-compatible IR or LLVM IR from the source language.

Did You Know?

LLVM is not an acronym. When the project was started as a research project, it meant Low-Level Virtual Machine. But later, it was decided to use the name as it is rather than as an acronym.

The main advantages of LLVM are as follows:

  • LLVM uses a simple low-level language that looks similar to C.
  • LLVM is strongly typed.
  • LLVM has strictly defined semantics.
  • LLVM has accurate and precise garbage collection.
  • LLVM provides various optimizations that you can choose based on the requirement. It has aggressive, scalar, inter-procedural, simple-loop, and profile-driven optimizations.
  • LLVM provides various compilation models. They are link time, install time, runtime, and offline.
  • LLVM generates machine code for various target architectures.
  • LLVM provides DWARF debugging information.

    Note

    DWARF is a debugging file format used by many compilers and debuggers to support source-level debugging. DWARF is architecture-independent and applicable to any processor or operating system. It uses a data structure called a Debugging Information Entry (DIE) to represent each variable, type, procedure, and so on.

    If you want to explore more about DWARF, refer to http://dwarfstd.org/doc/Debugging%20using%20DWARF-2012.pdf.

    Important Note

    LLVM is not a single monolithic project. It is a collection of subprojects and other projects. These projects are used by various languages, such as Ruby, Python, Haskell, Rust, and D, for compilation.

Now that we have an understanding of compilers and LLVM, we will see how it is used.

You have been reading a chapter from
Practical WebAssembly
Published in: May 2022
Publisher: Packt
ISBN-13: 9781838828004
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime