6.1 Imports and ops

In the preceding chapter, we delved into the execution of a basic "hello world" program within the Deno environment. This exploration encompassed a thorough examination of pivotal concepts. The deliberately uncomplicated nature of the program was a deliberate choice, aimed at directing our attention towards comprehending the intricacies of Deno's functionality rather than fixating solely on the program itself.

Our journey led us through an array of critical topics, including but not limited to:

  • The execution command known as "Run"

  • The central entity referred to as the "Main Worker"

  • The mechanism responsible for loading modules

  • Visualization of the module relationships through the module graph

  • The component handling the retrieval of files

  • The JavaScript Runtime, which is pivotal for execution

  • The multifaceted process of module loading

  • The intricate evaluation procedure of these loaded modules

  • And many other interconnected elements.

This chapter, however, embarks on a new leg of our exploration. Here, we will expand upon our initial "hello world" example by incorporating imports, synchronous and asynchronous operations. This endeavor will significantly enhance our comprehension of how imports operate within Deno's framework and how the operations (often referred to as "ops") are managed by both Deno and the underlying V8 engine.

It's essential to note that this chapter is a seamless extension of the groundwork laid in the previous one. Given our comprehensive understanding of the fundamentals, we won't revisit the foundational concepts. Instead, our focus will pivot towards assimilating novel ideas and insights.

Chapter contents

page6.1 Imports and opspage6.2 Hello world program v2page6.3 Module graph with importspage6.4 Transpilepage6.5 Registration and instantiationpage6.6 Registration of opspage6.7 Evaluate modulepage6.8 Sync OPspage6.9 Debug logs

Last updated