Binaryen vs directly generate wasm

I am thinking of creating a programming language that compiles to wasm.
Is there any difference between generating wasm with wasm_encoder then using wasm-opt to optimize it and using the binaryen C API?