Skip to content

Add fs.FS mount option#40

Open
mackross wants to merge 1 commit intofastschema:masterfrom
mackross:fs-mount-option
Open

Add fs.FS mount option#40
mackross wants to merge 1 commit intofastschema:masterfrom
mackross:fs-mount-option

Conversation

@mackross
Copy link
Copy Markdown

Summary

  • add an optional FS fs.FS field to qjs.Option
  • prefer wazero.FSConfig.WithFSMount(option.FS, "/") when provided
  • preserve the existing CWD + WithDirMount behavior as the fallback

Tests

  • add TestEvalOptions/FSOption
  • add TestModuleLoading/FS_Module_Imports
  • run go test ./...

Why

This makes it possible to execute and import modules from a Go-provided filesystem without requiring a host directory mount, while keeping the current path-based workflow unchanged.

@mackross mackross marked this pull request as ready for review March 22, 2026 19:00
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.

1 participant