mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature/OFFICIALLY UNSUPPORTED] add nowasm build tag to disable building with WebAssembly (#3429)
* add experimental build-tag 'nowasm' which uses local ffmpeg / ffprobe * updated experimental support message * add comment to build script explaining build tag * add nowasm build tags to moderncsqlite files
This commit is contained in:
@@ -19,9 +19,6 @@ package ffmpeg
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"codeberg.org/gruf/go-ffmpreg/wasm"
|
||||
"github.com/tetratelabs/wazero"
|
||||
)
|
||||
|
||||
// runner simply abstracts away the complexities
|
||||
@@ -53,7 +50,7 @@ func (r *runner) Init(n int) {
|
||||
|
||||
// Run will attempt to pass the given compiled WebAssembly module with args to run(), waiting on
|
||||
// the receiving runner until a free slot is available to run an instance, (if a limit is enabled).
|
||||
func (r *runner) Run(ctx context.Context, cmod wazero.CompiledModule, args Args) (uint32, error) {
|
||||
func (r *runner) Run(ctx context.Context, run func() (uint32, error)) (uint32, error) {
|
||||
select {
|
||||
// Context canceled.
|
||||
case <-ctx.Done():
|
||||
@@ -66,6 +63,6 @@ func (r *runner) Run(ctx context.Context, cmod wazero.CompiledModule, args Args)
|
||||
// Release slot back to pool on end.
|
||||
defer func() { r.pool <- struct{}{} }()
|
||||
|
||||
// Pass to main module runner function.
|
||||
return wasm.Run(ctx, runtime, cmod, args)
|
||||
// Call run.
|
||||
return run()
|
||||
}
|
||||
|
Reference in New Issue
Block a user