Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add shims for GOARCH=wasm with GOOS=js and GOOS=wasip1 #176

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions enumerator/usb_wasm.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// Copyright 2014-2024 Cristian Maglie. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//

package enumerator

func nativeGetDetailedPortsList() ([]*PortDetails, error) {
return nil, &PortEnumerationError{}
}
15 changes: 15 additions & 0 deletions enumerator_wasm.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Copyright 2014-2024 Cristian Maglie. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//

package serial

import (
"errors"
)

func nativeGetPortsList() ([]string, error) {
return nil, errors.New("nativeGetPortsList is not supported on wasm")
}
15 changes: 15 additions & 0 deletions serial_wasm.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Copyright 2014-2024 Cristian Maglie. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//

package serial

import (
"errors"
)

func nativeOpen(portName string, mode *Mode) (Port, error) {
return nil, errors.New("nativeOpen is not supported on wasm")
}
Loading