How to create and compile a standalone library?

to generate a generic Wasm library

You can refer to The MoonBit Update——0401

Also, it’s unclear how to include (or exclude) the standard library.

Currently, core will be linked by default, if you want to make it more clear you can use --std|--nostd flag for moon check|build|test, for example:

moon build --std
moon build --nostd