Skip to content

Improve website documentation#103

Open
Marcono1234 wants to merge 4 commits into
bytecodealliance:mainfrom
Marcono1234:doc-improvements
Open

Improve website documentation#103
Marcono1234 wants to merge 4 commits into
bytecodealliance:mainfrom
Marcono1234:doc-improvements

Conversation

@Marcono1234

Copy link
Copy Markdown
Contributor
  • Improve links & fix dead links
  • Improve formatting
  • Improve code snippets (formatting & code)
  • Fix typos
  • Consistently use Docusaurus Admonitions for notes

I hope the changes are rather uncontroversial, but please let me know if you want anything changed or reverted.

I have also added some comments below explaining the rationale.

- Improve links & fix dead links
- Improve formatting
- Improve code snippets (formatting & code)
- Fix typos
- Consistently use Docusaurus Admonitions for notes
@Marcono1234
Marcono1234 requested a review from andreaTP as a code owner July 19, 2026 00:42
Comment thread docs/docs/advanced/logging.md
Comment thread docs/docs/core/memory.md
Comment thread docs/docs/examples/rust.md
Comment thread docs/docs/execution/compiler-cache.md
Comment thread docs/docs/security/best-practices.md
Comment thread docs/docs/security/best-practices.md
Comment thread docs/docs/wasi/index.md
* system clock
* random number generation
* basic reading and writing of files (through use of a [virtual file system](https://github.com/google/jimfs))
* basic reading and writing of files (through use of a virtual file system)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this link; Jimfs is only one variant of it, and there are already links to Jimfs and ZeroFs on this page.

Comment thread docs/docs/wasi/index.md
Comment on lines -93 to +95
Often, this is the way you communicate with basic WASI-enabled modules by way of the [command pattern](https://endive.run/historical-blog/wasi-command-reactor).
Often, this is the way you communicate with basic WASI-enabled modules by way of the [command pattern](https://dylibso.com/blog/wasi-command-reactor/).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old link was a dead link.

Comment thread docs/docs/wasi/index.md
Comment on lines -139 to +141
For instance, in the case of stdout, you would write:
For instance, you would write:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example actually redirects also stderr and stdin, not only stdout.

Comment thread docs/docs/wasi/index.md Outdated
Comment on lines +166 to +171
var wasi = WasiOptions.builder().withEnvironment("ENV_ONE_KEY", "my-one-key-value").withEnvironment("ENV_TWO_KEY", "my-two-key-value").build();
var wasi = WasiOptions.builder()
.withEnvironment("ENV_ONE_KEY", "my-one-key-value")
.withEnvironment("ENV_TWO_KEY", "my-two-key-value")
.build();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrapped this because the line was cut off / required a scrollbar to be readable.

@Marcono1234

Copy link
Copy Markdown
Contributor Author

CI is failing, for example with:

● ApprovalTests › test docs/execution/build-time-compiler.md

    thrown: "WARNING: Using incubator modules: jdk.incubator.vector
    illegal start of expression
            .withMachineFactory(Add::create)
            ^
    illegal start of expression
            .build();
            ^
...

I had assumed the placement of the . at the end of the line instead of the beginning of the next line for wrapped chained method calls was just unconventional formatting, but apparently it was needed to make jbang to be able to compile the code.

Should I just revert these changes for now then?

Side note: It seems in recent jbang versions (e.g. version 0.141.0, due to jbangdev/jbang#2592?) this can be worked around now by adding:

  • somewhere at the beginning of the Markdown file
    <!--
    ```java
    class Main {
    public static void main(String... args) throws Exception {
    ```
    -->
    
  • somewhere at the end
    <!--
    ```java
    }}
    ```
    -->
    

jbang concatenates all code blocks, and detects the main method and compiles it as regular Java code instead of as jshell snippet then (?).

@andreaTP andreaTP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very very much welcome @Marcono1234 thanks a lot for doing a full pass with fresh eyes on the docs!

I'll merge as soon as the CI is green, however you want to fix it (with or without main) no strong opinions there.

Comment thread docs/docs/advanced/memory-customization.md Outdated
Comment thread docs/docs/advanced/logging.md
Comment thread docs/docs/core/memory.md
Comment thread docs/docs/examples/rust.md
Comment thread docs/docs/execution/build-time-compiler.md Outdated
Comment thread docs/docs/execution/compiler-cache.md
Comment thread docs/docs/security/best-practices.md
Comment thread docs/docs/security/best-practices.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants