Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

[wasm][wasi] incorrecly adds imports that aren't needed #96862

Open

Description

@silesmo

Description

Wasm modules built with mono incorrectly includes wasi imports that aren't used by the module.

This causes tests to fail for https://github.com/bytecodealliance/wit-bindgen.

Related: #96419

@AaronRobinsonMSFT @lewing @yowl @jsturtevant

Reproduction Steps

Build mono example: https://github.com/silesmo/wasm-unmanaged-callers-bug

Expected behavior

Imports for the same code built with native-aot-llvm:

Function { module: "test:numbers/test", field: "get-scalar", import_idx: 0, index: 10, params: [], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-char", import_idx: 0, index: 1, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-float32", import_idx: 0, index: 17, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-float64", import_idx: 0, index: 16, params: [F64], results: [F64] }
Function { module: "test:numbers/test", field: "roundtrip-s16", import_idx: 0, index: 1, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-s32", import_idx: 0, index: 1, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-s64", import_idx: 0, index: 18, params: [I64], results: [I64] }
Function { module: "test:numbers/test", field: "roundtrip-s8", import_idx: 0, index: 1, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-u16", import_idx: 0, index: 1, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-u32", import_idx: 0, index: 1, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-u64", import_idx: 0, index: 18, params: [I64], results: [I64] }
Function { module: "test:numbers/test", field: "roundtrip-u8", import_idx: 0, index: 1, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "set-scalar", import_idx: 0, index: 0, params: [I32], results: [] }
Function { module: "wasi_snapshot_preview1", field: "environ_get", import_idx: 0, index: 3, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "environ_sizes_get", import_idx: 0, index: 3, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "clock_time_get", import_idx: 0, index: 33, params: [I32, I64, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_close", import_idx: 0, index: 1, params: [I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_fdstat_get", import_idx: 0, index: 3, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_fdstat_set_flags", import_idx: 0, index: 3, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_prestat_get", import_idx: 0, index: 3, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_prestat_dir_name", import_idx: 0, index: 2, params: [I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_read", import_idx: 0, index: 6, params: [I32, I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_seek", import_idx: 0, index: 48, params: [I32, I64, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_write", import_idx: 0, index: 6, params: [I32, I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "path_filestat_get", import_idx: 0, index: 23, params: [I32, I32, I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "path_open", import_idx: 0, index: 60, params: [I32, I32, I32, I32, I32, I64, I64, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "path_unlink_file", import_idx: 0, index: 2, params: [I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "poll_oneoff", import_idx: 0, index: 6, params: [I32, I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "proc_exit", import_idx: 0, index: 0, params: [I32], results: [] }
Function { module: "wasi_snapshot_preview1", field: "sched_yield", import_idx: 0, index: 10, params: [], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "random_get", import_idx: 0, index: 3, params: [I32, I32], results: [I32] }

Actual behavior

Imports built with mono:
Function { module: "wasi_snapshot_preview1", field: "sock_accept", import_idx: 0, index: 7, params: [I32, I32, I32], results: [I32] }
Function { module: "test:numbers/test", field: "get-scalar", import_idx: 0, index: 9, params: [], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-char", import_idx: 0, index: 4, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-float32", import_idx: 0, index: 59, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-float64", import_idx: 0, index: 55, params: [F64], results: [F64] }
Function { module: "test:numbers/test", field: "roundtrip-s16", import_idx: 0, index: 4, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-s32", import_idx: 0, index: 4, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-s64", import_idx: 0, index: 23, params: [I64], results: [I64] }
Function { module: "test:numbers/test", field: "roundtrip-s8", import_idx: 0, index: 4, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-u16", import_idx: 0, index: 4, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-u32", import_idx: 0, index: 4, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "roundtrip-u64", import_idx: 0, index: 23, params: [I64], results: [I64] }
Function { module: "test:numbers/test", field: "roundtrip-u8", import_idx: 0, index: 4, params: [I32], results: [I32] }
Function { module: "test:numbers/test", field: "set-scalar", import_idx: 0, index: 1, params: [I32], results: [] }
Function { module: "wasi_snapshot_preview1", field: "args_get", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "args_sizes_get", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "environ_get", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "environ_sizes_get", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "clock_res_get", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "clock_time_get", import_idx: 0, index: 26, params: [I32, I64, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_advise", import_idx: 0, index: 66, params: [I32, I64, I64, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_close", import_idx: 0, index: 4, params: [I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_fdstat_get", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_fdstat_set_flags", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_filestat_get", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_filestat_set_size", import_idx: 0, index: 24, params: [I32, I64], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_filestat_set_times", import_idx: 0, index: 66, params: [I32, I64, I64, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_pread", import_idx: 0, index: 71, params: [I32, I32, I32, I64, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_prestat_get", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_prestat_dir_name", import_idx: 0, index: 7, params: [I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_pwrite", import_idx: 0, index: 71, params: [I32, I32, I32, I64, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_read", import_idx: 0, index: 12, params: [I32, I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_readdir", import_idx: 0, index: 71, params: [I32, I32, I32, I64, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_seek", import_idx: 0, index: 41, params: [I32, I64, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_sync", import_idx: 0, index: 4, params: [I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_tell", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "fd_write", import_idx: 0, index: 12, params: [I32, I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "path_create_directory", import_idx: 0, index: 7, params: [I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "path_filestat_get", import_idx: 0, index: 11, params: [I32, I32, I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "path_filestat_set_times", import_idx: 0, index: 72, params: [I32, I32, I32, I32, I64, I64, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "path_link", import_idx: 0, index: 14, params: [I32, I32, I32, I32, I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "path_open", import_idx: 0, index: 73, params: [I32, I32, I32, I32, I32, I64, I64, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "path_readlink", import_idx: 0, index: 10, params: [I32, I32, I32, I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "path_remove_directory", import_idx: 0, index: 7, params: [I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "path_rename", import_idx: 0, index: 10, params: [I32, I32, I32, I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "path_symlink", import_idx: 0, index: 11, params: [I32, I32, I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "path_unlink_file", import_idx: 0, index: 7, params: [I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "poll_oneoff", import_idx: 0, index: 12, params: [I32, I32, I32, I32], results: [I32] }
Function { module: "wasi_snapshot_preview1", field: "proc_exit", import_idx: 0, index: 1, params: [I32], results: [] }
Function { module: "wasi_snapshot_preview1", field: "random_get", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Activity

  1. ghost added
    area-CodeGen-coreclr
    on Jan 11, 2024
  2. ghost added
    untriaged
    on Jan 11, 2024
  3. silesmo commented on Jan 11, 2024

    @silesmo
    Author

    These are all the imports that shouldn't be there:
    Function { module: "wasi_snapshot_preview1", field: "sock_accept", import_idx: 0, index: 7, params: [I32, I32, I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "args_get", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "args_sizes_get", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "clock_res_get", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "fd_advise", import_idx: 0, index: 66, params: [I32, I64, I64, I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "fd_pread", import_idx: 0, index: 71, params: [I32, I32, I32, I64, I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "fd_pwrite", import_idx: 0, index: 71, params: [I32, I32, I32, I64, I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "fd_sync", import_idx: 0, index: 4, params: [I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "fd_tell", import_idx: 0, index: 5, params: [I32, I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "path_create_directory", import_idx: 0, index: 7, params: [I32, I32, I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "path_filestat_set_times", import_idx: 0, index: 72, params: [I32, I32, I32, I32, I64, I64, I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "path_link", import_idx: 0, index: 14, params: [I32, I32, I32, I32, I32, I32, I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "path_readlink", import_idx: 0, index: 10, params: [I32, I32, I32, I32, I32, I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "path_remove_directory", import_idx: 0, index: 7, params: [I32, I32, I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "path_rename", import_idx: 0, index: 10, params: [I32, I32, I32, I32, I32, I32], results: [I32] }
    Function { module: "wasi_snapshot_preview1", field: "path_symlink", import_idx: 0, index: 11, params: [I32, I32, I32, I32, I32], results: [I32] }

  4. added
    arch-wasm
    and removed
    area-CodeGen-coreclr
    on Jan 11, 2024
  5. radical commented on Jan 11, 2024

    @radical
    Member
  6. pavelsavara commented on Jan 12, 2024

    @pavelsavara
    Member
  7. lambdageek commented on Jan 12, 2024

    @lambdageek
    Member

    we probably need to run something like wasm-opt --remove-unused-module-elements as part of the module build.

  8. self-assigned this
    on Jan 26, 2024
  9. lewing commented on Jan 26, 2024

    @lewing
    Member

    I haven't had time to look into this directly but are you running dotnet publish or just build. The imports should be linked away if you are running publish. At the moment it isn't really possible to do iltriming during build which is what is required for the import table generator to remove the linkage.

    The NativeAOT build operates differently.

  10. added this to the 9.0.0 milestone on Feb 5, 2024
  11. ghost removed
    untriaged
    on Feb 5, 2024
  12. lewing commented on Mar 27, 2024

    @lewing
    Member

    It appears something has broken in the build and the the component selection logic is not working at all so things like sock_accept are coming from the debugger component. With a nightly build I see

    (import "wasi_snapshot_preview1" "sock_accept" (func $fimport$0 (param i32 i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "args_get" (func $fimport$1 (param i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "args_sizes_get" (func $fimport$2 (param i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "environ_get" (func $fimport$3 (param i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "environ_sizes_get" (func $fimport$4 (param i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "clock_res_get" (func $fimport$5 (param i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "clock_time_get" (func $fimport$6 (param i32 i64 i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_advise" (func $fimport$7 (param i32 i64 i64 i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_close" (func $fimport$8 (param i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_fdstat_get" (func $fimport$9 (param i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_fdstat_set_flags" (func $fimport$10 (param i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_filestat_get" (func $fimport$11 (param i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_filestat_set_size" (func $fimport$12 (param i32 i64) (result i32)))
     (import "wasi_snapshot_preview1" "fd_pread" (func $fimport$13 (param i32 i32 i32 i64 i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_prestat_get" (func $fimport$14 (param i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_prestat_dir_name" (func $fimport$15 (param i32 i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_pwrite" (func $fimport$16 (param i32 i32 i32 i64 i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_read" (func $fimport$17 (param i32 i32 i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_readdir" (func $fimport$18 (param i32 i32 i32 i64 i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_seek" (func $fimport$19 (param i32 i64 i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_sync" (func $fimport$20 (param i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_tell" (func $fimport$21 (param i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "fd_write" (func $fimport$22 (param i32 i32 i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "path_filestat_get" (func $fimport$23 (param i32 i32 i32 i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "path_open" (func $fimport$24 (param i32 i32 i32 i32 i32 i64 i64 i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "path_readlink" (func $fimport$25 (param i32 i32 i32 i32 i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "path_unlink_file" (func $fimport$26 (param i32 i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "poll_oneoff" (func $fimport$27 (param i32 i32 i32 i32) (result i32)))
     (import "wasi_snapshot_preview1" "proc_exit" (func $fimport$28 (param i32)))
     (import "wasi_snapshot_preview1" "random_get" (func $fimport$29 (param i32 i32) (result i32)))
    

    For an application that should have none of the optional components

  13. assigned and unassigned on Mar 27, 2024
  14. lewing commented on Mar 27, 2024

    @lewing
    Member

    @maraf please take a look at the components logic, it was working briefly before the browser/wasm target unification

  15. added
    os-wasi
    on Mar 27, 2024
  16. maraf commented on Mar 28, 2024

    @maraf
    Member

    I got away sock_accept by linking with debugger-stub, but all the remaining are still there (even after using the rest of the stubs)

    _WasmLinkDependencies
        entrypoint_Wasi.Console.Sample.dll.c
        pinvoke.o
        driver.o
        runtime.o
        main.o
        stubs.o
        synthetic-pthread.o
    
        libicudata.a
        libicui18n.a
        libicuuc.a
        libmono-component-debugger-stub-static.a
        libmono-component-diagnostics_tracing-stub-static.a
        libmono-component-hot_reload-stub-static.a
        libmono-component-marshal-ilgen-stub-static.a
        libmono-ee-interp.a
        libmono-icall-table.a
        libmono-wasm-nosimd.a
        libmonosgen-2.0.a
        libSystem.Globalization.Native.a
        libSystem.IO.Compression.Native.a
        libSystem.Native.a
        wasm-bundled-timezones.a
        libmono-wasm-nosimd.a
    
        libc++.a
        libc++abi.a
    

    I'm still getting

    (import "wasi_snapshot_preview1" "args_get" (func (;0;) (type 7)))
    (import "wasi_snapshot_preview1" "args_sizes_get" (func (;1;) (type 7)))
    (import "wasi_snapshot_preview1" "environ_get" (func (;2;) (type 7)))
    (import "wasi_snapshot_preview1" "environ_sizes_get" (func (;3;) (type 7)))
    (import "wasi_snapshot_preview1" "clock_res_get" (func (;4;) (type 7)))
    (import "wasi_snapshot_preview1" "clock_time_get" (func (;5;) (type 48)))
    (import "wasi_snapshot_preview1" "fd_advise" (func (;6;) (type 17)))
    (import "wasi_snapshot_preview1" "fd_close" (func (;7;) (type 6)))
    (import "wasi_snapshot_preview1" "fd_fdstat_get" (func (;8;) (type 7)))
    (import "wasi_snapshot_preview1" "fd_fdstat_set_flags" (func (;9;) (type 7)))
    (import "wasi_snapshot_preview1" "fd_filestat_get" (func (;10;) (type 7)))
    (import "wasi_snapshot_preview1" "fd_filestat_set_size" (func (;11;) (type 15)))
    (import "wasi_snapshot_preview1" "fd_pread" (func (;12;) (type 63)))
    (import "wasi_snapshot_preview1" "fd_prestat_get" (func (;13;) (type 7)))
    (import "wasi_snapshot_preview1" "fd_prestat_dir_name" (func (;14;) (type 8)))
    (import "wasi_snapshot_preview1" "fd_read" (func (;15;) (type 9)))
    (import "wasi_snapshot_preview1" "fd_readdir" (func (;16;) (type 63)))
    (import "wasi_snapshot_preview1" "fd_seek" (func (;17;) (type 50)))
    (import "wasi_snapshot_preview1" "fd_tell" (func (;18;) (type 7)))
    (import "wasi_snapshot_preview1" "fd_write" (func (;19;) (type 9)))
    (import "wasi_snapshot_preview1" "path_filestat_get" (func (;20;) (type 10)))
    (import "wasi_snapshot_preview1" "path_open" (func (;21;) (type 64)))
    (import "wasi_snapshot_preview1" "path_readlink" (func (;22;) (type 11)))
    (import "wasi_snapshot_preview1" "path_unlink_file" (func (;23;) (type 8)))
    (import "wasi_snapshot_preview1" "poll_oneoff" (func (;24;) (type 9)))
    (import "wasi_snapshot_preview1" "proc_exit" (func (;25;) (type 24)))
    (import "wasi_snapshot_preview1" "random_get" (func (;26;) (type 7)))
    

    Manually running wasm-opt --remove-unused-module-elements ... didn't remove any of those

    These are imports differ native aot

    args_get
    args_sizes_get
    clock_res_get
    fd_advise
    fd_filestat_get
    fd_filestat_set_size
    fd_pread
    fd_readdir
    fd_tell
    path_readlink
    

    They might be use from https://github.com/search?q=repo%3AWebAssembly%2Fwasi-libc+clock_res_get&type=code, I'll track them down to have clear understanding

  17. pavelsavara commented on May 21, 2024

    @pavelsavara
    Member

    I'm still getting

    (import "wasi_snapshot_preview1" "args_get" (func (;0;) (type 7)))
    (import "wasi_snapshot_preview1" "args_sizes_get" (func (;1;) (type 7)))
    (import "wasi_snapshot_preview1" "environ_get" (func (;2;) (type 7)))
    ...
    

    I'm thinking that's mono corelib -> using dotnet PAL -> is using libc from SDK -> is using those WASM imports ?
    Should ILink trim some of that ? If so, would it also mean that the native symbols should be trimmed ?
    Or is that just Mono VM -> libc -> WASM imports ?
    Or both.

  18. maraf commented on Jul 24, 2024

    @maraf
    Member

    The socket import is gone by proper mono component selection. Moving tracking down where the rest of the imports comes from to vNext.

  19. modified the milestones: 9.0.0, 10.0.0 on Jul 24, 2024
  20. modified the milestones: 10.0.0, Future on May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-Build-monoos-wasi

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions