Skip to content

fsc-host in WebAssembly #13

@harrisse

Description

@harrisse

Is it possible to run fsc-host in WebAssembly?

I'm trying to invoke fsc-host with CompilerHost.getAssembly Options.Default (Inline text) but am hitting the following exception:

System.TypeInitializationException: The type initializer for '<StartupCode$FSharp-Compiler-Service>.$FSharpCheckerResults' threw an exception.
System.NullReferenceException: Object reference not set to an instance of an object.

Googling the error took me to dotnet/fsharp#11966 which I saw you had left a comment on, so I figured you might know something one way or the other 😄

This project got fsc working in the browser a while back but the approach no longer works in .net 7. I was able to make some progress on their approach by copying dlls from the browser cache to the filesystem, but was never able to get fsc to recognize symbols from -r:'d dlls.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions