annie 🧸 on Nostr: are there any programming languages that compile part of the code to one target and ...
are there any programming languages that compile part of the code to one target and the rest to another? like i want to have a single codebase, and have some of the functions compiled for a backend binary and some of them compiled to wasm to use on the frontend
like if u wanna do this in rust, u have to set up two crates + a third shared one to keep common types, which is annoying
Published at
2024-06-05 21:46:13Event JSON
{
"id": "9947553b7ee757e32c5946a8a3a07938cd0cf87829e4eef2e3263fc233733eb0",
"pubkey": "5bf1afb35e8202b7292991df510321d2b0b395e332a01860fde2804c61394aeb",
"created_at": 1717623973,
"kind": 1,
"tags": [
[
"proxy",
"https://trans.enby.town/objects/3417beda-febb-470a-90ab-45f8fed8ebdc",
"activitypub"
]
],
"content": "are there any programming languages that compile part of the code to one target and the rest to another? like i want to have a single codebase, and have some of the functions compiled for a backend binary and some of them compiled to wasm to use on the frontend\n\nlike if u wanna do this in rust, u have to set up two crates + a third shared one to keep common types, which is annoying",
"sig": "0d0110072431ac5ca2e2a4386f4e91611dc2688f9c2a4a52cb0bbbfbec90dda4fd5df945cda3a4509421dc411579dfbfe8fa4bfc058e51be4775dd13dc17d10f"
}