-
Notifications
You must be signed in to change notification settings - Fork 300
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
feat: Define MSRV #1314
feat: Define MSRV #1314
Changes from all commits
a17ded8
8491464
bcbaf7b
c38d195
a5a28e2
2fe7f4d
3e82135
9a529b2
cf9fa03
6035c3f
8c83bf2
80d3fb0
4184ca7
3f4b673
72ca507
a5b37fb
5061798
d141625
55a67fc
7be2ee1
fb2eb1f
0a7c0ef
62f3ba0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
fzyzcjy marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ launch.json | |
.local-chromium | ||
Makefile | ||
*.log | ||
.vscode | ||
.vscode | ||
*.bak |
gutenfries marked this conversation as resolved.
Show resolved
Hide resolved
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: we need to add a link to it from our book index |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# MSRV | ||
|
||
The MSRV (Minimum Supported Rust Version) is the oldest version of Rust that | ||
this crate is guaranteed to work with. | ||
|
||
The MSRV(s) for `flutter_rust_bridge` are as follows: | ||
|
||
| Channel | MSRV | | ||
| ------- | ---- | | ||
| stable | <!-- stable msrv --> `1.64+` | | ||
| nightly | <!-- nightly msrv --> `nightly-2022-07-15+` | | ||
Comment on lines
+10
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: It seems that we are repeating ourself for 3 times:
is it possible we somehow add a very quick sanity check for them, to ensure that they are always in sync? e.g. some quick python/shell/whatever script to extract MSRV from these 3 places, and check they are equal. Then we can add them to CI, so nobody will accidencially make MSRV not-in-sync EDIT: Oh I see, they are already auto generated from shell. Then what about this:
|
||
|
||
These versions are CI tested and _guaranteed_ to compile, | ||
given there are no external error factors. | ||
|
||
The MSRV is subject to change without prior notice in major/minor releases of `flutter_rust_bridge`, | ||
but we do our best to keep it as low as possible. | ||
|
||
The MSRV is also stated in the [`README.md`](/README.md). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
msrv = "1.64" | ||
|
||
# https://doc.rust-lang.org/nightly/clippy/lint_configuration.html#avoid-breaking-exported-api | ||
avoid-breaking-exported-api = true | ||
|
||
# https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods | ||
disallowed-methods = [ | ||
"std::time::Instant::now", # use `instant` crate instead for wasm/web compatibility | ||
"std::time::Duration::elapsed", # use `instant` crate instead for wasm/web compatibility | ||
"std::time::SystemTime::now", # use `instant` or `time` crates instead for wasm/web compatibility | ||
"std::thread::spawn", # Cannot spawn threads on wasm | ||
# TODO(@fzyzcjy): add methods here as needed | ||
gutenfries marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
] | ||
|
||
# https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_types | ||
disallowed-types = [ | ||
# TODO(@fzyzcjy): add types here as needed | ||
gutenfries marked this conversation as resolved.
Show resolved
Hide resolved
|
||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
cargo-features = ["workspace-inheritance"] | ||
|
||
[package] | ||
name = "flutter_rust_bridge" | ||
version.workspace = true | ||
|
@@ -31,15 +33,15 @@ console_error_panic_hook = { version = "0.1.7", optional = true } | |
wasm-bindgen = { version = "0.2.81" } | ||
js-sys = { version = "0.3.60" } | ||
web-sys = { version = "0.3.58", features = [ | ||
"DedicatedWorkerGlobalScope", | ||
"MessageEvent", | ||
"MessagePort", | ||
"ErrorEvent", | ||
"Blob", | ||
"BlobPropertyBag", | ||
"Worker", | ||
"Url", | ||
"BroadcastChannel", | ||
"DedicatedWorkerGlobalScope", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: it would be great if the old format could be kept, because someone else in the future may also automatically change the format via IDE automatically, then the code blame history will be a mess... but that's not a super big problem. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what toml formatter does the project use? If it is Taplo, perhaps a configuration file may be helpful (https://taplo.tamasfe.dev/configuration/file.html) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right, there is no format yet. I am just following flutter's convention: when there is no (auto) formatter, try to not change the code due to format. However, feel free to configure a formatter (e.g. Taplo)! Just ensure that
|
||
"MessageEvent", | ||
"MessagePort", | ||
"ErrorEvent", | ||
"Blob", | ||
"BlobPropertyBag", | ||
"Worker", | ||
"Url", | ||
"BroadcastChannel", | ||
] } | ||
|
||
[build-dependencies] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -194,6 +194,10 @@ ci_codegen: | |
just generate_all | ||
just check_no_git_diff | ||
|
||
msrv: | ||
bash tools/find_msrv.sh | ||
bash tools/find_nightly_msrv.sh | ||
Comment on lines
+198
to
+199
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: it seems that the files are renamed |
||
|
||
# ============================ misc ============================ | ||
|
||
clean: | ||
|
@@ -310,6 +314,9 @@ _install_crate name="cargo-lipo": | |
else | ||
echo "Already installed the correct version of $PACKAGE_NAME." | ||
fi | ||
|
||
|
||
|
||
# ============================ to be migrated ============================ | ||
|
||
# TODO - @Desdaemon | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nightly-2022-07-15 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: also add latest stable