Skip to content

Commit

Permalink
Update some links that were redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
tomayac committed Jan 14, 2025
1 parent 2b6d598 commit 0138b48
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
18 changes: 11 additions & 7 deletions getting-started/js-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ exports a function `e`:
```

(Here, instead of writing the module in C/C++ and compiling to WebAssembly, we
write the module directly in the [text format](/docs/text-format/) which can be
write the module directly in the
[text format](https://webassembly.github.io/spec/core/text/index.html) which can
be
[assembled](/getting-started/advanced-tools/#wabt-the-webassembly-binary-toolkit)
directly into the binary file `simple.wasm`.)

Expand Down Expand Up @@ -97,11 +99,12 @@ imported JS function which ultimately executes `console.log(42)`.

## Memory

[Linear memory](/docs/semantics/#linear-memory) is another important WebAssembly
building block that is typically used to represent the entire heap of a compiled
C/C++ application. From a JavaScript perspective, linear memory (henceforth,
just “memory”) can be thought of as a resizable `ArrayBuffer` that is carefully
optimized for low-overhead sandboxing of loads and stores.
[Linear memory](https://webassembly.github.io/spec/core/exec/index.html#linear-memory)
is another important WebAssembly building block that is typically used to
represent the entire heap of a compiled C/C++ application. From a JavaScript
perspective, linear memory (henceforth, just “memory”) can be thought of as a
resizable `ArrayBuffer` that is carefully optimized for low-overhead sandboxing
of loads and stores.

Memories can be created from JavaScript by supplying their initial size and,
optionally, their maximum size:
Expand Down Expand Up @@ -174,4 +177,5 @@ reasons:
before or concurrent with module compilation.
- They allow a single `Memory` object to be imported by multiple instances,
which is a critical building block for implementing
[dynamic linking](/docs/dynamic-linking) in WebAssembly.
[dynamic linking](https://github.com/WebAssembly/tool-conventions/blob/main/DynamicLinking.md)
in WebAssembly.
6 changes: 3 additions & 3 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ lead:
<div class="row">
<div class="bubble col-xs-12 col-md-6">
<h3>Efficient and fast</h3>
<p>The Wasm <a href="/docs/semantics/">stack machine</a> is designed to be encoded in a size- and load-time-efficient <a href="/docs/binary-encoding/">binary format</a>. WebAssembly aims to execute at native speed by taking advantage of <a href="/docs/portability/#assumptions-for-efficient-execution">common hardware capabilities</a> available on a wide range of platforms.</p>
<p>The Wasm <a href="https://webassembly.github.io/spec/core/exec/index.html">stack machine</a> is designed to be encoded in a size- and load-time-efficient <a href="https://webassembly.github.io/spec/core/binary/index.html">binary format</a>. WebAssembly aims to execute at native speed by taking advantage of <a href="/docs/portability/#assumptions-for-efficient-execution">common hardware capabilities</a> available on a wide range of platforms.</p>
</div>
<div class="bubble col-xs-12 col-md-6">
<h3>Safe</h3>
<p>WebAssembly describes a memory-safe, sandboxed <a href="/docs/semantics/#linear-memory">execution environment</a> that may even be implemented inside existing JavaScript virtual machines. When <a href="/docs/web/">embedded in the web</a>, WebAssembly will enforce the same-origin and permissions security policies of the browser.</p>
<p>WebAssembly describes a memory-safe, sandboxed <a href="https://webassembly.github.io/spec/core/exec/index.html#linear-memory">execution environment</a> that may even be implemented inside existing JavaScript virtual machines. When <a href="/docs/web/">embedded in the web</a>, WebAssembly will enforce the same-origin and permissions security policies of the browser.</p>
</div>
</div>
<div class="row">
<div class="bubble col-xs-12 col-md-6">
<h3>Open and debuggable</h3>
<p>WebAssembly is designed to be pretty-printed in a <a href="/docs/text-format/">textual format</a> for debugging, testing, experimenting, optimizing, learning, teaching, and writing programs by hand. The textual format will be used when <a href="/docs/faq/#will-webassembly-support-view-source-on-the-web">viewing the source</a> of Wasm modules on the web.</p>
<p>WebAssembly is designed to be pretty-printed in a <a href="https://webassembly.github.io/spec/core/text/index.html">textual format</a> for debugging, testing, experimenting, optimizing, learning, teaching, and writing programs by hand. The textual format will be used when <a href="/docs/faq/#will-webassembly-support-view-source-on-the-web">viewing the source</a> of Wasm modules on the web.</p>
</div>
<div class="bubble col-xs-12 col-md-6">
<h3>Part of the open web platform</h3>
Expand Down
4 changes: 2 additions & 2 deletions scripts/optimize-svgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { optimize } from 'svgo';
function findSvgFiles(dir, fileList = []) {
const files = fs.readdirSync(dir);

files.forEach(file => {
files.forEach((file) => {
const filePath = path.join(dir, file);
const stats = fs.statSync(filePath);

Expand Down Expand Up @@ -45,7 +45,7 @@ function processDirectory(baseDir) {
}

console.log(`Found ${svgFiles.length} SVG file(s). Optimizing...`);
svgFiles.forEach(filePath => {
svgFiles.forEach((filePath) => {
try {
optimizeSvg(filePath);
} catch (error) {
Expand Down

0 comments on commit 0138b48

Please sign in to comment.